public interface ISerializedResourceEvent extends IEvent
ResourceEvent
) and the resource associated with the event might no longer exist (e.g. rename,
delete). Therefore event receivers which register themselves for persistent events must adapt their event
registration and handling code. In particular receivers have to adapt the code that detects different subclasses of
ResourceEvent
because instanceof
will not work for these events. The following code
example shows how it should be done:
public void received(IEvent event) {
if (event instanceof ISerializedResourceEvent) {
if (((ISerializedResourceEvent)event).getSubClassName().equals(IExtendedEvent.class.getName())) {
...
}
}
else ...
}
The event's parameter (IEvent.getParameter()
) is not
persisted for extended events. The parameter of serialized resource events does not support all objects used be the
ResourceEvent
. Depending on the event type the following parameters are not supported (null is
returned) or converted to other objects:CREATE_XXX
: RID
instead of IResource
COPY, MOVE
: RID
instead of IResource
LOCK, UNLOCK
: ILockInfo
is not supportedPROPERTY_DELETE
: IPropertyDef
is not supportedPROPERTY_SET
: IPropertyName
instead of IProperty
DELETE
: IRidList
is not supportedModifier and Type | Method and Description |
---|---|
long |
getAutoID() |
boolean |
getCollectionFlag()
Returns
true if the resource is/was a collection - this flag is especially useful with
DELETE events. |
RID |
getRID()
Returns the resource identifier of the resource associated with this event.
|
long |
getSendTime() |
String |
getSubClassName()
Returns the name of the interface of the "extended" resource event: The returned name is the name of the interface
that extends
IResourceEvent . |
getDescription, getDescription, getParameter, getType, isLike
RID getRID()
boolean getCollectionFlag()
true
if the resource is/was a collection - this flag is especially useful with
DELETE events.true
if the resource is/was a collection, false otherwise.String getSubClassName()
IResourceEvent
. If the event implements an additional interface which does not extend
IResourceEvent
then this method returns the class name. If the events class name is
ResourceEvent
then the return value is null
(it was not an extended event).long getSendTime()
long getAutoID()
Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice