Package org.apache.sling.jcr.resource.api

## Class JcrResourceChange

- java.lang.Object
- - org.apache.sling.api.resource.observation.ResourceChange
  - - org.apache.sling.jcr.resource.api.JcrResourceChange

    public final class JcrResourceChange
    extends org.apache.sling.api.resource.observation.ResourceChange

Extension of `ResourceChange` to support user id and user data (if available)

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.sling.api.resource.observation.ResourceChange

`org.apache.sling.api.resource.observation.ResourceChange.ChangeType`

### Constructor Summary

Constructors
`JcrResourceChange​(org.apache.sling.api.resource.observation.ResourceChange.ChangeType changeType, String path, boolean isExternal, String userId, String userData)`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getUserData()` Get the user data associated with the underlying JCR observation event (`Event.getUserData()`)
`String` `getUserId()`

### Methods inherited from class org.apache.sling.api.resource.observation.ResourceChange

`getAddedPropertyNames, getChangedPropertyNames, getPath, getRemovedPropertyNames, getType, isExternal, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### JcrResourceChange

    public JcrResourceChange​(org.apache.sling.api.resource.observation.ResourceChange.ChangeType changeType,
                             String path,
                             boolean isExternal,
                             String userId,
                             String userData)

### Method Detail

#### getUserId

    public String getUserId()

Overrides:
  `getUserId` in class `org.apache.sling.api.resource.observation.ResourceChange`

#### getUserData

    public 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`)