Class DCSServicesAction
java.lang.Object
org.apache.struts.action.Action
org.dlese.dpc.services.dcs.action.DCSServicesAction
public final class DCSServicesAction
extends org.apache.struts.action.Action
An Action that handles DCS related web service requests.
- Author:
- Jonathan Ostwald
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.apache.struts.action.Action
defaultLocale, servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.struts.action.ActionForwarddoExportCollection(HttpServletRequest request, HttpServletResponse response, RepositoryManager rm, DCSServicesForm dcssf, org.apache.struts.action.ActionMapping mapping) protected org.apache.struts.action.ActionForwarddoGetId(HttpServletRequest request, HttpServletResponse response, RepositoryManager rm, DCSServicesForm dcssf, org.apache.struts.action.ActionMapping mapping) Handles a request to generate an id for a specified collection.protected org.apache.struts.action.ActionForwarddoPutRecord(HttpServletRequest request, HttpServletResponse response, RepositoryManager rm, DCSServicesForm dcssf, org.apache.struts.action.ActionMapping mapping) Handles a request to put a metadata record into the repository.protected org.apache.struts.action.ActionForwarddoUpdateStatus(HttpServletRequest request, HttpServletResponse response, RepositoryManager rm, DCSServicesForm dcssf, org.apache.struts.action.ActionMapping mapping) Handles a request to put a metadata record into the repository.protected org.apache.struts.action.ActionForwarddoUrlCheck(HttpServletRequest request, HttpServletResponse response, RepositoryManager rm, DCSServicesForm dcssf, org.apache.struts.action.ActionMapping mapping) org.apache.struts.action.ActionForwardexecute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) Processes the DDS web service request by forwarding to the appropriate corresponding JSP page for rendering.protected static final StringReturn a string for the current time and date, sutiable for display in log files and output to standout:protected final voidOutput a line of text to standard out, with datestamp, if debug is set to true.protected final voidOutput a line of text to error out, with datestamp.static voidsetDebug(boolean db) Sets the debug attribute of the objectMethods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
-
Field Details
-
GET_ID_VERB
- See Also:
-
PUT_RECORD_VERB
- See Also:
-
UPDATE_STATUS_VERB
- See Also:
-
EXPORT_COLLECTION_VERB
- See Also:
-
URL_CHECK_VERB
- See Also:
-
-
Constructor Details
-
DCSServicesAction
public DCSServicesAction()
-
-
Method Details
-
execute
public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception Processes the DDS web service request by forwarding to the appropriate corresponding JSP page for rendering.- Overrides:
executein classorg.apache.struts.action.Action- Parameters:
mapping- The ActionMapping used to select this instanceform- The ActionForm for the given pagerequest- The HTTP request we are processingresponse- The HTTP response we are creating- Returns:
- The ActionForward instance describing where and how control should be forwarded
- Throws:
Exception- If error.
-
doGetId
protected org.apache.struts.action.ActionForward doGetId(HttpServletRequest request, HttpServletResponse response, RepositoryManager rm, DCSServicesForm dcssf, org.apache.struts.action.ActionMapping mapping) throws Exception Handles a request to generate an id for a specified collection.Arguments: collection key.
Error Exception Conditions:
badArgument - The request includes illegal arguments.- Parameters:
request- The HTTP requestresponse- The HTTP responserm- The RepositoryManager useddcssf- The beanmapping- ActionMapping used- Returns:
- An ActionForward to the JSP page that will handle the response
- Throws:
Exception- If error.
-
doUrlCheck
protected org.apache.struts.action.ActionForward doUrlCheck(HttpServletRequest request, HttpServletResponse response, RepositoryManager rm, DCSServicesForm dcssf, org.apache.struts.action.ActionMapping mapping) throws Exception - Throws:
Exception
-
doPutRecord
protected org.apache.struts.action.ActionForward doPutRecord(HttpServletRequest request, HttpServletResponse response, RepositoryManager rm, DCSServicesForm dcssf, org.apache.struts.action.ActionMapping mapping) throws Exception Handles a request to put a metadata record into the repository. WrapsRepositoryManager.putRecord and therefore requires the same arguments.Currently allows existing records to be overwritten.
Arguments: recordXml, xmlFormat, collection, and id.
Error Exception Conditions:
badArgument - The request includes illegal arguments.- Parameters:
request- The HTTP requestresponse- The HTTP responserm- The RepositoryManager useddcssf- The Form beanmapping- ActionMapping used- Returns:
- An ActionForward to the JSP page that will handle the response
- Throws:
Exception- If error.
-
doUpdateStatus
protected org.apache.struts.action.ActionForward doUpdateStatus(HttpServletRequest request, HttpServletResponse response, RepositoryManager rm, DCSServicesForm dcssf, org.apache.struts.action.ActionMapping mapping) throws Exception Handles a request to put a metadata record into the repository. WrapsRepositoryManager.putRecord and therefore requires the same arguments.Currently allows existing records to be overwritten.
Arguments: id, dcsStatus, dcsStatusNode (optional), and dcsStatusEditor(optional).
Error Exception Conditions:
badArgument - The request includes illegal or missing arguments.- Parameters:
request- The HTTP requestresponse- The HTTP responserm- The RepositoryManager useddcssf- The Form beanmapping- ActionMapping used- Returns:
- An ActionForward to the JSP page that will handle the response
- Throws:
Exception- If error.
-
doExportCollection
protected org.apache.struts.action.ActionForward doExportCollection(HttpServletRequest request, HttpServletResponse response, RepositoryManager rm, DCSServicesForm dcssf, org.apache.struts.action.ActionMapping mapping) throws Exception - Throws:
Exception
-
getDateStamp
Return a string for the current time and date, sutiable for display in log files and output to standout:- Returns:
- The dateStamp value
-
prtlnErr
Output a line of text to error out, with datestamp.- Parameters:
s- The text that will be output to error out.
-
prtln
Output a line of text to standard out, with datestamp, if debug is set to true.- Parameters:
s- The String that will be output.
-
setDebug
public static void setDebug(boolean db) Sets the debug attribute of the object- Parameters:
db- The new debug value
-