public class ProfileTransferEA extends Object implements SingleTarget, MessageSource
Modifier and Type | Field and Description |
---|---|
static String |
PARAM_DELETE_EXISTING_PROFILES
Alias: none
Required / Optional: optional
Type: Boolean
Default Value:
false
Explanation: By default, profiles that are transferred are merged with
existing profiles of a model element in the EA repository. |
static String |
PARAM_PROCESS_ALL_SCHEMAS
Alias: none
Required / Optional: optional
Type: Boolean
Default Value:
false
Explanation: By default, profiles are transferred only for non-prohibited
classes (and their properties) from schemas that are selected for
processing. |
static String |
PARAM_PROFILES_TO_TRANSFER
Alias: none
Required / Optional: optional
Type: String (comma separated list of values)
Default Value: all profiles
Explanation: Names of profiles to be transferred.
|
static String |
PARAM_PWD
Alias: none
Required / Optional: optional
Type: String
Default Value: none
Explanation: If the target parameter
'repositoryFileNameOrConnectionString' is set, and the connection
requires a username and password, set the password with this target
parameter.
|
static String |
PARAM_REPO_CONNECTION_STRING
Alias: none
Required / Optional: optional
Type: String
Default Value: defaults to the value of the input parameters 'inputFile'
and 'repositoryFileNameOrConnectionString' (the former has higher
priority than the latter)
Explanation: If this parameter is set in the target configuration, it
provides the connection info to the EA repository in which profiles shall
be transferred.
|
static String |
PARAM_TRANSFER_TO_EAP_COPY
Alias: none
Required / Optional: optional
Type: Boolean
Default Value:
false
Explanation: By default, profile information is transferred into the EA
repository that has originally been loaded by ShapeChange. |
static String |
PARAM_USER
Alias: none
Required / Optional: optional
Type: String
Default Value: none
Explanation: If the target parameter
'repositoryFileNameOrConnectionString' is set, and the connection
requires a username and password, set the username with this target
parameter.
|
Constructor and Description |
---|
ProfileTransferEA() |
Modifier and Type | Method and Description |
---|---|
String |
getTargetName() |
void |
initialise(PackageInfo pi,
Model m,
Options o,
ShapeChangeResult r,
boolean diagOnly)
Allows a target to perform the necessary initialization routines before
processing.
|
String |
message(int mnr)
Return a message for a message number.
|
void |
process(ClassInfo ci)
The converter will call this method for each class belonging to the
package given during initialization (see
Target.initialise(de.interactive_instruments.ShapeChange.Model.PackageInfo, de.interactive_instruments.ShapeChange.Model.Model, de.interactive_instruments.ShapeChange.Options, de.interactive_instruments.ShapeChange.ShapeChangeResult, boolean) ). |
void |
reset()
All relevant fields of the target will be reset, so that it is ready for
processing selected schemas based upon a specific target configuration.
|
void |
write() |
void |
writeAll(ShapeChangeResult r)
Instructs the target to output the processing results.
|
public static final String PARAM_TRANSFER_TO_EAP_COPY
Required / Optional: optional
Type: Boolean
Default Value: false
Explanation: By default, profile information is transferred into the EA repository that has originally been loaded by ShapeChange. If this target parameter is 'true' and if the EA repository containing the input model is an EA project file (.eap), then that file is copied into the output directory and only the copy will be processed by the target.
Applies to Rule(s): none – default behavior
public static final String PARAM_DELETE_EXISTING_PROFILES
Required / Optional: optional
Type: Boolean
Default Value: false
Explanation: By default, profiles that are transferred are merged with existing profiles of a model element in the EA repository. Merging means that only the profiles with names that match one of the names of profiles to be transferred will be overwritten - all other profiles of the model element will be kept.
If this parameter is set to true
, any previously existing
profiles of a model element from the EA repository that is eligible for
profile transfer (see "processAllSchemas") are deleted
before profiles are transferred to it (even if no corresponding model
elements could be found in the input model).
Applies to Rule(s): none – default behavior
public static final String PARAM_PROFILES_TO_TRANSFER
Required / Optional: optional
Type: String (comma separated list of values)
Default Value: all profiles
Explanation: Names of profiles to be transferred.
Applies to Rule(s): none – default behavior
public static final String PARAM_PROCESS_ALL_SCHEMAS
Required / Optional: optional
Type: Boolean
Default Value: false
Explanation: By default, profiles are transferred only for non-prohibited
classes (and their properties) from schemas that are selected for
processing. If this parameter is set to true
, profiles are
transferred for non-prohibited classes (and their properties) from all
schemas. For details on non-prohibited classes, see the explanation of
input parameter
"prohibitLoadingClassesWithStatusTaggedValue"
.
Applies to Rule(s): none – default behavior
public static final String PARAM_REPO_CONNECTION_STRING
Required / Optional: optional
Type: String
Default Value: defaults to the value of the input parameters 'inputFile' and 'repositoryFileNameOrConnectionString' (the former has higher priority than the latter)
Explanation: If this parameter is set in the target configuration, it provides the connection info to the EA repository in which profiles shall be transferred. If the parameter is not set, the target will transfer the profiles into the model that is defined in the input configuration of ShapeChange. For further details on this parameter, see the explanation for the input parameter with this name (but keep in mind that the target will assume / requires that the connection to an EA repository is given).
Applies to Rule(s): none – default behavior
public static final String PARAM_USER
Required / Optional: optional
Type: String
Default Value: none
Explanation: If the target parameter 'repositoryFileNameOrConnectionString' is set, and the connection requires a username and password, set the username with this target parameter. NOTE: If the parameter 'repositoryFileNameOrConnectionString' is not set in the target configuration, the target will fully rely on the information provided in the input configuration. In other words, then there is no need to set the parameter 'username' in the target configuration.
Applies to Rule(s): none – default behavior
public static final String PARAM_PWD
Required / Optional: optional
Type: String
Default Value: none
Explanation: If the target parameter 'repositoryFileNameOrConnectionString' is set, and the connection requires a username and password, set the password with this target parameter. NOTE: If the parameter 'repositoryFileNameOrConnectionString' is not set in the target configuration, the target will fully rely on the information provided in the input configuration. In other words, then there is no need to set the parameter 'password' in the target configuration.
Applies to Rule(s): none – default behavior
public void initialise(PackageInfo pi, Model m, Options o, ShapeChangeResult r, boolean diagOnly) throws ShapeChangeAbortException
Target
Will be called by the Converter
for each selected schema (see
Model.selectedSchemas()
and PackageInfo.isSchema()
).
initialise
in interface Target
pi
- a schema from the model selected via the configuration (see
Model.selectedSchemas()
) - not necessarily always an
application schemaShapeChangeAbortException
Model.selectedSchemas()
,
PackageInfo.isSchema()
public void process(ClassInfo ci)
Target
Target.initialise(de.interactive_instruments.ShapeChange.Model.PackageInfo, de.interactive_instruments.ShapeChange.Model.Model, de.interactive_instruments.ShapeChange.Options, de.interactive_instruments.ShapeChange.ShapeChangeResult, boolean)
).
NOTE: will be called not only for the classes directly contained in the package, but also all sub-packages belonging to the same targetNamespace!
public String getTargetName()
getTargetName
in interface Target
public void writeAll(ShapeChangeResult r)
SingleTarget
Will be called by the Converter
after initialization and
processing for all of the selected schema has been performed.
writeAll
in interface SingleTarget
Model.selectedSchemas()
public void reset()
SingleTarget
The Converter
will reset SingleTargets whenever it processes a
target configuration.
reset
in interface SingleTarget
public String message(int mnr)
MessageSource
message
in interface MessageSource
Copyright © 2017. All rights reserved.