Put service ticket in request scope.

@param context     the context
@param ticketValue the ticket value
762140
public static void putServiceTicketInRequestScope(final RequestContext context, final ServiceTicket ticketValue) {
        context.getRequestScope().put(PARAMETER_SERVICE_TICKET_ID, ticketValue.getId());
    }
1240137
public static void putServiceIntoFlashScope(final RequestContext context, final Service service) {
        context.getFlashScope().put(PARAMETER_SERVICE, service);
    }
1291456
public void updateServiceInstanceUri(String serviceName, String instanceId, String uri, final RegistrationCallback cb, Object context){
        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.UpdateServiceInstanceUri);

        UpdateServiceInstanceUriProtocol p = new UpdateServiceInstanceUriProtocol(serviceName, instanceId, uri);
        ProtocolCallback pcb = new ProtocolCallback(){

            @Override
            public void call(boolean result, Response response,
                    ErrorCode error, Object ctx) {
                cb.call(result, error, ctx);
            }

        };
        connection.submitCallbackRequest(header, p, pcb, context);
    }
66761
private void resetValues(FacesContext context) {
        Object resetValuesObject = context.getExternalContext().getRequestParameterMap().get(Constants.RequestParams.RESET_VALUES_PARAM);
        boolean resetValues = (null != resetValuesObject && "true".equals(resetValuesObject));

        if (resetValues) {
            VisitContext visitContext = null;
            ResetInputContextCallback contextCallback = null;

            for (String renderId : context.getPartialViewContext().getRenderIds()) {
                if (LangUtils.isValueBlank(renderId) || renderId.trim().equals(SearchExpressionConstants.NONE_KEYWORD)) {
                    continue;
                }

                // lazy init
                if (visitContext == null) {
                    visitContext = VisitContext.createVisitContext(context, null, ComponentUtils.VISIT_HINTS_SKIP_UNRENDERED);
                }

                if (renderId.equals(SearchExpressionConstants.ALL_KEYWORD)) {
                    context.getViewRoot().visitTree(visitContext, ResetInputVisitCallback.INSTANCE);
                }
                else {
                    // lazy init
                    if (contextCallback == null) {
                        contextCallback = new ResetInputContextCallback(visitContext);
                    }

                    context.getViewRoot().invokeOnComponent(context, renderId, contextCallback);
                }
            }
        }
    }
747433
public static void init(Context contextValue, ExecutorService service) {
		context = contextValue;

		if (service == null) {
			executerService = Executors.newFixedThreadPool(THREAD_POOL_SIZE_DEFAULT);
		} else {
			executerService = service;
		}

	}
314239
@com.fasterxml.jackson.annotation.JsonProperty("Context")
    public void setContext(String context) {
        this.context = context;
    }
704503
protected void setSuspended(boolean value, int detail)
	{
		suspended = value;
		if (value)
		{
			++modificationsCount;
		}

		if (value)
		{
			handler.handleSuspend(detail);
		} else
		{
			handler.handleResume(detail);
		}
	}
811344
public static void putTicketGrantingTicketInScopes(final RequestContext context, final TicketGrantingTicket ticket) {
        val ticketValue = ticket != null ? ticket.getId() : null;
        putTicketGrantingTicketInScopes(context, ticketValue);
    }
1325917
public void setRoutingDestination(JsDestinationAddress value) {
    if (value != null) {
      jmo.setField(ControlAccess.ROUTINGDESTINATION_VALUE_NAME, value.getDestinationName());
      if (value.getME() != null) {
        jmo.setField(ControlAccess.ROUTINGDESTINATION_VALUE_MEID, value.getME().toByteArray());
      }
      else {
        jmo.setField(ControlAccess.ROUTINGDESTINATION_VALUE_MEID, null);
      }
      jmo.setField(ControlAccess.ROUTINGDESTINATION_VALUE_BUSNAME, value.getBusName());
    }
    else {
      jmo.setChoiceField(ControlAccess.ROUTINGDESTINATION, ControlAccess.IS_ROUTINGDESTINATION_EMPTY);
    }
  }
579722
@Override
    public void addCongestionListener(CongestionListener listener) {
        this.listeners.add(listener);

        CongestionTicket[] ticketsList = getCongestionTicketsList();
        if (ticketsList != null) {
            for (CongestionTicket ticket : ticketsList) {
                listener.onCongestionStart(ticket);
            }
        }
    }
507402
@PostMapping(value = "/v1/tickets", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    public ResponseEntity<String> createTicketGrantingTicket(@RequestBody(required=false) final MultiValueMap<String, String> requestBody,
                                                             final HttpServletRequest request) {
        try {
            val tgtId = createTicketGrantingTicketForRequest(requestBody, request);
            return createResponseEntityForTicket(request, tgtId);
        } catch (final AuthenticationException e) {
            return RestResourceUtils.createResponseEntityForAuthnFailure(e, request, applicationContext);
        } catch (final BadRestRequestException e) {
            LOGGER.error(e.getMessage(), e);
            return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST);
        } catch (final Exception e) {
            LOGGER.error(e.getMessage(), e);
            return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
        }
    }
1026124
public void put(final Ticket ticket, final Ticket encodedTicket) {
        val metadata = this.ticketCatalog.find(ticket);
        val values = buildTableAttributeValuesMapFromTicket(ticket, encodedTicket);
        LOGGER.debug("Adding ticket id [{}] with attribute values [{}]", encodedTicket.getId(), values);
        val putItemRequest = new PutItemRequest(metadata.getProperties().getStorageName(), values);
        LOGGER.debug("Submitting put request [{}] for ticket id [{}]", putItemRequest, encodedTicket.getId());
        val putItemResult = amazonDynamoDBClient.putItem(putItemRequest);
        LOGGER.debug("Ticket added with result [{}]", putItemResult);
        getAll();
    }
214219
protected void createDeviceFingerPrintCookie(final RequestContext context, final HttpServletRequest request, final String cookieValue) {
        val response = WebUtils.getHttpServletResponseFromExternalWebflowContext(context);
        cookieGenerator.addCookie(request, response, cookieValue);
    }
457311
protected Set<Event> resolveMultifactorAuthenticationProvider(final Optional<RequestContext> context,
                                                                  final RegisteredService service,
                                                                  final Principal principal) {
        val globalPrincipalAttributeValueRegex = casProperties.getAuthn().getMfa().getGlobalPrincipalAttributeValueRegex();
        val providerMap = MultifactorAuthenticationUtils.getAvailableMultifactorAuthenticationProviders(ApplicationContextProvider.getApplicationContext());
        val providers = providerMap.values();
        if (providers.size() == 1 && StringUtils.isNotBlank(globalPrincipalAttributeValueRegex)) {
            return resolveSingleMultifactorProvider(context, service, principal, providers);
        }

        return resolveMultifactorProviderViaPredicate(context, service, principal, providers);
    }
1170621
public void setContextValves(Collection<? extends Valve> contextValves) {
		Assert.notNull(contextValves, "Valves must not be null");
		this.contextValves = new ArrayList<>(contextValves);
	}
19109
public void setRequest(Object request)
    {
        ExternalContext ctx = _MyFacesExternalContextHelper.firstInstance.get();
        
        if (ctx == null)
        {
            throw new UnsupportedOperationException();
        }
        
        ctx.setRequest(request);
    }
380687
public static String getTicketGrantingTicketId(final RequestContext context) {
        val tgtFromRequest = getTicketGrantingTicketIdFrom(context.getRequestScope());
        val tgtFromFlow = getTicketGrantingTicketIdFrom(context.getFlowScope());
        return tgtFromRequest != null ? tgtFromRequest : tgtFromFlow;
    }