Class IdentifierGeneratorBase
java.lang.Object
org.alfresco.module.org_alfresco_module_rm.identifier.IdentifierGeneratorBase
- All Implemented Interfaces:
IdentifierGenerator
- Direct Known Subclasses:
BasicIdentifierGenerator
- Author:
- Roy Wetherall
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetType()The content type this generator is applicible to.voidinit()Initialisation methodprotected StringFunction to pad a string with zero '0' characters to the required lengthvoidsetIdentifierService(IdentifierService identifierService) Set identifier service.voidsetNodeService(NodeService nodeService) Set the node servicevoidsetTypeAsString(String type) Set type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.module.org_alfresco_module_rm.identifier.IdentifierGenerator
generateId
-
Field Details
-
nodeService
Node service
-
-
Constructor Details
-
IdentifierGeneratorBase
public IdentifierGeneratorBase()
-
-
Method Details
-
init
public void init()Initialisation method -
setIdentifierService
Set identifier service.- Parameters:
identifierService- identifier service
-
setNodeService
Set the node service- Parameters:
nodeService- node service
-
setTypeAsString
Set type.- Parameters:
type- content type
-
getType
Description copied from interface:IdentifierGeneratorThe content type this generator is applicible to.- Specified by:
getTypein interfaceIdentifierGenerator- Returns:
- QName the type
- See Also:
-
padString
Function to pad a string with zero '0' characters to the required length- Parameters:
s- String to pad with leading zero '0' characterslen- Length to pad to- Returns:
- padded string or the original if already at >=len characters
-