SAP NetWeaver '04

com.sapportals.wcm.repository.manager
Class ResourceEvent

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.framework_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.repository.manager.ResourceEvent
All Implemented Interfaces:
IEvent, IResourceEvent
Direct Known Subclasses:
IndexServiceEvent, TimebasedPublishEvent

public class ResourceEvent
extends java.lang.Object
implements IResourceEvent

Implements the events known for resources.

Copyright 2004 SAP AG


Field Summary
static int ALL
          any kind of event... that means: an undefined event!
static ResourceEvent ALL_TEMPLATE
          constants for event templates
static int CHECKIN
          signals a VersioningManager.checkIn()
static ResourceEvent CHECKIN_TEMPLATE
           
static int CHECKOUT
          signals a VersioningManager.checkOut()
static ResourceEvent CHECKOUT_TEMPLATE
           
protected  java.lang.String clientId
          Client context asscociated to the event
static int COPY
          signals a NamespaceManager.copy()
static ResourceEvent COPY_TEMPLATE
           
protected  java.lang.String correlationId
          Correlationid of the event
static int CREATE_CHILD
          signals a NamespaceManager.createChild()
static ResourceEvent CREATE_CHILD_TEMPLATE
           
static int CREATE_COLLECTION
          signals a NamespaceManager.createCollection()
static ResourceEvent CREATE_COLLECTION_TEMPLATE
           
static int CREATE_LINK
          signals a NamespaceManager.createLink()
static ResourceEvent CREATE_LINK_TEMPLATE
           
static int DELETE
          signals a NamespaceManager.delete()
static ResourceEvent DELETE_TEMPLATE
           
static int ENABLE_VERSIONING
          Signals that versioning was activated for a resource
static ResourceEvent ENABLE_VERSIONING_TEMPLATE
           
static int GET
          signals a NamespaceManager.getContentInputStream()
static int GET_CHILDREN
          signals a NamespaceManager.getChildren()
static ResourceEvent GET_CHILDREN_TEMPLATE
           
static ResourceEvent GET_TEMPLATE
           
static int LOCK
          signals a LockManager.unlock()
static ResourceEvent LOCK_TEMPLATE
           
static int MIGRATION
          signals a migration
static ResourceEvent MIGRATION_TEMPLATE
           
static int MOVE
          signals a NamespaceManager.move()
static ResourceEvent MOVE_TEMPLATE
           
protected  java.lang.Object param
          This events parameter(s)
static int PRE_CHECKIN
          Before IVersioningManager.checkIn()
static ResourceEvent PRE_CHECKIN_TEMPLATE
           
static int PRE_DELETE
          Before INamespaceManager.delete()
static ResourceEvent PRE_DELETE_TEMPLATE
           
static int PRE_MOVE
          Before INamespaceManager.delete()
static ResourceEvent PRE_MOVE_TEMPLATE
           
static int PRE_RENAME
          Before INamespaceManager.rename()
static ResourceEvent PRE_RENAME_TEMPLATE
           
static int PRE_SET
          Before IContentManager.updateContent()
static ResourceEvent PRE_SET_TEMPLATE
           
static int PROPERTY_DELETE
          signals a PropertyManager.delete()
static ResourceEvent PROPERTY_DELETE_TEMPLATE
           
static int PROPERTY_GET
          signals a PropertyManager.get()
static ResourceEvent PROPERTY_GET_TEMPLATE
           
static int PROPERTY_SET
          signals a PropertyManager.set()
static ResourceEvent PROPERTY_SET_TEMPLATE
           
static int RENAME
          signals a NamespaceManager.move()
static ResourceEvent RENAME_TEMPLATE
           
protected  IResource resource
          This events associated resource.
protected  IResourceContext resourceContext
          Resource context asscociated to the event
static int SET
          signals a NamespaceManager.updateContent()
static ResourceEvent SET_TEMPLATE
           
protected  int type
          This events type.
static int UNDO_CHECKOUT
          Signals a VersioningManager.undoCheckOut()
static ResourceEvent UNDO_CHECKOUT_TEMPLATE
           
protected  java.lang.String uniqueId
          Unique id of the event
static int UNLOCK
          signals a LockManager.lock()
static ResourceEvent UNLOCK_TEMPLATE
           
static int UPDATE_LINK
          signals a NamespaceManager.updateLink()
static ResourceEvent UPDATE_LINK_TEMPLATE
           
 
Constructor Summary
ResourceEvent(int type, IResource resource)
          Create resource event from type and resource.
ResourceEvent(int type, IResource resource, java.lang.Object param)
          Create resource event from type and resource.
ResourceEvent(IResource resource, int type)
          Create resource event based on resource event type and resource.
ResourceEvent(IResource resource, int type, java.lang.Object param)
          Create resource event based on resource event type and resource.
ResourceEvent(IResource resource, int type, java.lang.String correlationId)
          Create resource event based on resource event type and resource.
ResourceEvent(IResource resource, int type, java.lang.String correlationId, java.lang.Object param)
          Create resource event from type and resource.
 
Method Summary
 java.lang.String getClientId()
          Returns the client identifier used when the event was build.
 java.lang.String getCorrelationId()
          Get correlation id of event.
 java.lang.String getDescription()
           
 java.lang.String getDescription(java.util.Locale locale)
           
 java.lang.Object getParameter()
          Returns the event's parameter
 java.lang.Object getReceiverProperty(java.lang.String name)
          Returns the property with the specified name.
 IResource getResource()
          Get a reference to the IResource , that caused the event.
 IResourceContext getResourceContext()
          Returns the resource context used when the event was build.
 int getType()
          Returns the event's type
 java.lang.String getUniqueId()
          Get unique id of event.
 boolean isLike(IEvent template)
          Compares this event with another event for equality or some kind of "similarity".
 void setReceiverProperty(java.lang.String name, java.lang.Object value)
          Stores a property (name/value pair) at this event.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALL

public static final int ALL
any kind of event... that means: an undefined event!

UNLOCK

public static final int UNLOCK
signals a LockManager.lock()

LOCK

public static final int LOCK
signals a LockManager.unlock()

PROPERTY_DELETE

public static final int PROPERTY_DELETE
signals a PropertyManager.delete()

PROPERTY_SET

public static final int PROPERTY_SET
signals a PropertyManager.set()

PROPERTY_GET

public static final int PROPERTY_GET
signals a PropertyManager.get()

DELETE

public static final int DELETE
signals a NamespaceManager.delete()

CREATE_CHILD

public static final int CREATE_CHILD
signals a NamespaceManager.createChild()

CREATE_COLLECTION

public static final int CREATE_COLLECTION
signals a NamespaceManager.createCollection()

CREATE_LINK

public static final int CREATE_LINK
signals a NamespaceManager.createLink()

UPDATE_LINK

public static final int UPDATE_LINK
signals a NamespaceManager.updateLink()

SET

public static final int SET
signals a NamespaceManager.updateContent()

GET

public static final int GET
signals a NamespaceManager.getContentInputStream()

GET_CHILDREN

public static final int GET_CHILDREN
signals a NamespaceManager.getChildren()

MOVE

public static final int MOVE
signals a NamespaceManager.move()

RENAME

public static final int RENAME
signals a NamespaceManager.move()

COPY

public static final int COPY
signals a NamespaceManager.copy()

CHECKOUT

public static final int CHECKOUT
signals a VersioningManager.checkOut()

CHECKIN

public static final int CHECKIN
signals a VersioningManager.checkIn()

UNDO_CHECKOUT

public static final int UNDO_CHECKOUT
Signals a VersioningManager.undoCheckOut()

ENABLE_VERSIONING

public static final int ENABLE_VERSIONING
Signals that versioning was activated for a resource

PRE_SET

public static final int PRE_SET
Before IContentManager.updateContent()

PRE_DELETE

public static final int PRE_DELETE
Before INamespaceManager.delete()

PRE_RENAME

public static final int PRE_RENAME
Before INamespaceManager.rename()

PRE_MOVE

public static final int PRE_MOVE
Before INamespaceManager.delete()

PRE_CHECKIN

public static final int PRE_CHECKIN
Before IVersioningManager.checkIn()

MIGRATION

public static final int MIGRATION
signals a migration

ALL_TEMPLATE

public static final ResourceEvent ALL_TEMPLATE
constants for event templates

UNLOCK_TEMPLATE

public static final ResourceEvent UNLOCK_TEMPLATE

LOCK_TEMPLATE

public static final ResourceEvent LOCK_TEMPLATE

PROPERTY_DELETE_TEMPLATE

public static final ResourceEvent PROPERTY_DELETE_TEMPLATE

PROPERTY_SET_TEMPLATE

public static final ResourceEvent PROPERTY_SET_TEMPLATE

PROPERTY_GET_TEMPLATE

public static final ResourceEvent PROPERTY_GET_TEMPLATE

DELETE_TEMPLATE

public static final ResourceEvent DELETE_TEMPLATE

CREATE_CHILD_TEMPLATE

public static final ResourceEvent CREATE_CHILD_TEMPLATE

CREATE_COLLECTION_TEMPLATE

public static final ResourceEvent CREATE_COLLECTION_TEMPLATE

CREATE_LINK_TEMPLATE

public static final ResourceEvent CREATE_LINK_TEMPLATE

UPDATE_LINK_TEMPLATE

public static final ResourceEvent UPDATE_LINK_TEMPLATE

SET_TEMPLATE

public static final ResourceEvent SET_TEMPLATE

GET_TEMPLATE

public static final ResourceEvent GET_TEMPLATE

GET_CHILDREN_TEMPLATE

public static final ResourceEvent GET_CHILDREN_TEMPLATE

MOVE_TEMPLATE

public static final ResourceEvent MOVE_TEMPLATE

RENAME_TEMPLATE

public static final ResourceEvent RENAME_TEMPLATE

COPY_TEMPLATE

public static final ResourceEvent COPY_TEMPLATE

CHECKOUT_TEMPLATE

public static final ResourceEvent CHECKOUT_TEMPLATE

CHECKIN_TEMPLATE

public static final ResourceEvent CHECKIN_TEMPLATE

UNDO_CHECKOUT_TEMPLATE

public static final ResourceEvent UNDO_CHECKOUT_TEMPLATE

ENABLE_VERSIONING_TEMPLATE

public static final ResourceEvent ENABLE_VERSIONING_TEMPLATE

PRE_SET_TEMPLATE

public static final ResourceEvent PRE_SET_TEMPLATE

PRE_DELETE_TEMPLATE

public static final ResourceEvent PRE_DELETE_TEMPLATE

PRE_RENAME_TEMPLATE

public static final ResourceEvent PRE_RENAME_TEMPLATE

PRE_MOVE_TEMPLATE

public static final ResourceEvent PRE_MOVE_TEMPLATE

PRE_CHECKIN_TEMPLATE

public static final ResourceEvent PRE_CHECKIN_TEMPLATE

MIGRATION_TEMPLATE

public static final ResourceEvent MIGRATION_TEMPLATE

type

protected final int type
This events type.

resource

protected final IResource resource
This events associated resource.

resourceContext

protected IResourceContext resourceContext
Resource context asscociated to the event

clientId

protected final java.lang.String clientId
Client context asscociated to the event

uniqueId

protected final java.lang.String uniqueId
Unique id of the event

correlationId

protected final java.lang.String correlationId
Correlationid of the event

param

protected final java.lang.Object param
This events parameter(s)
Constructor Detail

ResourceEvent

public ResourceEvent(int type,
                     IResource resource)
Create resource event from type and resource.
Parameters:
type - The type for this event (action).
resource - The resource that caused the event.

ResourceEvent

public ResourceEvent(int type,
                     IResource resource,
                     java.lang.Object param)
Create resource event from type and resource.
Parameters:
type - The type for this event (action).
resource - The resource that caused the event.
param - Additional parameter(s):
LOCK, UNLOCK: ILockInfo of the lock
PROPERTY_DELETE: IPropertyDef of the deleted property
PROPERTY_GET, PROPERTY_SET: IProperty
CREATE_CHILD, CREATE_LINK: IResource
CREATE_COLLECTION: ICollection
COPY, MOVE: IResource The new Resource
RENAME: String The old RID
DELETE: In case the deleted resource was a collection the parameter might contain a IRidList of all deleted RIDa - that is the identifier of the collection and all its children. The repository manager is not required to provide this list.
CHECKIN: The new revision RID
PRE_RENAME: The new name as String
PRE_MOVE: The destination RID

ResourceEvent

public ResourceEvent(IResource resource,
                     int type)
Create resource event based on resource event type and resource.
Parameters:
resource - resource that caused the event
type - type for this event (action)

ResourceEvent

public ResourceEvent(IResource resource,
                     int type,
                     java.lang.String correlationId)
Create resource event based on resource event type and resource.
Parameters:
resource - resource that caused the event
type - type for this event (action)
correlationId - (unique event) id to which this event is related

ResourceEvent

public ResourceEvent(IResource resource,
                     int type,
                     java.lang.Object param)
Create resource event based on resource event type and resource.
Parameters:
resource - resource that caused the event
type - type for this event (action)
param - additional parameter(s):
LOCK, UNLOCK: ILockInfo of the lock
PROPERTY_DELETE: IPropertyDef of the deleted property
PROPERTY_GET, PROPERTY_SET: IProperty
CREATE_CHILD, CREATE_LINK: IResource
CREATE_COLLECTION: ICollection
COPY, MOVE: IResource The new Resource
RENAME: String The old RID
DELETE: In case the deleted resource was a collection the parameter might contain a IRidList of all deleted RIDa - that is the identifier of the collection and all its children. The repository manager is not required to provide this list.
CHECKIN: The new revision RID
PRE_RENAME: The new name as String
PRE_MOVE: The destination RID

ResourceEvent

public ResourceEvent(IResource resource,
                     int type,
                     java.lang.String correlationId,
                     java.lang.Object param)
Create resource event from type and resource.
Parameters:
resource - resource that caused the event
type - type for this event (action)
correlationId - (unique event) id to which this event is related
param - additional parameter(s):
LOCK, UNLOCK: ILockInfo of the lock
PROPERTY_DELETE: IPropertyDef of the deleted property
PROPERTY_GET, PROPERTY_SET: IProperty
CREATE_CHILD, CREATE_LINK: IResource
CREATE_COLLECTION: ICollection
COPY, MOVE: IResource The new Resource
RENAME: String The old RID
DELETE: In case the deleted resource was a collection the parameter might contain a IRidList of all deleted RIDa - that is the identifier of the collection and all its children. The repository manager is not required to provide this list.
CHECKIN: The new revision RID
PRE_RENAME: The new name as String
PRE_MOVE: The destination RID
Method Detail

getResource

public IResource getResource()
Description copied from interface: IResourceEvent
Get a reference to the IResource , that caused the event.
Specified by:
getResource in interface IResourceEvent
Following copied from interface: com.sapportals.wcm.repository.manager.IResourceEvent
Returns:
IResource Resource, that caused the event.

getResourceContext

public IResourceContext getResourceContext()
Returns the resource context used when the event was build.
Returns:
the resource context used when the event was build.

getClientId

public java.lang.String getClientId()
Returns the client identifier used when the event was build.
Returns:
the client identifier used when the event was build.

getUniqueId

public java.lang.String getUniqueId()
Get unique id of event.
Returns:
unique id of event

getCorrelationId

public java.lang.String getCorrelationId()
Get correlation id of event.
Returns:
correlation id of event

getType

public int getType()
Description copied from interface: IEvent
Returns the event's type
Specified by:
getType in interface IEvent
Following copied from interface: com.sapportals.wcm.util.events.IEvent
Returns:
the event's type

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
Following copied from interface: com.sapportals.wcm.util.events.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 java.lang.String getDescription()
Specified by:
getDescription in interface IEvent

getDescription

public java.lang.String getDescription(java.util.Locale locale)
Specified by:
getDescription in interface IEvent

getReceiverProperty

public java.lang.Object getReceiverProperty(java.lang.String name)
Returns the property with the specified name. See setReceiverProperty(String, Object).
Parameters:
name - TBD: Description of the incoming method parameter
Returns:
the property with the specified name.

setReceiverProperty

public void setReceiverProperty(java.lang.String name,
                                java.lang.Object value)
Stores a property (name/value pair) at this event. This method can be used by event receivers to attach information to the event in addition to the parameter(s) provided by the event sender. Subsequent receivers can read these properties with getReceiverProperty(String). Note: "subsequent receivers" of a synchronous reveicer R are:
- sychronous receivers with lower priority than R
- all asynchronous receivers
Parameters:
name - receiverProperty to be set
value - receiverProperty to be set

getParameter

public java.lang.Object getParameter()
Description copied from interface: IEvent
Returns the event's parameter
Specified by:
getParameter in interface IEvent
Following copied from interface: com.sapportals.wcm.util.events.IEvent
Returns:
the event's parameter

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.