public class DefaultDOManager extends Module implements DOManager
Constants.FedoraHome| Modifier and Type | Field and Description |
|---|---|
static String |
CMODEL_QUERY |
static String |
INSERT_PID_QUERY |
protected boolean |
m_checkableStore |
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 |
static String |
PID_VERSION_QUERY |
static String |
PID_VERSION_UPDATE |
static String |
REGISTERED_PID_QUERY |
ACCESS, ACTION, API, ATOM_APIM1_0, ATOM_ZIP1_1, ATOM1_1, AUDIT, AUDIT1_0, BATCH_MODIFY, BATCH_MODIFY1_1, BE_SECURITY, BE_SECURITY1_0, BINDING_SPEC, DATASTREAM, DC, DISSEMINATOR, DS_COMPOSITE_MODEL, DS_COMPOSITE_MODEL1_0, DS_INPUT_SPEC1_0, DS_INPUT_SPEC1_1, ENVIRONMENT, FCFG, FEDORA, FEDORA_APP_CONTEXT_NAME, FEDORA_DEFAULT_APP_CONTEXT, FEDORA_HOME, FEDORA_REPOSITORY_PID, FOXML, FOXML1_0, FOXML1_0_LEGACY, FOXML1_1, HTTP_REQUEST, MANAGEMENT, METHOD_MAP, METS, METS_EXT, METS_EXT1_0, METS_EXT1_0_LEGACY, METS_EXT1_1, MODEL, MULGARA, OAI_DC, OAI_DC2_0, OAI_FRIENDS, OAI_FRIENDS2_0, OAI_IDENTIFIER, OAI_IDENTIFIER2_0, OAI_PMH, OAI_PMH2_0, OAI_PROV, OAI_PROV2_0, OBJ_DATASTREAMS1_0, OBJ_HISTORY1_0, OBJ_ITEMS1_0, OBJ_METHODS1_0, OBJ_PROFILE1_0, OBJ_VALIDATION1_0, OBJECT, OLD_XLINK, PID_LIST1_0, RDF, RDF_XSD, RECOVERY, RELS_EXT, RELS_EXT1_0, RELS_INT1_0, REPO_DESC1_0, RESOURCE, SDEF, SDEF_METHOD_MAP1_0, SDEP, SDEP_METHOD_MAP1_0, SDEP_METHOD_MAP1_1, SERVICE_PROFILE, SOAP, SOAP_ENC, SUBJECT, TYPES, VIEW, WSDL, WSDL_HTTP, WSDL_MIME, XACML_POLICY, XACML_POLICY1_0, XACML1, XACML1_ACTION, XACML1_POLICY, XACML1_RESOURCE, XACML1_SUBJECT, XACML2_POLICY_SCHEMA, XLINK, XML_XSD, XMLNS, XSI| Constructor and Description |
|---|
DefaultDOManager(Map<String,String> moduleParameters,
Server server,
String role)
Creates a new DefaultDOManager.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected boolean |
objectExistsInRegistry(String pid) |
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) |
getHelp, getOptionalParameters, getParameterHelp, getRequiredParametersgetParameter, getParameter, getParameter, getParameterList, getParameters, getParameters, parameterNames, setParameter, setParameters, setParameterspublic static String CMODEL_QUERY
public static String REGISTERED_PID_QUERY
public static String INSERT_PID_QUERY
public static String PID_VERSION_QUERY
public static String PID_VERSION_UPDATE
protected String m_storagePool
protected PIDGenerator m_pidGenerator
protected DOTranslator m_translator
protected ILowlevelStorage m_permanentStore
protected boolean m_checkableStore
protected FedoraStorageHintProvider m_hintProvider
protected DOValidator m_validator
protected FieldSearch m_fieldSearch
protected ExternalContentManager m_contentManager
protected Management m_management
protected ResourceIndex m_resourceIndex
protected ConnectionPool m_connectionPool
protected Connection m_connection
public DefaultDOManager(Map<String,String> moduleParameters, Server server, String role) throws ModuleInitializationException
ModuleInitializationExceptionpublic 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
ModulepostInitModule 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()
ModuleshutdownModule 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 RepositoryReaderServerExceptionpublic ServiceDefinitionReader getServiceDefinitionReader(boolean cachedObjectRequired, Context context, String pid) throws ServerException
getServiceDefinitionReader in interface RepositoryReaderServerExceptionpublic 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.ObjectLockedExceptionpublic 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
ServerExceptionpublic boolean objectExists(String pid) throws StorageDeviceException
objectExists in interface DOManagerStorageDeviceExceptionprotected boolean objectExistsInRegistry(String pid) throws StorageDeviceException
StorageDeviceExceptionpublic String[] listObjectPIDs(Context context) throws StorageDeviceException
RepositoryReaderlistObjectPIDs in interface RepositoryReaderStorageDeviceExceptionpublic FieldSearchResult findObjects(Context context, String[] resultFields, int maxResults, FieldSearchQuery query) throws ServerException
findObjects in interface DOManagerServerExceptionpublic FieldSearchResult resumeFindObjects(Context context, String sessionToken) throws ServerException
resumeFindObjects in interface DOManagerServerExceptionpublic 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
DOManagerreservePIDs in interface DOManagerServerExceptionpublic String getRepositoryHash() throws ServerException
DOManagergetRepositoryHash in interface DOManagerServerExceptionCopyright © 2013 DuraSpace. All Rights Reserved.