com.plumtree.analytics.openusage
Class ASEventFactory

java.lang.Object
  extended bycom.plumtree.analytics.openusage.ASEventFactory

public class ASEventFactory
extends java.lang.Object

Factory class for creating different Analytics events.

Since:
3.0
Author:
James Hang

Constructor Summary
ASEventFactory()
           
 
Method Summary
static IDirViewEvent createDirViewEvent()
          Creates a Directory View Event
static IDocViewEvent createDocViewEvent()
          Creates a Document View Event
static ILoginEvent createLoginEvent()
          Creates a Login Event
static ILogoffEvent createLogoffEvent()
          Creates a Log Off Event
static IManagedEvent createManagedEvent(java.lang.String eventName)
          Creates a Managed Event with the registered event name.
static IManagedEvent createManagedEvent(java.lang.String eventName, java.lang.String namespaceUri)
          Creates a Managed Event with the registered event name.
static IPageViewEvent createPageViewEvent()
          Creates a Page View Event
static IPortletUseEvent createPortletUseEvent()
          Creates a Portlet Use Event
static IPortletViewEvent createPortletViewEvent()
          Creates a Portlet View Event
static ISearchEvent createSearchEvent()
          Creates a Search Event
static ISearchResultEvent createSearchResultEvent()
          Creates a Search Result Event
static void setConfig(java.lang.String destinationHost, int destinationPort, boolean isUnicast)
          Sets the openusage configuration using the given values.
static void setConfig(java.lang.String destinationHost, int destinationPort, int loggingLevel, boolean enableConsoleLogging, boolean isUnicast)
          Sets the openusage configuration using the given values.
static void setConfig(java.lang.String fileLocation, java.lang.String fileName)
          Sets the openusage configuration using the property file at the given location and name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASEventFactory

public ASEventFactory()
Method Detail

setConfig

public static void setConfig(java.lang.String fileLocation,
                             java.lang.String fileName)
Sets the openusage configuration using the property file at the given location and name. This only needs to be called once per java process.

The property file should be in the format:

<properties>
<UT_MODE>(YES/NO)</UT_MODE>

<UNICAST_MODE>(YES/NO)</UNICAST_MODE>

<UNICAST_IP>(DESTINATION IP)</UNICAST_IP>

</properties>

The DESTINATION IP can be in 2 formats:

Parameters:
fileLocation - the directory where the file is located (NULL is not allowed)
fileName - the name of the file (NULL is not allowed)

setConfig

public static void setConfig(java.lang.String destinationHost,
                             int destinationPort,
                             boolean isUnicast)
Sets the openusage configuration using the given values. This only needs to be called once per java process.

Parameters:
destinationHost - the destination host machine to send events (this value is ignored and can be NULL if isUnicast parameter is set to false)
destinationPort - the destination host port to send events (this value is ignored if isUnicast parameter is set to false)
isUnicast - if true use UDP Unicast to send events

setConfig

public static void setConfig(java.lang.String destinationHost,
                             int destinationPort,
                             int loggingLevel,
                             boolean enableConsoleLogging,
                             boolean isUnicast)
Sets the openusage configuration using the given values. This only needs to be called once per java process.

Parameters:
destinationHost - the destination host machine to send events (this value is ignored and can be NULL if isUnicast parameter is set to false)
destinationPort - the destination host port to send events (this value is ignored if isUnicast parameter is set to false)
loggingLevel - the logging level
enableConsoleLogging - enable console logging of events
isUnicast - if true use UDP Unicast to send events

createManagedEvent

public static IManagedEvent createManagedEvent(java.lang.String eventName)
Creates a Managed Event with the registered event name.

Parameters:
eventName - the event name registered for this event (NULL is not allowed)
Returns:
IManagedEvent object (will never be NULL)

createManagedEvent

public static IManagedEvent createManagedEvent(java.lang.String eventName,
                                               java.lang.String namespaceUri)
Creates a Managed Event with the registered event name.

Parameters:
eventName - the event name registered for this event (NULL is not allowed)
Returns:
IManagedEvent object (will never be NULL)

createDirViewEvent

public static IDirViewEvent createDirViewEvent()
Creates a Directory View Event

Returns:
IDirViewEvent object (will never be NULL)

createDocViewEvent

public static IDocViewEvent createDocViewEvent()
Creates a Document View Event

Returns:
IDocViewEvent object (will never be NULL)

createLoginEvent

public static ILoginEvent createLoginEvent()
Creates a Login Event

Returns:
ILoginEvent object (will never be NULL)

createLogoffEvent

public static ILogoffEvent createLogoffEvent()
Creates a Log Off Event

Returns:
ILogoffEvent object (will never be NULL)

createPageViewEvent

public static IPageViewEvent createPageViewEvent()
Creates a Page View Event

Returns:
IPageViewEvent object (will never be NULL)

createPortletUseEvent

public static IPortletUseEvent createPortletUseEvent()
Creates a Portlet Use Event

Returns:
IPortletUseEvent object (will never be NULL)

createPortletViewEvent

public static IPortletViewEvent createPortletViewEvent()
Creates a Portlet View Event

Returns:
IPortletViewEvent object (will never be NULL)

createSearchEvent

public static ISearchEvent createSearchEvent()
Creates a Search Event

Returns:
ISearchEvent object (will never be NULL)

createSearchResultEvent

public static ISearchResultEvent createSearchResultEvent()
Creates a Search Result Event

Returns:
ISearchResultEvent object (will never be NULL)


Copyright © 2006 BEA Systems Inc. All Rights Reserved.