public class CopyObjectOptions
extends java.lang.Object
Allows you to configure options in IApplicationService.copyToParent(com.ibm.openpages.api.metadata.Id, List, CopyObjectOptions)
operations.
You can specify whether to include children in the copy and specify an explicit list of child Object Types to be copied.
You can also define the actions to take when a naming conflict occurs as a result of the copy.
When the includeChildren flag is set to true (default), then the ChildrenTypeToCopy list will determine which Object Types are copied. The default is that all types will be copied.
When the autoNameChildren flag is set to true, based on their Auto-Named/Copied Object OpenPages registry value the children associated with the object being copied are auto named. The default is false.
When the inclAssociationForReturnObjs flag is set to NONE (default), no associations (Child and Parent) will be included on the returned GRCObjects.
Constructor and Description |
---|
CopyObjectOptions()
Creates the CopyObjectOptions with default settings: includeChildren = true
- The children types are not explicitly defined and all primary children are copied. - If conflicts exist, it will use Copy Of prefix behavior to rename the copies. |
Modifier and Type | Method and Description |
---|---|
void |
addChildrenType(ITypeDefinition objectType)
Adds a single Object Type to the explicit list of Object Types to include in the copyToParent
operation.
|
void |
addTypeAssociationToHonor(TypeAssociationToHonor typeAssociationToHonor)
Add a single
TypeAssociationToHonor object that need to be honored
during the copy operation |
java.util.List<ITypeDefinition> |
getChildrenTypesToCopy()
Gets the children Object Types to be copied.
|
CopyConflictBehavior |
getConflictBehavior()
Gets the conflict resolution behavior for this copy operation.
|
static CopyObjectOptions |
getDefaultOptions()
Constructs a new instance of CopyObjectOptions with default parameters:
- includeChildren = true - ChildrenTypesToCopy = ALL - conflictBehavior = CopyConflictBehavior.CREATECOPYOF |
IncludeAssociations |
getInclAssociationForReturnObjs()
Gets the association filter value for returned GRCObjects.
|
java.util.Map<Id,java.lang.String> |
getNameOverrides()
Specifies a name to set on the copy of each Id.
|
java.util.List<TypeAssociationToHonor> |
getTypeAssociationsToHonor()
Gets the List of
TypeAssociationToHonor objects that need to be
honored during the copy operation. |
boolean |
isAutoNameChildren()
Specifies if the copy operation auto name children associated with the object being copied.
|
boolean |
isIncludeChildren()
Specifies if the copy operation includes children associated with the object being copied.
|
void |
setAutoNameChildren(boolean autoNameChildren)
Sets whether the copy operation auto name children associated with the object being copied.
|
void |
setChildrenTypesToCopy(java.util.List<ITypeDefinition> childrenTypesToCopy)
Explicit list of Object Types to include in the copyToParent
operation, if isIncludeChildren is true.
|
void |
setConflictBehavior(CopyConflictBehavior conflictBehavior)
Specifies the behavior of the copy operation
when a GRCObject with the same name already exists at the location.
|
void |
setInclAssociationForReturnObjs(IncludeAssociations inclAssociationForReturnObjs)
Specifies the associations to be included on
returned GRCObjects by the copy operation.
|
void |
setIncludeChildren(boolean includeChildren)
Sets whether the copy operation will include children associated with the object being copied.
|
void |
setNameOverrides(java.util.Map<Id,java.lang.String> nameOverrides)
Optionally specifies an explicit name to set on the copy of each Id.
|
void |
setTypeAssociationsToHonor(java.util.List<TypeAssociationToHonor> typeAssociationsToHonor)
Sets the the List of
TypeAssociationToHonor objects that need to be honored
during the copy operation |
public CopyObjectOptions()
public java.util.List<ITypeDefinition> getChildrenTypesToCopy()
public void setChildrenTypesToCopy(java.util.List<ITypeDefinition> childrenTypesToCopy)
Explicit list of Object Types to include in the copyToParent operation, if isIncludeChildren is true. If specified, only the primary children whose type matches those in the specified list will be copied to the target parent location. An empty list means all types are copied.
If this is not specified, then it is assumed that all primary children will be copied.
It is not required to add the object type for the object being copied.
childrenTypesToCopy
- (required) the complete list to set. If the list is empty, then all types will be copied. Copy will default to all.public boolean isIncludeChildren()
public void setIncludeChildren(boolean includeChildren)
includeChildren
- (required) the includeChildren to setpublic void addChildrenType(ITypeDefinition objectType)
Adds a single Object Type to the explicit list of Object Types to include in the copyToParent operation.
It is not required to add the object type for the object being copied.objectType
- (required) object type to include in the copyToParent operationpublic IncludeAssociations getInclAssociationForReturnObjs()
public void setInclAssociationForReturnObjs(IncludeAssociations inclAssociationForReturnObjs)
Specifies the associations to be included on returned GRCObjects by the copy operation.
Possible options include:
inclAssociationForReturnObjs
- (required) the association filter for returned GRCOBjects to setIncludeAssociations.
public CopyConflictBehavior getConflictBehavior()
public void setConflictBehavior(CopyConflictBehavior conflictBehavior)
Specifies the behavior of the copy operation when a GRCObject with the same name already exists at the location.
Possible options include:
conflictBehavior
- (required) the conflictBehavior to setCopyConflictBehavior.
public static CopyObjectOptions getDefaultOptions()
public java.util.List<TypeAssociationToHonor> getTypeAssociationsToHonor()
TypeAssociationToHonor
objects that need to be
honored during the copy operation.TypeAssociationToHonor
public void setTypeAssociationsToHonor(java.util.List<TypeAssociationToHonor> typeAssociationsToHonor)
TypeAssociationToHonor
objects that need to be honored
during the copy operationtypeAssociationsToHonor
- the List of TypeAssociationToHonor
public void addTypeAssociationToHonor(TypeAssociationToHonor typeAssociationToHonor)
TypeAssociationToHonor
object that need to be honored
during the copy operationtypeAssociationToHonor
- public boolean isAutoNameChildren()
isAutoNameChildren()
returns true.public void setAutoNameChildren(boolean autoNameChildren)
isAutoNameChildren()
returns true.autoNameChildren
- flagpublic java.util.Map<Id,java.lang.String> getNameOverrides()
public void setNameOverrides(java.util.Map<Id,java.lang.String> nameOverrides)
nameOverrides
- the mapping of Ids to names that will be set on their copies. Note that the names provided must have the platform designed
file type extension e.g. .txt
Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2020. All Rights Reserved.
US Government Users Restricted Rights -
Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.