|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.authorize.ResourcePolicy
public class ResourcePolicy
Class representing a ResourcePolicy
| Method Summary | |
|---|---|
static ResourcePolicy |
create(Context context)
Create a new ResourcePolicy |
void |
delete()
Delete an ResourcePolicy |
boolean |
equals(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()
|
String |
getActionText()
|
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 e-person'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 |
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(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 |
setStartDate(Date d)
Set the start date for the policy |
void |
update()
Update the ResourcePolicy |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean equals(Object obj)
equals in class Objectobj -
public int hashCode()
hashCode in class Object
public static ResourcePolicy find(Context context,
int id)
throws SQLException
context - DSpace context objectid - ID of the ResourcePolicy
SQLException
public static ResourcePolicy create(Context context)
throws SQLException,
AuthorizeException
context - DSpace context object
SQLException
AuthorizeException
public void delete()
throws SQLException
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 String getActionText()
public void setAction(int myid)
myid - action ID from org.dspace.core.Constantspublic int getEPersonID()
public EPerson getEPerson()
throws SQLException
SQLExceptionpublic void setEPerson(EPerson e)
e - EPersonpublic int getGroupID()
public Group getGroup()
throws SQLException
SQLExceptionpublic void setGroup(Group g)
g - grouppublic boolean isDateValid()
public Date getStartDate()
public void setStartDate(Date d)
d - date, or null for no start datepublic Date getEndDate()
public void setEndDate(Date d)
d - end date, or null
public void update()
throws SQLException
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||