com.counterclaim.openefm.model.id
Class UUIDDispenser

java.lang.Object
  extended bycom.counterclaim.openefm.model.id.UUIDDispenser
All Implemented Interfaces:
IdDispenser

public class UUIDDispenser
extends java.lang.Object
implements IdDispenser

Singleton providing the usable UUID.

 

Field Summary
private static UUIDDispenser dispenser
          Singleton value of the UUID dispenser.
private  java.lang.String uniqueId
          Unique ID to create a namespace for this app.
 
Constructor Summary
private UUIDDispenser()
           
 
Method Summary
static UUIDDispenser getDispenser()
          Returns the UUIDispenser singleton.
 java.lang.String getNextId()
          Returns the next universal ID.
 java.lang.String getUniqueIdentifier()
          Returns a unique identifier to differenciate keys between companies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dispenser

private static UUIDDispenser dispenser
Singleton value of the UUID dispenser.


uniqueId

private java.lang.String uniqueId
Unique ID to create a namespace for this app.

Constructor Detail

UUIDDispenser

private UUIDDispenser()
Method Detail

getDispenser

public static UUIDDispenser getDispenser()
Returns the UUIDispenser singleton.


getNextId

public java.lang.String getNextId()
                           throws IdDispenserException
Returns the next universal ID.

Specified by:
getNextId in interface IdDispenser
Throws:
IdDispenserException

getUniqueIdentifier

public java.lang.String getUniqueIdentifier()
Returns a unique identifier to differenciate keys between companies. As per Scott Ambler's article, "www.my-company.com" is an example.

Specified by:
getUniqueIdentifier in interface IdDispenser


Copyright © 2002 counterclaim.com. All Rights Reserved.