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,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) Return the mount point of the server, e.g.booleanCheck if the requested repo exists.voidmodified(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(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
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 Option<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
Description copied from interface:OaiPmhServerInfoCheck if the requested repo exists.- Specified by:
hasRepoin interfaceOaiPmhServerInfo
-
getMountPoint
Description copied from interface:OaiPmhServerInfoReturn the mount point of the server, e.g. /oaipmh. This is not the full base url like http://localhost:8080/oaipmh but only the path.- Specified by:
getMountPointin interfaceOaiPmhServerInfo
-