com.jeceira.observation
Class WorkspaceEvent

java.lang.Object
  extended bycom.jeceira.observation.WorkspaceEvent

public class WorkspaceEvent
extends java.lang.Object

Event fired within a specific workspace. This event is wrapped into a SessionEvent and delivered to all event listeners registered with the sessions associated with the workspace.

Author:
Kristian Duske, Valeri Felberg

Constructor Summary
WorkspaceEvent(int type, java.lang.String sessionId, java.lang.String userId, Path itemPath, java.lang.String parentUuid, NodeTypeName parentPrimaryTypeName)
          Creates a workspace event of the specified type triggered by the session with the specified session ID.
 
Method Summary
 void addParentMixinTypeName(NodeTypeName parentMixinTypeName)
          Adds the name of a mixin type of the parent node associated with this event.
static WorkspaceEvent createEvent(int type, SessionItem item)
          Creates an event with the specified type associated with the specified item.
 Path getItemPath()
          Returns the path of the affected item.
 NodeTypeName[] getParentMixinTypeNames()
          Returns the names of the mixin types of the parent node associated with this event.
 NodeTypeName getParentPrimaryTypeName()
          Returns the name of the primary type of the parent node associated with this event.
 java.lang.String getParentUuid()
          Returns the UUID of the parent node of the affected item.
 java.lang.String getSessionId()
          Returns the ID of the session which has triggered the event.
 int getType()
          Returns the type of this event.
 java.lang.String getUserId()
          Returns the ID of the user owning the session which has triggered the event.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WorkspaceEvent

public WorkspaceEvent(int type,
                      java.lang.String sessionId,
                      java.lang.String userId,
                      Path itemPath,
                      java.lang.String parentUuid,
                      NodeTypeName parentPrimaryTypeName)
Creates a workspace event of the specified type triggered by the session with the specified session ID.

Parameters:
type - event type
sessionId - id of the session where event occured
userId - id of the user owning the specified session
itemPath - path of the affected item
parentUuid - UUID of the parent node of the affected item
parentPrimaryTypeName - name of the primary node type of the parent node
Throws:
java.lang.NullPointerException - if either of the arguments, except user ID, is null
Method Detail

createEvent

public static WorkspaceEvent createEvent(int type,
                                         SessionItem item)
                                  throws RepositoryException
Creates an event with the specified type associated with the specified item.

Throws:
java.lang.NullPointerException - if the specified item is null
RepositoryException

addParentMixinTypeName

public void addParentMixinTypeName(NodeTypeName parentMixinTypeName)
Adds the name of a mixin type of the parent node associated with this event.

Throws:
java.lang.NullPointerException - if the specified node type name is null

getItemPath

public Path getItemPath()
Returns the path of the affected item. Never returns null.


getParentMixinTypeNames

public NodeTypeName[] getParentMixinTypeNames()
Returns the names of the mixin types of the parent node associated with this event. Empty array is returned if the parent node does not have any mixin types.


getParentPrimaryTypeName

public NodeTypeName getParentPrimaryTypeName()
Returns the name of the primary type of the parent node associated with this event. Never returns null.


getParentUuid

public java.lang.String getParentUuid()
Returns the UUID of the parent node of the affected item. Never returns null.


getSessionId

public java.lang.String getSessionId()
Returns the ID of the session which has triggered the event. Never returns null.


getType

public int getType()
Returns the type of this event.


getUserId

public java.lang.String getUserId()
Returns the ID of the user owning the session which has triggered the event. May return null.


toString

public java.lang.String toString()


Copyright © 2005 Aparzev Software Ltd. All Rights Reserved.