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

public class MCRBasketServlet extends MCRServlet
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 Details

  • Constructor Details

    • MCRBasketServlet

      public MCRBasketServlet()
  • Method Details

    • doGetPost

      public void doGetPost(MCRServletJob job) throws Exception
      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 class MCRServlet
      Throws:
      Exception