|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fcrepo.server.Parameterized
org.fcrepo.server.Pluggable
org.fcrepo.server.Module
org.fcrepo.server.storage.DefaultDOManager
public class DefaultDOManager
Manages the reading and writing of digital objects by instantiating an appropriate object reader or writer. Also, manages the object ingest process and the object replication process.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.fcrepo.common.Constants |
|---|
Constants.FedoraHome |
| Field Summary | |
|---|---|
protected Connection |
m_connection
|
protected ConnectionPool |
m_connectionPool
|
protected ExternalContentManager |
m_contentManager
|
protected FieldSearch |
m_fieldSearch
|
protected FedoraStorageHintProvider |
m_hintProvider
|
protected Management |
m_management
|
protected ILowlevelStorage |
m_permanentStore
|
protected PIDGenerator |
m_pidGenerator
|
protected ResourceIndex |
m_resourceIndex
|
protected Set<String> |
m_retainPIDs
|
protected String |
m_storagePool
|
protected DOTranslator |
m_translator
|
protected DOValidator |
m_validator
|
| Constructor Summary | |
|---|---|
DefaultDOManager(Map<String,String> moduleParameters,
Server server,
String role)
Creates a new DefaultDOManager. |
|
| Method Summary | |
|---|---|
void |
doCommit(boolean cachedObjectRequired,
Context context,
DigitalObject obj,
String logMessage,
boolean remove)
The doCommit method finalizes an ingest/update/remove of a digital object. |
FieldSearchResult |
findObjects(Context context,
String[] resultFields,
int maxResults,
FieldSearchQuery query)
|
ConnectionPool |
getConnectionPool()
|
String |
getDefaultExportFormat()
|
DOValidator |
getDOValidator()
|
DOWriter |
getIngestWriter(boolean cachedObjectRequired,
Context context,
InputStream in,
String format,
String encoding,
String pid)
Manages the INGEST process which includes validation of the ingest XML file, deserialization of the XML into a Digital Object instance, setting of properties on the object by the system (dates and states), PID validation or generation, object registry functions, getting a writer for the digital object, and ultimately writing the object to persistent storage via the writer. |
String[] |
getNextPID(int numPIDs,
String namespace)
Gets a list of the requested next available PIDs. |
DOReader |
getReader(boolean cachedObjectRequired,
Context context,
String pid)
Gets a reader on an an existing digital object. |
String |
getRepositoryHash()
Get a "hash" of the repository. |
String[] |
getRequiredModuleRoles()
Gets the names of the roles that are required by this Pluggable. |
ServiceDefinitionReader |
getServiceDefinitionReader(boolean cachedObjectRequired,
Context context,
String pid)
Gets a reader on an an existing service definition object. |
ServiceDeploymentReader |
getServiceDeploymentReader(boolean cachedObjectRequired,
Context context,
String pid)
Gets a reader on an an existing service deployment object. |
String |
getStorageCharacterEncoding()
|
String |
getStorageFormat()
|
DOTranslator |
getTranslator()
|
DOWriter |
getWriter(boolean cachedObjectRequired,
Context context,
String pid)
Gets a writer on an an existing object. |
void |
initModule()
Gets initial param values. |
protected void |
initRetainPID()
|
String[] |
listObjectPIDs(Context context)
Gets a list of PIDs (accessible in the given context) of all objects in the repository. |
String |
lookupDeploymentForCModel(String cModelPid,
String sDefPid)
|
boolean |
objectExists(String pid)
Checks the object registry for the given object. |
void |
postInitModule()
Second stage of Module initialization. |
void |
releaseWriter(DOWriter writer)
Relinquishes control of a DOWriter back to the DOManager. |
void |
reservePIDs(String[] pidList)
Reserve a series of PIDs so that they are never used for subsequent PID generations. |
FieldSearchResult |
resumeFindObjects(Context context,
String sessionToken)
|
void |
shutdownModule()
Frees system resources allocated by this Module. |
static String |
toSql(String name,
String in)
|
| Methods inherited from class org.fcrepo.server.Module |
|---|
getRole, getServer |
| Methods inherited from class org.fcrepo.server.Pluggable |
|---|
getHelp, getOptionalParameters, getParameterHelp, getRequiredParameters |
| Methods inherited from class org.fcrepo.server.Parameterized |
|---|
getParameter, getParameter, getParameter, getParameterList, getParameters, getParameters, parameterNames, setParameter, setParameters, setParameters |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String m_storagePool
protected PIDGenerator m_pidGenerator
protected DOTranslator m_translator
protected ILowlevelStorage m_permanentStore
protected FedoraStorageHintProvider m_hintProvider
protected DOValidator m_validator
protected FieldSearch m_fieldSearch
protected ExternalContentManager m_contentManager
protected Management m_management
protected Set<String> m_retainPIDs
protected ResourceIndex m_resourceIndex
protected ConnectionPool m_connectionPool
protected Connection m_connection
| Constructor Detail |
|---|
public DefaultDOManager(Map<String,String> moduleParameters,
Server server,
String role)
throws ModuleInitializationException
ModuleInitializationException| Method Detail |
|---|
public void initModule()
throws ModuleInitializationException
initModule in class ModuleModuleInitializationException - If initialization values are invalid or initialization fails for
some other reason.protected void initRetainPID()
public void postInitModule()
throws ModuleInitializationException
Module
postInitModule in class ModuleModuleInitializationException - If initialization values are invalid or initialization fails for
some other reason.
public String lookupDeploymentForCModel(String cModelPid,
String sDefPid)
lookupDeploymentForCModel in interface DOManagerpublic void shutdownModule()
Module
shutdownModule in class Modulepublic void releaseWriter(DOWriter writer)
DOManagerWhen a DOManager provides a DOWriter, it creates a session lock. This is used to guarantee that there will never be concurrent changes to the same object. To release the session lock, a DOWriter user calls this method.
releaseWriter in interface DOManagerwriter - an instance of a digital object writer.public ConnectionPool getConnectionPool()
public DOValidator getDOValidator()
public String[] getRequiredModuleRoles()
PluggablePluggable.
By default, no roles need to be fulfilled.
getRequiredModuleRoles in class Pluggablepublic String getStorageFormat()
public String getDefaultExportFormat()
public String getStorageCharacterEncoding()
public DOTranslator getTranslator()
public DOReader getReader(boolean cachedObjectRequired,
Context context,
String pid)
throws ServerException
getReader in interface RepositoryReadercontext - The context of this request.pid - The PID of the object.
ServerException - If anything went wrong.
public ServiceDeploymentReader getServiceDeploymentReader(boolean cachedObjectRequired,
Context context,
String pid)
throws ServerException
getServiceDeploymentReader in interface RepositoryReaderServerException
public ServiceDefinitionReader getServiceDefinitionReader(boolean cachedObjectRequired,
Context context,
String pid)
throws ServerException
getServiceDefinitionReader in interface RepositoryReaderServerException
public DOWriter getWriter(boolean cachedObjectRequired,
Context context,
String pid)
throws ServerException,
ObjectLockedException
getWriter in interface DOManagercontext - The context of this request.pid - The PID of the object.
ServerException - If anything went wrong.
ObjectLockedException
public DOWriter getIngestWriter(boolean cachedObjectRequired,
Context context,
InputStream in,
String format,
String encoding,
String pid)
throws ServerException
getIngestWriter in interface DOManagercontext - in - the input stream that is the XML ingest file for a digital
objectformat - the format of the XML ingest file (e.g., FOXML, Fedora METS)encoding - the character encoding of the XML ingest file (e.g., UTF-8)pid - "new" if the system should generate a new PID for the object,
otherwise the value of the additional pid parameter for
ingests (may be null or any valid pid)
ServerException - If anything went wrong.
public void doCommit(boolean cachedObjectRequired,
Context context,
DigitalObject obj,
String logMessage,
boolean remove)
throws ServerException
ServerException
public boolean objectExists(String pid)
throws StorageDeviceException
objectExists in interface DOManagerStorageDeviceException
public String[] listObjectPIDs(Context context)
throws StorageDeviceException
RepositoryReader
listObjectPIDs in interface RepositoryReaderStorageDeviceException
public static String toSql(String name,
String in)
public FieldSearchResult findObjects(Context context,
String[] resultFields,
int maxResults,
FieldSearchQuery query)
throws ServerException
findObjects in interface DOManagerServerException
public FieldSearchResult resumeFindObjects(Context context,
String sessionToken)
throws ServerException
resumeFindObjects in interface DOManagerServerException
public String[] getNextPID(int numPIDs,
String namespace)
throws ServerException
Gets a list of the requested next available PIDs. the number of PIDs.
getNextPID in interface DOManagernumPIDs - The number of PIDs to generate. Defaults to 1 if the number is
not a positive integer.namespace - The namespace to be used when generating the PIDs. If null,
the namespace defined by the pidNamespace parameter in
the fedora.fcfg configuration file is used.
ServerException - If an error occurs in generating the PIDs.
public void reservePIDs(String[] pidList)
throws ServerException
DOManager
reservePIDs in interface DOManagerServerException
public String getRepositoryHash()
throws ServerException
DOManager
getRepositoryHash in interface DOManagerServerException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||