Interface DocumentChangeEvent
public interface DocumentChangeEvent
Event sent when a document has been changed.
- Author:
- Per-Erik
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Used when the content of the document has changed.static final int
Used when the content source has changed.static final int
Used when the copy on publish flag has changed.static final int
Used when document types has been added to a document.static final int
Used when document types has been removed from a document.static final int
Used when the documents group has changed.static final int
Used when the documents owner has changed.static final int
Used when the document title has changed in some language.static final int
Used by event creators/sources when it is not clear what has changed or something has changed that the other change types does not fit for. -
Method Summary
Modifier and TypeMethodDescriptionReturns the repository affected by the change (the repository that the document is in).Returns the document affected by the change.boolean
hasChanged
(int property) Returns true if the property represented byproperty
has changed, false otherwise.
-
Field Details
-
CONTENT_CHANGED
static final int CONTENT_CHANGEDUsed when the content of the document has changed.- See Also:
-
CONTENT_SOURCE_CHANGED
static final int CONTENT_SOURCE_CHANGEDUsed when the content source has changed. This often means a change in the content too but is not necessary.- See Also:
-
COPY_ON_PUBLISH_CHANGED
static final int COPY_ON_PUBLISH_CHANGEDUsed when the copy on publish flag has changed.- See Also:
-
DOCUMENT_TYPE_ADDED
static final int DOCUMENT_TYPE_ADDEDUsed when document types has been added to a document. Note that some events might contain both remove and add events for document types.- See Also:
-
DOCUMENT_TYPE_REMOVED
static final int DOCUMENT_TYPE_REMOVEDUsed when document types has been removed from a document. Note that some events might contain both remove and add events for document types.- See Also:
-
GROUP_CHANGED
static final int GROUP_CHANGEDUsed when the documents group has changed.- See Also:
-
OWNER_CHANGED
static final int OWNER_CHANGEDUsed when the documents owner has changed.- See Also:
-
TITLE_CHANGED
static final int TITLE_CHANGEDUsed when the document title has changed in some language.- See Also:
-
UNKNOWN_CHANGES
static final int UNKNOWN_CHANGESUsed by event creators/sources when it is not clear what has changed or something has changed that the other change types does not fit for. Other changes might still have happened too.- See Also:
-
-
Method Details
-
getRepsitory
MTRepository getRepsitory()Returns the repository affected by the change (the repository that the document is in).- Returns:
- the repository affected by the change
-
getSource
MTDocumentHeader getSource()Returns the document affected by the change.- Returns:
- the document affected by the change
-
hasChanged
boolean hasChanged(int property) Returns true if the property represented byproperty
has changed, false otherwise. If the parameter is not recognized, false is returned.- Parameters:
property
- An integer representation of a property- Returns:
- true if the property has changed
- See Also:
-