Package org.dlese.dpc.vocab
Class MetadataVocabServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.dlese.dpc.vocab.MetadataVocabServlet
- All Implemented Interfaces:
Serializable,Servlet,ServletConfig
Provided as an intialization (and administrative) servlet for the DLESE
Metadata UI system (OPML-based controlled vocabularies)
- Author:
- Ryan Deardorff
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(MetadataVocabReloadListener listener) Registers a Listener to be notified of MetadataVocabReloadEvents.voiddestroy()Shut down sequence.voiddoPost(HttpServletRequest request, HttpServletResponse response) Standard doPost method forwards to doGetstatic StringReturn a string for the current time and date, sutiable for display in log files and output to standout:voidinit(ServletConfig config) The standardHttpServletinit method, called only when the servlet is first loaded.voidLoad/reload a vocab instance (invoked by newVocabsChecker when it detects that the base loader file timestamp has changed)voidremoveListener(MetadataVocabReloadListener listener) Description of the Methodfinal voidsetDebug(boolean db) Sets the debug attribute of the DDSServlet objectstatic voidsynchWithCollectionManager(ServletContext context) Grab the MetadataVocab and RepositoryManager from the servlet context, and if both exist, invoke the synchronization of the CM "enabled" states with their corresponding vocabulary "display" states.Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceMethods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
MetadataVocabServlet
public MetadataVocabServlet()Constructor for the MetadataServlet object
-
-
Method Details
-
init
The standardHttpServletinit method, called only when the servlet is first loaded.- Specified by:
initin interfaceServlet- Overrides:
initin classGenericServlet- Parameters:
config-- Throws:
ServletException
-
loadVocabs
public void loadVocabs()Load/reload a vocab instance (invoked by newVocabsChecker when it detects that the base loader file timestamp has changed) -
synchWithCollectionManager
Grab the MetadataVocab and RepositoryManager from the servlet context, and if both exist, invoke the synchronization of the CM "enabled" states with their corresponding vocabulary "display" states.- Parameters:
context-
-
addListener
Registers a Listener to be notified of MetadataVocabReloadEvents.- Parameters:
listener- The feature to be added to the Listener attribute
-
removeListener
Description of the Method- Parameters:
listener- Description of the Parameter
-
destroy
public void destroy()Shut down sequence.- Specified by:
destroyin interfaceServlet- Overrides:
destroyin classGenericServlet
-
doPost
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException Standard doPost method forwards to doGet- Overrides:
doPostin classHttpServlet- Parameters:
request-response-- Throws:
ServletExceptionIOException
-
getDateStamp
Return a string for the current time and date, sutiable for display in log files and output to standout:- Returns:
- The dateStamp value
-
setDebug
public final void setDebug(boolean db) Sets the debug attribute of the DDSServlet object- Parameters:
db- The new debug value
-