public class CopyModel extends AbstractImplementation implements ExecutableIF
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.Long,java.lang.Long> |
aeIdMap
The map with the Id's of the application element
|
protected boolean |
copyInstanceAttributes
Switch which set to copy the instance attributes
|
protected HandledInstancesMap |
handledMap
Map with the handled instances.
|
protected java.util.logging.Logger |
messenger
The messenger
|
protected boolean |
noEnvironmentInstances
Switch which tells the implementation to copy the environment instance.
|
protected boolean |
skipId
Switch which set to skip the Id attribute
|
protected AoSession |
sourceSess
The ASAM ODS session of the source.
|
protected AoSession |
targetSess
The ASAM ODS session of the target.
|
protected boolean |
useGetValueSeq
Switch which set to use the getValueSeq method
|
protected java.util.HashMap<java.lang.Long,InstanceElement> |
userGroupMap
The map with the Id of the instances of the usergroup.
|
protected boolean |
withSecurity
Switch which tells the implementation to copy the security information.
|
arguments, ctx, descriptor, NEW_LINE
Constructor and Description |
---|
CopyModel() |
Modifier and Type | Method and Description |
---|---|
protected void |
addHandledId(java.lang.String elementName,
T_LONGLONG ieId)
Add the Id of the instances to the list with handled Id's.
|
protected void |
copyAttribute(ApplicationAttribute aa,
ApplicationElement aeTarget,
BaseElement beTarget)
Copy the attribute as new attribute on the target application element.
|
protected void |
copyElement(ApplicationElement ae,
ApplicationStructure target,
AoSession targetSession)
Copy an application element with the attributes in the target application structure.
|
protected EnumerationDefinition |
copyEnumeration(EnumerationDefinition ed,
ApplicationStructure targetAs)
Copy the enumeration definition into the target application structure.
|
protected InstanceElement |
copyInstance(ApplicationElement aeSource,
InstanceElement ie,
ApplicationStructure targetAs)
Copy an instance element from the source instance element to the target instance element.
|
protected void |
copyInstancesOfElementByBaseType(ApplicationStructure as,
java.lang.String baseType,
ApplicationStructure targetAs,
java.util.HashMap<java.lang.Long,InstanceElement> ieMap)
Copy all instances of the the elements with the given base type from the source into the
target application structure.
|
protected void |
copyRelation(ApplicationRelation ar,
ApplicationElement ae,
ApplicationElement ae2,
ApplicationStructure target)
Copy the relation between the elements form the source into the target structure.
|
protected void |
copyRelation(ApplicationRelation ar,
ApplicationElement ae,
ApplicationElement ae2,
ApplicationStructure target,
ApplicationElement targetAe,
ApplicationElement targetAe2)
Copy the relation between the elements form the source into the target structure.
|
protected void |
copyRelations(ApplicationElement ae,
ApplicationStructure target,
AoSession targetSession)
Copy the relations from an application element into the target application structure, expect the names of the
application elements are identical in both application structures.
|
protected void |
copySecurity(ApplicationElement ae,
ApplicationStructure target,
AoSession targetSession)
Copy an application element with the attributes in the target application structure.
|
void |
execute()
The execute method, copy the model from the source session into the target session.
|
void |
init()
Initialize the copy of the model
|
protected java.lang.String[] |
listAttributes(java.lang.String aeName,
ApplicationElement aeTarget,
ApplicationElement aeSource,
boolean idSkip,
boolean skipName,
boolean skipValues)
List attributes.
|
void |
terminate()
The terminate method, nothing to do.
|
addAttributesToNameValueUnitArray, addAttributeToNameValueUnitArray, addStringValueToNameValueUnitArray, checkDirectoy, checkDirectoy, checkDirectoy, checkFile, checkFile, checkFile, checkIntValue, checkStringValue, compressNvuArray, createMessageFromPropertyFile, createMessageFromPropertyFile, createMessageFromPropertyFile, createTsUnionFromObject, deleteRowWithAttributes, getArguments, getContext, getDescriptor, getListFromProperty, getMandatoryProperty, getMandatoryProperty, getMandatoryPropertyAsInt, getMandatoryPropertyAsList, getMandatoryPropertyWithRuleException, getNvuArrayFromMap, getNvuArrayFromMap, getNvuObjectWithName, getNvuObjectWithName, getNvuObjectWithName, getOdsCacheFromProperty, getOptioanlPropertyAsInt, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsList, makeUpperCaseKeyword, removeAttributeFromNameValueUnitArray, removeAttributeFromNameValueUnitArray, setArguments, setContext, setDescriptor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContext, getDescriptor, setArguments, setContext, setDescriptor
protected AoSession sourceSess
protected AoSession targetSess
protected boolean withSecurity
protected boolean noEnvironmentInstances
protected java.util.logging.Logger messenger
protected java.util.HashMap<java.lang.Long,InstanceElement> userGroupMap
protected HandledInstancesMap handledMap
protected java.util.HashMap<java.lang.Long,java.lang.Long> aeIdMap
protected boolean copyInstanceAttributes
protected boolean useGetValueSeq
protected boolean skipId
protected void copyInstancesOfElementByBaseType(ApplicationStructure as, java.lang.String baseType, ApplicationStructure targetAs, java.util.HashMap<java.lang.Long,InstanceElement> ieMap) throws AoException
as
- the source application structure.baseType
- the base type.targetAs
- the target application structureieMap
- the map for the stored instances.AoException
- any occurring ASAM ODS exception.public void execute() throws ExecutableException
execute
in interface ExecutableIF
ExecutableException
- if execution fails.ExecutableIF.execute()
public void terminate() throws TerminationException
terminate
in interface ExecutableIF
TerminationException
- if termination fails.ExecutableIF.terminate()
public void init() throws InitializationFailedException
init
in interface ImplementationIF
init
in class AbstractImplementation
InitializationFailedException
- - When one of the required arguments not exist.com.highqsoft.xsd.ImplentationIF#init()
protected EnumerationDefinition copyEnumeration(EnumerationDefinition ed, ApplicationStructure targetAs) throws AoException
ed
- enumeration definition to copy.targetAs
- target application structureAoException
- any occurring ASAM ODS exception.protected void copyAttribute(ApplicationAttribute aa, ApplicationElement aeTarget, BaseElement beTarget) throws AoException
aa
- the attributeaeTarget
- the target application element.beTarget
- the target base element.AoException
- any occurring ASAM ODS exception.protected void copyElement(ApplicationElement ae, ApplicationStructure target, AoSession targetSession) throws AoException
ae
- the application element to copy.target
- the target application structuretargetSession
- the target sessionAoException
- any occurring ASAM ODS exception.protected void copySecurity(ApplicationElement ae, ApplicationStructure target, AoSession targetSession) throws AoException
ae
- the application element to copy.target
- the target application structuretargetSession
- the target sessionAoException
- any occurring ASAM ODS exception.protected void copyRelation(ApplicationRelation ar, ApplicationElement ae, ApplicationElement ae2, ApplicationStructure target) throws AoException
ar
- the relation to copyae
- the elem1 of the relation.ae2
- the elem2 of the relation.target
- the target application structure.AoException
- any occurring ASAM ODS exception.protected void copyRelation(ApplicationRelation ar, ApplicationElement ae, ApplicationElement ae2, ApplicationStructure target, ApplicationElement targetAe, ApplicationElement targetAe2) throws AoException
ar
- the relation to copyae
- the elem1 of the relation.ae2
- the elem2 of the relation.target
- the target application structure.targetAe
- the elem1 in the target structure.targetAe2
- the elem2 in the target structure.AoException
- any occurring ASAM ODS exception.protected void copyRelations(ApplicationElement ae, ApplicationStructure target, AoSession targetSession) throws AoException
ae
- the source element where the relation are copied fromtarget
- the target application structuretargetSession
- the target sessionAoException
- any occurring ASAM ODS exception.protected InstanceElement copyInstance(ApplicationElement aeSource, InstanceElement ie, ApplicationStructure targetAs) throws AoException
aeSource
- the source application element.ie
- the instance element to be copiedtargetAs
- the target application structureAoException
- any occurring ASAM ODS exception.protected void addHandledId(java.lang.String elementName, T_LONGLONG ieId)
elementName
- the name of the application element.ieId
- the Id of the instance.protected java.lang.String[] listAttributes(java.lang.String aeName, ApplicationElement aeTarget, ApplicationElement aeSource, boolean idSkip, boolean skipName, boolean skipValues) throws AoException
aeName
- name of the elementaeTarget
- the target application elementaeSource
- the source application elementidSkip
- skip the based attribute IdskipName
- skip the based attribute nameskipValues
- skip the based attribute values and flagsAoException
- any occurring ASAM ODS exception.