Class DDSRepositoryUpdateServiceAction
java.lang.Object
org.apache.struts.action.Action
org.dlese.dpc.services.dds.action.DDSRepositoryUpdateServiceAction
public final class DDSRepositoryUpdateServiceAction
extends org.apache.struts.action.Action
An Action that implements a RESTful Web service for performing updates to a DDS repository.
- Author:
- John Weatherley
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDelete Collectionstatic final StringDeleteRecordstatic final StringPutCollectionstatic final StringPutRecordFields inherited from class org.apache.struts.action.Action
defaultLocale, servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.struts.action.ActionForwarddoDeleteCollection(HttpServletRequest request, HttpServletResponse response, RepositoryManager repositoryManager, DDSRepositoryUpdateServiceForm ddsusf, org.apache.struts.action.ActionMapping mapping) Handles a request to delete a collection from a DDS repository.protected org.apache.struts.action.ActionForwarddoDeleteRecord(HttpServletRequest request, HttpServletResponse response, RepositoryManager repositoryManager, DDSRepositoryUpdateServiceForm ddsusf, org.apache.struts.action.ActionMapping mapping) Handles a request to delete a metadata record into a DDS repository.protected org.apache.struts.action.ActionForwarddoPutCollection(HttpServletRequest request, HttpServletResponse response, RepositoryManager repositoryManager, DDSRepositoryUpdateServiceForm ddsusf, org.apache.struts.action.ActionMapping mapping) Handles a request to put a collection into a DDS repository.protected org.apache.struts.action.ActionForwarddoPutRecord(HttpServletRequest request, HttpServletResponse response, RepositoryManager repositoryManager, DDSRepositoryUpdateServiceForm ddsusf, org.apache.struts.action.ActionMapping mapping) Handles a request to put a metadata record into a DDS repository.org.apache.struts.action.ActionForwardexecute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, HttpServletRequest request, HttpServletResponse response) Processes the 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
-
PUT_RECORD_VERB
PutRecord- See Also:
-
DELETE_RECORD_VERB
DeleteRecord- See Also:
-
PUT_COLLECTION_VERB
PutCollection- See Also:
-
DELETE_COLLECTION_VERB
Delete Collection- See Also:
-
-
Constructor Details
-
DDSRepositoryUpdateServiceAction
public DDSRepositoryUpdateServiceAction()
-
-
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 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.
-
doPutCollection
protected org.apache.struts.action.ActionForward doPutCollection(HttpServletRequest request, HttpServletResponse response, RepositoryManager repositoryManager, DDSRepositoryUpdateServiceForm ddsusf, org.apache.struts.action.ActionMapping mapping) throws Exception Handles a request to put a collection into a DDS repository.- Parameters:
request- The HTTP requestresponse- The HTTP responseddsusf- The Form beanmapping- ActionMapping usedrm- The RepositoryManager used- Returns:
- An ActionForward to the JSP page that will handle the response
- Throws:
Exception- If error.
-
doDeleteCollection
protected org.apache.struts.action.ActionForward doDeleteCollection(HttpServletRequest request, HttpServletResponse response, RepositoryManager repositoryManager, DDSRepositoryUpdateServiceForm ddsusf, org.apache.struts.action.ActionMapping mapping) throws Exception Handles a request to delete a collection from a DDS repository.- Parameters:
request- The HTTP requestresponse- The HTTP responseddsusf- The Form beanmapping- ActionMapping usedrm- The RepositoryManager used- Returns:
- An ActionForward to the JSP page that will handle the response
- Throws:
Exception- If error.
-
doPutRecord
protected org.apache.struts.action.ActionForward doPutRecord(HttpServletRequest request, HttpServletResponse response, RepositoryManager repositoryManager, DDSRepositoryUpdateServiceForm ddsusf, org.apache.struts.action.ActionMapping mapping) throws Exception Handles a request to put a metadata record into a DDS repository. WrapsRepositoryManager.putRecord and therefore requires the same arguments.- Parameters:
request- The HTTP requestresponse- The HTTP responseddsusf- The Form beanmapping- ActionMapping usedrm- The RepositoryManager used- Returns:
- An ActionForward to the JSP page that will handle the response
- Throws:
Exception- If error.
-
doDeleteRecord
protected org.apache.struts.action.ActionForward doDeleteRecord(HttpServletRequest request, HttpServletResponse response, RepositoryManager repositoryManager, DDSRepositoryUpdateServiceForm ddsusf, org.apache.struts.action.ActionMapping mapping) throws Exception Handles a request to delete a metadata record into a DDS repository.- Parameters:
request- The HTTP requestresponse- The HTTP responseddsusf- The Form beanmapping- ActionMapping usedrm- The RepositoryManager used- Returns:
- An ActionForward to the JSP page that will handle the response
- Throws:
Exception- If error.
-
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
-