Class CommitInfo
java.lang.Object
org.apache.jackrabbit.oak.spi.commit.CommitInfo
Commit info instances associate some meta data with a commit.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CommitInfo
Empty commit information object.static final CommitInfo
Empty commit information object to be used for external changes.static final String
-
Constructor Summary
ConstructorsConstructorDescriptionCommitInfo
(@NotNull String sessionId, @Nullable String userId) Creates a commit info for the given session and user.Creates a commit info for the given session and user and info map.CommitInfo
(@NotNull String sessionId, @Nullable String userId, Map<String, Object> info, boolean external) Creates a commit info for the given session and user and info map. -
Method Summary
-
Field Details
-
OAK_UNKNOWN
- See Also:
-
EMPTY
Empty commit information object. Used as a dummy object when no metadata is known (or needed) about a commit. -
EMPTY_EXTERNAL
Empty commit information object to be used for external changes. Used as a dummy object when no metadata is known (or needed) about a commit.
-
-
Constructor Details
-
CommitInfo
Creates a commit info for the given session and user.- Parameters:
sessionId
- session identifieruserId
- The user id.
-
CommitInfo
public CommitInfo(@NotNull @NotNull String sessionId, @Nullable @Nullable String userId, Map<String, Object> info) Creates a commit info for the given session and user and info map.- Parameters:
sessionId
- session identifieruserId
- The user id.info
- info map
-
CommitInfo
public CommitInfo(@NotNull @NotNull String sessionId, @Nullable @Nullable String userId, Map<String, Object> info, boolean external) Creates a commit info for the given session and user and info map.- Parameters:
sessionId
- session identifieruserId
- The user id.info
- info mapexternal
- indicates if the commit info is from external change
-
-
Method Details
-
getSessionId
- Returns:
- id of the committing session
-
getUserId
- Returns:
- user id of the committing user
-
getDate
public long getDate()- Returns:
- time stamp
-
isExternal
public boolean isExternal()Return a flag indicating whether this is commit info is for an external change- Returns:
- true if commit info is for an external change
-
getPath
/** Returns the base path of this commit. All changes within this commit are expected to be located within the returned path. By default this is the root path, but a particular commit can declare a more specific base path to indicate that only changes within that subtree should be considered. Note that this value is purely informational and its interpretation depends on the kinds of commit hooks and observers present on the system.- Returns:
- base path of this commit
-
getInfo
Return the info map- Returns:
- info map
-
equals
-
hashCode
public int hashCode() -
toString
-