public class HandleUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static CommunityService |
communityService |
protected static String |
DSPACE_OBJECT |
protected static String |
HANDLE_PREFIX
The URL prefix of all handles
|
protected static HandleService |
handleService |
| Constructor and Description |
|---|
HandleUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
buildHandleTrail(Context context,
DSpaceObject dso,
PageMeta pageMeta,
String contextPath)
Build a list of trail metadata starting with the owning collection and
ending with the root level parent.
|
static void |
buildHandleTrail(Context context,
DSpaceObject dso,
PageMeta pageMeta,
String contextPath,
boolean linkOriginalObject)
Build a list of trail metadata starting with the owning collection and
ending with the root level parent.
|
static boolean |
inheritsFrom(DSpaceObject dso,
String parent)
Determine if the given DSO is an ancestor of the the parent handle.
|
static DSpaceObject |
obtainHandle(Map objectModel)
Obtain the current DSpace handle for the specified request.
|
protected static final String HANDLE_PREFIX
protected static final String DSPACE_OBJECT
protected static final CommunityService communityService
protected static final HandleService handleService
public static DSpaceObject obtainHandle(Map objectModel) throws SQLException
objectModel - The cocoon model.SQLException - passed through.public static boolean inheritsFrom(DSpaceObject dso, String parent) throws SQLException
dso - The child DSO object.parent - The Handle to test against.SQLException - passed through.public static void buildHandleTrail(Context context, DSpaceObject dso, PageMeta pageMeta, String contextPath) throws SQLException, WingException
If the terminal object in the trail is the passed object, do not link to it, because that is (presumably) the page at which the user has arrived.
context - session context.dso - the DSpace who's parents we will add to the pageMetapageMeta - the object to which we link our trialcontextPath - The context pathSQLException - passed through.WingException - passed through.public static void buildHandleTrail(Context context, DSpaceObject dso, PageMeta pageMeta, String contextPath, boolean linkOriginalObject) throws SQLException, WingException
If the terminal object in the trail is the passed object, do not link to it, because that is (presumably) the page at which the user has arrived.
context - session context.dso - the DSpace who's parents we will add to the pageMetapageMeta - the object to which we link our trialcontextPath - The context pathlinkOriginalObject - whether or not to make a link of the original objectSQLException - passed through.WingException - passed through.Copyright © 2016 DuraSpace. All rights reserved.