DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.action
Class DCSAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by 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 Summary
protected  AccessManager accessManager
           
protected  CollectionRegistry collectionRegistry
           
protected  DcsDataManager dcsDataManager
           
protected  FrameworkRegistry frameworkRegistry
           
protected  boolean ndrServiceEnabled
           
protected  RepositoryManager repositoryManager
           
protected  RepositoryService repositoryService
           
protected  Roles.Role requiredRole
           
protected  SessionRegistry sessionRegistry
           
protected  UserManager userManager
           
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
DCSAction()
           
 
Method Summary
protected  MetaDataFramework getMetaDataFramework(String xmlFormat)
          Gets the MetaDataFramework from the frameworkRegistry for the specified xmlFormat.
protected  Object getRequiredContextAttributeValue(String attrName, org.apache.struts.action.ActionErrors errors)
          Gets the requiredContextAttributeValue attribute of the DCSAction object
protected  SessionBean getSessionBean(HttpServletRequest request)
          Gets the sessionBean using the supplied request ojbect
protected  User getSessionUser(HttpServletRequest request)
          Gets the sessionUser using the supplied Request.
protected  User getSessionUser(SessionBean sessionBean)
          Gets the sessionUser from the supplied SessionBean object.
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.
 org.apache.struts.action.ActionErrors initializeFromContext(org.apache.struts.action.ActionMapping mapping, HttpServletRequest request)
          Processes the specified HTTP request and creates the corresponding HTTP response by forwarding to a JSP that will create it.
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frameworkRegistry

protected FrameworkRegistry frameworkRegistry

collectionRegistry

protected CollectionRegistry collectionRegistry

sessionRegistry

protected SessionRegistry sessionRegistry

repositoryManager

protected RepositoryManager repositoryManager

repositoryService

protected RepositoryService repositoryService

accessManager

protected AccessManager accessManager

userManager

protected UserManager userManager

dcsDataManager

protected DcsDataManager dcsDataManager

requiredRole

protected Roles.Role requiredRole

ndrServiceEnabled

protected boolean ndrServiceEnabled
Constructor Detail

DCSAction

public DCSAction()
Method Detail

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

DLESE Tools
v1.6.0