class: GrantVO

public class: GrantVO
Author:
Project: Phase: 1.0; Status: Proposed; Version: $Revision: 1959 $ $LastChangedDate: 2009-05-08 09:; Complexity: 1
Dates: Created: 16.07.2009 15:14:07; Modified: 16.07.2009 15:14:07;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {FCF9057A-8259-4360-BF43-B675C31CA1F8}
A grant wraps a role that is granted to a certain certain object (like an affiliation or a collection).
@revised by MuJ: 28.08.2007
 

Goto: Custom Properties, Fields, Methods

Extends: ValueObject

See also: GrantRO, ValueObject

Appears in: valueobjects

Connections
 
Custom Properties
 
GrantVO Attributes
Attribute Details
private String
  grantedTo
Notes: The object to which this grant was granted.
private String
  grantType
Notes: The scope of this grant.
private Date
  lastModificationDate
private String
  objectRef
Notes: The reference to the object for which the role is granted. Changed to String by FrM.
private GrantRO
  reference
Notes: The possible predefined roles. Caution: To compare roles to PredefinedRoles, use the according isPredefinedRole() method, or compare the role with the PredefinedRole.value(). It is: user.isModerator <=> frameworkValue="escidoc:role-md-editor" (the framework role "role-moderator" is not the same as the PubMan role MODERATOR!)
private String
  role
Notes: The role that is granted. The value of this attribute matches the value the framework gives back as role (e. g. "escidoc:role-depositor").
 
GrantVO Methods
Operation Details
public
getGrantedTo():String
Sequential
public
getGrantType():String
Sequential
public
getLastModificationDate():Date
Sequential
public
getObjectRef():String
Sequential
Notes: Delivers the object reference of the object the rights are granted for.
public
getReference():GrantRO
Sequential
public
getRole():String
Sequential
Notes: Delivers the role that is granted. The value of this attribute matches the value the framework gives back as role (e. g. "escidoc:role-depositor"). If you want to check if the role matches a predefined role, use the according isPredefinedRole() method instead.
public
GrantVO():
Sequential
Notes: Default constructor.
public
GrantVO(
   String role,
   String object):
Sequential
Notes: Constructor using fields.
public
isDepositor(
   ReferenceObject objRef):boolean
Sequential
Notes: Delivers true if the granted role is of type 'depositor' for the given object (normally a PubCollection).
public
isModerator(
   ReferenceObject objRef):boolean
Sequential
Notes: Delivers true if the granted role is of type 'moderator' for the given object (normally a PubCollection).
public
setGrantedTo(
   String grantedTo):void
Sequential
public
setGrantType(
   String grantType):void
Sequential
public
setLastModificationDate(
   Date lastModificationDate):void
Sequential
public
setObjectRef(
   String newVal):void
Sequential
Notes: Sets the object reference of the object the rights are granted for.
public
setReference(
   GrantRO reference):void
Sequential
public
setRole(
   String newVal):void
Sequential
Notes: Sets the role that is granted. The value of this attribute must match the value the framework expects as role (e. g. "escidoc:role-depositor").
public
toString():String
Sequential
Notes: {@inheritDoc}