com.jivesoftware.community.event
Class DocumentEvent
java.lang.Object
com.jivesoftware.community.event.DocumentEvent
public class DocumentEvent
- extends
A class for Document events. This class will be passed to EventListeners
whenever a document event is fired and contains all the pertinent information to the event.
Certain event types will populate the params Map with additional objects as outlined below:
| Event Type | Extra Params |
| ADDED | None |
| DELETING | None |
| MOVED | | Name | Value |
| OriginalContainer | The original container |
| DestinationContainer | The destination container |
|
| RELATED_DOCUMENT_ADDED | | Name | Value |
| RelatedDocument | The related document added |
|
| RELATED_DELETED | | Name | Value |
| RelatedDocument | The related document to be deleted |
|
| RATED | | Name | Value |
| User | The user rating the document | | Rating | A Rating
object |
|
| MODIFIED | | Reason | Name | Value |
| ExternalID was modified | Type | externalIDModify |
| ExternalID was modified | originalValue | The externalID before it was
modified | | Document type was modified | Type | documentTypeModify |
| Document type was modified | originalValue | The ID of the document type
before it was modified as a String | | Author was changed | Type | userModify |
| Author was changed | originalValue | The userID of the original author as a
Long | | Title was modified | Type | titleModify |
| Title was modified | originalValue | The title before it was modified
|
| | Description was
modified | Type | descriptionModify | | Description was
modified | originalValue | The description before it was modified |
| | Property was modified | Type | propertyModify |
| Property was modified | PropertyKey | The name of the property |
| Property was modified | originalValue | The property value before it was
modified |
| | Property was
added | Type | propertyAdd | | Property was
added | PropertyKey | The name of the new property |
| | Property was deleted | Type | propertyDelete |
| Property was deleted | PropertyKey | The name of the property that is going
to be deleted |
| | Document index was
changed | Type | IndexChange |
|
DocumentEvent
public DocumentEvent()
DocumentEvent
public DocumentEvent(DocumentEvent.Type type,
EntityDescriptor d,
JiveContainer c)
DocumentEvent
public DocumentEvent(DocumentEvent.Type type,
Document d,
JiveContainer c)
DocumentEvent
public DocumentEvent(DocumentEvent.Type type,
Document d,
JiveContainer c,
Map<String,? extends Object> params)
getJiveContainer
public EntityDescriptor getJiveContainer()
setPreviousStatus
public void setPreviousStatus(JiveContentObject.Status status)
getPreviousStatus
public JiveContentObject.Status getPreviousStatus()
isDocumentStateChanged
public boolean isDocumentStateChanged()
setDocumentStateChanged
public void setDocumentStateChanged(boolean documentStateChanged)
isMinorRevision
public boolean isMinorRevision()
setMinorRevision
public void setMinorRevision(boolean minorRevision)
getIdentifiedObject
public JiveObject getIdentifiedObject()
- Return an EntityDescriptor if document is null and documentID is not.
- Returns:
- if document is null, an EntityDescriptor, otherwise the document itself.
getDocID
public long getDocID()
getTempDocID
public String getTempDocID()
setTempDocID
public void setTempDocID(String tempDocID)
setDocID
public void setDocID(long docID)
getContentModificationType
public ModificationType getContentModificationType()
- A modification type from the list below that corresponds to the implementing event's type.
- Returns:
- a ModificationType.
toString
public String toString()
Copyright © 1999-2007 Jive Software.