Package org.nuxeo.ecm.core.uidgen
Class AbstractUIDGenerator
java.lang.Object
org.nuxeo.ecm.core.uidgen.AbstractUIDGenerator
- All Implemented Interfaces:
UIDGenerator
The abstract class adds some useful methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intgetNext(DocumentModel document) protected longgetNextLong(DocumentModel document) Get the property name used to set the identifier value.String[]Gets the property name used to set the identifier valueprotected final booleanisPropValueDefined(String propName, DocumentModel document) Checks if the property with the given name is defined and is not null.voidsetPropertyName(String propertyName) Sets the property name used to set the identifier value.voidsetPropertyNames(String[] propertyNames) Set the properties used to set the identifier value.final voidsetSequencer(UIDSequencer sequencer) The sequencer used to generate unique numbers sequencially.voidsetUID(DocumentModel document) Creates a new UID for the given doc and sets the field configured in the generator component with this value.protected final Stringstr(String propName, DocumentModel document) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.ecm.core.uidgen.UIDGenerator
createUID, getSequenceKey
-
Constructor Details
-
AbstractUIDGenerator
public AbstractUIDGenerator()
-
-
Method Details
-
setSequencer
Description copied from interface:UIDGeneratorThe sequencer used to generate unique numbers sequencially.- Specified by:
setSequencerin interfaceUIDGenerator
-
getNext
-
getNextLong
-
getPropertyName
Description copied from interface:UIDGeneratorGet the property name used to set the identifier value.- Specified by:
getPropertyNamein interfaceUIDGenerator- See Also:
-
setPropertyName
Description copied from interface:UIDGeneratorSets 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:
setPropertyNamein interfaceUIDGenerator- See Also:
-
setPropertyNames
Description copied from interface:UIDGeneratorSet the properties used to set the identifier value.- Specified by:
setPropertyNamesin interfaceUIDGenerator
-
getPropertyNames
Description copied from interface:UIDGeneratorGets the property name used to set the identifier value- Specified by:
getPropertyNamesin interfaceUIDGenerator
-
isPropValueDefined
Checks if the property with the given name is defined and is not null. -
str
-
setUID
Description copied from interface:UIDGeneratorCreates a new UID for the given doc and sets the field configured in the generator component with this value.- Specified by:
setUIDin interfaceUIDGenerator- Throws:
PropertyNotFoundException
-