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 TypeMethodDescriptionvoid
configure
(Configuration configuration) generateUniqueCode
(String cTypeId) Generate a unique codevoid
service
(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:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classAbstractUniqueCodeGenerator
- Throws:
ConfigurationException
-
generateUniqueCode
Description copied from interface:UniqueCodeGenerator
Generate a unique code- Specified by:
generateUniqueCode
in interfaceUniqueCodeGenerator
- Parameters:
cTypeId
- The ODF content type- Returns:
- a unique code
-