OBEROn SDK

com.oberon.ooql.sdk
Class ObjectDelegation

java.lang.Object
  extended by com.oberon.ooql.sdk.OBBase
      extended by com.oberon.ooql.sdk.ObjectDelegation
All Implemented Interfaces:
java.io.Serializable

public class ObjectDelegation
extends OBBase

Class used to manage ObjectObj's delegations. The delegation enable one or more delegate Users to perform ObjectObj manipulation in place of the delegator User(s). The access regards a single ObjectObj and is valid if and only if the delegator is enabled to perform the same operation.

Version:
5.0
See Also:
Serialized Form

Constructor Summary
ObjectDelegation()
           
 
Method Summary
 java.lang.String accessToString(java.lang.String delim)
          Get access flags as String (convert to OOQL format)
 void addDelegateUser(java.lang.String userName)
          Add a delegate user for ObjectObj manipulation
 void addDelegator(java.lang.String userName)
          Add a User to the delegator list
 boolean canValidate()
          Check is the delegates have the Validation access
 void fromXML(org.jdom.Element rootElement)
          Load the ObjectDelegation from XML element tree
 java.util.BitSet getAccess()
          Get access flags
 boolean getAccess(int accessType)
          Get access flag for a specific operation
 java.util.Vector<java.lang.String> getDelegateUsers()
          Return the list of delegate User names
 java.lang.String getDelegateUsersAsString(java.lang.String delim)
          Return the list of delegate Users as String
 java.util.Vector<java.lang.String> getDelegators()
          Get the delegator names list
 java.lang.String getDelegatorsAsString(java.lang.String delim)
          Get the delegator list as String
 void getHistory(Framework framework)
          [Inherited but not used]
 java.lang.String getKeyWord()
          Get the delegation keyword
 java.lang.String getName()
          [Inherited but not used]
 java.lang.String getProperty(java.lang.String propertyName, java.util.Vector<java.lang.Object> filterArgs, java.lang.String token, Framework framework)
          Get a property for this ObjectDelegation by its OOQL identifier
 java.util.Vector<?> getTargetNames(java.lang.String composedName, java.util.Vector<java.lang.Object> filterArgs, Framework framework)
          Return a Vector of administrative object names extracted by using an OOQL selector
 org.jdom.Element getXMLDelegatedAccess()
          Return the delegated access as XML element tree
 void removeDelegateUser(java.lang.String userName)
          Remove a delegate user
 void removeDelegateUsers()
          Remove all delegate Users
 void removeDelegator(java.lang.String userName)
          Remove a user the delegator list
 void removeDelegators()
          Clean the delegator list
 void setAccess(java.util.BitSet accessFlags)
          Set access flags
 void setAccess(int accessType, boolean access)
          Set access for a specific operation
 void setAllAccess()
          Set access for all operations
 void setKeyWord(java.lang.String keyword)
          Assign a keyword to the delegation so that it can be further removed using this alias
 void setNoAccess()
          Revoke access for all operations
 void setValidate(boolean validate)
          Extend or not the Validation (validate/refuse/ignore) access from delegator to the delegates
 java.lang.String toLineString()
          Return the ObjectDelegation properties as a single line String
 java.lang.String toString(java.lang.String indent)
          Return the ObjectDelegation properties as a single String
 org.jdom.Element toXML(Framework framework)
          Return the ObjectDelegation properties as XML element tree
 
Methods inherited from class com.oberon.ooql.sdk.OBBase
addChange, addUniqueChange, ChangesFromXML, ChangesToXML, getChanges, getChangesAsString, getId, isLinked, removeChange, resetChanges, setId, setLinked
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectDelegation

public ObjectDelegation()
Method Detail

addDelegator

public void addDelegator(java.lang.String userName)
Add a User to the delegator list

Parameters:
userName - the User name

removeDelegator

public void removeDelegator(java.lang.String userName)
Remove a user the delegator list

Parameters:
userName - the User name

removeDelegators

public void removeDelegators()
Clean the delegator list


getDelegators

public java.util.Vector<java.lang.String> getDelegators()
Get the delegator names list


getDelegatorsAsString

public java.lang.String getDelegatorsAsString(java.lang.String delim)
Get the delegator list as String

Parameters:
delim - the User names separator

addDelegateUser

public void addDelegateUser(java.lang.String userName)
Add a delegate user for ObjectObj manipulation

Parameters:
userName - the User name

removeDelegateUser

public void removeDelegateUser(java.lang.String userName)
Remove a delegate user

Parameters:
userName - the User name

removeDelegateUsers

public void removeDelegateUsers()
Remove all delegate Users


getDelegateUsers

public java.util.Vector<java.lang.String> getDelegateUsers()
Return the list of delegate User names


getDelegateUsersAsString

public java.lang.String getDelegateUsersAsString(java.lang.String delim)
Return the list of delegate Users as String

Parameters:
delim - the User names separator

setAccess

public void setAccess(int accessType,
                      boolean access)
Set access for a specific operation

Parameters:
accessType - the operation type
access - true to enable the delegate User to perform the operation

setAllAccess

public void setAllAccess()
Set access for all operations


setNoAccess

public void setNoAccess()
Revoke access for all operations


setAccess

public void setAccess(java.util.BitSet accessFlags)
Set access flags

See Also:
User

getAccess

public boolean getAccess(int accessType)
Get access flag for a specific operation

Parameters:
accessType - the operation type

getAccess

public java.util.BitSet getAccess()
Get access flags


accessToString

public java.lang.String accessToString(java.lang.String delim)
Get access flags as String (convert to OOQL format)

Parameters:
delim - the access type separator

setKeyWord

public void setKeyWord(java.lang.String keyword)
Assign a keyword to the delegation so that it can be further removed using this alias


getKeyWord

public java.lang.String getKeyWord()
Get the delegation keyword

See Also:
setKeyWord(String)

setValidate

public void setValidate(boolean validate)
Extend or not the Validation (validate/refuse/ignore) access from delegator to the delegates

Parameters:
validate - true to enable / false disable the validation access

canValidate

public boolean canValidate()
Check is the delegates have the Validation access


getHistory

public void getHistory(Framework framework)
                throws OberonException
[Inherited but not used]

Throws:
OberonException

getName

public java.lang.String getName()
[Inherited but not used]

Specified by:
getName in class OBBase

getProperty

public java.lang.String getProperty(java.lang.String propertyName,
                                    java.util.Vector<java.lang.Object> filterArgs,
                                    java.lang.String token,
                                    Framework framework)
Get a property for this ObjectDelegation by its OOQL identifier

Specified by:
getProperty in class OBBase
Parameters:
propertyName - OOQL property identifier/name (example: delegator , access ...)
filterArgs - extra arguments used to compute properties
token - separator token for complex properties
framework - the current framework
Returns:
the property value

getTargetNames

public java.util.Vector<?> getTargetNames(java.lang.String composedName,
                                          java.util.Vector<java.lang.Object> filterArgs,
                                          Framework framework)
Description copied from class: OBBase
Return a Vector of administrative object names extracted by using an OOQL selector

Specified by:
getTargetNames in class OBBase

getXMLDelegatedAccess

public org.jdom.Element getXMLDelegatedAccess()
Return the delegated access as XML element tree


toXML

public org.jdom.Element toXML(Framework framework)
Return the ObjectDelegation properties as XML element tree

Parameters:
framework - the current framework

fromXML

public void fromXML(org.jdom.Element rootElement)
Load the ObjectDelegation from XML element tree


toLineString

public java.lang.String toLineString()
Return the ObjectDelegation properties as a single line String


toString

public java.lang.String toString(java.lang.String indent)
Return the ObjectDelegation properties as a single String

Parameters:
indent - set the row indent chars

OBEROn SDK

Copyright © 2008-2014 Mirko Solazzi. All Rights Reserved.