Package org.nuxeo.ecm.core.uidgen
Interface UIDGeneratorService
-
- All Known Implementing Classes:
UIDGeneratorComponent
public interface UIDGeneratorService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringcreateUID(DocumentModel doc)UIDSequencergetSequencer()Retrieves the defaultUIDSequencerUIDSequencergetSequencer(String name)RetrievesUIDSequencerby it's nameUIDGeneratorgetUIDGeneratorFor(DocumentModel doc)Returns the uid generator to use for this document.voidsetUID(DocumentModel doc)Creates a new UID for the given doc and sets the field configured in the generator component with this value.
-
-
-
Method Detail
-
getSequencer
UIDSequencer getSequencer()
Retrieves the defaultUIDSequencer- Returns:
- the default
UIDSequencer - Since:
- 7.3
-
getSequencer
UIDSequencer getSequencer(String name)
RetrievesUIDSequencerby it's name- Parameters:
name- the name of theUIDSequencer- Returns:
- the
UIDSequencermatching the name - Since:
- 7.3
-
getUIDGeneratorFor
UIDGenerator getUIDGeneratorFor(DocumentModel doc)
Returns the uid generator to use for this document.Choice is made following the document type and the generator configuration.
-
setUID
void setUID(DocumentModel doc) throws PropertyNotFoundException
Creates a new UID for the given doc and sets the field configured in the generator component with this value.- Throws:
PropertyNotFoundException
-
createUID
String createUID(DocumentModel doc)
- Returns:
- a new UID for the given document
-
-