@Component public class VersionedHandleIdentifierProvider extends IdentifierProvider
configurationService, parentService| Constructor and Description |
|---|
VersionedHandleIdentifierProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
createId(int id)
Create a new handle id.
|
protected String |
createNewIdentifier(Context context,
DSpaceObject dso,
String handleId) |
protected VersionImpl |
createVersion(Context c,
VersionHistory vh,
Item item,
String summary,
Date date,
int versionNumber) |
void |
delete(Context context,
DSpaceObject dso) |
void |
delete(Context context,
DSpaceObject dso,
String identifier) |
protected static TableRow |
findHandleInternal(Context context,
String handle)
Find the database row corresponding to handle.
|
protected String |
getCanonical(Item item) |
protected String |
getCanonical(String identifier) |
protected static String |
getCanonicalForm(String handle) |
protected static TableRow |
getHandleInternal(Context context,
int type,
int id)
Return the handle for an Object, or null if the Object has no handle.
|
protected int |
getNextVersionNumer(Version latest) |
static String |
getPrefix()
Get the configured Handle prefix string, or a default
|
String |
lookup(Context context,
DSpaceObject dso) |
protected String |
makeIdentifierBasedOnHistory(Context context,
DSpaceObject dso,
String handleId,
VersionHistory history) |
String |
mint(Context context,
DSpaceObject dso)
Creates a new handle in the database.
|
protected void |
modifyHandleMetadata(Item item,
String handle) |
protected String |
modifyHandleRecord(Context context,
DSpaceObject dso,
TableRow handle,
String handleId) |
protected void |
populateHandleMetadata(Item item) |
String |
register(Context context,
DSpaceObject dso) |
void |
register(Context context,
DSpaceObject dso,
String identifier) |
void |
reserve(Context context,
DSpaceObject dso,
String identifier) |
DSpaceObject |
resolve(Context context,
String identifier,
String... attributes) |
static String |
retrieveHandleOutOfUrl(String url) |
protected VersionHistory |
retrieveVersionHistory(Context c,
Item item) |
void |
setVersionDAO(VersionDAO versionDAO) |
void |
setVersionHistoryDAO(VersionHistoryDAO versionHistoryDAO) |
boolean |
supports(Class<? extends Identifier> identifier) |
boolean |
supports(String identifier) |
setConfigurationService, setParentServicepublic boolean supports(Class<? extends Identifier> identifier)
supports in class IdentifierProviderpublic boolean supports(String identifier)
supports in class IdentifierProviderpublic String register(Context context, DSpaceObject dso)
register in class IdentifierProviderpublic void register(Context context, DSpaceObject dso, String identifier)
register in class IdentifierProviderpublic void reserve(Context context, DSpaceObject dso, String identifier)
reserve in class IdentifierProviderpublic String mint(Context context, DSpaceObject dso)
mint in class IdentifierProvidercontext - DSpace contextdso - The DSpaceObject to create a handle forpublic DSpaceObject resolve(Context context, String identifier, String... attributes)
resolve in class IdentifierProviderpublic String lookup(Context context, DSpaceObject dso) throws IdentifierNotFoundException, IdentifierNotResolvableException
lookup in class IdentifierProviderIdentifierNotFoundExceptionIdentifierNotResolvableExceptionpublic void delete(Context context, DSpaceObject dso, String identifier) throws IdentifierException
delete in class IdentifierProviderIdentifierExceptionpublic void delete(Context context, DSpaceObject dso) throws IdentifierException
delete in class IdentifierProviderIdentifierExceptionpublic static String retrieveHandleOutOfUrl(String url) throws SQLException
SQLExceptionpublic static String getPrefix()
protected String createNewIdentifier(Context context, DSpaceObject dso, String handleId) throws SQLException
SQLExceptionprotected String makeIdentifierBasedOnHistory(Context context, DSpaceObject dso, String handleId, VersionHistory history) throws AuthorizeException, SQLException
AuthorizeExceptionSQLExceptionprotected String modifyHandleRecord(Context context, DSpaceObject dso, TableRow handle, String handleId) throws SQLException
SQLExceptionprotected static TableRow findHandleInternal(Context context, String handle) throws SQLException
context - DSpace contexthandle - The handle to resolveSQLException - If a database error occursprotected static TableRow getHandleInternal(Context context, int type, int id) throws SQLException
context - DSpace contexttype - The type of objectid - The id of objectSQLException - If a database error occursprotected static String createId(int id) throws SQLException
SQLException - If a database error occursprotected VersionHistory retrieveVersionHistory(Context c, Item item)
protected void populateHandleMetadata(Item item) throws SQLException, IOException, AuthorizeException
protected void modifyHandleMetadata(Item item, String handle) throws SQLException, IOException, AuthorizeException
protected VersionImpl createVersion(Context c, VersionHistory vh, Item item, String summary, Date date, int versionNumber)
protected int getNextVersionNumer(Version latest)
public void setVersionDAO(VersionDAO versionDAO)
public void setVersionHistoryDAO(VersionHistoryDAO versionHistoryDAO)
Copyright © 2015 DuraSpace. All Rights Reserved.