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
-
Method Summary
Modifier and TypeMethodDescriptionprotected int
getNext
(DocumentModel document) protected long
getNextLong
(DocumentModel document) Get the property name used to set the identifier value.String[]
Gets the property name used to set the identifier valueprotected final boolean
isPropValueDefined
(String propName, DocumentModel document) Checks if the property with the given name is defined and is not null.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.final 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.protected final String
str
(String propName, DocumentModel document) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.ecm.core.uidgen.UIDGenerator
createUID, getSequenceKey
-
Constructor Details
-
AbstractUIDGenerator
public AbstractUIDGenerator()
-
-
Method Details
-
setSequencer
Description copied from interface:UIDGenerator
The sequencer used to generate unique numbers sequencially.- Specified by:
setSequencer
in interfaceUIDGenerator
-
getNext
-
getNextLong
-
getPropertyName
Description copied from interface:UIDGenerator
Get the property name used to set the identifier value.- Specified by:
getPropertyName
in interfaceUIDGenerator
- See Also:
-
setPropertyName
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 interfaceUIDGenerator
- See Also:
-
setPropertyNames
Description copied from interface:UIDGenerator
Set the properties used to set the identifier value.- Specified by:
setPropertyNames
in interfaceUIDGenerator
-
getPropertyNames
Description copied from interface:UIDGenerator
Gets the property name used to set the identifier value- Specified by:
getPropertyNames
in interfaceUIDGenerator
-
isPropValueDefined
Checks if the property with the given name is defined and is not null. -
str
-
setUID
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 interfaceUIDGenerator
- Throws:
PropertyNotFoundException
-