Package org.dspace.authorize
Class ResourcePolicy
java.lang.Object
org.dspace.authorize.ResourcePolicy
- All Implemented Interfaces:
ReloadableEntity<Integer>
Database entity representation of the ResourcePolicy table
- Author:
- kevinvandevelde at atmire.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic StringThis policy was explicitly set on this object.static StringThis policy was copied from the containing object's default policies.static StringThis policy was set on submission, to give the submitter access.static StringThis policy was set to allow access by a workflow group. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected constructor, create object using:org.dspace.authorize.service.ResourcePolicyService#create(Context) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn true if this object equals obj, false otherwise.intGet end date for the policygetGroup()gets the Group referred to by this policygetID()Get the ResourcePolicy's internal identifierGet the start date of the policyinthashCode()Return a hash code for this object.voidsetAction(int myid) set the action this policy authorizesvoidsetdSpaceObject(DSpaceObject dSpaceObject) voidSet end date for the policyvoidsetEPerson(EPerson eperson) assign an EPerson to this policyvoidsets the Group referred to by this policyvoidsetRpDescription(String description) voidvoidvoidSet the start date for the policytoString()Describe the ResourcePolicy in String form.
-
Field Details
-
TYPE_SUBMISSION
This policy was set on submission, to give the submitter access. -
TYPE_WORKFLOW
This policy was set to allow access by a workflow group. -
TYPE_CUSTOM
This policy was explicitly set on this object. -
TYPE_INHERITED
This policy was copied from the containing object's default policies.
-
-
Constructor Details
-
ResourcePolicy
protected ResourcePolicy()Protected constructor, create object using:org.dspace.authorize.service.ResourcePolicyService#create(Context)
-
-
Method Details
-
equals
Return true if this object equals obj, false otherwise. -
hashCode
public int hashCode()Return a hash code for this object. -
getID
Get the ResourcePolicy's internal identifier- Specified by:
getIDin interfaceReloadableEntity<Integer>- Returns:
- the internal identifier
-
getdSpaceObject
-
setdSpaceObject
-
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
- Returns:
- eperson, null if EPerson not set
-
setEPerson
assign an EPerson to this policy- Parameters:
eperson- Eperson
-
getGroup
gets the Group referred to by this policy- Returns:
- group, or null if no group set
-
setGroup
sets the Group referred to by this policy- Parameters:
epersonGroup- Group
-
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
Set the start date for the policy- Parameters:
d- date, or null for no start date
-
getEndDate
Get end date for the policy- Returns:
- end date or null for no end date
-
setEndDate
Set end date for the policy- Parameters:
d- end date, or null
-
getRpName
-
setRpName
-
getRpType
-
setRpType
-
getRpDescription
-
setRpDescription
-
toString
Describe the ResourcePolicy in String form. Useful for debugging ResourcePolicy issues in tests or similar.
-