|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IIDFactory
Contract for IDFactory
Method Summary | |
---|---|
Namespace |
addNamespace(Namespace n)
Add the given Namespace to our table of available Namespaces |
boolean |
containsNamespace(Namespace n)
Check whether table contains given Namespace instance |
ID |
createGUID()
Make a GUID using SHA-1 hash algorithm and a default of 16bits of data length. |
ID |
createGUID(int length)
Make a GUID using SHA-1 hash algorithm and a default of 16bits of data length. |
ID |
createID(Namespace n,
java.lang.Object[] args)
Make a new identity. |
ID |
createID(Namespace namespace,
java.lang.String uri)
Make a new identity instance from a namespace and String. |
ID |
createID(java.lang.String namespaceName,
java.lang.Object[] args)
Make a new identity. |
ID |
createID(java.lang.String namespaceName,
java.lang.String idValue)
Make a new identity instance from a namespaceName and idValue. |
ID |
createLongID(long l)
Make a an ID from a long |
ID |
createStringID(java.lang.String idString)
Make a an ID from a String |
Namespace |
getNamespace(Namespace n)
Get the given Namespace instance from table |
Namespace |
getNamespaceByName(java.lang.String name)
Get a Namespace instance by its string name. |
java.util.List |
getNamespaces()
Get a list of the current Namespace instances exposed by this factory. |
Namespace |
removeNamespace(Namespace n)
Remove the given Namespace from our table of available Namespaces |
Method Detail |
---|
Namespace addNamespace(Namespace n) throws java.lang.SecurityException
n
- the Namespace to add
java.lang.SecurityException
- thrown if caller does not have appropriate
NamespacePermission for given namespaceboolean containsNamespace(Namespace n) throws java.lang.SecurityException
n
- the Namespace to look for
java.lang.SecurityException
- thrown if caller does not have appropriate
NamespacePermission for given namespacejava.util.List getNamespaces() throws java.lang.SecurityException
java.lang.SecurityException
- thrown if caller does not have appropriate
NamespacePermission for given namespaceNamespace getNamespace(Namespace n) throws java.lang.SecurityException
n
- the Namespace to look for
java.lang.SecurityException
- thrown if caller does not have appropriate
NamespacePermission for given namespaceNamespace getNamespaceByName(java.lang.String name) throws java.lang.SecurityException
name
- the name to use for lookup
java.lang.SecurityException
- thrown if caller does not have appropriate
NamespacePermission for given namespaceID createGUID() throws IDCreateException
IDCreateException
- if ID cannot be constructedID createGUID(int length) throws IDCreateException
length
- the byte-length of data used to create a GUID
IDCreateException
- if ID cannot be constructedID createID(Namespace n, java.lang.Object[] args) throws IDCreateException
n
- the Namespace to which the ID will belongargs
- an Object [] of the parameters for the ID instance constructor
IDCreateException
- thrown if class for instantiator or instance can't be
loaded, if something goes wrong during instance
constructionID createID(java.lang.String namespaceName, java.lang.Object[] args) throws IDCreateException
namespaceName
- the name of the Namespace to which the ID will belongargs
- an Object [] of the parameters for the ID instance constructor
IDCreateException
- thrown if class for instantiator or ID instance can't be
loaded, if something goes wrong during instance
constructionID createID(Namespace namespace, java.lang.String uri) throws IDCreateException
namespace
- the namespace to use to create the IDuri
- the String uri to use to create the ID
IDCreateException
- thrown if class for instantiator or ID instance can't be
loaded, if something goes wrong during instance
constructionID createID(java.lang.String namespaceName, java.lang.String idValue) throws IDCreateException
getNamespaceByName(String)
, and then the result is passed into
createID(Namespace,String)
.
namespaceName
- the name of the namespace that should be used to create the IDidValue
- the String value to use to create the ID
IDCreateException
- thrown if class for instantiator or ID instance can't be
loaded, if something goes wrong during instance
constructionID createStringID(java.lang.String idString) throws IDCreateException
idString
- the String to use as this ID's unique value. Note: It is
incumbent upon the caller of this method to be sure that the
given string allows the resulting ID to satisfy the ID
contract for global uniqueness within the associated
Namespace.
IDCreateException
- thrown if class for instantiator or ID instance can't be
loaded, if something goes wrong during instance constructionID createLongID(long l) throws IDCreateException
l
- the long to use as this ID's unique value. Note: It is
incumbent upon the caller of this method to be sure that the
given long allows the resulting ID to satisfy the ID contract
for global uniqueness within the associated Namespace.
IDCreateException
- thrown if class for instantiator or ID instance can't be
loaded, if something goes wrong during instance constructionNamespace removeNamespace(Namespace n) throws java.lang.SecurityException
n
- the Namespace to remove
java.lang.SecurityException
- thrown if caller does not have appropriate
NamespacePermission for given namespace
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |