Build ticket definition ticket.

@param plan   the plan
@param prefix the prefix
@param impl   the
@return the ticket definition
340377
protected TicketDefinition buildTicketDefinition(final TicketCatalog plan, final String prefix, final Class impl) {
        if (plan.contains(prefix)) {
            return plan.find(prefix);
        }
        return new DefaultTicketDefinition(impl, prefix, Ordered.LOWEST_PRECEDENCE);
    }
80653
@SneakyThrows
    protected Ticket decodeTicket(final Ticket result) {
        if (!isCipherExecutorEnabled()) {
            LOGGER.trace(MESSAGE);
            return result;
        }
        if (result == null) {
            LOGGER.warn("Ticket passed is null and cannot be decoded");
            return null;
        }
        if (!result.getClass().isAssignableFrom(EncodedTicket.class)) {
            LOGGER.warn("Ticket passed is not an encoded ticket type; rather it's a [{}], no decoding is necessary.", result.getClass().getSimpleName());
            return result;
        }
        LOGGER.debug("Attempting to decode [{}]", result);
        val encodedTicket = (EncodedTicket) result;
        val ticket = SerializationUtils.decodeAndDeserializeObject(encodedTicket.getEncodedTicket(), this.cipherExecutor, Ticket.class);
        LOGGER.debug("Decoded ticket to [{}]", ticket);
        return ticket;
    }
752428
static SuggestedFix makeFix(VisitorState state, Tree declaration) {
    SuggestedFix.Builder builder = SuggestedFix.builder();
    String qualifiedName = getQualifiedName(state, builder);
    return builder.prefixWith(declaration, "@" + qualifiedName + " ").build();
  }
175771
public static Plan retrieve(String plan) throws StripeException {
    return retrieve(plan, (Map<String, Object>) null, (RequestOptions) null);
  }
374473
private Ref impOp() throws PageException {
	Ref ref = eqvOp();
	while (cfml.forwardIfCurrentAndNoWordAfter("imp")) {
	    cfml.removeSpace();
	    ref = new Imp(ref, eqvOp(), limited);
	}
	return ref;
    }
366682
private Expression impOp(Data data) throws TemplateException {
	Expression expr = eqvOp(data);
	while (data.srcCode.forwardIfCurrentAndNoWordAfter("imp")) {
	    comments(data);
	    expr = data.factory.opBool(expr, eqvOp(data), Factory.OP_BOOL_IMP);
	}
	return expr;
    }
683720
@SneakyThrows
    protected String generateToken(final Service service, final Map<String, String> parameters) {
        val ticketId = parameters.get(CasProtocolConstants.PARAMETER_TICKET);
        return this.tokenTicketBuilder.build(ticketId, service);
    }
1176332
public static DiskInterface createLoggingProxy(final DiskInterface impl) {

        return (DiskInterface)Proxy.newProxyInstance(
            Thread.currentThread().getContextClassLoader(),
            new Class[] {DiskInterface.class},
            new InvocationHandler() {

                @SuppressWarnings("synthetic-access")
                public Object invoke(Object target, Method method, Object[] params) throws Throwable {

                    // Just to be on the safe side performance-wise, we only log the parameters/result
                    // if the info channel is enabled
                    if (LOG.isInfoEnabled()) {
                        List<String> paramStrings = new ArrayList<String>();
                        for (Object param : params) {
                            paramStrings.add("" + param);
                        }
                        String paramsAsString = CmsStringUtil.listAsString(paramStrings, ", ");
                        LOG.info("Call: " + method.getName() + " " + paramsAsString);
                    }
                    try {
                        Object result = method.invoke(impl, params);
                        if (LOG.isInfoEnabled()) {
                            LOG.info("Returned from " + method.getName() + ": " + result);
                        }
                        return result;
                    } catch (InvocationTargetException e) {
                        Throwable cause = e.getCause();
                        if ((cause != null) && (cause instanceof CmsSilentWrapperException)) {
                            // not really an error
                            LOG.info(cause.getCause().getLocalizedMessage(), cause.getCause());
                        } else {
                            LOG.error(e.getLocalizedMessage(), e);
                        }
                        throw e.getCause();
                    }
                }
            });
    }
716580
def write(self):
        
        if not hasattr(self, 'space'):
            raise AttributeError("A ticket must have a 'space' attribute before you can write it to Assembla.")

        if self.get('number'):  # Modifying an existing ticket
            method = self.space.api._put_json
        else:  # Creating a new ticket
            method = self.space.api._post_json

        return method(
            self,
            space=self.space,
            rel_path=self.space._build_rel_path('tickets'),
        )
241020
public <T> T populate(String prefix, Class<T> clazz, Set<Class> resolvedConfigs) {
        checkConfigurationClass(clazz);
        Map<Method, PropertyInfo> properties = resolve(prefix, clazz.getMethods(), resolvedConfigs);
        //noinspection unchecked
        return (T) Proxy.newProxyInstance(classLoader, new Class[]{clazz},
                new PropertiesProxy(properties));
    }
377683
public static String add(String prefix, String name) {
    return (prefix == null) ? name : prefix+"."+name;
  }
519746
public Ticket[] take() throws InterruptedException {
		Ticket[] tickets = new Ticket[buckets.size()];
		for (int i=0; i<tickets.length; i++) {
			tickets[i] = buckets.get(i).take();
		}
		
		return tickets;
	}
1065558
public SimpleOrderedMap<Object> create(ComponentPrefix prefix, Boolean encode)
      throws IOException {
    SimpleOrderedMap<Object> mtasPrefixResponse = new SimpleOrderedMap<>();
    mtasPrefixResponse.add("key", prefix.key);
    if (encode) {
      mtasPrefixResponse.add("_encoded_singlePosition",
          MtasSolrResultUtil.encode(prefix.singlePositionList));
      mtasPrefixResponse.add("_encoded_multiplePosition",
          MtasSolrResultUtil.encode(prefix.multiplePositionList));
      mtasPrefixResponse.add("_encoded_setPosition",
          MtasSolrResultUtil.encode(prefix.setPositionList));
      mtasPrefixResponse.add("_encoded_intersecting",
          MtasSolrResultUtil.encode(prefix.intersectingList));
    } else {
      mtasPrefixResponse.add("singlePosition", prefix.singlePositionList);
      mtasPrefixResponse.add("multiplePosition", prefix.multiplePositionList);
      mtasPrefixResponse.add("setPosition", prefix.setPositionList);
      mtasPrefixResponse.add("intersecting", prefix.intersectingList);
    }
    return mtasPrefixResponse;
  }
504604
protected void createCreateTicketGrantingTicketAction(final Flow flow) {
        val action = createActionState(flow, CasWebflowConstants.STATE_ID_CREATE_TICKET_GRANTING_TICKET, CasWebflowConstants.ACTION_ID_CREATE_TICKET_GRANTING_TICKET);
        createTransitionForState(action, CasWebflowConstants.TRANSITION_ID_SUCCESS_WITH_WARNINGS, CasWebflowConstants.STATE_ID_SHOW_AUTHN_WARNING_MSGS);
        createTransitionForState(action, CasWebflowConstants.TRANSITION_ID_SUCCESS, CasWebflowConstants.STATE_ID_SEND_TICKET_GRANTING_TICKET);
    }
283736
def ticket_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/tickets.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
1142685
public static RateLimiterExports ofSupplier(String prefix, Supplier<Iterable<RateLimiter>> rateLimitersSupplier) {
        return new RateLimiterExports(prefix, rateLimitersSupplier);
    }
713809
void createImpl() throws SocketException {
        if (impl == null)
            setImpl();
        try {
            impl.create(true);
            created = true;
        } catch (IOException e) {
            throw new SocketException(e.getMessage());
        }
    }