Modifier and Type | Method and Description |
---|---|
static EventState |
childNodeAdded(NodeId parentId,
Path parentPath,
NodeId childId,
Path childPath,
Name nodeType,
Set<Name> mixins,
Session session)
Creates a new
Event of type
Event.NODE_ADDED . |
static EventState |
childNodeAdded(NodeId parentId,
Path parentPath,
NodeId childId,
Path childPath,
Name nodeType,
Set<Name> mixins,
Session session,
boolean external)
Creates a new
Event of type
Event.NODE_ADDED . |
static EventState |
childNodeRemoved(NodeId parentId,
Path parentPath,
NodeId childId,
Path childPath,
Name nodeType,
Set<Name> mixins,
Session session)
Creates a new
Event of type
Event.NODE_REMOVED . |
static EventState |
childNodeRemoved(NodeId parentId,
Path parentPath,
NodeId childId,
Path childPath,
Name nodeType,
Set<Name> mixins,
Session session,
boolean external)
Creates a new
Event of type
Event.NODE_REMOVED . |
boolean |
equals(Object obj)
Returns
true if this EventState is equal to
another object. |
NodeId |
getChildId()
Returns the Id of a child node operation.
|
Path |
getChildRelPath()
|
static String |
getCommonPath(List<EventState> events,
SessionImpl session)
Get the longest common path of all event state paths.
|
Map<String,InternalValue> |
getInfo() |
Set<Name> |
getMixinNames()
Returns a set of
Name s which are the names of the mixins
assigned to the parent node associated with this event. |
Name |
getNodeType()
Returns the node type of the parent node associated with this event.
|
Set<NodeType> |
getNodeTypes(NodeTypeManagerImpl ntMgr)
Returns the
Set of NodeType s
assigned to the parent node associated with this event. |
NodeId |
getParentId()
Returns the uuid of the parent node.
|
Path |
getParentPath()
Returns the path of the parent node.
|
int |
getType() |
String |
getUserId() |
int |
hashCode()
Returns a hashCode for this
EventState . |
static EventState |
nodeMoved(NodeId parentId,
Path parentPath,
NodeId childId,
Path childPath,
Name nodeType,
Set<Name> mixins,
Session session,
boolean external)
Creates a new
Event of type
NODE_MOVED . |
static EventState |
nodeMovedWithInfo(NodeId parentId,
Path destPath,
NodeId childId,
Path srcPath,
Name nodeType,
Set<Name> mixins,
Session session,
boolean external)
Creates a new
Event of type
NODE_MOVED . |
static EventState |
nodeReordered(NodeId parentId,
Path parentPath,
NodeId childId,
Path destChildPath,
Path srcChildPath,
Path beforeChildPath,
Name nodeType,
Set<Name> mixins,
Session session,
boolean external)
Creates a new
Event of type
NODE_MOVED . |
static EventState |
persist(Session session,
boolean external)
Creates a new
Event of type
Event.PERSIST . |
static EventState |
propertyAdded(NodeId parentId,
Path parentPath,
Path childPath,
Name nodeType,
Set<Name> mixins,
Session session)
Creates a new
Event of type
Event.PROPERTY_ADDED . |
static EventState |
propertyAdded(NodeId parentId,
Path parentPath,
Path childPath,
Name nodeType,
Set<Name> mixins,
Session session,
boolean external)
Creates a new
Event of type
Event.PROPERTY_ADDED . |
static EventState |
propertyChanged(NodeId parentId,
Path parentPath,
Path childPath,
Name nodeType,
Set<Name> mixins,
Session session)
Creates a new
Event of type
Event.PROPERTY_CHANGED . |
static EventState |
propertyChanged(NodeId parentId,
Path parentPath,
Path childPath,
Name nodeType,
Set<Name> mixins,
Session session,
boolean external)
Creates a new
Event of type
Event.PROPERTY_CHANGED . |
static EventState |
propertyRemoved(NodeId parentId,
Path parentPath,
Path childPath,
Name nodeType,
Set<Name> mixins,
Session session)
Creates a new
Event of type
Event.PROPERTY_REMOVED . |
static EventState |
propertyRemoved(NodeId parentId,
Path parentPath,
Path childPath,
Name nodeType,
Set<Name> mixins,
Session session,
boolean external)
Creates a new
Event of type
Event.PROPERTY_REMOVED . |
void |
setInfo(Map<String,InternalValue> info)
Sets a new info map for this event.
|
String |
toString()
Returns a String representation of this
EventState . |
static String |
valueOf(int eventType)
Returns a String representation of
eventType . |
public static EventState childNodeAdded(NodeId parentId, Path parentPath, NodeId childId, Path childPath, Name nodeType, Set<Name> mixins, Session session)
Event
of type
Event.NODE_ADDED
.parentId
- the id of the parent node associated with
this EventState
.parentPath
- the path of the parent node associated with
this EventState
.childId
- the id of the child node associated with this event.childPath
- the relative path of the child node that was added.nodeType
- the node type of the parent node.mixins
- mixins assigned to the parent node.session
- the session that added the node.EventState
instance.public static EventState childNodeAdded(NodeId parentId, Path parentPath, NodeId childId, Path childPath, Name nodeType, Set<Name> mixins, Session session, boolean external)
Event
of type
Event.NODE_ADDED
.parentId
- the id of the parent node associated with
this EventState
.parentPath
- the path of the parent node associated with
this EventState
.childId
- the id of the child node associated with this event.childPath
- the relative path of the child node that was added.nodeType
- the node type of the parent node.mixins
- mixins assigned to the parent node.session
- the session that added the node.external
- flag indicating whether this is an external eventEventState
instance.public static EventState childNodeRemoved(NodeId parentId, Path parentPath, NodeId childId, Path childPath, Name nodeType, Set<Name> mixins, Session session)
Event
of type
Event.NODE_REMOVED
.parentId
- the id of the parent node associated with
this EventState
.parentPath
- the path of the parent node associated with
this EventState
.childId
- the id of the child node associated with this event.childPath
- the relative path of the child node that was removed.nodeType
- the node type of the parent node.mixins
- mixins assigned to the parent node.session
- the session that removed the node.EventState
instance.public static EventState childNodeRemoved(NodeId parentId, Path parentPath, NodeId childId, Path childPath, Name nodeType, Set<Name> mixins, Session session, boolean external)
Event
of type
Event.NODE_REMOVED
.parentId
- the id of the parent node associated with
this EventState
.parentPath
- the path of the parent node associated with
this EventState
.childId
- the id of the child node associated with this event.childPath
- the relative path of the child node that was removed.nodeType
- the node type of the parent node.mixins
- mixins assigned to the parent node.session
- the session that removed the node.external
- flag indicating whether this is an external eventEventState
instance.public static EventState nodeMoved(NodeId parentId, Path parentPath, NodeId childId, Path childPath, Name nodeType, Set<Name> mixins, Session session, boolean external)
Event
of type
NODE_MOVED
. The parent node associated with this event type
is the parent node of the destination of the move!
This method creates an event state without an info map. A caller of this
method must ensure that it is properly set afterwards.parentId
- the id of the parent node associated with
this EventState
.parentPath
- the path of the parent node associated with
this EventState
.childId
- the id of the child node associated with this event.childPath
- the relative path of the child node that was moved.nodeType
- the node type of the parent node.mixins
- mixins assigned to the parent node.session
- the session that moved the node.external
- flag indicating whether this is an external eventEventState
instance.public static EventState nodeMovedWithInfo(NodeId parentId, Path destPath, NodeId childId, Path srcPath, Name nodeType, Set<Name> mixins, Session session, boolean external) throws ItemStateException
Event
of type
NODE_MOVED
. The parent node associated with this event type
is the parent node of the destination of the move!parentId
- the id of the parent node associated with this
EventState
.destPath
- the path of the destination of the move.childId
- the id of the child node associated with this event.srcPath
- the path of the source of the move.nodeType
- the node type of the parent node.mixins
- mixins assigned to the parent node.session
- the session that removed the node.external
- flag indicating whether this is an external eventEventState
instance.ItemStateException
- if destPath
does not have a
parent.public static EventState nodeReordered(NodeId parentId, Path parentPath, NodeId childId, Path destChildPath, Path srcChildPath, Path beforeChildPath, Name nodeType, Set<Name> mixins, Session session, boolean external)
Event
of type
NODE_MOVED
. The parent node associated with this event type
is the parent node of the destination of the reorder!parentId
- the id of the parent node associated with this
EventState
.parentPath
- the path of the parent node associated with
this EventState
.childId
- the id of the child node associated with this
event.destChildPath
- the name element of the node before it was reordered.srcChildPath
- the name element of the reordered node before the
reorder operation.beforeChildPath
- the name element of the node before which the
reordered node is placed. (may be null
if reordered to the end.nodeType
- the node type of the parent node.mixins
- mixins assigned to the parent node.session
- the session that removed the node.external
- flag indicating whether this is an external eventEventState
instance.public static EventState propertyAdded(NodeId parentId, Path parentPath, Path childPath, Name nodeType, Set<Name> mixins, Session session)
Event
of type
Event.PROPERTY_ADDED
.parentId
- the id of the parent node associated with
this EventState
.parentPath
- the path of the parent node associated with
this EventState
.childPath
- the relative path of the property that was added.nodeType
- the node type of the parent node.mixins
- mixins assigned to the parent node.session
- the session that added the property.EventState
instance.public static EventState propertyAdded(NodeId parentId, Path parentPath, Path childPath, Name nodeType, Set<Name> mixins, Session session, boolean external)
Event
of type
Event.PROPERTY_ADDED
.parentId
- the id of the parent node associated with
this EventState
.parentPath
- the path of the parent node associated with
this EventState
.childPath
- the relative path of the property that was added.nodeType
- the node type of the parent node.mixins
- mixins assigned to the parent node.session
- the session that added the property.external
- flag indicating whether this is an external eventEventState
instance.public static EventState propertyRemoved(NodeId parentId, Path parentPath, Path childPath, Name nodeType, Set<Name> mixins, Session session)
Event
of type
Event.PROPERTY_REMOVED
.parentId
- the id of the parent node associated with
this EventState
.parentPath
- the path of the parent node associated with
this EventState
.childPath
- the relative path of the property that was removed.nodeType
- the node type of the parent node.mixins
- mixins assigned to the parent node.session
- the session that removed the property.EventState
instance.public static EventState propertyRemoved(NodeId parentId, Path parentPath, Path childPath, Name nodeType, Set<Name> mixins, Session session, boolean external)
Event
of type
Event.PROPERTY_REMOVED
.parentId
- the id of the parent node associated with
this EventState
.parentPath
- the path of the parent node associated with
this EventState
.childPath
- the relative path of the property that was removed.nodeType
- the node type of the parent node.mixins
- mixins assigned to the parent node.session
- the session that removed the property.external
- flag indicating whether this is an external eventEventState
instance.public static EventState propertyChanged(NodeId parentId, Path parentPath, Path childPath, Name nodeType, Set<Name> mixins, Session session)
Event
of type
Event.PROPERTY_CHANGED
.parentId
- the id of the parent node associated with
this EventState
.parentPath
- the path of the parent node associated with
this EventState
.childPath
- the relative path of the property that changed.nodeType
- the node type of the parent node.mixins
- mixins assigned to the parent node.session
- the session that changed the property.EventState
instance.public static EventState propertyChanged(NodeId parentId, Path parentPath, Path childPath, Name nodeType, Set<Name> mixins, Session session, boolean external)
Event
of type
Event.PROPERTY_CHANGED
.parentId
- the id of the parent node associated with
this EventState
.parentPath
- the path of the parent node associated with
this EventState
.childPath
- the relative path of the property that changed.nodeType
- the node type of the parent node.mixins
- mixins assigned to the parent node.session
- the session that changed the property.external
- flag indicating whether this is an external eventEventState
instance.public static EventState persist(Session session, boolean external)
Event
of type
Event.PERSIST
.session
- the session that changed the property.external
- flag indicating whether this is an external eventEventState
instance.public int getType()
public NodeId getParentId()
public Path getParentPath()
public NodeId getChildId()
EventState
was generated for a property
operation this method returns null
.public Path getChildRelPath()
Path
associated with this event.public Name getNodeType()
public Set<Name> getMixinNames()
Name
s which are the names of the mixins
assigned to the parent node associated with this event.Name
s.public Set<NodeType> getNodeTypes(NodeTypeManagerImpl ntMgr)
Set
of NodeType
s
assigned to the parent node associated with this event. This
Set
includes the primary type as well as all the mixin types
assigned to the parent node.Set
of NodeType
s.public String getUserId()
public Map<String,InternalValue> getInfo()
public void setInfo(Map<String,InternalValue> info)
info
- the new info map.public String toString()
EventState
.public int hashCode()
EventState
.public boolean equals(Object obj)
true
if this EventState
is equal to
another object.public static String valueOf(int eventType)
eventType
.eventType
- an event type defined by Event
.eventType
.public static String getCommonPath(List<EventState> events, SessionImpl session)
events
- The list of EventStatesession
- The associated session; it can be nullCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.