public class ResourcePolicy
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TYPE_CUSTOM |
static java.lang.String |
TYPE_INHERITED |
static java.lang.String |
TYPE_SUBMISSION |
static java.lang.String |
TYPE_WORKFLOW |
| Modifier and Type | Method and Description |
|---|---|
static ResourcePolicy |
create(Context context)
Create a new ResourcePolicy
|
void |
delete()
Delete an ResourcePolicy
|
boolean |
equals(java.lang.Object obj)
Return true if this object equals obj, false otherwise.
|
static ResourcePolicy |
find(Context context,
int id)
Get an ResourcePolicy from the database.
|
int |
getAction() |
java.lang.String |
getActionText() |
java.util.Date |
getEndDate()
Get end date for the policy
|
EPerson |
getEPerson()
get EPerson this policy relates to
|
int |
getEPersonID() |
Group |
getGroup()
gets Group for this policy
|
int |
getGroupID()
gets ID for Group referred to by this policy
|
int |
getID()
Get the ResourcePolicy's internal identifier
|
int |
getResourceID()
Get the ID of a resource pointed to by the policy (is null if policy
doesn't apply to a single resource.)
|
int |
getResourceType()
Get the type of the objects referred to by policy
|
java.lang.String |
getRpDescription() |
java.lang.String |
getRpName() |
java.lang.String |
getRpType() |
java.util.Date |
getStartDate()
Get the start date of the policy
|
int |
hashCode()
Return a hash code for this object.
|
boolean |
isDateValid()
figures out if the date is valid for the policy
|
void |
setAction(int myid)
set the action this policy authorizes
|
void |
setEndDate(java.util.Date d)
Set end date for the policy
|
void |
setEPerson(EPerson e)
assign an EPerson to this policy
|
void |
setGroup(Group g)
set Group for this policy
|
void |
setResource(DSpaceObject o)
set both type and id of resource referred to by policy
|
void |
setResourceID(int myid)
If the policy refers to a single resource, this is the ID of that
resource.
|
void |
setResourceType(int mytype)
Set the type of the resource referred to by the policy
|
void |
setRpDescription(java.lang.String description) |
void |
setRpName(java.lang.String name) |
void |
setRpType(java.lang.String type) |
void |
setStartDate(java.util.Date d)
Set the start date for the policy
|
void |
update()
Update the ResourcePolicy
|
public static java.lang.String TYPE_SUBMISSION
public static java.lang.String TYPE_WORKFLOW
public static java.lang.String TYPE_CUSTOM
public static java.lang.String TYPE_INHERITED
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - public int hashCode()
hashCode in class java.lang.Objectpublic static ResourcePolicy find(Context context, int id) throws java.sql.SQLException
context - DSpace context objectid - ID of the ResourcePolicyjava.sql.SQLExceptionpublic static ResourcePolicy create(Context context) throws java.sql.SQLException, AuthorizeException
context - DSpace context objectjava.sql.SQLExceptionAuthorizeExceptionpublic void delete()
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getID()
public int getResourceType()
public void setResource(DSpaceObject o)
public void setResourceType(int mytype)
mytype - type of the resourcepublic int getResourceID()
public void setResourceID(int myid)
myid - id of resource (database primary key)public int getAction()
public java.lang.String getActionText()
public void setAction(int myid)
myid - action ID from org.dspace.core.Constantspublic int getEPersonID()
public EPerson getEPerson() throws java.sql.SQLException
java.sql.SQLExceptionpublic void setEPerson(EPerson e)
e - EPersonpublic int getGroupID()
public Group getGroup() throws java.sql.SQLException
java.sql.SQLExceptionpublic void setGroup(Group g)
g - grouppublic boolean isDateValid()
public java.util.Date getStartDate()
public void setStartDate(java.util.Date d)
d - date, or null for no start datepublic java.util.Date getEndDate()
public void setEndDate(java.util.Date d)
d - end date, or nullpublic void update()
throws java.sql.SQLException,
AuthorizeException
java.sql.SQLExceptionAuthorizeExceptionpublic java.lang.String getRpName()
public void setRpName(java.lang.String name)
public java.lang.String getRpType()
public void setRpType(java.lang.String type)
public java.lang.String getRpDescription()
public void setRpDescription(java.lang.String description)
Copyright © 2013 DuraSpace. All Rights Reserved.