de.interactive_instruments.ShapeChange.Transformation.Naming
Class NamingModifier

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Transformation.Naming.NamingModifier
All Implemented Interfaces:
MessageSource, Transformer

public class NamingModifier
extends Object
implements Transformer, MessageSource

Encapsulates the logic for execution of rules that modify the naming of application schema elements.

Author:
Johannes Echterhoff (echterhoff interactive-instruments de)

Field Summary
static String DEFAULT_SUFFIX
          Default suffix used for adding a suffix to model element names, in case that the configuration parameter "suffix" is not used.
static String PARAM_SUFFIX
          Identifier of the parameter that provides the suffix to add.
static String PARAM_SUFFIX_REGEX
          Identifier of the parameter that defines the regular expression for matching model element names to add a suffix.
static String RULE_TRF_ADD_SUFFIX
          Identifies the rule used for adding a suffix to the name of specific model elements.
 
Constructor Summary
NamingModifier()
           
 
Method Summary
 String message(int mnr)
          Return a message for a message number.
 void process(GenericModel genModel, Options options, TransformerConfiguration trfConfig, ShapeChangeResult result)
          Processes the model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_SUFFIX

public static final String PARAM_SUFFIX
Identifier of the parameter that provides the suffix to add. Applies to rule "rule-trf-add-suffix". The parameter is optional - the default value is: "_".

See Also:
Constant Field Values

PARAM_SUFFIX_REGEX

public static final String PARAM_SUFFIX_REGEX
Identifier of the parameter that defines the regular expression for matching model element names to add a suffix. Applies to rule "rule-trf-add-suffix". The parameter is required.

See Also:
Constant Field Values

RULE_TRF_ADD_SUFFIX

public static final String RULE_TRF_ADD_SUFFIX
Identifies the rule used for adding a suffix to the name of specific model elements.

See Also:
Constant Field Values

DEFAULT_SUFFIX

public static final String DEFAULT_SUFFIX
Default suffix used for adding a suffix to model element names, in case that the configuration parameter "suffix" is not used.

See Also:
Constant Field Values
Constructor Detail

NamingModifier

public NamingModifier()
Method Detail

process

public void process(GenericModel genModel,
                    Options options,
                    TransformerConfiguration trfConfig,
                    ShapeChangeResult result)
             throws ShapeChangeAbortException
Description copied from interface: Transformer
Processes the model. The given model is changed by the Transformer. NOTE: The TransformationManager ensures that this can be done without side-effects.

Specified by:
process in interface Transformer
Parameters:
genModel - The model to process.
options - Options to control the process execution.
result - Logging target.
Throws:
ShapeChangeAbortException
See Also:
Transformer.process(de.interactive_instruments.ShapeChange.Model.Generic.GenericModel, de.interactive_instruments.ShapeChange.Options, de.interactive_instruments.ShapeChange.TransformerConfiguration, de.interactive_instruments.ShapeChange.ShapeChangeResult)

message

public String message(int mnr)
Description copied from interface: MessageSource
Return a message for a message number.

Specified by:
message in interface MessageSource


Copyright © 2015. All rights reserved.