Class DCSAction

java.lang.Object
org.apache.struts.action.Action
org.dlese.dpc.schemedit.action.DCSAction
Direct Known Subclasses:
AbstractSchemEditAction, AccessManagerAction, BatchOperationsAction, CollectionAccessAction, CollectionIntegrationAction, CollectionServicesAction, CreateRecordAction, DCSAdminAction, DCSBrowseAction, DCSQueryAction, DCSViewAction, FrameworkAdminAction, NDRAction, RecommenderAction, RecordOperationsAction, SchemEditAdminAction, SessionInfoAction, SessionsAction, SIFReferenceAction, StaticRecordAction, StatusAction, UserInfoAction, UserManagerAction

public class DCSAction extends org.apache.struts.action.Action
Base Action class that sets up access to global structures as instance variables. NOTE: using instance variables this way in an Action is dangerous. We have to at least make sure we don't use any session-specific variables this way, since the Action class is shared by all threads, and the session-specific vars may be re-assigned by another thread.
Author:
Jonathan Ostwald
  • Field Details

  • Constructor Details

    • DCSAction

      public DCSAction()
  • Method Details

    • initializeFromContext

      public org.apache.struts.action.ActionErrors initializeFromContext(org.apache.struts.action.ActionMapping mapping, HttpServletRequest request) throws IOException, ServletException
      Processes the specified HTTP request and creates the corresponding HTTP response by forwarding to a JSP that will create it. A RepositoryManager must be available to this class via a ServletContext attribute under the key "repositoryManager." Returns an ActionForward instance which must be configured in struts-config.xml to forward to the JSP page that will handle the request.
      Parameters:
      mapping - The ActionMapping used to select this instance
      request - The HTTP request we are processing
      Returns:
      The ActionForward instance describing where and how control should be forwarded
      Throws:
      IOException - if an input/output error occurs
      ServletException - if a servlet exception occurs
    • getRequiredContextAttributeValue

      protected Object getRequiredContextAttributeValue(String attrName, org.apache.struts.action.ActionErrors errors) throws Exception
      Gets the requiredContextAttributeValue attribute of the DCSAction object
      Parameters:
      attrName - name of attribute to get
      errors - place holder to return error message
      Returns:
      The requiredContextAttributeValue value
      Throws:
      Exception - if attribute is not found in ServletContext
    • getMetaDataFramework

      protected MetaDataFramework getMetaDataFramework(String xmlFormat)
      Gets the MetaDataFramework from the frameworkRegistry for the specified xmlFormat.
      Parameters:
      xmlFormat - format of framework to get
      Returns:
      framework, or null if specified framework is not found.
    • getSessionBean

      protected SessionBean getSessionBean(HttpServletRequest request)
      Gets the sessionBean using the supplied request ojbect
      Parameters:
      request - the Request
      Returns:
      The sessionBean value
    • getSessionUser

      protected User getSessionUser(SessionBean sessionBean)
      Gets the sessionUser from the supplied SessionBean object.
      Parameters:
      sessionBean - the SessionBean
      Returns:
      The sessionUser value
    • getSessionUser

      protected User getSessionUser(HttpServletRequest request)
      Gets the sessionUser using the supplied Request.
      Parameters:
      request - the Request
      Returns:
      The sessionUser value
    • getSessionUserName

      protected String getSessionUserName(HttpServletRequest request)
      Returns the userName of the current sessionUser (as determined from the supplied Request object) or the UNKNOWN_EDITOR value if a user is not found.
      Parameters:
      request - the Request
      Returns:
      The sessionUserName value