public MutableAttributeMap<Object> getScope(RequestContext context) { return context.getRequestScope(); } },
protected MutableAttributeMap<Object> getScope() { return getRequiredRequestContext().getRequestScope(); } }
public boolean isReadOnly(ELContext elContext, Object base, Object property) { RequestContext requestContext = getRequestContext(); if (base != null || requestContext == null) { return false; } String attributeName = property.toString(); if (requestContext.getRequestScope().contains(attributeName)) { elContext.setPropertyResolved(true); return false; } else if (requestContext.getFlashScope().contains(attributeName)) { elContext.setPropertyResolved(true); return false; } else if (requestContext.inViewState() && requestContext.getViewScope().contains(attributeName)) { elContext.setPropertyResolved(true); return false; } else if (requestContext.getFlowScope().contains(attributeName)) { elContext.setPropertyResolved(true); return false; } else if (requestContext.getConversationScope().contains(attributeName)) { elContext.setPropertyResolved(true); return false; } else { return false; } }
public Class<?> getType(ELContext elContext, Object base, Object property) { RequestContext requestContext = getRequestContext(); if (base != null || requestContext == null) { return null; } String attributeName = property.toString(); if (requestContext.getRequestScope().contains(attributeName)) { elContext.setPropertyResolved(true); return requestContext.getRequestScope().get(attributeName).getClass(); } else if (requestContext.getFlashScope().contains(attributeName)) { elContext.setPropertyResolved(true); return requestContext.getFlashScope().get(attributeName).getClass(); } else if (requestContext.inViewState() && requestContext.getViewScope().contains(attributeName)) { elContext.setPropertyResolved(true); return requestContext.getViewScope().get(attributeName).getClass(); } else if (requestContext.getFlowScope().contains(attributeName)) { elContext.setPropertyResolved(true); return requestContext.getFlowScope().get(attributeName).getClass(); } else if (requestContext.getConversationScope().contains(attributeName)) { elContext.setPropertyResolved(true); return requestContext.getConversationScope().get(attributeName).getClass(); } else { return null; } }
public void setValue(ELContext elContext, Object base, Object property, Object value) { RequestContext requestContext = getRequestContext(); if (base != null || requestContext == null) { return; } String attributeName = property.toString(); if (requestContext.getRequestScope().contains(attributeName)) { elContext.setPropertyResolved(true); requestContext.getRequestScope().put(attributeName, value); } else if (requestContext.getFlashScope().contains(attributeName)) { elContext.setPropertyResolved(true); requestContext.getFlashScope().put(attributeName, value); } else if (requestContext.inViewState() && requestContext.getViewScope().contains(attributeName)) { elContext.setPropertyResolved(true); requestContext.getViewScope().put(attributeName, value); } else if (requestContext.getFlowScope().contains(attributeName)) { elContext.setPropertyResolved(true); requestContext.getFlowScope().put(attributeName, value); } else if (requestContext.getConversationScope().contains(attributeName)) { elContext.setPropertyResolved(true); requestContext.getConversationScope().put(attributeName, value); } }
public Object getValue(ELContext elContext, Object base, Object property) { RequestContext requestContext = getRequestContext(); if (base != null || requestContext == null) { return null; } String attributeName = property.toString(); if (requestContext.getRequestScope().contains(attributeName)) { elContext.setPropertyResolved(true); return requestContext.getRequestScope().get(attributeName); } else if (requestContext.getFlashScope().contains(attributeName)) { elContext.setPropertyResolved(true); return requestContext.getFlashScope().get(attributeName); } else if (requestContext.inViewState() && requestContext.getViewScope().contains(attributeName)) { elContext.setPropertyResolved(true); return requestContext.getViewScope().get(attributeName); } else if (requestContext.getFlowScope().contains(attributeName)) { elContext.setPropertyResolved(true); return requestContext.getFlowScope().get(attributeName); } else if (requestContext.getConversationScope().contains(attributeName)) { elContext.setPropertyResolved(true); return requestContext.getConversationScope().get(attributeName); } else { return null; } }
private MutableAttributeMap<Object> findScopeForAttribute(RequestContext requestContext, String name) { if (requestContext.getRequestScope().contains(name)) { return requestContext.getRequestScope(); } if (requestContext.getFlashScope().contains(name)) { return requestContext.getFlashScope(); } if (requestContext.inViewState() && requestContext.getViewScope().contains(name)) { return requestContext.getViewScope(); } if (requestContext.getFlowScope().contains(name)) { return requestContext.getFlowScope(); } if (requestContext.getConversationScope().contains(name)) { return requestContext.getConversationScope(); } return null; }
private Map<String, Object> flowScopes() { if (requestContext.getCurrentState().isViewState()) { return requestContext.getConversationScope().union(requestContext.getFlowScope()) .union(requestContext.getViewScope()).union(requestContext.getFlashScope()) .union(requestContext.getRequestScope()).asMap(); } else { return requestContext.getConversationScope().union(requestContext.getFlowScope()) .union(requestContext.getFlashScope()).union(requestContext.getRequestScope()).asMap(); } }
/** * Gets the service ticket from request scope. * * @param context the context * @return the service ticket from request scope */ public static String getServiceTicketFromRequestScope( final RequestContext context) { return context.getRequestScope().getString("serviceTicketId"); }
/** * Put service response into request scope. * * @param requestContext the request context * @param url the url */ public static void putServiceRedirectUrl(final RequestContext requestContext, final String url) { requestContext.getRequestScope().put("url", url); }
public Object getResponse() { if (this.context.getRequestScope().contains(CUSTOM_RESPONSE)) { return this.context.getRequestScope().get(CUSTOM_RESPONSE); } return super.getResponse(); }
public Object getResponse() { if (this.context.getRequestScope().contains(CUSTOM_RESPONSE)) { return this.context.getRequestScope().get(CUSTOM_RESPONSE); } return super.getResponse(); }
public Object getResponse() { if (context.getRequestScope().contains(CUSTOM_RESPONSE)) { return context.getRequestScope().get(CUSTOM_RESPONSE); } return delegate.getResponse(); }
/** * Put service ticket in request scope. * * @param context the context * @param ticketValue the ticket value */ public static void putServiceTicketInRequestScope(final RequestContext context, final ServiceTicket ticketValue) { context.getRequestScope().put(PARAMETER_SERVICE_TICKET_ID, ticketValue.getId()); }
/** * Put service ticket in request scope. * * @param context the context * @param ticketValue the ticket value */ public static void putServiceTicketInRequestScope( final RequestContext context, final ServiceTicket ticketValue) { context.getRequestScope().put("serviceTicketId", ticketValue.getId()); }
/** * Put service original url into request scope. * * @param requestContext the request context * @param service the service */ public static void putServiceOriginalUrlIntoRequestScope(final RequestContext requestContext, final WebApplicationService service) { requestContext.getRequestScope().put("originalUrl", service.getOriginalUrl()); }
/** * Put ticket granting ticket in request and flow scopes. * * @param context the context * @param ticketValue the ticket value */ public static void putTicketGrantingTicketInScopes( final RequestContext context, @NotNull final String ticketValue) { putTicketGrantingTicketIntoMap(context.getRequestScope(), ticketValue); putTicketGrantingTicketIntoMap(context.getFlowScope(), ticketValue); }
/** * Gets the ticket granting ticket id from the request and flow scopes. * * @param context the context * @return the ticket granting ticket id */ public static String getTicketGrantingTicketId(final RequestContext context) { val tgtFromRequest = getTicketGrantingTicketIdFrom(context.getRequestScope()); val tgtFromFlow = getTicketGrantingTicketIdFrom(context.getFlowScope()); return tgtFromRequest != null ? tgtFromRequest : tgtFromFlow; }
/** * Put service response into request scope. * * @param requestContext the request context * @param response the response */ public static void putServiceResponseIntoRequestScope(final RequestContext requestContext, final Response response) { requestContext.getRequestScope().put("parameters", response.getAttributes()); putServiceRedirectUrl(requestContext, response.getUrl()); }
private Map<String, Object> flowScopes() { if (requestContext.getCurrentState().isViewState()) { return requestContext.getConversationScope().union(requestContext.getFlowScope()) .union(requestContext.getViewScope()).union(requestContext.getFlashScope()) .union(requestContext.getRequestScope()).asMap(); } else { return requestContext.getConversationScope().union(requestContext.getFlowScope()) .union(requestContext.getFlashScope()).union(requestContext.getRequestScope()).asMap(); } }