Package org.mycore.pi.purl
Class MCRPURLService
-
Nested Class Summary
Nested classes/interfaces inherited from class org.mycore.pi.MCRPIJobService
MCRPIJobService.PiJobAction
-
Field Summary
Fields inherited from class org.mycore.pi.MCRPIJobService
CREATION_PREDICATE, JOB_API_USER_PROPERTY, REGISTRATION_PREDICATE
Fields inherited from class org.mycore.pi.MCRPIService
GENERATOR_CONFIG_PREFIX, GENERATOR_PROPERTY_KEY, METADATA_SERVICE_CONFIG_PREFIX, METADATA_SERVICE_PROPERTY_KEY, PI_FLAG, REGISTRATION_CONFIG_PREFIX, TRANSLATE_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
buildTargetURL
(String objId) protected void
Should handle deletion of a Object with the PI.void
protected void
doWithPURLManager
(Consumer<MCRPURLManager> action) getJobInformation
(Map<String, String> contextParameters) Result of this will be passed toMCRJobAction.name()
insertIdentifierToDatabase
(MCRBase obj, String additional, MCRPURL identifier) protected void
registerIdentifier
(MCRBase obj, String additional, MCRPURL purl) void
registerJob
(Map<String, String> parameters) protected void
Should handle updates of a Object with the PI.void
Methods inherited from class org.mycore.pi.MCRPIJobService
addDeleteJob, addRegisterJob, addUpdateJob, checkConfiguration, getAction, getRegistrationCondition, parseIdentifier, rollbackDeleteJob, rollbackRegisterJob, rollbackUpdateJob, runAsJobUser, updateRegistrationDate, updateStartRegistrationDate, validateJobUserRights
Methods inherited from class org.mycore.pi.MCRPIService
addFlagToObject, getCreationPredicate, getGenerator, getGson, getMetadataService, getNewIdentifier, getPredicateInstance, getProperties, getRegistrationPredicate, getServiceID, getTableEntry, getType, hasFlag, hasFlag, hasRegistrationStarted, init, isCreated, isRegistered, onDelete, onUpdate, provideRegisterDate, register, register, register, removeFlagFromObject, requireNotEmptyProperty, setProperties, updateFlag, updateFlagsInDatabase, validateAlreadyCreated, validatePermission, validateRegistration, validateRegistration
-
Constructor Details
-
MCRPURLService
public MCRPURLService()
-
-
Method Details
-
registerJob
- Specified by:
registerJob
in classMCRPIJobService<MCRPURL>
- Throws:
MCRPersistentIdentifierException
-
buildTargetURL
-
getJobInformation
Description copied from class:MCRPIJobService
Result of this will be passed toMCRJobAction.name()
- Specified by:
getJobInformation
in classMCRPIJobService<MCRPURL>
- Parameters:
contextParameters
- the parameters of the job- Returns:
- Some Information what this job will do or just
Optional.empty()
, then a default message is generated.
-
updateJob
- Specified by:
updateJob
in classMCRPIJobService<MCRPURL>
- Throws:
MCRPersistentIdentifierException
-
deleteJob
- Specified by:
deleteJob
in classMCRPIJobService<MCRPURL>
-
insertIdentifierToDatabase
- Overrides:
insertIdentifierToDatabase
in classMCRPIService<MCRPURL>
-
registerIdentifier
protected void registerIdentifier(MCRBase obj, String additional, MCRPURL purl) throws MCRPersistentIdentifierException - Specified by:
registerIdentifier
in classMCRPIService<MCRPURL>
- Throws:
MCRPersistentIdentifierException
-
delete
protected void delete(MCRPURL identifier, MCRBase obj, String additional) throws MCRPersistentIdentifierException Description copied from class:MCRPIService
Should handle deletion of a Object with the PI. E.g. TheMCRDOIService
sets the active flag in Datacite datacentre to false.- Specified by:
delete
in classMCRPIService<MCRPURL>
- Parameters:
identifier
- the Identifierobj
- the deleted object- Throws:
MCRPersistentIdentifierException
- to abort deletion of the object or if something went wrong, (e.g.MCRDOIService
throws if not a superuser tries to delete the object)
-
update
protected void update(MCRPURL purl, MCRBase obj, String additional) throws MCRPersistentIdentifierException Description copied from class:MCRPIService
Should handle updates of a Object with the PI. E.g. TheMCRDOIService
sends the updated metadata to the Datacite datacentre.- Specified by:
update
in classMCRPIService<MCRPURL>
- Parameters:
purl
- the Identifierobj
- the deleted object- Throws:
MCRPersistentIdentifierException
- to abort update of the object or if something went wrong.
-
doWithPURLManager
-