Package org.ametys.odf.content.code
Class PrefixedIncrementalCodeGenerator
java.lang.Object
org.ametys.odf.content.code.AbstractUniqueCodeGenerator
org.ametys.odf.content.code.PrefixedIncrementalCodeGenerator
- All Implemented Interfaces:
UniqueCodeGenerator,PluginAware,Configurable,Serviceable
public class PrefixedIncrementalCodeGenerator
extends AbstractUniqueCodeGenerator
implements Serviceable
Implementation of
UniqueCodeGenerator that generates a code composed by a prefix representing the type of content and an incremental number on 6 digits.-
Field Summary
Fields inherited from class org.ametys.odf.content.code.AbstractUniqueCodeGenerator
_pluginName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Configuration configuration) generateUniqueCode(String cTypeId) Generate a unique codevoidservice(ServiceManager manager) Methods inherited from class org.ametys.odf.content.code.AbstractUniqueCodeGenerator
getId, getLabel, setPluginInfo
-
Constructor Details
-
PrefixedIncrementalCodeGenerator
public PrefixedIncrementalCodeGenerator()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
configure
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classAbstractUniqueCodeGenerator- Throws:
ConfigurationException
-
generateUniqueCode
Description copied from interface:UniqueCodeGeneratorGenerate a unique code- Specified by:
generateUniqueCodein interfaceUniqueCodeGenerator- Parameters:
cTypeId- The ODF content type- Returns:
- a unique code
-