Package org.mycore.frontend.basket
Class MCRBasketServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.mycore.frontend.servlets.MCRServlet
org.mycore.frontend.basket.MCRBasketServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
Provides the web front end to manage baskets and their contents.
Required parameter is the type of basket and the action to perform.
For a basket of objects, possible requests would be:
BasketServlet?type=objects&action=show
to output the contents of the objects basket using basket-{type}.xsl
BasketServlet?type=objects&action=clear
to remove all entries in the objects basket.
BasketServlet?type=objects&action=add&id=DocPortal_document_00774301&uri=mcrobject:DocPortal_document_00774301
to add a new entry with ID DocPortal_document_00774301 to the basket,
reading its contents from URI mcrobject:DocPortal_document_00774301
BasketServlet?type=objects&action=add&id=DocPortal_document_00774301&uri=mcrobject:DocPortal_document_00774301&resolve=true
to add a new entry with ID DocPortal_document_00774301 to the basket,
immediately resolving content from the given URI.
BasketServlet?type=objects&action=remove&id=DocPortal_document_00774301
to remove the entry with ID DocPortal_document_00774301 from the basket
BasketServlet?type=objects&action=up&id=DocPortal_document_00774301
to move the entry with ID DocPortal_document_00774301 one position up in the basket
BasketServlet?type=objects&action=down&id=DocPortal_document_00774301
to move the entry with ID DocPortal_document_00774301 one position down in the basket
BasketServlet?type=objects&action=comment&id=DocPortal_document_00774301
to change the comment stored in the basket. This is called
using EditorServlet submission, see basket-edit.xml for an example.
BasketServlet?type=objects&action=create&ownerID=DocPortal_basket_01234567
to store a basket in a new file "basket" in a new derivate that is owned by the metadata object
with the given ownerID.
BasketServlet?type=objects&action=update
to update a persistent basket in its derivate - that is the derivate the basket was loaded from.
BasketServlet?action=retrieve&derivateID=DocPortal_derivate_12345678
to retrieve a basket's data from a file "basket.xml" in the given derivate into the current user's session.
- Author:
- Frank Lützenkirchen
- See Also:
-
Field Summary
Fields inherited from class org.mycore.frontend.servlets.MCRServlet
ATTR_MYCORE_SESSION, CURRENT_THREAD_NAME_KEY, INITIAL_SERVLET_NAME_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doGetPost
(MCRServletJob job) This method should be overwritten by other servlets.Methods inherited from class org.mycore.frontend.servlets.MCRServlet
allowCrossDomainRequests, buildRedirectURL, cleanupMCRSession, doGet, doGet, doPost, doPost, getErrorI18N, getLastModified, getLayoutService, getProperty, getReferer, getServletBaseURL, getSession, handleException, init, initializeMCRSession, render, reportException, think, toReferrer, toReferrer
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, service, service
Methods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Field Details
-
ALLOW_LIST_PROPERTY_NAME
- See Also:
-
-
Constructor Details
-
MCRBasketServlet
public MCRBasketServlet()
-
-
Method Details
-
doGetPost
Description copied from class:MCRServlet
This method should be overwritten by other servlets. As a default response we indicate the HTTP 1.1 status code 501 (Not Implemented).- Overrides:
doGetPost
in classMCRServlet
- Throws:
Exception
-