Class OaiPmhServer

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.opencastproject.oaipmh.server.OaiPmhServer
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, org.opencastproject.oaipmh.server.OaiPmhServerInfo

public final class OaiPmhServer extends javax.servlet.http.HttpServlet implements org.opencastproject.oaipmh.server.OaiPmhServerInfo
The OAI-PMH server. Backed by an arbitrary amount of OAI-PMH repositories.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    activate(org.osgi.service.component.ComponentContext cc)
    OSGi component activation.
    void
     
    protected void
    doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
     
    protected void
    doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
     
     
    boolean
     
    void
    modified(org.osgi.service.component.ComponentContext cc)
     
    static org.opencastproject.util.data.Option<String>
    repositoryId(javax.servlet.http.HttpServletRequest req, String mountPoint)
    Retrieve the repository id from the requested path.
    void
    OSGi DI.
    void
    setSecurityService(org.opencastproject.security.api.SecurityService securityService)
    OSGi DI.
    void
    OSGi DI.
    void
    updated(Dictionary<String,?> properties)
    Called by the ConfigurationAdmin service.

    Methods inherited from class javax.servlet.http.HttpServlet

    doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service

    Methods inherited from class javax.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OaiPmhServer

      public OaiPmhServer()
  • Method Details

    • setRepository

      public void setRepository(OaiPmhRepository r)
      OSGi DI.
    • unsetRepository

      public void unsetRepository(OaiPmhRepository r)
      OSGi DI.
    • setSecurityService

      public void setSecurityService(org.opencastproject.security.api.SecurityService securityService)
      OSGi DI.
    • activate

      public void activate(org.osgi.service.component.ComponentContext cc) throws org.osgi.service.cm.ConfigurationException
      OSGi component activation.
      Throws:
      org.osgi.service.cm.ConfigurationException
    • modified

      public void modified(org.osgi.service.component.ComponentContext cc) throws org.osgi.service.cm.ConfigurationException
      Throws:
      org.osgi.service.cm.ConfigurationException
    • deactivate

      public void deactivate()
    • updated

      public void updated(Dictionary<String,?> properties) throws org.osgi.service.cm.ConfigurationException
      Called by the ConfigurationAdmin service. This method actually sets up the server.
      Throws:
      org.osgi.service.cm.ConfigurationException
    • doGet

      protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException
      Overrides:
      doGet in class javax.servlet.http.HttpServlet
      Throws:
      javax.servlet.ServletException
      IOException
    • doPost

      protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException
      Overrides:
      doPost in class javax.servlet.http.HttpServlet
      Throws:
      javax.servlet.ServletException
      IOException
    • repositoryId

      public static org.opencastproject.util.data.Option<String> repositoryId(javax.servlet.http.HttpServletRequest req, String mountPoint)
      Retrieve the repository id from the requested path.
      Parameters:
      req - the HTTP request
      mountPoint - the base path of the OAI-PMH server, e.g. /oaipmh
    • hasRepo

      public boolean hasRepo(String id)
      Specified by:
      hasRepo in interface org.opencastproject.oaipmh.server.OaiPmhServerInfo
    • getMountPoint

      public String getMountPoint()
      Specified by:
      getMountPoint in interface org.opencastproject.oaipmh.server.OaiPmhServerInfo