# Uses of Enum Class
com.logicaldoc.core.document.DocumentEvent

Packages that use DocumentEvent
Package
Description
com.logicaldoc.core.automation
Automation subsystem that allows you to program your own logic inside the platform.
The automation engine can be accessed through the class `Automation`
Please note the special annotation `AutomationDictionary` that is used to automatically put in the Dictionary whatever bean you need.
com.logicaldoc.core.document
Contains the definitions of `Document` and `Version` as well as other related objects

## Uses of DocumentEvent in com.logicaldoc.core.automation

Methods in com.logicaldoc.core.automation that return DocumentEvent
Modifier and Type
Method
Description
`DocumentEvent`
DocTool.`documentEvent(String eventKey)`
Methods in com.logicaldoc.core.automation with parameters of type DocumentEvent
Modifier and Type
Method
Description
`List<DocumentHistory>`
DocTool.`getHistories(long docId, DocumentEvent event)`
Retrieve the list of events of a document

## Uses of DocumentEvent in com.logicaldoc.core.document

Methods in com.logicaldoc.core.document that return DocumentEvent
Modifier and Type
Method
Description
`static DocumentEvent`
DocumentEvent.`fromKey(String key)`
Gets the right enumeration entry from the corresponding resource bundle key
`DocumentEvent`
DocumentHistory.`getEventEnum()`
`DocumentEvent`
Version.`getEventEnum()`
`static DocumentEvent`
DocumentEvent.`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static DocumentEvent[]`
DocumentEvent.`values()`
Returns an array containing the constants of this enum class, in the order they are declared.
Methods in com.logicaldoc.core.document with parameters of type DocumentEvent
Modifier and Type
Method
Description
`static Version`
Version.`create(Document document, User user, String comment, DocumentEvent event, boolean release)`
Factory method that creates a Version and replicate all given document's properties.
The new version and fileVersion will be set in both Document and Version
Important: The created Version is not persistent
`List<DocumentHistory>`
DocumentHistoryDAO.`findByDocIdAndEvent(long docId, DocumentEvent event)`
This method selects all histories of a given document.
`List<DocumentHistory>`
HibernateDocumentHistoryDAO.`findByDocIdAndEvent(long docId, DocumentEvent event)`
`void`
DocumentHistory.`setEvent(DocumentEvent event)`
`void`
Version.`setEvent(DocumentEvent event)`