com.sapportals.wcm.repository.manager

Class SerializedResourceEventTemplate

java.lang.Object
  extended by com.sapportals.wcm.repository.manager.SerializedResourceEventTemplate
All Implemented Interfaces:
ISerializedResourceEvent, IEvent

public final class SerializedResourceEventTemplate
extends Object
implements ISerializedResourceEvent

See Also:
IResourceEventBroker.registerForSerializedResourceEvents(IEventReceiver, SerializedResourceEventTemplate, IEventMapper)

Constructor Summary
SerializedResourceEventTemplate(int type)
           
 
Method Summary
 ResourceEvent asResourceEventTemplate()
          Transforms this event template into a ResourceEvent.XXX_TEMPLATE.
static SerializedResourceEventTemplate createFromResourceEventTemplate(ResourceEvent re)
          Transforms a resource event template (see ResourceEvent.XXX_TEMPLATE) into a serialized event template.
 long getAutoID()
          Returns a unique identifier for this event (primary key value of the row in the database table).
 boolean getCollectionFlag()
          Returns true if the resource is/was a collection - this flag is especially usefull with DELETE events.
 String getDescription()
           
 String getDescription(Locale locale)
           
 Object getParameter()
          Returns the event's parameter
 com.sapportals.wcm.util.uri.RID getRID()
          Returns the resource identifier of the resource associated with this event.
 long getSendTime()
          Returns the time when the event was sent and persisted.
 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.
 int getType()
          Returns the event's type
 boolean isLike(IEvent template)
          Compares this event with another event for equality or some kind of "similarity".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializedResourceEventTemplate

public SerializedResourceEventTemplate(int type)
Method Detail

createFromResourceEventTemplate

public static SerializedResourceEventTemplate createFromResourceEventTemplate(ResourceEvent re)
Transforms a resource event template (see ResourceEvent.XXX_TEMPLATE) into a serialized event template.

Parameters:
re -
Returns:

asResourceEventTemplate

public ResourceEvent asResourceEventTemplate()
Transforms this event template into a ResourceEvent.XXX_TEMPLATE.

Returns:

isLike

public boolean isLike(IEvent template)
Description copied from interface: IEvent
Compares this event with another event for equality or some kind of "similarity". Normally an event equals another if it is of the same instance and type. There might be implementations that want to match one event type with many others.

Specified by:
isLike in interface IEvent
Parameters:
template - The other event to compare with.
Returns:
True, if the specified event template is equal to this event, according to the implemented matching rules.

getDescription

public String getDescription()
Specified by:
getDescription in interface IEvent

getDescription

public String getDescription(Locale locale)
Specified by:
getDescription in interface IEvent

getParameter

public Object getParameter()
Description copied from interface: IEvent
Returns the event's parameter

Specified by:
getParameter in interface IEvent
Returns:
the event's parameter

getType

public int getType()
Description copied from interface: IEvent
Returns the event's type

Specified by:
getType in interface IEvent
Returns:
the event's type

getRID

public com.sapportals.wcm.util.uri.RID getRID()
Description copied from interface: ISerializedResourceEvent
Returns the resource identifier of the resource associated with this event. Note: Obviously it is not possible to get a resource instance for this RID in case of a delete event, because the resource was already deleted - if a resource exists for the RID a new one must have been created in the meantime with the same name.

Specified by:
getRID in interface ISerializedResourceEvent
Returns:

getSendTime

public long getSendTime()
Description copied from interface: ISerializedResourceEvent
Returns the time when the event was sent and persisted.

Specified by:
getSendTime in interface ISerializedResourceEvent
Returns:

getSubClassName

public String getSubClassName()
Description copied from interface: ISerializedResourceEvent
Returns the name of the interface of the "extended" resource event: The returned name is the name of the interface that extends 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).

Specified by:
getSubClassName in interface ISerializedResourceEvent
Returns:

getAutoID

public long getAutoID()
Description copied from interface: ISerializedResourceEvent
Returns a unique identifier for this event (primary key value of the row in the database table).

Specified by:
getAutoID in interface ISerializedResourceEvent
Returns:

getCollectionFlag

public boolean getCollectionFlag()
Description copied from interface: ISerializedResourceEvent
Returns true if the resource is/was a collection - this flag is especially usefull with DELETE events.

Specified by:
getCollectionFlag in interface ISerializedResourceEvent
Returns:
Access Rights

This class can be accessed from:


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 2012 SAP AG Complete Copyright Notice