Class JcrResourceChange
- java.lang.Object
-
- org.apache.sling.api.resource.observation.ResourceChange
-
- org.apache.sling.jcr.resource.api.JcrResourceChange
-
public final class JcrResourceChange extends ResourceChange
Extension ofResourceChangeto support user id and user data (if available)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.sling.api.resource.observation.ResourceChange
ResourceChange.ChangeType
-
-
Constructor Summary
Constructors Constructor Description JcrResourceChange(ResourceChange.ChangeType changeType, java.lang.String path, boolean isExternal, java.lang.String userId, java.lang.String userData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetUserData()Get the user data associated with the underlying JCR observation event (Event.getUserData())java.lang.StringgetUserId()Get the user id of the user initiating the change-
Methods inherited from class org.apache.sling.api.resource.observation.ResourceChange
getAddedPropertyNames, getChangedPropertyNames, getPath, getRemovedPropertyNames, getType, isExternal, toString
-
-
-
-
Constructor Detail
-
JcrResourceChange
public JcrResourceChange(ResourceChange.ChangeType changeType, java.lang.String path, boolean isExternal, java.lang.String userId, java.lang.String userData)
-
-
Method Detail
-
getUserId
public java.lang.String getUserId()
Description copied from class:ResourceChangeGet the user id of the user initiating the change- Overrides:
getUserIdin classResourceChange- Returns:
- The user id or
nullif it's not available.
-
getUserData
public java.lang.String getUserData()
Get the user data associated with the underlying JCR observation event (Event.getUserData())- Returns:
- the JCR observation event's user data (may be
null)
-
-