Oracle Entitlements Server for Java API Reference

com.bea.security
Class NamedObject

java.lang.Object
  |
  +--com.bea.security.NamedObject
Direct Known Subclasses:
AuditRecord, RuntimeAction, RuntimeResource

public abstract class NamedObject
extends java.lang.Object

The NamedObject class is used to represent an object that is associated with a NamingAuthority and conforms to that authority's structure.

Author:
Copyright © 2004-2008, Oracle and/or its affiliates. All rights reserved.

Field Summary
protected  AttributeValueEnumeration deep
          A deep enumeration of this object's fields.
protected  NamingAuthority nameAuth
          A reference to this object's naming authority, or null if the object is not yet associated with one.
protected  AttributeValueEnumeration shallow
          A shallow enumeration of this object's fields.
 
Constructor Summary
NamedObject(java.lang.String namestring, java.lang.String authorityname)
          Constructs a named object from a string representation of the name and the name of the authority with which it is associated.
NamedObject(java.lang.String namestring, java.lang.String authorityname, SecurityRuntime rt)
          Constructs a named object from a string representation of the name and the name of the authority with which it is associated, specifying the security runtime with which this object is associated.
 
Method Summary
protected  boolean chop()
          Removes the deepest (last) field from this name.
 java.lang.String getAuthorityName()
          Gets the name of this object's naming authority.
 java.util.Enumeration getDeepEnumeration()
          Gets a deep enumeration of this name's fields.
 java.util.Enumeration getEnumeration()
          Gets a shallow enumeration of this name's fields.
 int getID()
          Gets a unique ID for this named object by combining the authority name with the name and then hashing it.
 NamingAuthority getNamingAuthority()
          Gets a reference to this object's naming authority.
 java.lang.String toString()
          Returns a string representation of this named object using the appropriate delimiters of the various authorities and sub-authorities.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nameAuth

protected NamingAuthority nameAuth
A reference to this object's naming authority, or null if the object is not yet associated with one.

shallow

protected AttributeValueEnumeration shallow
A shallow enumeration of this object's fields. The enumeration is said to be "shallow" when it does not resolve sub-authorities in the calculation of the fields.

deep

protected AttributeValueEnumeration deep
A deep enumeration of this object's fields. The enumeration is said to be "deep" when it recursively resolves sub-authorities in the calculation of the fields.
Constructor Detail

NamedObject

public NamedObject(java.lang.String namestring,
                   java.lang.String authorityname)
Constructs a named object from a string representation of the name and the name of the authority with which it is associated.

Parameters:
namestring - the string representaion of this object.
authorityname - the name of the authority that governs the format of this object's name.

NamedObject

public NamedObject(java.lang.String namestring,
                   java.lang.String authorityname,
                   SecurityRuntime rt)
Constructs a named object from a string representation of the name and the name of the authority with which it is associated, specifying the security runtime with which this object is associated.

Parameters:
namestring - the string representaion of this object.
authorityname - the name of the authority that governs the format of this object's name.
rt - the SecurityRuntime with which this object is associated.
Method Detail

getDeepEnumeration

public java.util.Enumeration getDeepEnumeration()
Gets a deep enumeration of this name's fields.

Returns:
a deep AttributeValueEnumeration of this object's fields.

getEnumeration

public java.util.Enumeration getEnumeration()
Gets a shallow enumeration of this name's fields.

Returns:
a shallow AttributeValueEnumeration of this object's fields.

getNamingAuthority

public NamingAuthority getNamingAuthority()
Gets a reference to this object's naming authority.

Returns:
a reference to the naming authority associated with this named object.

getAuthorityName

public java.lang.String getAuthorityName()
Gets the name of this object's naming authority.

Returns:
the name of this object's naming authority or null if one is not yet associated.

chop

protected boolean chop()
Removes the deepest (last) field from this name.

Returns:
true if a token has been successfully chopped off; otherwise, returns false.

getID

public int getID()
Gets a unique ID for this named object by combining the authority name with the name and then hashing it.

Returns:
the unique ID of this named object, represented as a int.

toString

public java.lang.String toString()
Returns a string representation of this named object using the appropriate delimiters of the various authorities and sub-authorities. This string conforms to the naming specification of this resource's naming authority.

Returns:
the named object, represented as a String.
Overrides:
toString in class java.lang.Object