Modifier and Type | Method and Description |
---|---|
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
|
ID |
createURIID(java.lang.String uri)
Create a URIID from String.
|
ID |
createURIID(java.net.URI uri)
Create a URIID from URI.
|
ID |
createUuID()
Create a random UuID
|
ID |
createUuID(java.lang.String uuid)
Create a UuID from String
|
ID |
createUuID(java.net.URI uuidURI)
Create a UuID from URI.
|
ID |
createUuID(java.util.UUID uuid)
Create a UuID from UUID
|
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<Namespace> |
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
|
Namespace addNamespace(Namespace n) throws java.lang.SecurityException
n
- the Namespace to addjava.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 forjava.lang.SecurityException
- thrown if caller does not have appropriate
NamespacePermission for given namespacejava.util.List<Namespace> 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 forjava.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 lookupjava.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 GUIDIDCreateException
- 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 constructorIDCreateException
- 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 constructorIDCreateException
- 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 IDIDCreateException
- 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 IDIDCreateException
- 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 constructionID createUuID(java.lang.String uuid) throws IDCreateException
uuid
- the String to use. Must be in UUID format as returned from
UUID.toString(). Must not be null.IDCreateException
ID createUuID(java.util.UUID uuid) throws IDCreateException
uuid
- the UUID to use. Must not be null.IDCreateException
ID createUuID() throws IDCreateException
IDCreateException
ID createUuID(java.net.URI uuidURI) throws IDCreateException
uuidURI
- the URI. Must not be null and must be in valid uuid syntax
form as specified by rfc4122 see
http://tools.ietf.org/html/rfc4122. Example:
'uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6'IDCreateException
ID createURIID(java.net.URI uri) throws IDCreateException
uri
- the URI to use for the URIID. Must not be null.IDCreateException
ID createURIID(java.lang.String uri) throws IDCreateException
uri
- the String to use for the URIID. Must not be null, and must be
valid URI format as per URI.toString().IDCreateException
Namespace removeNamespace(Namespace n) throws java.lang.SecurityException
n
- the Namespace to removejava.lang.SecurityException
- thrown if caller does not have appropriate
NamespacePermission for given namespace