Package org.eclipse.ecf.core.identity
Interface IIDFactory
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description NamespaceaddNamespace(Namespace n)Add the given Namespace to our table of available NamespacesbooleancontainsNamespace(Namespace n)Check whether table contains given Namespace instanceIDcreateGUID()Make a GUID using SHA-1 hash algorithm and a default of 16bits of data length.IDcreateGUID(int length)Make a GUID using SHA-1 hash algorithm and a default of 16bits of data length.IDcreateID(String namespaceName, Object[] args)Make a new identity.IDcreateID(String namespaceName, String idValue)Make a new identity instance from a namespaceName and idValue.IDcreateID(Namespace n, Object[] args)Make a new identity.IDcreateID(Namespace namespace, String uri)Make a new identity instance from a namespace and String.IDcreateLongID(long l)Make a an ID from a longIDcreateStringID(String idString)Make a an ID from a StringIDcreateURIID(String uri)Create a URIID from String.IDcreateURIID(URI uri)Create a URIID from URI.IDcreateUuID()Create a random UuIDIDcreateUuID(String uuid)Create a UuID from StringIDcreateUuID(URI uuidURI)Create a UuID from URI.IDcreateUuID(UUID uuid)Create a UuID from UUIDNamespacegetNamespace(Namespace n)Get the given Namespace instance from tableNamespacegetNamespaceByName(String name)Get a Namespace instance by its string name.List<Namespace>getNamespaces()Get a list of the current Namespace instances exposed by this factory.NamespaceremoveNamespace(Namespace n)Remove the given Namespace from our table of available Namespaces
 
- 
- 
- 
Method Detail- 
addNamespaceNamespace addNamespace(Namespace n) throws SecurityException Add the given Namespace to our table of available Namespaces- Parameters:
- n- the Namespace to add
- Returns:
- Namespace the namespace already in table (null if Namespace not previously in table)
- Throws:
- SecurityException- thrown if caller does not have appropriate NamespacePermission for given namespace
 
 - 
containsNamespaceboolean containsNamespace(Namespace n) throws SecurityException Check whether table contains given Namespace instance- Parameters:
- n- the Namespace to look for
- Returns:
- true if table does contain given Namespace, false otherwise
- Throws:
- SecurityException- thrown if caller does not have appropriate NamespacePermission for given namespace
 
 - 
getNamespacesList<Namespace> getNamespaces() throws SecurityException Get a list of the current Namespace instances exposed by this factory.- Returns:
- Listof Namespace instances 
- Throws:
- SecurityException- thrown if caller does not have appropriate NamespacePermission for given namespace
 
 - 
getNamespaceNamespace getNamespace(Namespace n) throws SecurityException Get the given Namespace instance from table- Parameters:
- n- the Namespace to look for
- Returns:
- Namespace
- Throws:
- SecurityException- thrown if caller does not have appropriate NamespacePermission for given namespace
 
 - 
getNamespaceByNameNamespace getNamespaceByName(String name) throws SecurityException Get a Namespace instance by its string name.- Parameters:
- name- the name to use for lookup
- Returns:
- Namespace instance. Null if not found.
- Throws:
- SecurityException- thrown if caller does not have appropriate NamespacePermission for given namespace
 
 - 
createGUIDID createGUID() throws IDCreateException Make a GUID using SHA-1 hash algorithm and a default of 16bits of data length. The value is Base64 encoded to allow for easy display.- Returns:
- new ID instance
- Throws:
- IDCreateException- if ID cannot be constructed
 
 - 
createGUIDID createGUID(int length) throws IDCreateException Make a GUID using SHA-1 hash algorithm and a default of 16bits of data length. The value is Base64 encoded to allow for easy display.- Parameters:
- length- the byte-length of data used to create a GUID
- Returns:
- new ID instance
- Throws:
- IDCreateException- if ID cannot be constructed
 
 - 
createIDID createID(Namespace n, Object[] args) throws IDCreateException Make a new identity. Given a Namespace, and an array of instance constructor parameters, return a new instance of an ID belonging to the given Namespace- Parameters:
- n- the Namespace to which the ID will belong
- args- an Object [] of the parameters for the ID instance constructor
- Throws:
- IDCreateException- thrown if class for instantiator or instance can't be loaded, if something goes wrong during instance construction
 
 - 
createIDID createID(String namespaceName, Object[] args) throws IDCreateException Make a new identity. Given a Namespace name, and an array of instance constructor parameters, return a new instance of an ID belonging to the given Namespace- Parameters:
- namespaceName- the name of the Namespace to which the ID will belong
- args- an Object [] of the parameters for the ID instance constructor
- Throws:
- IDCreateException- thrown if class for instantiator or ID instance can't be loaded, if something goes wrong during instance construction
 
 - 
createIDID createID(Namespace namespace, String uri) throws IDCreateException Make a new identity instance from a namespace and String.- Parameters:
- namespace- the namespace to use to create the ID
- uri- the String uri to use to create the ID
- Throws:
- IDCreateException- thrown if class for instantiator or ID instance can't be loaded, if something goes wrong during instance construction
 
 - 
createIDID createID(String namespaceName, String idValue) throws IDCreateException Make a new identity instance from a namespaceName and idValue. The namespaceName is first used to lookup the namespace withgetNamespaceByName(String), and then the result is passed intocreateID(Namespace,String).- Parameters:
- namespaceName- the name of the namespace that should be used to create the ID
- idValue- the String value to use to create the ID
- Throws:
- IDCreateException- thrown if class for instantiator or ID instance can't be loaded, if something goes wrong during instance construction
 
 - 
createStringIDID createStringID(String idString) throws IDCreateException Make a an ID from a String- Parameters:
- 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.
- Returns:
- valid ID instance
- Throws:
- IDCreateException- thrown if class for instantiator or ID instance can't be loaded, if something goes wrong during instance construction
 
 - 
createLongIDID createLongID(long l) throws IDCreateException Make a an ID from a long- Parameters:
- 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.
- Returns:
- valid ID instance
- Throws:
- IDCreateException- thrown if class for instantiator or ID instance can't be loaded, if something goes wrong during instance construction
 
 - 
createUuIDID createUuID(String uuid) throws IDCreateException Create a UuID from String- Parameters:
- uuid- the String to use. Must be in UUID format as returned from UUID.toString(). Must not be null.
- Returns:
- valid ID instance
- Throws:
- IDCreateException
- Since:
- 3.5
 
 - 
createUuIDID createUuID(UUID uuid) throws IDCreateException Create a UuID from UUID- Parameters:
- uuid- the UUID to use. Must not be null.
- Returns:
- valid ID instance
- Throws:
- IDCreateException
- Since:
- 3.5
 
 - 
createUuIDID createUuID() throws IDCreateException Create a random UuID- Returns:
- valid ID instance from UUID.randomUUID()
- Throws:
- IDCreateException
- Since:
- 3.5
 
 - 
createUuIDID createUuID(URI uuidURI) throws IDCreateException Create a UuID from URI.- Parameters:
- 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'
- Returns:
- valid ID instance
- Throws:
- IDCreateException
- Since:
- 3.5
 
 - 
createURIIDID createURIID(URI uri) throws IDCreateException Create a URIID from URI.- Parameters:
- uri- the URI to use for the URIID. Must not be null.
- Returns:
- valid ID instance
- Throws:
- IDCreateException
- Since:
- 3.5
 
 - 
createURIIDID createURIID(String uri) throws IDCreateException Create a URIID from String.- Parameters:
- uri- the String to use for the URIID. Must not be null, and must be valid URI format as per URI.toString().
- Returns:
- valid ID instance
- Throws:
- IDCreateException
- Since:
- 3.5
 
 - 
removeNamespaceNamespace removeNamespace(Namespace n) throws SecurityException Remove the given Namespace from our table of available Namespaces- Parameters:
- n- the Namespace to remove
- Returns:
- Namespace the namespace already in table (null if Namespace not previously in table)
- Throws:
- SecurityException- thrown if caller does not have appropriate NamespacePermission for given namespace
 
 
- 
 
-