Oxygen XML Editor 14.2 Author API

ro.sync.ecss.extensions.commons.id
Class GenerateIDElementsInfo

java.lang.Object
  extended by ro.sync.ecss.extensions.commons.id.GenerateIDElementsInfo

@API(type=INTERNAL,
     src=PUBLIC)
public class GenerateIDElementsInfo
extends java.lang.Object

Information about the list of elements for which to generate auto ID + if the auto ID generation is activated


Field Summary
static java.lang.String DEFAULT_ID_GENERATION_PATTERN
          The default id generation pattern.
static java.lang.String FILTER_IDS_ON_COPY_KEY
          The key from options
static java.lang.String GENERATE_ID_ELEMENTS_ACTIVE_KEY
          The key from options
static java.lang.String GENERATE_ID_ELEMENTS_KEY
          The key from options
static java.lang.String GENERATE_ID_PATTERN_KEY
          The key from options
static java.lang.String ID_PATTERN_DESCRIPTION
          Description for the id pattern macro.
static java.lang.String LOCAL_NAME_PATTERN_DESCRIPTION
          Description for the local name pattern macro.
static java.lang.String LOCAL_NAME_PATTERN_MACRO
          Local name pattern macro.
static java.lang.String PATTERN_TOOLTIP
          The default pattern tooltip.
static java.lang.String UUID_PATTERN_DESCRIPTION
          Description for the uuid pattern macro.
 
Constructor Summary
GenerateIDElementsInfo(AuthorAccess authorAccess, GenerateIDElementsInfo defaultOptions)
          Constructor.
GenerateIDElementsInfo(boolean autoGenerateIds, java.lang.String idGenerationPattern, java.lang.String[] elementsWithIDGeneration)
          Constructor.
GenerateIDElementsInfo(boolean autoGenerateIds, java.lang.String idGenerationPattern, java.lang.String[] elementsWithIDGeneration, boolean filterIDsOnCopy)
          Constructor.
 
Method Summary
static java.lang.String generateID(java.lang.String idGenerationPattern, java.lang.String elementLocalName)
          Generate an ID from a pattern for the specified element.
 java.lang.String[] getElementsWithIDGeneration()
           
 java.lang.String getIdGenerationPattern()
           
 java.lang.String getPatternTooltip()
          Get the pattern tooltip.
 boolean isAutoGenerateIDs()
           
 boolean isFilterIDsOnCopy()
           
 void saveToOptions(AuthorAccess authorAccess)
          Save to persistent options
 void setAutoGenerateIds(boolean autoGenerateIds)
          Set auto generate IDs.
 void setElementsWithIDGeneration(java.lang.String[] elementsWithIDGeneration)
          Set a list of elements with ID generation
 void setIdGenerationPattern(java.lang.String idGenerationPattern)
          Set the ID generation pattern.
 void setPatternTooltip(java.lang.String patternTooltip)
          Set the pattern tooltip which will be shown in the configuration dialog.
 void setRemoveIDsOnCopy(boolean removeIDsOnCopy)
          Set the flag which controls whether the IDs will be removed on copy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GENERATE_ID_ELEMENTS_KEY

public static final java.lang.String GENERATE_ID_ELEMENTS_KEY
The key from options

See Also:
Constant Field Values

GENERATE_ID_ELEMENTS_ACTIVE_KEY

public static final java.lang.String GENERATE_ID_ELEMENTS_ACTIVE_KEY
The key from options

See Also:
Constant Field Values

GENERATE_ID_PATTERN_KEY

public static final java.lang.String GENERATE_ID_PATTERN_KEY
The key from options

See Also:
Constant Field Values

FILTER_IDS_ON_COPY_KEY

public static final java.lang.String FILTER_IDS_ON_COPY_KEY
The key from options

See Also:
Constant Field Values

LOCAL_NAME_PATTERN_MACRO

public static final java.lang.String LOCAL_NAME_PATTERN_MACRO
Local name pattern macro.

See Also:
Constant Field Values

LOCAL_NAME_PATTERN_DESCRIPTION

public static final java.lang.String LOCAL_NAME_PATTERN_DESCRIPTION
Description for the local name pattern macro.

See Also:
Constant Field Values

UUID_PATTERN_DESCRIPTION

public static final java.lang.String UUID_PATTERN_DESCRIPTION
Description for the uuid pattern macro.

See Also:
Constant Field Values

ID_PATTERN_DESCRIPTION

public static final java.lang.String ID_PATTERN_DESCRIPTION
Description for the id pattern macro.

See Also:
Constant Field Values

DEFAULT_ID_GENERATION_PATTERN

public static final java.lang.String DEFAULT_ID_GENERATION_PATTERN
The default id generation pattern.

See Also:
Constant Field Values

PATTERN_TOOLTIP

public static java.lang.String PATTERN_TOOLTIP
The default pattern tooltip.

Constructor Detail

GenerateIDElementsInfo

public GenerateIDElementsInfo(AuthorAccess authorAccess,
                              GenerateIDElementsInfo defaultOptions)
Constructor.

Parameters:
authorAccess - The author access
defaultOptions - The default options.

GenerateIDElementsInfo

public GenerateIDElementsInfo(boolean autoGenerateIds,
                              java.lang.String idGenerationPattern,
                              java.lang.String[] elementsWithIDGeneration)
Constructor.

Parameters:
autoGenerateIds - true to auto generate IDs.
idGenerationPattern - The pattern for id generation.
elementsWithIDGeneration - List of elements for which to generate IDs.

GenerateIDElementsInfo

public GenerateIDElementsInfo(boolean autoGenerateIds,
                              java.lang.String idGenerationPattern,
                              java.lang.String[] elementsWithIDGeneration,
                              boolean filterIDsOnCopy)
Constructor.

Parameters:
autoGenerateIds - true to auto generate IDs.
idGenerationPattern - The pattern for id generation.
elementsWithIDGeneration - List of elements for which to generate IDs.
filterIDsOnCopy - Filter IDs when copying content in the same file.
Method Detail

isAutoGenerateIDs

public boolean isAutoGenerateIDs()
Returns:
true if auto generates IDs for elements.

isFilterIDsOnCopy

public boolean isFilterIDsOnCopy()
Returns:
Returns true to filter IDs when copying content in the Author page.

getIdGenerationPattern

public java.lang.String getIdGenerationPattern()
Returns:
Returns the pattern for id generation.

getElementsWithIDGeneration

public java.lang.String[] getElementsWithIDGeneration()
Returns:
Returns the elements for which to generate IDs.

saveToOptions

public void saveToOptions(AuthorAccess authorAccess)
Save to persistent options

Parameters:
authorAccess - The author access

generateID

public static java.lang.String generateID(java.lang.String idGenerationPattern,
                                          java.lang.String elementLocalName)
Generate an ID from a pattern for the specified element.

Parameters:
idGenerationPattern - The pattern.
elementLocalName - The element local name
Returns:
The generated ID.

setAutoGenerateIds

public void setAutoGenerateIds(boolean autoGenerateIds)
Set auto generate IDs.

Parameters:
autoGenerateIds - true to auto generate IDs.

setElementsWithIDGeneration

public void setElementsWithIDGeneration(java.lang.String[] elementsWithIDGeneration)
Set a list of elements with ID generation

Parameters:
elementsWithIDGeneration - a list of elements with ID generation

setRemoveIDsOnCopy

public void setRemoveIDsOnCopy(boolean removeIDsOnCopy)
Set the flag which controls whether the IDs will be removed on copy.

Parameters:
removeIDsOnCopy - The filterIDsOnCopy to set.

setIdGenerationPattern

public void setIdGenerationPattern(java.lang.String idGenerationPattern)
Set the ID generation pattern.

Parameters:
idGenerationPattern - The idGeneration pattern.

getPatternTooltip

public java.lang.String getPatternTooltip()
Get the pattern tooltip. Can be overwritten to provide another tooltip.

Returns:
the pattern tooltip.

setPatternTooltip

public void setPatternTooltip(java.lang.String patternTooltip)
Set the pattern tooltip which will be shown in the configuration dialog.

Parameters:
patternTooltip - the pattern tooltip which will be shown in the configuration dialog.

Oxygen XML Editor 14.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2013. All rights reserved.