fr.gouv.culture.sdx.documentbase
Interface IDGenerator

All Superinterfaces:
org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled
All Known Implementing Classes:
AbstractIDGenerator

public interface IDGenerator
extends org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.configuration.Configurable


Field Summary
static java.lang.String ATTRIBUTE_CLASS
          The attribute used to define a class for an id generator.
static java.lang.String ATTRIBUTE_VALUE_DEFAULT_ID_GENERATOR_CLASS
          Default value for this attribute.
static java.lang.String CLASS_NAME
           
static java.lang.String ELEMENT_NAME_ID_GENERATOR
          The element used to define an id generator.
 
Method Summary
 java.lang.String generate()
          Generates an id using configured prefix and suffix
 java.lang.String generate(java.lang.String prefix, java.lang.String suffix)
          Generates an id appending the given strings
 java.lang.String getPrefix()
           
 java.lang.String getSuffix()
           
 boolean isIdUnique(java.lang.String id)
          Determines where an id is unique within an index
 void setDatabase(Database database)
          Sets the database for verification of a generated id's uniqueness
 void setIdFieldName(java.lang.String fieldName)
          Deprecated. No longer necesssary as we now use Database for id verification
 void setIndex(Index index)
          Deprecated. This was dependency on our Lucene packages
 void setPrefix(java.lang.String idPrefix)
           
 void setSuffix(java.lang.String idSuffix)
           
 
Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled
enableLogging
 
Methods inherited from interface org.apache.avalon.framework.configuration.Configurable
configure
 

Field Detail

CLASS_NAME

public static final java.lang.String CLASS_NAME
See Also:
Constant Field Values

ELEMENT_NAME_ID_GENERATOR

public static final java.lang.String ELEMENT_NAME_ID_GENERATOR
The element used to define an id generator.

See Also:
Constant Field Values

ATTRIBUTE_VALUE_DEFAULT_ID_GENERATOR_CLASS

public static final java.lang.String ATTRIBUTE_VALUE_DEFAULT_ID_GENERATOR_CLASS
Default value for this attribute.

See Also:
Constant Field Values

ATTRIBUTE_CLASS

public static final java.lang.String ATTRIBUTE_CLASS
The attribute used to define a class for an id generator.

See Also:
Constant Field Values
Method Detail

generate

public java.lang.String generate(java.lang.String prefix,
                                 java.lang.String suffix)
Generates an id appending the given strings

Parameters:
prefix - The prefix for the generated id
suffix - The suffix for the generated id

generate

public java.lang.String generate()
Generates an id using configured prefix and suffix


setIndex

public void setIndex(Index index)
Deprecated. This was dependency on our Lucene packages

Sets the index for verification of a generated id's uniqueness


setDatabase

public void setDatabase(Database database)
Sets the database for verification of a generated id's uniqueness


isIdUnique

public boolean isIdUnique(java.lang.String id)
Determines where an id is unique within an index


setIdFieldName

public void setIdFieldName(java.lang.String fieldName)
Deprecated. No longer necesssary as we now use Database for id verification

Set's the field name for the id field in the index for id verification needs


getSuffix

public java.lang.String getSuffix()

setSuffix

public void setSuffix(java.lang.String idSuffix)

getPrefix

public java.lang.String getPrefix()

setPrefix

public void setPrefix(java.lang.String idPrefix)


Copyright © 2000-2004 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.