public abstract class AbstractUIDGenerator extends Object implements UIDGenerator
| Constructor and Description | 
|---|
AbstractUIDGenerator()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected int | 
getNext(DocumentModel document)  | 
protected long | 
getNextLong(DocumentModel document)  | 
String | 
getPropertyName()
Get the property name used to set the identifier value. 
 | 
String[] | 
getPropertyNames()
Gets the property name used to set the identifier value 
 | 
protected 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. 
 | 
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 String | 
str(String propName,
   DocumentModel document)  | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateUID, getSequenceKeypublic AbstractUIDGenerator()
public final void setSequencer(UIDSequencer sequencer)
UIDGeneratorsetSequencer in interface UIDGeneratorprotected int getNext(DocumentModel document)
protected long getNextLong(DocumentModel document)
public String getPropertyName()
UIDGeneratorgetPropertyName in interface UIDGeneratorUIDGenerator.getPropertyNames()public void setPropertyName(String propertyName)
UIDGeneratorThe 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.
setPropertyName in interface UIDGeneratorUIDGenerator.setPropertyNames(String[])public void setPropertyNames(String[] propertyNames)
UIDGeneratorsetPropertyNames in interface UIDGeneratorpublic String[] getPropertyNames()
UIDGeneratorgetPropertyNames in interface UIDGeneratorprotected final boolean isPropValueDefined(String propName, DocumentModel document)
protected final String str(String propName, DocumentModel document)
public void setUID(DocumentModel document) throws PropertyNotFoundException
UIDGeneratorsetUID in interface UIDGeneratorPropertyNotFoundExceptionCopyright © 2019 Nuxeo. All rights reserved.