Jive API (3.0.13) Core Javadocs

com.jivesoftware.community.event
Class DocumentEvent

java.lang.Object
  extended by 
      extended by 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 TypeExtra Params
ADDEDNone
DELETINGNone
MOVED
NameValue
OriginalContainerThe original container
DestinationContainerThe destination container
RELATED_DOCUMENT_ADDED
NameValue
RelatedDocumentThe related document added
RELATED_DELETED
NameValue
RelatedDocumentThe related document to be deleted
RATED
NameValue
UserThe user rating the document
RatingA Rating object
MODIFIED
ReasonNameValue
ExternalID was modifiedTypeexternalIDModify
ExternalID was modifiedoriginalValueThe externalID before it was modified
Document type was modifiedTypedocumentTypeModify
Document type was modifiedoriginalValueThe ID of the document type before it was modified as a String
Author was changedTypeuserModify
Author was changedoriginalValueThe userID of the original author as a Long
Title was modifiedTypetitleModify
Title was modifiedoriginalValueThe title before it was modified

Description was modifiedTypedescriptionModify
Description was modifiedoriginalValueThe description before it was modified

Property was modifiedTypepropertyModify
Property was modifiedPropertyKeyThe name of the property
Property was modifiedoriginalValueThe property value before it was modified

Property was addedTypepropertyAdd
Property was addedPropertyKeyThe name of the new property

Property was deletedTypepropertyDelete
Property was deletedPropertyKeyThe name of the property that is going to be deleted

Document index was changedTypeIndexChange


Nested Class Summary
static class DocumentEvent.Type
           
 
Constructor Summary
DocumentEvent()
           
DocumentEvent(DocumentEvent.Type type, Document d, JiveContainer c)
           
DocumentEvent(DocumentEvent.Type type, Document d, JiveContainer c, Map<String,? extends Object> params)
           
DocumentEvent(DocumentEvent.Type type, EntityDescriptor d, JiveContainer c)
           
 
Method Summary
 ModificationType getContentModificationType()
          A modification type from the list below that corresponds to the implementing event's type.
 long getDocID()
           
 JiveObject getIdentifiedObject()
          Return an EntityDescriptor if document is null and documentID is not.
 EntityDescriptor getJiveContainer()
           
 JiveContentObject.Status getPreviousStatus()
           
 String getTempDocID()
           
 boolean isDocumentStateChanged()
           
 boolean isMinorRevision()
           
 void setDocID(long docID)
           
 void setDocumentStateChanged(boolean documentStateChanged)
           
 void setMinorRevision(boolean minorRevision)
           
 void setPreviousStatus(JiveContentObject.Status status)
           
 void setTempDocID(String tempDocID)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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()

Jive Product Page

Copyright © 1999-2007 Jive Software.