Package org.nuxeo.ecm.core.event.impl
Class DocumentEventContext
- java.lang.Object
-
- org.nuxeo.ecm.core.event.impl.AbstractEventContext
-
- org.nuxeo.ecm.core.event.impl.EventContextImpl
-
- 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
Fields Modifier and Type Field Description static String
CATEGORY_PROPERTY_KEY
static String
COMMENT_PROPERTY_KEY
-
Fields inherited from class org.nuxeo.ecm.core.event.impl.EventContextImpl
principal, session
-
Fields inherited from class org.nuxeo.ecm.core.event.impl.AbstractEventContext
args, EMPTY, properties, repositoryName
-
-
Constructor Summary
Constructors Constructor Description DocumentEventContext(CoreSession session, NuxeoPrincipal principal, DocumentModel source)
DocumentEventContext(CoreSession session, NuxeoPrincipal principal, DocumentModel source, DocumentRef destDoc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, updateRepositoryName
-
Methods inherited from class org.nuxeo.ecm.core.event.impl.AbstractEventContext
getArguments, getProperties, getProperty, getRepositoryName, hasProperty, newEvent, newEvent, setProperty, setRepositoryName
-
-
-
-
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, NuxeoPrincipal principal, DocumentModel source)
-
DocumentEventContext
public DocumentEventContext(CoreSession session, NuxeoPrincipal 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 interfaceEventContext
- Overrides:
setProperties
in classAbstractEventContext
- Parameters:
properties
- the properties to use
-
-