public abstract class DSpaceObject extends Object
| Constructor and Description |
|---|
DSpaceObject() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDetails(String d)
Add a string to the cache of event details.
|
protected void |
clearDetails()
Reset the cache of event details.
|
static DSpaceObject |
find(Context context,
int type,
int id)
Generic find for when the precise type of a DSO is not known, just the
a pair of type number and database ID.
|
DSpaceObject |
getAdminObject(int action)
Return the dspace object where an ADMIN action right is sufficient to
grant the initial authorize check.
|
protected String |
getDetails() |
abstract String |
getHandle()
Get the Handle of the object.
|
abstract int |
getID()
Get the internal ID (database primary key) of this object
|
abstract String |
getName()
Get a proper name for the object.
|
DSpaceObject |
getParentObject()
Return the dspace object that "own" the current object in the hierarchy.
|
abstract int |
getType()
Get the type of this object, found in Constants
|
String |
getTypeText()
Provide the text name of the type of this DSpaceObject.
|
abstract void |
update() |
abstract void |
updateLastModified() |
protected void clearDetails()
protected void addDetails(String d)
d - detail string to add.protected String getDetails()
public abstract int getType()
public String getTypeText()
public abstract int getID()
public abstract String getHandle()
nullnull if it doesn't have
onepublic abstract String getName()
null.
Name should be suitable for display in a user interface.null if it doesn't have
onepublic static DSpaceObject find(Context context, int type, int id) throws SQLException
context - - the contexttype - - type numberid - - id within table of type'd objectsSQLException - only upon failure accessing the database.public DSpaceObject getAdminObject(int action) throws SQLException
Default behaviour is ADMIN right on the object grant right on all other action on the object itself. Subclass should override this method as needed.
action - ID of action being attempted, from
org.dspace.core.Constants. The ADMIN action is
not a valid parameter for this method, an
IllegalArgumentException should be thrownSQLExceptionIllegalArgumentException - if the ADMIN action is supplied as parameter of the method
callpublic DSpaceObject getParentObject() throws SQLException
SQLExceptionpublic abstract void update()
throws SQLException,
AuthorizeException
SQLExceptionAuthorizeExceptionpublic abstract void updateLastModified()
Copyright © 2014 DuraSpace. All Rights Reserved.