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 -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) OSGi component activation.voidprotected voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) protected voiddoPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) booleanvoidmodified(org.osgi.service.component.ComponentContext cc) repositoryId(javax.servlet.http.HttpServletRequest req, String mountPoint) Retrieve the repository id from the requested path.voidOSGi DI.voidsetSecurityService(org.opencastproject.security.api.SecurityService securityService) OSGi DI.voidOSGi DI.voidupdated(Dictionary<String, ?> properties) Called by the ConfigurationAdmin service.Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
Constructor Details
-
OaiPmhServer
public OaiPmhServer()
-
-
Method Details
-
setRepository
OSGi DI. -
unsetRepository
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.ConfigurationExceptionCalled 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:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException - Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
repositoryId
public static Optional<String> repositoryId(javax.servlet.http.HttpServletRequest req, String mountPoint) Retrieve the repository id from the requested path.- Parameters:
req- the HTTP requestmountPoint- the base path of the OAI-PMH server, e.g. /oaipmh
-
hasRepo
- Specified by:
hasRepoin interfaceorg.opencastproject.oaipmh.server.OaiPmhServerInfo
-
getMountPoint
- Specified by:
getMountPointin interfaceorg.opencastproject.oaipmh.server.OaiPmhServerInfo
-