Package org.dlese.dpc.schemedit.action
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 Summary
FieldsModifier and TypeFieldDescriptionprotected AccessManagerprotected CollectionRegistryprotected DcsDataManagerprotected FrameworkRegistryprotected booleanprotected RepositoryManagerprotected RepositoryServiceprotected Roles.Roleprotected SessionRegistryprotected UserManagerFields inherited from class org.apache.struts.action.Action
defaultLocale, servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MetaDataFrameworkgetMetaDataFramework(String xmlFormat) Gets the MetaDataFramework from the frameworkRegistry for the specified xmlFormat.protected ObjectgetRequiredContextAttributeValue(String attrName, org.apache.struts.action.ActionErrors errors) Gets the requiredContextAttributeValue attribute of the DCSAction objectprotected SessionBeangetSessionBean(HttpServletRequest request) Gets the sessionBean using the supplied request ojbectprotected UsergetSessionUser(HttpServletRequest request) Gets the sessionUser using the supplied Request.protected UsergetSessionUser(SessionBean sessionBean) Gets the sessionUser from the supplied SessionBean object.protected StringgetSessionUserName(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.ActionErrorsinitializeFromContext(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
-
Field Details
-
frameworkRegistry
-
collectionRegistry
-
sessionRegistry
-
repositoryManager
-
repositoryService
-
accessManager
-
userManager
-
dcsDataManager
-
requiredRole
-
ndrServiceEnabled
protected boolean ndrServiceEnabled
-
-
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. ARepositoryManagermust be available to this class via a ServletContext attribute under the key "repositoryManager." Returns anActionForwardinstance 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 instancerequest- 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 occursServletException- 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 geterrors- place holder to return error message- Returns:
- The requiredContextAttributeValue value
- Throws:
Exception- if attribute is not found in ServletContext
-
getMetaDataFramework
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
Gets the sessionBean using the supplied request ojbect- Parameters:
request- the Request- Returns:
- The sessionBean value
-
getSessionUser
Gets the sessionUser from the supplied SessionBean object.- Parameters:
sessionBean- the SessionBean- Returns:
- The sessionUser value
-
getSessionUser
Gets the sessionUser using the supplied Request.- Parameters:
request- the Request- Returns:
- The sessionUser value
-
getSessionUserName
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
-