Class WebServiceContextFactory

java.lang.Object
com.appiancorp.services.ServiceContextFactory
com.appiancorp.services.WebServiceContextFactory

public class WebServiceContextFactory extends ServiceContextFactory
Used to manufacture the ServiceContext used within the product and in other web applications.
  • Constructor Details

    • WebServiceContextFactory

      public WebServiceContextFactory()
  • Method Details

    • getServiceContext

      public static ServiceContext getServiceContext(javax.servlet.http.HttpServletRequest q_)
      Gets the ServiceContext associated with the user data in the HttpServletRequest's HttpSession. If there is no ServiceContext associated with the user data, it creates a new WebServiceContext for the web session. If there is no user data in the HttpSession, it returns null.
      Parameters:
      q_ - the request
      Returns:
      the service context
    • getServiceContext

      public static ServiceContext getServiceContext(javax.servlet.http.HttpServletRequest q_, String username_, String grantorUsername)
      Get the ServiceContext for the request and username. If the request has a context associated with it and the context's username is the same as the username passed in, returns the context. If the context's username is different or no context exists, return a new WebServiceContext.
      Parameters:
      q_ - the request
      username_ - the web user's username
      grantorUsername - the name of the user granting privilege escalation
      Returns:
      the context
    • getServiceContext

      public static ServiceContext getServiceContext(javax.servlet.http.HttpServletRequest q_, com.appiancorp.services.ASLIdentity id_)
      Gets the ServiceContext for the request and ASLIdentity. If the request has a context associated with it and the context's username is the same as the username associated with the ASLIdentity argument, returns the context. If the context's username is different or no context exists, return a new WebServiceContext.
      Parameters:
      q_ - the request
      id_ - the ASLIdentity
      Returns:
      the context
    • getServiceContext

      public static ServiceContext getServiceContext(javax.servlet.http.HttpSession session_)
      Gets the ASLIdentity from the session and gets a service context for it. If there is no ASLIdentity in the session, returns null.
      Parameters:
      session_ - the session
      Returns:
      the context
    • getServiceContext

      public static ServiceContext getServiceContext(javax.servlet.http.HttpSession session_, com.appiancorp.services.ASLIdentity id, String grantorUsername)
      Gets the ServiceContext for the session and ASLIdentity. If the session has a context associated with it and the context's username is the same as the username associated with the ASLIdentity argument, returns the context. If the context's username is different or no context exists, return a new WebServiceContext.
      Parameters:
      session_ - the session
      id - the ASLIdentity
      grantorUsername -
      Returns:
      the context