com.novell.admin.rbs
Class RBSAssociation

java.lang.Object
  |
  +--com.novell.admin.rbs.RBSAssociation
All Implemented Interfaces:
java.io.Serializable

public class RBSAssociation
extends java.lang.Object
implements java.io.Serializable

Static model class that represents the association of a Role to a User, Group, O, or OU. Note that the class represents a single scope and does not interact directly with NDS.


Constructor Summary
RBSAssociation()
          Default Constructor that set object, role and scope to null, index to -1.
RBSAssociation(ObjectEntry objectEntry, RBSRole rbsRole, ObjectEntry theScope, long scopeIndex, boolean inherit)
          Constructor.
 
Method Summary
 long getIndex()
          Returns the index used in this relationship.
 ObjectEntry getObject()
          Returns the User, Group, O, or OU in this Association.
 ObjectEntry getPreviousScope()
          Gets the previous scope of this relationship.
 RBSRole getRole()
          Returns the Role in this relationship.
 ObjectEntry getScope()
          Gets the scope of this relationship.
 boolean isExternalScope()
          Checks if the scope is an External Scope
 boolean isInherited()
          Finds if the association is inheritable
 boolean isValid(int type)
          Checks if both the oe and scope are set
 void setInherited(boolean state)
          Sets whether the relation is inherited or not.
 void setObject(ObjectEntry obj)
          Sets the ObjectEntry representing the User, Group, O, or OU in this Association.
 void setRole(RBSRole newRole)
          Sets the Role in this relationship.
 void setScope(ObjectEntry theScope)
          Sets the scope scope to be used in this relation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RBSAssociation

public RBSAssociation(ObjectEntry objectEntry,
                      RBSRole rbsRole,
                      ObjectEntry theScope,
                      long scopeIndex,
                      boolean inherit)
Constructor.
Parameters:
objectEntry - ObjectEntry representing a User, Group, O or OU
rbsRole - The RBSRole object that objectEntry is associated with
theScope - The ObjectEntry representing the scope
scopeIndex - The index (Interval) into the rbsMember attribute of the rbsRole object for use in going back into the rbsTrusteeOf attribute of objectEntry to obtain the scope
inherit - True if relation is inherited from scope down, false if only for scope (applicable mostly to NDS)

RBSAssociation

public RBSAssociation()
Default Constructor that set object, role and scope to null, index to -1.
Method Detail

getObject

public ObjectEntry getObject()
Returns the User, Group, O, or OU in this Association.
Returns:
The ObjectEntry representing the object that the Role is associated with.

setObject

public void setObject(ObjectEntry obj)
Sets the ObjectEntry representing the User, Group, O, or OU in this Association.
Parameters:
obj - The ObjectEntry for the association

getRole

public RBSRole getRole()
Returns the Role in this relationship.
Returns:
The Role that is used in this relationship.

setRole

public void setRole(RBSRole newRole)
Sets the Role in this relationship.
Parameters:
newRole - The Role that is used in this relationship.

getIndex

public long getIndex()
Returns the index used in this relationship. Note that if the value is -1 then this object represents a new Association. Also, there is no setIndex() method because indexes are not mutable. They are defined in the attribute and cant be changed.
Returns:
long The index that matches the RBSRole's rbsMemberOf attribute into the objects rbsTrusteeOf attribute.

getPreviousScope

public ObjectEntry getPreviousScope()
Gets the previous scope of this relationship.
Returns:
ObjectEntry representing the previous scope for this relation.

getScope

public ObjectEntry getScope()
Gets the scope of this relationship.
Returns:
ObjectEntry representing the scope for this relation.

setScope

public void setScope(ObjectEntry theScope)
Sets the scope scope to be used in this relation.
Parameters:
ctx - The ObjectEntry representing a container for this scope.

isInherited

public boolean isInherited()
Finds if the association is inheritable
Returns:
true if inherites down, false otherwise.

setInherited

public void setInherited(boolean state)
Sets whether the relation is inherited or not. This is applicable mostly to NDS scopes.
Parameters:
boolean - state, true if relation is from scope down, false if applys only to the container scope

isExternalScope

public boolean isExternalScope()
                        throws SPIException,
                               NamespaceException
Checks if the scope is an External Scope
Returns:
boolean true if External scope, false otherwise

isValid

public boolean isValid(int type)
Checks if both the oe and scope are set
Returns:
boolean true if both are set else false if one of the two are not set.


API Documentation Copyright © 1998-2003 Novell, Inc. All rights reserved.
ConsoleOne is a registered trademark of Novell Inc.
Generated December 9 2003 1727.