com.jalios.jcms.analytics
Class EventData

java.lang.Object
  extended by com.jalios.jcms.analytics.EventData
All Implemented Interfaces:
Serializable

public class EventData
extends Object
implements Serializable

See Also:
Serialized Form

Constructor Summary
EventData()
           
EventData(String type, Member actor, int opAction, Data data)
           
EventData(String type, Member actor, String action, Data data, javax.servlet.http.HttpServletRequest request)
           
EventData(String type, Member actor, String action, Data data, javax.servlet.http.HttpServletRequest request, long eventDate)
           
EventData(String type, Member actor, String action, Data data, javax.servlet.http.HttpServletRequest request, long startDate, long endDate, long eventDate)
           
EventData(String type, Member actor, String action, String dataId, String dataClass, long eventDate, String urid, long startDate, long endDate)
           
EventData(String type, String action)
          Create eventData for some core action (like CSRF error, RSS access, OpenAPI access, AuthFail, ...)
 
Method Summary
 void addContext(Map<String,String> tmpContext)
           
 String getAction()
           
 Member getActor()
           
 Map<String,String> getContext()
           
 Data getData()
           
 long getDate()
           
 long getEndDate()
           
 String getObjectClass()
           
 String getObjectId()
           
 Class getRealObjectClass()
          Compute real class from object class string
 long getStartDate()
           
 String getType()
           
 String getUrid()
           
 boolean isAccess()
          Indicates if this event has the type AnalyticsManager.ACCESS
 boolean isCore()
          Indicates if this event has the type AnalyticsManager.CORE
 boolean isCreate()
          returns true if the eventData is a creation event (op is Create and DeepCopy), false otherwise
 boolean isDelete()
          returns true if the eventData is a delete event (op is Delete and DeepDelete), false otherwise
 boolean isInstanceOf(Class clazz)
          returns true if the EventData is about the provided class
 boolean isOpenApi()
          Indicates if this event has the type AnalyticsManager.OPENAPI
 boolean isType(String type)
          Indicates if this event has the provided type
 boolean isUpdate()
          returns true if the eventData is a update event (op is Update and Merge), false otherwise
 void setAction(String action)
           
 void setActor(Member actor)
           
 void setContext(Map<String,String> context)
           
 void setData(Data data)
           
 void setDate(long date)
           
 void setEndDate(long endDate)
           
 void setObjectClass(String objectClass)
           
 void setObjectId(String objectId)
           
 void setStartDate(long startDate)
           
 void setType(String type)
           
 void setUrid(String urid)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventData

public EventData()

EventData

public EventData(String type,
                 Member actor,
                 int opAction,
                 Data data)

EventData

public EventData(String type,
                 Member actor,
                 String action,
                 Data data,
                 javax.servlet.http.HttpServletRequest request)

EventData

public EventData(String type,
                 Member actor,
                 String action,
                 Data data,
                 javax.servlet.http.HttpServletRequest request,
                 long eventDate)

EventData

public EventData(String type,
                 Member actor,
                 String action,
                 Data data,
                 javax.servlet.http.HttpServletRequest request,
                 long startDate,
                 long endDate,
                 long eventDate)

EventData

public EventData(String type,
                 Member actor,
                 String action,
                 String dataId,
                 String dataClass,
                 long eventDate,
                 String urid,
                 long startDate,
                 long endDate)

EventData

public EventData(String type,
                 String action)
Create eventData for some core action (like CSRF error, RSS access, OpenAPI access, AuthFail, ...)

Parameters:
type - the type of the EventData (often AnalyticsManager.CORE)
action - the action of the EventData (like AnalyticsManager.CSRF_ERROR or AnalyticsManager.AUTH_FAIL)
Method Detail

setData

public void setData(Data data)

getData

public Data getData()

getType

public String getType()
Returns:
the type

setType

public void setType(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 String getAction()
Returns:
the action

setAction

public void setAction(String action)
Parameters:
action - the action to set

getObjectId

public String getObjectId()
Returns:
the objectId

setObjectId

public void setObjectId(String objectId)
Parameters:
objectId - the objectId to set

getObjectClass

public String getObjectClass()
Returns:
the objectClass

setObjectClass

public void setObjectClass(String objectClass)
Parameters:
objectClass - the objectClass to set

getContext

public Map<String,String> getContext()
Returns:
the context

setContext

public void setContext(Map<String,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 String getUrid()
Returns:
the urid

setUrid

public void setUrid(String urid)
Parameters:
urid - the urid to set

addContext

public void addContext(Map<String,String> tmpContext)

toString

public String toString()
Overrides:
toString in class Object

isType

public boolean isType(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 type AnalyticsManager.CORE

Returns:
true if the event type is AnalyticsManager.CORE

isAccess

public boolean isAccess()
Indicates if this event has the type AnalyticsManager.ACCESS

Returns:
true if the event type is AnalyticsManager.ACCESS

isOpenApi

public boolean isOpenApi()
Indicates if this event has the type AnalyticsManager.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(Class clazz)
returns true if the EventData is about the provided class

Parameters:
clazz - the Class to check
Returns:
true if the EventData is about the provided class

getRealObjectClass

public Class getRealObjectClass()
Compute real class from object class string

Returns:
the computed class, or null if objectClass does not exist


Copyright © 2001-2010 Jalios SA. All Rights Reserved.