Package com.jalios.jcms.analytics
Class EventData
- java.lang.Object
-
- com.jalios.jcms.analytics.EventData
-
- All Implemented Interfaces:
java.io.Serializable
public class EventData extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EventData()
EventData(java.lang.String type, Member actor, int opAction, Data data)
EventData(java.lang.String type, Member actor, java.lang.String action, Data data, javax.servlet.http.HttpServletRequest request)
EventData(java.lang.String type, Member actor, java.lang.String action, Data data, javax.servlet.http.HttpServletRequest request, long eventDate)
EventData(java.lang.String type, Member actor, java.lang.String action, Data data, javax.servlet.http.HttpServletRequest request, long startDate, long endDate, long eventDate)
EventData(java.lang.String type, Member actor, java.lang.String action, java.lang.String dataId, java.lang.String dataClass, long eventDate, java.lang.String urid, long startDate, long endDate)
EventData(java.lang.String type, java.lang.String action)
Create eventData for some core action (like CSRF error, RSS access, OpenAPI access, AuthFail, ...)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addContext(java.util.Map<java.lang.String,java.lang.String> tmpContext)
java.lang.String
getAction()
Member
getActor()
java.util.Map<java.lang.String,java.lang.String>
getContext()
Data
getData()
long
getDate()
long
getEndDate()
java.lang.String
getObjectClass()
java.lang.String
getObjectId()
java.lang.Class
getRealObjectClass()
Compute real class from object class stringlong
getStartDate()
java.lang.String
getType()
java.lang.String
getUrid()
boolean
isAccess()
Indicates if this event has the typeAnalyticsManager.ACCESS
boolean
isCore()
Indicates if this event has the typeAnalyticsManager.CORE
boolean
isCreate()
returns true if the eventData is a creation event (op is Create and DeepCopy), false otherwiseboolean
isDelete()
returns true if the eventData is a delete event (op is Delete and DeepDelete), false otherwiseboolean
isInstanceOf(java.lang.Class clazz)
returns true if theEventData
is about the provided classboolean
isOpenApi()
Indicates if this event has the typeAnalyticsManager.OPENAPI
boolean
isType(java.lang.String type)
Indicates if this event has the provided typeboolean
isUpdate()
returns true if the eventData is a update event (op is Update and Merge), false otherwisevoid
setAction(java.lang.String action)
void
setActor(Member actor)
void
setContext(java.util.Map<java.lang.String,java.lang.String> context)
void
setData(Data data)
void
setDate(long date)
void
setEndDate(long endDate)
void
setObjectClass(java.lang.String objectClass)
void
setObjectId(java.lang.String objectId)
void
setStartDate(long startDate)
void
setType(java.lang.String type)
void
setUrid(java.lang.String urid)
java.lang.String
toString()
-
-
-
Constructor Detail
-
EventData
public EventData()
-
EventData
public EventData(java.lang.String type, Member actor, java.lang.String action, Data data, javax.servlet.http.HttpServletRequest request)
-
EventData
public EventData(java.lang.String type, Member actor, java.lang.String action, Data data, javax.servlet.http.HttpServletRequest request, long eventDate)
-
EventData
public EventData(java.lang.String type, Member actor, java.lang.String action, Data data, javax.servlet.http.HttpServletRequest request, long startDate, long endDate, long eventDate)
-
EventData
public EventData(java.lang.String type, Member actor, java.lang.String action, java.lang.String dataId, java.lang.String dataClass, long eventDate, java.lang.String urid, long startDate, long endDate)
-
EventData
public EventData(java.lang.String type, java.lang.String action)
Create eventData for some core action (like CSRF error, RSS access, OpenAPI access, AuthFail, ...)- Parameters:
type
- the type of theEventData
(oftenAnalyticsManager.CORE
)action
- the action of theEventData
(likeAnalyticsManager.CSRF_ERROR
orAnalyticsManager.AUTH_FAIL
)
-
-
Method Detail
-
setData
public void setData(Data data)
-
getData
public Data getData()
-
getType
public java.lang.String getType()
- Returns:
- the type
-
setType
public void setType(java.lang.String type)
- Parameters:
type
- the type to set
-
getActor
public Member getActor()
- Returns:
- the actor
-
setActor
public void setActor(Member actor)
- Parameters:
actor
- the actor to set
-
getAction
public java.lang.String getAction()
- Returns:
- the action
-
setAction
public void setAction(java.lang.String action)
- Parameters:
action
- the action to set
-
getObjectId
public java.lang.String getObjectId()
- Returns:
- the objectId
-
setObjectId
public void setObjectId(java.lang.String objectId)
- Parameters:
objectId
- the objectId to set
-
getObjectClass
public java.lang.String getObjectClass()
- Returns:
- the objectClass
-
setObjectClass
public void setObjectClass(java.lang.String objectClass)
- Parameters:
objectClass
- the objectClass to set
-
getContext
public java.util.Map<java.lang.String,java.lang.String> getContext()
- Returns:
- the context
-
setContext
public void setContext(java.util.Map<java.lang.String,java.lang.String> context)
- Parameters:
context
- the context to set
-
getDate
public long getDate()
- Returns:
- the date
-
setDate
public void setDate(long date)
- Parameters:
date
- the date to set
-
getStartDate
public long getStartDate()
- Returns:
- the startDate
-
setStartDate
public void setStartDate(long startDate)
- Parameters:
startDate
- the startDate to set
-
getEndDate
public long getEndDate()
- Returns:
- the endDate
-
setEndDate
public void setEndDate(long endDate)
- Parameters:
endDate
- the endDate to set
-
getUrid
public java.lang.String getUrid()
- Returns:
- the urid
-
setUrid
public void setUrid(java.lang.String urid)
- Parameters:
urid
- the urid to set
-
addContext
public void addContext(java.util.Map<java.lang.String,java.lang.String> tmpContext)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isType
public boolean isType(java.lang.String type)
Indicates if this event has the provided type- Parameters:
type
- the type to check- Returns:
- true if the event type is the same than the parameter
-
isCore
public boolean isCore()
Indicates if this event has the typeAnalyticsManager.CORE
- Returns:
- true if the event type is
AnalyticsManager.CORE
-
isAccess
public boolean isAccess()
Indicates if this event has the typeAnalyticsManager.ACCESS
- Returns:
- true if the event type is
AnalyticsManager.ACCESS
-
isOpenApi
public boolean isOpenApi()
Indicates if this event has the typeAnalyticsManager.OPENAPI
- Returns:
- true if the event type is
AnalyticsManager.OPENAPI
-
isCreate
public boolean isCreate()
returns true if the eventData is a creation event (op is Create and DeepCopy), false otherwise- Returns:
- true if the eventData is a creation event (op is Create and DeepCopy), false otherwise
-
isDelete
public boolean isDelete()
returns true if the eventData is a delete event (op is Delete and DeepDelete), false otherwise- Returns:
- true if the eventData is a delete event (op is Delete and DeepDelete), false otherwise
-
isUpdate
public boolean isUpdate()
returns true if the eventData is a update event (op is Update and Merge), false otherwise- Returns:
- true if the eventData is a update event (op is Update and Merge), false otherwise
-
isInstanceOf
public boolean isInstanceOf(java.lang.Class clazz)
returns true if theEventData
is about the provided class- Parameters:
clazz
- theClass
to check- Returns:
- true if the
EventData
is about the provided class
-
getRealObjectClass
public java.lang.Class getRealObjectClass()
Compute real class from object class string- Returns:
- the computed class, or null if objectClass does not exist
-
-