Package org.dspace.authorize
Class ResourcePolicy
- java.lang.Object
-
- org.dspace.authorize.ResourcePolicy
-
- All Implemented Interfaces:
ReloadableEntity<Integer>
@Entity public class ResourcePolicy extends Object implements ReloadableEntity<Integer>
Database entity representation of the ResourcePolicy table- Author:
- kevinvandevelde at atmire.com
-
-
Field Summary
Fields Modifier and Type Field Description static StringTYPE_CUSTOMThis policy was explicitly set on this object.static StringTYPE_INHERITEDThis policy was copied from the containing object's default policies.static StringTYPE_SUBMISSIONThis policy was set on submission, to give the submitter access.static StringTYPE_WORKFLOWThis policy was set to allow access by a workflow group.
-
Constructor Summary
Constructors Modifier Constructor Description protectedResourcePolicy()Protected constructor, create object using:DSpaceCRUDService.create(Context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Return true if this object equals obj, false otherwise.intgetAction()DSpaceObjectgetdSpaceObject()DategetEndDate()Get end date for the policyEPersongetEPerson()GroupgetGroup()gets the Group referred to by this policyIntegergetID()Get the ResourcePolicy's internal identifierStringgetRpDescription()StringgetRpName()StringgetRpType()DategetStartDate()Get the start date of the policyinthashCode()Return a hash code for this object.voidsetAction(int myid)set the action this policy authorizesvoidsetdSpaceObject(DSpaceObject dSpaceObject)voidsetEndDate(Date d)Set end date for the policyvoidsetEPerson(EPerson eperson)assign an EPerson to this policyvoidsetGroup(Group epersonGroup)sets the Group referred to by this policyvoidsetRpDescription(String description)voidsetRpName(String name)voidsetRpType(String type)voidsetStartDate(Date d)Set the start date for the policy
-
-
-
Field Detail
-
TYPE_SUBMISSION
public static String TYPE_SUBMISSION
This policy was set on submission, to give the submitter access.
-
TYPE_WORKFLOW
public static String TYPE_WORKFLOW
This policy was set to allow access by a workflow group.
-
TYPE_CUSTOM
public static String TYPE_CUSTOM
This policy was explicitly set on this object.
-
TYPE_INHERITED
public static String TYPE_INHERITED
This policy was copied from the containing object's default policies.
-
-
Constructor Detail
-
ResourcePolicy
protected ResourcePolicy()
Protected constructor, create object using:DSpaceCRUDService.create(Context)
-
-
Method Detail
-
equals
public boolean equals(Object obj)
Return true if this object equals obj, false otherwise.
-
hashCode
public int hashCode()
Return a hash code for this object.
-
getID
public Integer getID()
Get the ResourcePolicy's internal identifier- Specified by:
getIDin interfaceReloadableEntity<Integer>- Returns:
- the internal identifier
-
getdSpaceObject
public DSpaceObject getdSpaceObject()
-
setdSpaceObject
public void setdSpaceObject(DSpaceObject dSpaceObject)
-
setAction
public void setAction(int myid)
set the action this policy authorizes- Parameters:
myid- action ID fromConstants
-
getAction
public int getAction()
- Returns:
- get the action this policy authorizes
-
getEPerson
public EPerson getEPerson()
- Returns:
- eperson, null if EPerson not set
-
setEPerson
public void setEPerson(EPerson eperson)
assign an EPerson to this policy- Parameters:
eperson- Eperson
-
getGroup
public Group getGroup()
gets the Group referred to by this policy- Returns:
- group, or null if no group set
-
setGroup
public void setGroup(Group epersonGroup)
sets the Group referred to by this policy- Parameters:
epersonGroup- Group
-
getStartDate
public Date getStartDate()
Get the start date of the policy- Returns:
- start date, or null if there is no start date set (probably most common case)
-
setStartDate
public void setStartDate(Date d)
Set the start date for the policy- Parameters:
d- date, or null for no start date
-
getEndDate
public Date getEndDate()
Get end date for the policy- Returns:
- end date or null for no end date
-
setEndDate
public void setEndDate(Date d)
Set end date for the policy- Parameters:
d- end date, or null
-
getRpName
public String getRpName()
-
setRpName
public void setRpName(String name)
-
getRpType
public String getRpType()
-
setRpType
public void setRpType(String type)
-
getRpDescription
public String getRpDescription()
-
setRpDescription
public void setRpDescription(String description)
-
-