com.novell.emframe.dev.rights
Class eDirRightsObject

java.lang.Object
  extended bycom.novell.emframe.dev.rights.eDirRightsObject

public final class eDirRightsObject
extends java.lang.Object

This is an encapsulation of the namespace NSObject to get rights info.


Field Summary
static int ALL_OBJ_RIGHTS
          Represents all object right flags.
static int ALL_PROP_RIGHTS
          Represents all property right flags.
static int NO_ASSIGNMENT
          Represents that no assignment of rights has been made.
static int OBJECT_EXCEPTION
          Tells the com.novell.admin.common.exceptions.AdminError exception that an Object exception occurred.
 
Constructor Summary
eDirRightsObject(NSObject nsObject)
          Constructs an eDirRightsObject to contain the rights of the NSObject passed in.
eDirRightsObject(java.lang.String specialObject)
          Constructs an eDirRightsObject to contain a special object (not based upon an NSObject).
 
Method Summary
 boolean aclReadRights()
          Returns whether we have read rights to the ACL attribute.
 boolean aclWriteRights()
          Returns whether we have write rights to the ACL attribute.
 void clearDirty()
          Clear the dirty flag.
 boolean deleteACL(java.lang.String trustee, java.lang.String protectedName, int rights)
          Delete an ACL from this object.
 boolean deleteTrustee(java.lang.String trustee)
          Delete a trustee from this object.
 void externalSetDirty()
          Set the dirty flag from an external class.
 ObjectAttribute getACLAttribute()
          Get the ACL attribute of the object.
 eDirPropertyRightsData getAllPropertyInheritedFilters()
          Get the inherited rights filters on all properties.
 NDSPropertyRights[] getArrayOfEffectivePropertyRights(ObjectEntry trusteeObj, java.lang.String[] properties)
          Get the effective rights to a given array of properties.
 java.util.Vector getAssignedAllPropertyRights(java.lang.String trustee)
          Get assigned rights to all properties.
 java.util.Vector getAssignedObjectRights(java.lang.String trustee)
          Get assigned object rights.
 java.util.Vector getAssignedPropertyRights(java.lang.String trustee, java.lang.String property)
          Get assigned rights to a specific property.
 java.util.Enumeration getAttributeNames()
          Get the names of the attributes on this object.
 eDirPropertyRightsData getEffectiveAllPropertyRights(ObjectEntry trusteeObj)
          Get the effective rights on all properties.
 eDirObjectRightsData getEffectiveObjectRights(ObjectEntry trusteeObj)
          Get the effective object rights.
 eDirPropertyRightsData getEffectivePropertyRights(ObjectEntry trusteeObj, java.lang.String property)
          Get the effective rights to a given property.
 NDSNamespace getNameSpace()
          Get the namespace this object exists in.
 NSObject getNSObject()
          Get the corresponding NSObject.
 eDirObjectRightsData getObjectInheritedFilters()
          Get the inherited rights filters for this object.
 eDirPropertyRightsData getPropertyInheritedFilters(java.lang.String property)
          Get the inherited rights filters for a specified property.
 java.util.Enumeration getTrustees()
          Get the trustees of this object.
 boolean isDirty()
          Returns if this object's rights is "dirty" or has changed.
 boolean needToPreventOrphaning(java.lang.String objNotToCheck)
          Method called to make sure the user is not orphaning a portion of the tree.
 void setAllObjectInheritedFilters(int rights)
          Sets an object inherited rights filter ACL.
 void setAllObjectRights(java.lang.String subject, int rights)
          Sets an ACL for all object rights.
 void setAllPropertyInheritedFilters(int rights)
          Sets all property inherited rights filter ACL.
 void setAllPropertyRights(java.lang.String subject, int rights)
          Sets an ACL for all property rights.
 void setPropertyInheritedFilters(java.lang.String property, int rights)
          Sets a specific properties inherited rights filter ACL.
 void setPropertyRights(java.lang.String property, java.lang.String subject, int newRights, int oldRights)
          Sets an ACL for a specific property rights.
 boolean updateData()
          Update this object's data from eDirectory without throwing any exceptions.
 void updateDataNoCatch()
          Update this object's data from eDirectory but throwing any exception encountered instead of catching them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_OBJ_RIGHTS

public static final int ALL_OBJ_RIGHTS
Represents all object right flags.

See Also:
Constant Field Values

ALL_PROP_RIGHTS

public static final int ALL_PROP_RIGHTS
Represents all property right flags.

See Also:
Constant Field Values

NO_ASSIGNMENT

public static final int NO_ASSIGNMENT
Represents that no assignment of rights has been made.

See Also:
Constant Field Values

OBJECT_EXCEPTION

public static final int OBJECT_EXCEPTION
Tells the com.novell.admin.common.exceptions.AdminError exception that an Object exception occurred.

See Also:
Constant Field Values
Constructor Detail

eDirRightsObject

public eDirRightsObject(NSObject nsObject)
Constructs an eDirRightsObject to contain the rights of the NSObject passed in.

Parameters:
nsObject - The namespace object to get eDirectory rights from

eDirRightsObject

public eDirRightsObject(java.lang.String specialObject)
Constructs an eDirRightsObject to contain a special object (not based upon an NSObject).

Parameters:
specialObject - The special object to get eDirectory rights from
Method Detail

aclReadRights

public boolean aclReadRights()
Returns whether we have read rights to the ACL attribute.

Returns:
boolean true if we have rights, false if otherwise

aclWriteRights

public boolean aclWriteRights()
Returns whether we have write rights to the ACL attribute.

Returns:
boolean true if we have rights, false if otherwise

clearDirty

public void clearDirty()
Clear the dirty flag.


deleteACL

public boolean deleteACL(java.lang.String trustee,
                         java.lang.String protectedName,
                         int rights)
Delete an ACL from this object.

Parameters:
trustee - The object to remove as a trustee of this object
protectedName - The name of the property to remove an ACL from. Can include special names such as "[Entry Rights]" or "[All Attributes Rights]"
rights - An int representing the rights to remove
Returns:
boolean true if successful, false if otherwise

deleteTrustee

public boolean deleteTrustee(java.lang.String trustee)
Delete a trustee from this object.

Parameters:
trustee - The object to remove as a trustee of this object
Returns:
boolean true if successful, false if otherwise

externalSetDirty

public void externalSetDirty()
Set the dirty flag from an external class.


getACLAttribute

public ObjectAttribute getACLAttribute()
Get the ACL attribute of the object.

Returns:
ObjectAttribute containing the contents of the ACL attribute

getAllPropertyInheritedFilters

public eDirPropertyRightsData getAllPropertyInheritedFilters()
Get the inherited rights filters on all properties.

Returns:
eDirPropertyRightsData containing the inherited rights filters
See Also:
setAllPropertyInheritedFilters(int)

getArrayOfEffectivePropertyRights

public NDSPropertyRights[] getArrayOfEffectivePropertyRights(ObjectEntry trusteeObj,
                                                             java.lang.String[] properties)
Get the effective rights to a given array of properties.

Parameters:
trusteeObj - An ObjectEntry pointing to the trustee object to get effective rights on
properties - String array of property names
Returns:
NDSPropertyRights array containing the effective rights

getAssignedAllPropertyRights

public java.util.Vector getAssignedAllPropertyRights(java.lang.String trustee)
Get assigned rights to all properties.

Parameters:
trustee - The trustee to check to see what object rights are assigned
Returns:
Vector of eDirPropertyRightsData objects containing the assigned property rights

getAssignedObjectRights

public java.util.Vector getAssignedObjectRights(java.lang.String trustee)
Get assigned object rights.

Parameters:
trustee - The trustee to check to see what object rights are assigned to this object.
Returns:
Vector of eDirObjectRightsData objects containing the assigned object rights

getAssignedPropertyRights

public java.util.Vector getAssignedPropertyRights(java.lang.String trustee,
                                                  java.lang.String property)
Get assigned rights to a specific property.

Parameters:
trustee - The trustee to check to see what object rights are assigned
property - The property to check for assigned property rights
Returns:
Vector of eDirPropertyRightsData objects containing the assigned property rights

getAttributeNames

public java.util.Enumeration getAttributeNames()
Get the names of the attributes on this object.

Returns:
AttributeEnumeration object

getEffectiveAllPropertyRights

public eDirPropertyRightsData getEffectiveAllPropertyRights(ObjectEntry trusteeObj)
Get the effective rights on all properties.

Parameters:
trusteeObj - An ObjectEntry pointing to the trustee object to get effective rights on
Returns:
eDirPropertyRightsData containing the effective rights

getEffectiveObjectRights

public eDirObjectRightsData getEffectiveObjectRights(ObjectEntry trusteeObj)
Get the effective object rights.

Parameters:
trusteeObj - An ObjectEntry pointing to the trustee object to get effective rights on
Returns:
eDirObjectRightsData containing the effective rights

getEffectivePropertyRights

public eDirPropertyRightsData getEffectivePropertyRights(ObjectEntry trusteeObj,
                                                         java.lang.String property)
Get the effective rights to a given property.

Parameters:
trusteeObj - An ObjectEntry pointing to the trustee object to get effective rights on
property - String of property name
Returns:
eDirPropertyRightsData containing the effective rights

getNameSpace

public NDSNamespace getNameSpace()
Get the namespace this object exists in.

Returns:
NDSNamespace object

getNSObject

public NSObject getNSObject()
Get the corresponding NSObject.

Returns:
NSObject Namespace object representing this eDirectory object

getObjectInheritedFilters

public eDirObjectRightsData getObjectInheritedFilters()
Get the inherited rights filters for this object.

Returns:
eDirPropertyRightsData containing the inherited rights filters

getPropertyInheritedFilters

public eDirPropertyRightsData getPropertyInheritedFilters(java.lang.String property)
Get the inherited rights filters for a specified property.

Parameters:
property - String containing the property to get inherited rights filters for
Returns:
eDirPropertyRightsData containing the inherited rights filters
See Also:
setPropertyInheritedFilters(java.lang.String, int)

getTrustees

public java.util.Enumeration getTrustees()
Get the trustees of this object.

Returns:
TrusteesEnumeration object

isDirty

public boolean isDirty()
Returns if this object's rights is "dirty" or has changed.

Returns:
boolean true if object's rights are "dirty" or have changed, false if otherwise

needToPreventOrphaning

public boolean needToPreventOrphaning(java.lang.String objNotToCheck)
Method called to make sure the user is not orphaning a portion of the tree.

Parameters:
objNotToCheck - String value of any objects not to check for orpaning.
Returns:
true if we need to prevent the proposed operation, false - otherwise

setAllObjectInheritedFilters

public void setAllObjectInheritedFilters(int rights)
Sets an object inherited rights filter ACL.

Parameters:
rights - An int representing the rights to set
See Also:
getObjectInheritedFilters()

setAllObjectRights

public void setAllObjectRights(java.lang.String subject,
                               int rights)
Sets an ACL for all object rights.

Parameters:
subject - The object to set as a trustee of this object
rights - An int representing the rights to set

setAllPropertyInheritedFilters

public void setAllPropertyInheritedFilters(int rights)
Sets all property inherited rights filter ACL.

Parameters:
rights - An int representing the rights to set
See Also:
getAllPropertyInheritedFilters()

setAllPropertyRights

public void setAllPropertyRights(java.lang.String subject,
                                 int rights)
Sets an ACL for all property rights.

Parameters:
subject - The object to set as a trustee of this object
rights - An int representing the rights to set

setPropertyInheritedFilters

public void setPropertyInheritedFilters(java.lang.String property,
                                        int rights)
Sets a specific properties inherited rights filter ACL.

Parameters:
property - The property to set the ACL on
rights - An int representing the rights to set
See Also:
getPropertyInheritedFilters(java.lang.String)

setPropertyRights

public void setPropertyRights(java.lang.String property,
                              java.lang.String subject,
                              int newRights,
                              int oldRights)
Sets an ACL for a specific property rights.

Parameters:
property - The property to set the ACL rights on
subject - The object to set as a trustee of this object
newRights - An int representing the rights to set
oldRights - An int representing the existing rights to check to see if newRights contains removal of protected rights

updateData

public boolean updateData()
Update this object's data from eDirectory without throwing any exceptions.

Returns:
boolean true if no error, false if there was an error but the exception was caught
See Also:
updateDataNoCatch()

updateDataNoCatch

public void updateDataNoCatch()
                       throws SPIException,
                              SnapinVetoException
Update this object's data from eDirectory but throwing any exception encountered instead of catching them.

Throws:
SPIException - Namespace exception
SnapinVetoException - Namespace exception
See Also:
updateData()


API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated September 2 2004 0111.