Package org.imixs.workflow.jaxrs
Class EventLogRestService
java.lang.Object
org.imixs.workflow.jaxrs.EventLogRestService
@Path("/eventlog")
@Produces({"application/xml","application/json","text/html","text/xml"})
public class EventLogRestService
extends Object
The EventLogRestService supports methods to access the event log entries by
different kind of request URIs
- Author:
- rsoika
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateEventLogEntry(String topic, String refID, XMLDocument xmlworkitem) Creates/updates a new event log entry.voidDeletes a eventLog entry by its $uniqueIDgetAllEventLogEntries(int pageSize, int pageIndex) Returns all eventLog entries.getEventLogEntriesByTopic(String topic, int maxCount) Returns a set of eventLog entries for a given topic.jakarta.ws.rs.core.ResponseThis method locks an eventLog entry for processing.voidreleaseDeadLocks(long deadLockInterval, String topic) This method unlocks eventlog entries which are older than 1 minute.jakarta.ws.rs.core.ResponseThis method unlocks an eventLog entry.
-
Constructor Details
-
EventLogRestService
public EventLogRestService()
-
-
Method Details
-
getAllEventLogEntries
@GET @Path("/") public XMLDataCollection getAllEventLogEntries(@DefaultValue("100") @QueryParam("pageSize") int pageSize, @DefaultValue("0") @QueryParam("pageIndex") int pageIndex) Returns all eventLog entries.- Parameters:
pageSize- - page sizepageIndex- - page index (default = 0)items- - optional list of itemsmaxCount- - max count of returned eventLogEntries (default 99)- Returns:
- result set.
-
getEventLogEntriesByTopic
@GET @Path("/{topic}") public XMLDataCollection getEventLogEntriesByTopic(@PathParam("topic") String topic, @DefaultValue("99") @QueryParam("maxCount") int maxCount) Returns a set of eventLog entries for a given topic. Multiple topics can be separated by a swung dash (~).- Parameters:
topic- - topic to search event log entries.maxCount- - max count of returned eventLogEntries (default 99)- Returns:
- - xmlDataCollection containing all matching eventLog entries
-
lockEventLogEntry
@POST @Path("/lock/{id}") public jakarta.ws.rs.core.Response lockEventLogEntry(@PathParam("id") String id) This method locks an eventLog entry for processing. The topic will be suffixed with '.lock' to indicate that this topic is locked by a process. If a lock is successful a client can exclusive process this eventLog entry.- Parameters:
id- - id of the event log entry- Returns:
- the method returns a Response OK in case of a successful lock.
-
unlockEventLogEntry
@POST @Path("/unlock/{id}") public jakarta.ws.rs.core.Response unlockEventLogEntry(@PathParam("id") String id) This method unlocks an eventLog entry. The topic suffix '.lock' will be removed.- Parameters:
id- - id of the event log entry
-
releaseDeadLocks
@POST @Path("/release/{interval}/{topic}") public void releaseDeadLocks(@PathParam("interval") long deadLockInterval, @PathParam("topic") String topic) This method unlocks eventlog entries which are older than 1 minute. We assume that these events are deadlocks.- Parameters:
interval- - interval in millistopic- - topic to search event log entries.
-
deleteEventLogEntry
Deletes a eventLog entry by its $uniqueID- Parameters:
name- of report or uniqueid
-
createEventLogEntry
@PUT @Path("/{topic}/{id}") public void createEventLogEntry(@PathParam("topic") String topic, @PathParam("id") String refID, XMLDocument xmlworkitem) Creates/updates a new event log entry.- Parameters:
topic- - the topic of the event.id- - uniqueId of the document to be assigned to the eventdocument- - optional document data to be stored in the event log entry
-