|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.security.NamingAuthority
A Naming Authority has two functions. First, it provides a scope for a name, allowing it to be unique within that scope. Second, it defines the format of the name, breaking the name into named fields separated by delimiters.
The scoping functions of the name authority allow two identical names to be recognized as unique.
For example:
OrderEntryForm
may exist in both a fullfillment application and a point of sales (POS)
application. By associating the name OrderEntryForm
with the naming authority FULLFILLMENT
or the naming authority POS
,
it can be recognized which actual form is being referenced.
In addition, a name may define fields within itself. In the example above, a form may contain
fields, and fields may contain functions and so on. The POS
name, then, might be defined as FORMNAME, FIELDNAME, FUNCTION
with a delimter
of "." (period). This would allow the name OrderEntryForm.name.setText
to then be parsed into three name/value pairs FORMNAME=OrderEntryForm, FIELDNAME=name,
FUNCTION=setText
. By combining authorities, subauthorities, and delimiters into a parse tree, a
very flexible way of defining names can be formed.
If through the use of authorities and sub-authorities a name cannot be represented, you may create a custom class to override the methods of this base class and provide custom or optimized parsing.
Field Summary | |
protected static boolean |
cachenames
A flag to indicate if the naming authority is allowed to cache name parsings. |
protected boolean |
initialized
A flag for the Naming Authority Manager to set once this authority's dependencies have been met. |
protected static int |
maxentries
The maximum number of entries to hold in the LRU cache of this naming authority. |
protected NamingAuthorityManager |
mgr
A reference to this authority's Naming Authority Manager. |
Constructor Summary | |
NamingAuthority()
|
Method Summary | |
java.lang.String |
assembleTokens(java.util.Enumeration namedattrvalues)
Given an enumeration of NameAttributeValues, assemble this name into a string form. |
boolean |
equals(java.lang.Object another)
Determines if this authority is equal to another. |
abstract NameAttributeType[] |
getAttributeTypes()
Gets the attributes for this naming authority. |
abstract java.lang.String |
getAuthorityName()
Gets the name of this authority. |
java.util.Enumeration |
getDeepTokenEnumeration(java.lang.String name)
Tokenizes a name according to this name authority's rules and the rules of its referenced authorities. |
abstract java.lang.String |
getDelimiters()
Gets the list of delimiters for this authority. |
abstract java.lang.String[] |
getDependencies()
Gets a list of this authority's dependencies. |
abstract int |
getNumAttributes()
Gets the number of attributes defined in this naming authority. |
SecurityRuntime |
getRuntime()
Gets the runtime associated with this naming authority. |
abstract NamingAuthority[] |
getSubAuthorities()
Gets a list of references to sub-authorities provided by this authority for registration. |
java.util.Enumeration |
getTokenEnumeration(java.lang.String name)
Tokenizes a name according to this name authority's rules. |
static boolean |
hasSameAuthority(NamedObject one,
NamedObject another)
Determines if two named objects use the same authority. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected boolean initialized
protected static boolean cachenames
com.bea.security.naming.cache
to enable
or disable all naming authority caching.protected static int maxentries
com.bea.security.naming.maxentries
to set this
value for all naming authorities.protected NamingAuthorityManager mgr
Constructor Detail |
public NamingAuthority()
Method Detail |
public abstract java.lang.String[] getDependencies()
Strings
.public abstract NamingAuthority[] getSubAuthorities()
NamingAuthoritys
that are sub-athorities for this authority.public abstract java.lang.String getAuthorityName()
public abstract java.lang.String getDelimiters()
String
whose characters are delimiters for this authority.
The first character in this string is said to be the
PRIMARY DELIMITER
and may be used when adding values programatically to an
object that conforms to this naming convention.public abstract int getNumAttributes()
int
.public abstract NameAttributeType[] getAttributeTypes()
NameAttributeTypes
that define this authority's
naming convention.public static boolean hasSameAuthority(NamedObject one, NamedObject another)
true
if these two objects share
the same authority; otherwise, returns false
.public boolean equals(java.lang.Object another)
true
if this naming authority is equal to the other; otherwise, returns
false
.public java.util.Enumeration getTokenEnumeration(java.lang.String name)
name
- a name that conforms to this naming authority's conventions.NameAttributeValues
that contains the type information,
sub-authority information, name, and value for the attributes within this name.public java.util.Enumeration getDeepTokenEnumeration(java.lang.String name)
name
- a name that conforms to this naming authority's conventions.NameAttributeValues
which contain the
type information,
the sub-authority information, and the value for the attributes within this name.public java.lang.String assembleTokens(java.util.Enumeration namedattrvalues)
If the enumeration is a shallow enumeration, it is recursively assembled
into a string using the PRIMARY DELMITERS
of the naming authorities,
therefore, taking a form which can then be reparsed into the original name/value enumeration
that was originally presented. In this way a name can be enumerated, assembled and
enumerated again
and again, always getting the same values.
If the enumeration is a deep enumeration, the name is assembled using only the
PRIMARY DELIMITER
of the original naming authority. Whereas this can unify a name to use only one delimiter,
the resuling string
will not conform to the naming specification of the original naming authority.
namedattrvalues
- an enumeration of NameAttributeValues
to assemble
into a String
representation of the name.String
representation of the name.public SecurityRuntime getRuntime()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |