|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.security.NamingAuthorityManager
The NameAuthorityManager
class is a central registrar for all naming authorities that
the security runtime recognizes. Within a runtime
if the name is not registered with it's naming authority's manager, then the name effectively
does not exist.
This class is also responsible for managing the dependencies of the naming authorities. If a naming authority's dependencies are not met, then it will not be available to the security runtime. The naming authority will remain associated with the Naming Authority Manager, and every time a new authority is added, it's dependencies will be re-evaluated and it will be enabled once they are all met.
The format of the XML file used for creating new naming authorities is as follows:
<?xml version="1.0"?> <AuthorityConfig> <AuthorityDefinition name="AUTHORITYNAME" delimiters="," <Attribute name="ATTRIBUTENAME" type="ATTRIBUTETYPE" authority="AUTHORITYNAME"/> ... (As many attributes as are necessary) <AuthorityDefinition name="SUBAUTHORITY" delimiters=":" ... (Nested definitions allow subauthorities to be associated with other authorities. By registering the main authority, all subauthorities are also registered) </AuthorityDefinition> <Dependency> <Authority name="DEPENDANTAUTHORITY"/> ... (List this authority's dependencies here) </Dependency> </AuthorityDefinition> <!-- Or you can load in a class extending the NamingAuthority base class by... --> <AuthorityDefinition class="my.package.name.Classname"/> </AuthorityConfig>Valid attribute types are
SINGLE_VALUE_PREFIX, MULTI_VALUE_PREFIX, SINGLE_VALUE, MULTI_TOKEN,
MULTI_VALUE_TERMINAL,
and SINGLE_VALUE_TERMINAL
. See NameAttributeType for
the definitions of these attribute types.
NameAttributeType
,
NamingAuthority
Method Summary | |
NamingAuthority |
getNamingAuthority(java.lang.String namingauthorityname)
Gets a reference to a known authority by name. |
SecurityRuntime |
getRuntime()
Gets the reference to the runtime this naming authority manager services. |
void |
loadDefaultAuthorityDefinitions()
Loads factory default naming authority definitions. |
void |
loadXMLAuthorityDefinition(java.io.InputStream in)
Loads authority definitions from an input stream. |
void |
loadXMLAuthorityDefinition(java.lang.String filespec)
Loads authority definitions from an XML file given a path to that file. |
void |
registerAuthority(NamingAuthority authority)
Registers a new naming authority. |
void |
shutdown()
Returns this naming authority manager to its pre-initialized state. |
boolean |
validateAuthority(NamingAuthority authority)
Validate an authority to ensure that its attribute configuration is proper. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Method Detail |
public SecurityRuntime getRuntime()
SecurityRuntime
that this manager services.public void loadXMLAuthorityDefinition(java.lang.String filespec) throws ServiceNotAvailableException, java.io.FileNotFoundException, java.io.IOException
filespec
- a path name to an XML file defining naming authorities.public void loadDefaultAuthorityDefinitions() throws ServiceNotAvailableException
public void loadXMLAuthorityDefinition(java.io.InputStream in) throws ServiceNotAvailableException, java.io.IOException
in
- an InputStream
where authority definition XML can be read.public void shutdown()
public void registerAuthority(NamingAuthority authority)
authority
- the NamingAuthority
to register.public NamingAuthority getNamingAuthority(java.lang.String namingauthorityname)
namingauthorityname
- The name of the authority whose reference you are asking for.public boolean validateAuthority(NamingAuthority authority)
true
if this authority is valid; otherwise, returns false
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |