Oracle Entitlements Server for Java API Reference

com.bea.security
Class DataDrivenAuthority

java.lang.Object
  |
  +--com.bea.security.NamingAuthority
        |
        +--com.bea.security.DataDrivenAuthority

public class DataDrivenAuthority
extends NamingAuthority

The DataDrivenAuthority class provides a way to programmatically create a new naming authority. By adding attributes, delimiters, dependencies, and sub-authorities, you can define new naming conventions. By giving this class a name and adding attributes, delimiters, dependencies, and sub-authorities, you can define new naming conventions and construct a fully functional naming authority.

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

Fields inherited from class com.bea.security.NamingAuthority
cachenames, initialized, maxentries, mgr
 
Constructor Summary
DataDrivenAuthority(java.lang.String authorityname, java.lang.String delimiters)
          Constructs a data driven authority by name and delimiter string.
 
Method Summary
 void addAttribute(NameAttributeType attribute)
          Adds a attribute definition to this authority.
 void addDependency(java.lang.String authorityname)
          Adds a dependent authority to this authority.
 void addSubAuthority(NamingAuthority subauthority)
          Adds a sub-authority to this authority.
 NameAttributeType[] getAttributeTypes()
          Gets the attribute types for this authority.
 java.lang.String getAuthorityName()
          Gets this authority's name.
 java.lang.String getDelimiters()
          Gets the list of delimiters for this authority.
 java.lang.String[] getDependencies()
          Gets a list of this authority's dependent naming authority names.
 int getNumAttributes()
          Gets the number of attributes in this authority.
 NamingAuthority[] getSubAuthorities()
          Gets a list of references to sub-authorities provided by this authority.
 void setAuthorityName(java.lang.String name)
          Sets the name of this authority.
 void setDelimiters(java.lang.String delimiters)
          Sets the delimiters for this authority.
 
Methods inherited from class com.bea.security.NamingAuthority
assembleTokens, equals, getDeepTokenEnumeration, getRuntime, getTokenEnumeration, hasSameAuthority
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataDrivenAuthority

public DataDrivenAuthority(java.lang.String authorityname,
                           java.lang.String delimiters)
Constructs a data driven authority by name and delimiter string.

Parameters:
authorityname - the name of this naming authority.
delimiters - a String of characters that are delimiters for this authority.
Method Detail

addDependency

public void addDependency(java.lang.String authorityname)
                   throws ParameterException
Adds a dependent authority to this authority.

Parameters:
authorityname - the name of the naming authority this authority is dependent upon.
Throws:
ParameterException - This exception is thrown if this naming authority is already validated. After it has been validated, this naming authority cannot be modified.

addSubAuthority

public void addSubAuthority(NamingAuthority subauthority)
                     throws ParameterException
Adds a sub-authority to this authority.

Parameters:
sub-authority - an authority to embed within this authority. By chaining the authorities together, they will be registered and unregistered together when the parent is registered or unregistered.
Throws:
ParameterException - This exception is thrown if this naming authority is already validated. After it has been validated, this naming authority cannot be modified.

addAttribute

public void addAttribute(NameAttributeType attribute)
                  throws ParameterException
Adds a attribute definition to this authority.

Parameters:
attribute - a NameAttributeType that defines a field within this name. This field is typed to give it a behavior and can be optionally associated with another authority.
Throws:
ParameterException - This exception is thrown if this naming authority is already validated. After it has been validated, this naming authority cannot be modified.

setAuthorityName

public void setAuthorityName(java.lang.String name)
                      throws ParameterException
Sets the name of this authority.

Parameters:
name - the name of this authority.
Throws:
ParameterException - This exception is thrown if this naming authority is already validated. After it has been validated, this naming authority cannot be modified.

setDelimiters

public void setDelimiters(java.lang.String delimiters)
                   throws ParameterException
Sets the delimiters for this authority.

Parameters:
delimiters - the delimiting characters for this name authority.
Throws:
ParameterException - This exception is thrown if this naming authority is already validated. After it has been validated, this naming authority cannot be modified.

getDependencies

public java.lang.String[] getDependencies()
Gets a list of this authority's dependent naming authority names. An authority will not be enabled until all its dependencies are met.

Returns:
the list of this authority's dependency names as an array of Strings.
Overrides:
getDependencies in class NamingAuthority

getSubAuthorities

public NamingAuthority[] getSubAuthorities()
Gets a list of references to sub-authorities provided by this authority. These sub-authorities will be registered and unregistered at the same time.

Returns:
an array of NamingAuthority objects that are sub-authorities for this naming authority.
Overrides:
getSubAuthorities in class NamingAuthority

getAuthorityName

public java.lang.String getAuthorityName()
Gets this authority's name.

Returns:
the name of this authority.
Overrides:
getAuthorityName in class NamingAuthority

getDelimiters

public java.lang.String getDelimiters()
Gets the list of delimiters for this authority.

Returns:
the delimiters for this authority.
Overrides:
getDelimiters in class NamingAuthority

getNumAttributes

public int getNumAttributes()
Gets the number of attributes in this authority.

Returns:
the number of attributes in this authority.
Overrides:
getNumAttributes in class NamingAuthority

getAttributeTypes

public NameAttributeType[] getAttributeTypes()
Gets the attribute types for this authority.

Returns:
an array of NameAttributeTypes that define the fields within this authority.
Overrides:
getAttributeTypes in class NamingAuthority