Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.uidgen
Class AbstractUIDGenerator

java.lang.Object
  extended by org.nuxeo.ecm.platform.uidgen.AbstractUIDGenerator
All Implemented Interfaces:
UIDGenerator
Direct Known Subclasses:
UIDGCoreDocument, UIDGenerator1

public abstract class AbstractUIDGenerator
extends Object
implements UIDGenerator

The abstract class adds some useful methods.

Author:
Constructor Summary
AbstractUIDGenerator()
           
 
Method Summary
 String getPropertyName()
          Get the property name used to set the identifier value.
 String[] getPropertyNames()
          Gets the property name used to set the identifier value
 void setPropertyName(String propertyName)
          Sets the property name used to set the identifier value.
 void setPropertyNames(String[] propertyNames)
          Set the properties used to set the identifier value.
 void setSequencer(UIDSequencer sequencer)
          The sequencer used to generate unique numbers sequencially.
 void setUID(DocumentModel document)
          Creates a new UID for the given doc and sets the field configured in the generator component with this value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.platform.uidgen.UIDGenerator
createUID, getSequenceKey
 

Constructor Detail

AbstractUIDGenerator

public AbstractUIDGenerator()
Method Detail

setSequencer

public final void setSequencer(UIDSequencer sequencer)
Description copied from interface: UIDGenerator
The sequencer used to generate unique numbers sequencially.

Specified by:
setSequencer in interface UIDGenerator

getPropertyName

public String getPropertyName()
Description copied from interface: UIDGenerator
Get the property name used to set the identifier value.

Specified by:
getPropertyName in interface UIDGenerator
See Also:
UIDGenerator.getPropertyNames()

setPropertyName

public void setPropertyName(String propertyName)
Description copied from interface: UIDGenerator
Sets the property name used to set the identifier value.

The property must be a string like 'schemaPrefix:fieldName' ; the syntax 'schemaName:fieldName' is also accepted. Could be used as a convenient method when there is only one property to set.

Specified by:
setPropertyName in interface UIDGenerator
See Also:
UIDGenerator.setPropertyNames(String[])

setPropertyNames

public void setPropertyNames(String[] propertyNames)
Description copied from interface: UIDGenerator
Set the properties used to set the identifier value.

Specified by:
setPropertyNames in interface UIDGenerator

getPropertyNames

public String[] getPropertyNames()
Description copied from interface: UIDGenerator
Gets the property name used to set the identifier value

Specified by:
getPropertyNames in interface UIDGenerator
Returns:

setUID

public void setUID(DocumentModel document)
            throws DocumentException
Description copied from interface: UIDGenerator
Creates a new UID for the given doc and sets the field configured in the generator component with this value.

Specified by:
setUID in interface UIDGenerator
Throws:
DocumentException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.