Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.event.impl
Class DocumentEventContext

java.lang.Object
  extended by org.nuxeo.ecm.core.event.impl.AbstractEventContext
      extended by org.nuxeo.ecm.core.event.impl.EventContextImpl
          extended by org.nuxeo.ecm.core.event.impl.DocumentEventContext
All Implemented Interfaces:
Serializable, EventContext

public class DocumentEventContext
extends EventContextImpl

Specialized implementation to be used with an abstract session

Author:
Bogdan Stefanescu, tiry
See Also:
Serialized Form

Field Summary
static String CATEGORY_PROPERTY_KEY
           
static String COMMENT_PROPERTY_KEY
           
 
Constructor Summary
DocumentEventContext(CoreSession session, Principal principal, DocumentModel source)
           
DocumentEventContext(CoreSession session, Principal principal, DocumentModel source, DocumentRef destDoc)
           
 
Method Summary
 String getCategory()
           
 String getComment()
           
 DocumentRef getDestination()
           
 DocumentModel getSourceDocument()
           
 void setCategory(String category)
           
 void setComment(String comment)
           
 void setProperties(Map<String,Serializable> properties)
          Replaces all properties with the given ones.
 
Methods inherited from class org.nuxeo.ecm.core.event.impl.EventContextImpl
getCoreSession, getPrincipal, setArgs, setCoreSession, setPrincipal
 
Methods inherited from class org.nuxeo.ecm.core.event.impl.AbstractEventContext
getArguments, getProperties, getProperty, getRepositoryName, hasProperty, newEvent, newEvent, setProperty, setRepositoryName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CATEGORY_PROPERTY_KEY

public static final String CATEGORY_PROPERTY_KEY
See Also:
Constant Field Values

COMMENT_PROPERTY_KEY

public static final String COMMENT_PROPERTY_KEY
See Also:
Constant Field Values
Constructor Detail

DocumentEventContext

public DocumentEventContext(CoreSession session,
                            Principal principal,
                            DocumentModel source)

DocumentEventContext

public DocumentEventContext(CoreSession session,
                            Principal principal,
                            DocumentModel source,
                            DocumentRef destDoc)
Method Detail

getSourceDocument

public DocumentModel getSourceDocument()

getDestination

public DocumentRef getDestination()

getCategory

public String getCategory()

setCategory

public void setCategory(String category)

getComment

public String getComment()

setComment

public void setComment(String comment)

setProperties

public void setProperties(Map<String,Serializable> properties)
Description copied from interface: EventContext
Replaces all properties with the given ones. The given map is set as is - no copy occurs.

Specified by:
setProperties in interface EventContext
Overrides:
setProperties in class AbstractEventContext
Parameters:
properties - the properties to use

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.