public class AssociateResourceEvent extends AbstractResourceOperationEvent
Represents the event type to associate resource objects. Associate events can be represented as a single parent associated with multiple children, or multiple parents associated with a single child. The parents and children are represented by their Ids and can be retrieved inside the rule or event handlers.
To determine whether an associate event is single parent versus multiple parent, use the isSingleParent() flag. For example if isSingleParent() returns true, then you might choose to use getParent() which returns a single Id to represent the parent GRC object in this event and getChildren() to return the list of child Ids representing the children GRC Objects.
TriggerEventType.ASSOCIATE_OBJECTS| Constructor and Description |
|---|
AssociateResourceEvent(Id parentId,
java.util.List<Id> childIds,
TriggerPositionType position,
Context context)
Constructor for single parent.
|
AssociateResourceEvent(java.util.List<Id> parentIds,
Id childId,
TriggerPositionType position,
Context context)
Constructor for multiple parents.
|
| Modifier and Type | Method and Description |
|---|---|
Id |
getChild()
Returns the single child Id for the child object of this event.
|
java.util.List<Id> |
getChildren()
Returns the list of Ids of the children objects of this event.
|
Id |
getParent()
Returns the single parent Id for the parent object of this event.
|
java.util.List<Id> |
getParents()
Returns the list of Ids of the parent objects of this event.
|
boolean |
isSingleParent()
Represents which flavor of associate the event is.
|
getContext, getPosition, getTriggerEventType, hasOuterCreateWithRelationsEventpublic AssociateResourceEvent(Id parentId, java.util.List<Id> childIds, TriggerPositionType position, Context context)
parentId - single parent IdchildIds - List of multiple children Idsposition - either pre or postcontext - the Context for the APIpublic AssociateResourceEvent(java.util.List<Id> parentIds, Id childId, TriggerPositionType position, Context context)
parentIds - List of multiple parent IdschildId - single child Idposition - either pre or postcontext - the Context for the APIpublic Id getParent()
public java.util.List<Id> getParents()
public Id getChild()
public java.util.List<Id> getChildren()
public boolean isSingleParent()
Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2021. All Rights Reserved.
US Government Users Restricted Rights -
Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.