Class AuditEntry
java.lang.Object
org.apache.juneau.petstore.service.AuditEntry
One audit-trail record: who changed which petstore entity, how, and when.
PetStore appends one entry for every successful create, update or delete, whether it came from the
/petstore API (actor "api") or from the console (actor "console:<user>"). Failed mutations
append nothing. The Audit console page lists these entries.
Example:
PetStore
-
Constructor Details
-
AuditEntry
public AuditEntry()
-
-
Method Details
-
getId
- Returns:
- The audit id, increasing in insertion order.
-
setId
- Parameters:
value- The audit id.- Returns:
- This object.
-
getAt
- Returns:
- When the mutation happened, from the store's
Clock.
-
setAt
- Parameters:
value- The timestamp.- Returns:
- This object.
-
getActor
- Returns:
- Who made the change, e.g.
"api"or"console:alice".
-
setActor
- Parameters:
value- The actor.- Returns:
- This object.
-
getEntity
- Returns:
- The entity kind:
"Pet","Order","User"or"Change".
-
setEntity
- Parameters:
value- The entity kind.- Returns:
- This object.
-
getEntityId
- Returns:
- The entity id (pet/order id, or username).
-
setEntityId
- Parameters:
value- The entity id.- Returns:
- This object.
-
getAction
- Returns:
- The action, e.g.
"CREATE","UPDATE","DELETE".
-
setAction
- Parameters:
value- The action.- Returns:
- This object.
-
getDetail
- Returns:
- A short human-readable detail (pet name, username, ...), or
null .
-
setDetail
- Parameters:
value- The detail.- Returns:
- This object.
-