public abstract class CopyInstancesAbstractRule extends AscobaAbstractRule
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 |
checkInstElem
Switch which check the instance in the target
|
protected boolean |
copyInstanceAttributes
Switch which set to copy the instance attributes
|
protected boolean |
skipId
Switch which set to skip the Id attribute
|
protected boolean |
skipValues
Switch which set to skip the values and flags attribute
|
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.
|
elementName, handledMap, messenger, sourceSess, useDestroy
loggerName, postMethods, preMethods, sessionRef
arguments, ctx, descriptor, NEW_LINE
Constructor and Description |
---|
CopyInstancesAbstractRule() |
Modifier and Type | Method and Description |
---|---|
protected void |
copyInitialRights(InstanceElement ie,
InstanceElement targetIe)
Copy the Rights from the source to the target instance element.
|
protected void |
copyRights(InstanceElement ie,
InstanceElement targetIe)
Copy the Rights from the source to the target instance element.
|
protected InstanceElement |
createCopiedInstance(InstanceElement ie,
ApplicationElement aeTarget,
ApplicationElement aeSource)
Create at the target application element a copy of the given instance
element.
|
protected DataType |
getAttributeDatatype(ApplicationAttribute aa)
Get the datatype of an attribute using the cache.
|
protected java.lang.String |
getAttributName(ApplicationAttribute aa)
Get the datatype of an attribute using the cache.
|
protected java.lang.Long |
getTargetAID(T_LONGLONG aid)
Get the Id of application element in the target of the corresponding
application element from the source.
|
protected InstanceElement |
getTargetUserGroup(T_LONGLONG usergroupId)
Get the InstanceElement of the AoUserGroup from the target of the corresponding usergroup instance element in the
source.
|
NameValueUnit[][] |
getValue()
ElementToRule, nothing to do at getValue()
|
void |
init(java.lang.String logger_name)
The initialization of the rule.
|
protected void |
linkRelated(InstanceElement ie,
InstanceElement ieTarget,
ApplicationElement aeSource,
ApplicationElement aeTarget,
java.lang.String logger_name)
Link the related instances from the source, which are already in the target to the
target instance element.
|
protected java.lang.String[] |
listAttributes(java.lang.String aeName,
ApplicationElement aeTarget,
ApplicationElement aeSource,
boolean skipId,
boolean skipName)
List attributes.
|
protected ApplicationAttribute[] |
listElementAttributes(ApplicationElement ae)
List the attributes of an element, use the cache of the attributes.
|
protected InstanceElement |
loadFromTarget(ApplicationStructure targetAs,
ApplicationElement aeTarget,
java.lang.String aeName,
InstanceElement ie)
Load the corresponding instance from the target application structure of the instance element from the source.
|
void |
terminate(java.lang.String logger_name)
The terminate method, reset the local variables.
|
addCopied, addHandledId, checkHandledId, destroy, destroy, execute, getCopiedTarget, getIds, getIds, getIdValue, getTargetApplicationRelation, setValue, setValue, stactTraceToString
execute, executePostMethods, executePreMethods, getAoSessionFromContextWithSessionRef, getId, getOdsCache, getPointTo, getSessionRef, getType, isPedantic, setGathermode, setId, setPointTo, setPostMethods, setPreMethods, setSessionRef, setType, terminate, toString, toString, toString
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, init, makeUpperCaseKeyword, removeAttributeFromNameValueUnitArray, removeAttributeFromNameValueUnitArray, setArguments, setContext, setDescriptor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getContext, getDescriptor, init, setArguments, setContext, setDescriptor
protected AoSession targetSess
protected boolean withSecurity
protected java.util.HashMap<java.lang.Long,InstanceElement> userGroupMap
protected java.util.HashMap<java.lang.Long,java.lang.Long> aeIdMap
protected boolean useGetValueSeq
protected boolean copyInstanceAttributes
protected boolean skipId
protected boolean skipValues
protected boolean checkInstElem
public NameValueUnit[][] getValue()
getValue
in interface RuleIF
getValue
in class AscobaAbstractRule
RuleIF.getValue()
public void init(java.lang.String logger_name) throws InitializationFailedException
init
in class AscobaAbstractRule
logger_name
- the name of the logger.InitializationFailedException
- any error which will break the ruleAbstractImplementation.init()
public void terminate(java.lang.String logger_name) throws TerminationException
terminate
in class AscobaAbstractRule
TerminationException
AbstractRule.terminate()
protected java.lang.Long getTargetAID(T_LONGLONG aid) throws AoException
aid
- The application element Id from the source.AoException
- any occurring ASAM ODS exceptionprotected InstanceElement loadFromTarget(ApplicationStructure targetAs, ApplicationElement aeTarget, java.lang.String aeName, InstanceElement ie) throws AoException
targetAs
- The target application structure.aeTarget
- the target application element.aeName
- the name of the application element.ie
- the instance of the source.AoException
- any occurring ASAM ODS Exception.protected InstanceElement getTargetUserGroup(T_LONGLONG usergroupId) throws AoException
usergroupId
- the Id of the usergroup instance in the source.AoException
- any occurring ASAM ODS exceptionprotected void copyRights(InstanceElement ie, InstanceElement targetIe) throws AoException
ie
- the source instance elementtargetIe
- the target instance element.AoException
- any occurring ASAM ODS exceptionprotected void copyInitialRights(InstanceElement ie, InstanceElement targetIe) throws AoException
ie
- the source instance elementtargetIe
- the target instance element.AoException
- any occurring ASAM ODS exceptionprotected java.lang.String[] listAttributes(java.lang.String aeName, ApplicationElement aeTarget, ApplicationElement aeSource, boolean skipId, boolean skipName) throws AoException
aeName
- name of the elementaeTarget
- the target application elementaeSource
- the source application elementskipId
- skip the based attribute IdskipName
- skip the based attribute nameAoException
- any occurring ASAM ODS exception.protected ApplicationAttribute[] listElementAttributes(ApplicationElement ae) throws AoException
ae
- the elementAoException
- any occurred ASAM ODS exceptionprotected DataType getAttributeDatatype(ApplicationAttribute aa) throws AoException
aa
- the attributeAoException
- any occurring ASAM ODS exception.protected java.lang.String getAttributName(ApplicationAttribute aa) throws AoException
aa
- the attributeAoException
- any occurring ASAM ODS exception.protected InstanceElement createCopiedInstance(InstanceElement ie, ApplicationElement aeTarget, ApplicationElement aeSource) throws AoException
ie
- the instance element to copyaeTarget
- the target application element.aeSource
- the source application element.AoException
- any occurring ASAM ODS Exception.protected void linkRelated(InstanceElement ie, InstanceElement ieTarget, ApplicationElement aeSource, ApplicationElement aeTarget, java.lang.String logger_name) throws AoException
ie
- the source instances element.ieTarget
- then target instances element.aeSource
- the source application element.aeTarget
- the target application element.logger_name
- the name of the Logger.AoException
- any occurring ASAM ODS exception.