Class EventRecorder
- java.lang.Object
-
- org.vx68k.bitbucket.api.client.webapp.EventRecorder
-
- All Implemented Interfaces:
Serializable
@Path("events") @Produces("application/json") @Named @ApplicationScoped public class EventRecorder extends Object implements Serializable
Application-scoped bean to record Bitbucket events.- Since:
- 5.0
- Author:
- Kaz Nishimura
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EventRecorder.EventRecord
Event record.
-
Constructor Summary
Constructors Constructor Description EventRecorder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
Collection<EventRecorder.EventRecord>
getRecords()
Returns aCollection
view of all the records.int
hashCode()
JsonArray
listRecords()
Returns a JSON array of all the event records.void
record(BitbucketEvent bitbucketEvent)
Records a Bitbucket event.static void
setEntityManager(EntityManager value)
Sets the entity manager to aEntityManager
value.
-
-
-
Method Detail
-
setEntityManager
public static void setEntityManager(EntityManager value)
Sets the entity manager to aEntityManager
value.- Parameters:
value
-EntityManager
value
-
getRecords
public Collection<EventRecorder.EventRecord> getRecords()
Returns aCollection
view of all the records.- Returns:
Collection
view of all the records
-
listRecords
@GET public JsonArray listRecords()
Returns a JSON array of all the event records.- Returns:
- JSON array
-
record
public void record(@Observes BitbucketEvent bitbucketEvent)
Records a Bitbucket event.- Parameters:
bitbucketEvent
- Bitbucket event to record
-
-