fedora.server.storage
Class GSearchDOManager
java.lang.Object
fedora.server.Parameterized
fedora.server.Pluggable
fedora.server.Module
fedora.server.storage.DefaultDOManager
fedora.server.storage.GSearchDOManager
- All Implemented Interfaces:
- Constants, DOManager, RepositoryReader
public class GSearchDOManager
- extends DefaultDOManager
DefaultDOManager extension that updates a GSearch (Fedora
Generic Search) service as object changes are committed.
To use, simply change fedora.fcfg, replacing "DefaultDOManager"
with "GSearchDOManager", and add the following xml param elements:
Required:
- <param name="gSearchRESTURL"
value="http://localhost:8080/fedoragsearch/rest"/>
Optional (only needed if basic auth is required for GSearch REST access):
- <param name="gSearchUsername" value="exampleUsername"/>
- <param name="gSearchPassword" value="examplePassword"/>
- Author:
- cwilper@cs.cornell.edu
|
Field Summary |
static java.lang.String |
GSEARCH_PASSWORD
Optional param: Password to use for GSearch authentication. |
static java.lang.String |
GSEARCH_REST_URL
Required param: URL of GSearch REST interface. |
static java.lang.String |
GSEARCH_USERNAME
Optional param: User to authenticate to GSearch as. |
| Fields inherited from class fedora.server.storage.DefaultDOManager |
DEFAULT_STATE, m_connection, m_connectionPool, m_contentManager, m_fieldSearch, m_management, m_permanentStore, m_pidGenerator, m_replicator, m_resourceIndex, m_retainPIDs, m_storagePool, m_translator, m_validator |
| Fields inherited from interface fedora.common.Constants |
ACTION, BDEF, BMECH, DATASTREAM, DC, DISSEMINATOR, ENVIRONMENT, FEDORA, FEDORA_HOME, FEDORA_SYSTEM_DEF_PID, FEDORA_SYSTEM_DEF_URI, HTTP_REQUEST, MODEL, OBJECT, RDF, RECOVERY, RELS_EXT, RESOURCE, SUBJECT, TUCANA, VIEW, XSD |
|
Constructor Summary |
GSearchDOManager(java.util.Map moduleParameters,
Server server,
java.lang.String role)
Delegates construction to the superclass. |
|
Method Summary |
void |
doCommit(boolean cachedObjectRequired,
Context context,
DigitalObject obj,
java.lang.String logMessage,
boolean remove)
Commits the changes to the given object as usual, then attempts
to propagate the change to the GSearch service. |
void |
postInitModule()
Performs superclass post-initialization, then completes initialization
using GSearch-specific parameters. |
| Methods inherited from class fedora.server.storage.DefaultDOManager |
findObjects, getBDefReader, getBMechReader, getConnectionPool, getDefaultExportFormat, getDOValidator, getIngestWriter, getNextPID, getOwnerId, getReader, getReplicator, getRepositoryHash, getRequiredModuleRoles, getStorageCharacterEncoding, getStorageFormat, getTranslator, getWriter, initModule, initRetainPID, listObjectPIDs, objectExists, releaseWriter, reservePIDs, resumeFindObjects, shutdownModule, toSql |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GSEARCH_REST_URL
public static final java.lang.String GSEARCH_REST_URL
- Required param: URL of GSearch REST interface.
- See Also:
- Constant Field Values
GSEARCH_USERNAME
public static final java.lang.String GSEARCH_USERNAME
- Optional param: User to authenticate to GSearch as.
- See Also:
- Constant Field Values
GSEARCH_PASSWORD
public static final java.lang.String GSEARCH_PASSWORD
- Optional param: Password to use for GSearch authentication.
- See Also:
- Constant Field Values
GSearchDOManager
public GSearchDOManager(java.util.Map moduleParameters,
Server server,
java.lang.String role)
throws ModuleInitializationException
- Delegates construction to the superclass.
- Throws:
ModuleInitializationException
postInitModule
public void postInitModule()
throws ModuleInitializationException
- Performs superclass post-initialization, then completes initialization
using GSearch-specific parameters.
- Overrides:
postInitModule in class DefaultDOManager
- Throws:
ModuleInitializationException - If initialization values are
invalid or initialization fails for some other reason.
doCommit
public void doCommit(boolean cachedObjectRequired,
Context context,
DigitalObject obj,
java.lang.String logMessage,
boolean remove)
throws ServerException
- Commits the changes to the given object as usual, then attempts
to propagate the change to the GSearch service.
- Overrides:
doCommit in class DefaultDOManager
- Throws:
ServerException