Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.uidgen
Interface UIDGenerator

All Known Implementing Classes:
AbstractUIDGenerator, UIDGCoreDocument, UIDGenerator1

public interface UIDGenerator

Common interface for UID generators. All UID generators must implement this interface.

Author:
Method Summary
 java.lang.String createUID(DocumentModel document)
          Returns a new UID for the given doc.
 java.lang.String getPropertyName()
          Get the property name used to set the identifier value.
 java.lang.String[] getPropertyNames()
          Gets the property name used to set the identifier value
 java.lang.String getSequenceKey(DocumentModel document)
           
 void setPropertyName(java.lang.String propertyName)
          Sets the property name used to set the identifier value.
 void setPropertyNames(java.lang.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 Detail

setPropertyName

void setPropertyName(java.lang.String propertyName)
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.

Parameters:
propertyName -
See Also:
setPropertyNames(String[])

getPropertyName

java.lang.String getPropertyName()
Get the property name used to set the identifier value.

See Also:
getPropertyNames()

setPropertyNames

void setPropertyNames(java.lang.String[] propertyNames)
Set the properties used to set the identifier value.

Parameters:
propertyNames -

getPropertyNames

java.lang.String[] getPropertyNames()
Gets the property name used to set the identifier value

Returns:

setSequencer

void setSequencer(UIDSequencer sequencer)
The sequencer used to generate unique numbers sequencially.

Parameters:
sequencer -

getSequenceKey

java.lang.String getSequenceKey(DocumentModel document)
                                throws DocumentException
Throws:
DocumentException

createUID

java.lang.String createUID(DocumentModel document)
                           throws DocumentException
Returns a new UID for the given doc.

Throws:
DocumentException

setUID

void setUID(DocumentModel document)
            throws DocumentException
Creates a new UID for the given doc and sets the field configured in the generator component with this value.

Throws:
DocumentException

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.