Package org.nuxeo.ecm.core.uidgen
Interface UIDGenerator
- All Known Implementing Classes:
AbstractUIDGenerator
public interface UIDGenerator
Common interface for UID generators. All UID generators must implement this interface.
- Author:
- Dragos Mihalache
-
Method Summary
Modifier and TypeMethodDescriptioncreateUID
(DocumentModel document) Returns a new UID for the given doc.Get the property name used to set the identifier value.String[]
Gets the property name used to set the identifier valuegetSequenceKey
(DocumentModel document) 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.
-
Method Details
-
setPropertyName
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.
- See Also:
-
getPropertyName
String getPropertyName()Get the property name used to set the identifier value.- See Also:
-
setPropertyNames
Set the properties used to set the identifier value. -
getPropertyNames
String[] getPropertyNames()Gets the property name used to set the identifier value -
setSequencer
The sequencer used to generate unique numbers sequencially. -
getSequenceKey
-
createUID
Returns a new UID for the given doc. -
setUID
Creates a new UID for the given doc and sets the field configured in the generator component with this value.- Throws:
PropertyNotFoundException
-