public class CreateResourceEvent extends AbstractResourceEvent
Represents the event type for creating a resource object. The resource being
created is provided by the AbstractResourceEvent.getResource(). In
the POST TriggerPositionType, the object that was created is available. To
access the newly created object, use the getCreatedResource() method. This is
useful if the event handler requires the Id for the newly created resource.
For an event handler which handles the CreateResourceEvent, the values of the resource object being saved can be modified directly. A separate call to IResourceService.saveResource() is not required.
TriggerEventType.CREATE_OBJECT| Constructor and Description |
|---|
CreateResourceEvent(IResource resource,
TriggerPositionType position,
Context context)
Constructor with the resource to be created.
|
CreateResourceEvent(TriggerEventType triggerEventType,
IResource resource,
TriggerPositionType position,
Context context) |
CreateResourceEvent(TriggerPositionType position,
Context context)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
IResource |
getCreatedResource()
If available, as in a POST event, Returns the created resource object that was
the result of this create event i.e.
|
getResourcegetContext, getPosition, getTriggerEventType, hasOuterCreateWithRelationsEventpublic CreateResourceEvent(TriggerPositionType position, Context context)
position - either pre or postcontext - the Context for the APIpublic CreateResourceEvent(IResource resource, TriggerPositionType position, Context context)
resource - the folder or GRC object that is the focus of the eventposition - either pre or postcontext - the Context for the APIpublic CreateResourceEvent(TriggerEventType triggerEventType, IResource resource, TriggerPositionType position, Context context)
public IResource getCreatedResource()
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.