com.ibm.commerce.bi.events
Class AnalyticsComponentConfiguration
- java.lang.Object
-
- com.ibm.commerce.bi.events.AnalyticsComponentConfiguration
-
- All Implemented Interfaces:
- ComponentConfiguration
public class AnalyticsComponentConfiguration extends java.lang.Object implements ComponentConfiguration
This class provides access to the analytics configuration parameters defined in the instance XML. Instance XML is the configuration file used by WebSphere Commerce which can be found at <WC_installdir>/instances/<instance>/xml/<instance>.xml. The instance XML that is used by runtime is <WAS_deploydir>/xml/config/wc-server.xml. The class can be extended if the users need to include more configurable parameters in the instance xml document.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
COPYRIGHT
IBM Copyright notice field.
-
Constructor Summary
Constructors Constructor and Description AnalyticsComponentConfiguration()
Creates a new instance of the analytics configation
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
destroy()
Tear-down routine called when the servlet is stopped.void
enable(boolean flag)
Dynamically enable or disable this componentjava.lang.String
getCommonEventMapper()
Returns the path to the common mapper definition file relative to the EAR/xml directoryorg.w3c.dom.Document
getCommonEventMapperDocument()
Returns aDocument
of the common mapper definition filejava.util.Vector
getEnabledStores()
Returns a list of enabled store ID'sjava.lang.String
getEventMapper(java.lang.String eventName)
Returns the path to the mapper definition file for the event relative to the EAR/xml directoryorg.w3c.dom.Document
getEventMapperDocument(java.lang.String eventName)
Returns aDocument
of the mapper definition file for the event typeint
getInProcessState()
Returns the state of events that are under processingint
getMaxBatchSize()
Returns the maximum transaction batch sizeint
getMaxProcessTime()
Returns the maximum time in which the event can remain in 'under processing' stateint
getProcessState()
Returns the state of events that are pending processingint
getPurgeState()
Returns the state of events that are finished processingTypedProperty
getStoreConfiguration(java.lang.Integer storeId)
Returns the configuration parameters specific to a storejava.lang.String
getStoreTransmitClass(java.lang.Integer storeId)
Returns the fully-qualified name of the class that implements the transmitter for the given storejava.util.Vector
getSupportedChannelsForTransport(java.lang.String transportId)
Returns a list of enabled channel identifiersjava.util.Vector
getSupportedEvents()
Returns a list of supported or enabled event typesjava.util.Vector
getSupportedTransports()
Returns a list of transport identifiers that are enabled or supportedvoid
init(org.w3c.dom.Element elemConfig)
Initialization routine called by the configuration framework during servlet startup to provide XML configuration markup defined in the instance XML.boolean
isChannelSupportedForTransport(java.lang.String transportId, java.lang.Integer channelId)
Returns whether or not a channel is enabled for a given transportboolean
isEventSupported(java.lang.String eventName)
Returns whether or not an event type is supported or enabledboolean
isStoreEnabled(java.lang.Integer storeId)
Returns whether or not a store is enabledboolean
isStoreTransmitEnabled(java.lang.Integer storeId)
Returns whether or not a store is set to automatically transmit resultsboolean
isTransportSupported(java.lang.String transportId)
Returns whether or not a transport is enabled.
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
IBM Copyright notice field.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AnalyticsComponentConfiguration
public AnalyticsComponentConfiguration()
Creates a new instance of the analytics configation
-
-
Method Detail
-
init
public void init(org.w3c.dom.Element elemConfig) throws java.lang.Exception
Initialization routine called by the configuration framework during servlet startup to provide XML configuration markup defined in the instance XML.- Specified by:
init
in interfaceComponentConfiguration
- Parameters:
elemConfig
- The configuration XML node for this component in the instance XML- Throws:
java.lang.Exception
- if a problem occurred during initialization
-
destroy
public void destroy()
Tear-down routine called when the servlet is stopped.- Specified by:
destroy
in interfaceComponentConfiguration
-
enable
public void enable(boolean flag) throws java.lang.Exception
Dynamically enable or disable this component- Specified by:
enable
in interfaceComponentConfiguration
- Parameters:
flag
-true
orfalse
to enable or disable, respectively, this component- Throws:
java.lang.Exception
- if a problem occurred
-
getSupportedEvents
public java.util.Vector getSupportedEvents()
Returns a list of supported or enabled event types- Returns:
- a
Vector
ofString
objects containing event types
-
isEventSupported
public boolean isEventSupported(java.lang.String eventName)
Returns whether or not an event type is supported or enabled- Parameters:
eventName
- the event type to check- Returns:
true
if the event is enabled,false
otherwise
-
getEnabledStores
public java.util.Vector getEnabledStores()
Returns a list of enabled store ID's- Returns:
- a
Vector
ofInteger
objects containing store identifiers
-
isStoreEnabled
public boolean isStoreEnabled(java.lang.Integer storeId)
Returns whether or not a store is enabled- Parameters:
storeId
- the store identifier- Returns:
true
if the store is enabled,false
otherwise
-
getStoreConfiguration
public TypedProperty getStoreConfiguration(java.lang.Integer storeId)
Returns the configuration parameters specific to a store- Parameters:
storeId
- the store identifier- Returns:
- the set of name/value pairs as defined for the store
-
isStoreTransmitEnabled
public boolean isStoreTransmitEnabled(java.lang.Integer storeId)
Returns whether or not a store is set to automatically transmit results- Parameters:
storeId
- the store identifier- Returns:
true
if the store is enabled for auto-transmission,false
otherwise
-
getStoreTransmitClass
public java.lang.String getStoreTransmitClass(java.lang.Integer storeId)
Returns the fully-qualified name of the class that implements the transmitter for the given store- Parameters:
storeId
- the store identifier- Returns:
- the name of the class that implements the transmitter or
null
if one doesn't exist.
-
getCommonEventMapper
public java.lang.String getCommonEventMapper()
Returns the path to the common mapper definition file relative to the EAR/xml directory- Returns:
- the path to the common mapper definition file or
null
if it is not defined
-
getCommonEventMapperDocument
public org.w3c.dom.Document getCommonEventMapperDocument()
Returns aDocument
of the common mapper definition file- Returns:
- a
Document
of the common mapper definition file ornull
if it can't be found
-
getEventMapper
public java.lang.String getEventMapper(java.lang.String eventName)
Returns the path to the mapper definition file for the event relative to the EAR/xml directory- Parameters:
eventName
- the event name- Returns:
- the path to the mapper definition file for the event or
null
if it is not defined
-
getEventMapperDocument
public org.w3c.dom.Document getEventMapperDocument(java.lang.String eventName)
Returns aDocument
of the mapper definition file for the event type- Parameters:
eventName
- the event name- Returns:
- a
Document
of the mapper definition file ornull
if it can't be found
-
getProcessState
public int getProcessState()
Returns the state of events that are pending processing- Returns:
- the state of events that are pending processing
-
getPurgeState
public int getPurgeState()
Returns the state of events that are finished processing- Returns:
- the state of events that are finished processing
-
getInProcessState
public int getInProcessState()
Returns the state of events that are under processing- Returns:
- the state of events that are under processing
-
getMaxProcessTime
public int getMaxProcessTime()
Returns the maximum time in which the event can remain in 'under processing' state- Returns:
- the maximum time in which the event can remain in 'under processing' state
-
getSupportedChannelsForTransport
public java.util.Vector getSupportedChannelsForTransport(java.lang.String transportId)
Returns a list of enabled channel identifiers- Parameters:
transportId
- the transport identified- Returns:
- a
Vector
ofInteger
objects containing channel identifiers
-
isChannelSupportedForTransport
public boolean isChannelSupportedForTransport(java.lang.String transportId, java.lang.Integer channelId)
Returns whether or not a channel is enabled for a given transport- Parameters:
transportId
- the transport identifiedchannelId
- the channel identifier- Returns:
true
if the channel is enabled,false
otherwise
-
getSupportedTransports
public java.util.Vector getSupportedTransports()
Returns a list of transport identifiers that are enabled or supported- Returns:
- a
Vector
ofString
objects containing transport IDs
-
isTransportSupported
public boolean isTransportSupported(java.lang.String transportId)
Returns whether or not a transport is enabled.- Parameters:
transportId
- the transport identifier to check- Returns:
true
if the transport is enabled or supported,false
otherwise
-
getMaxBatchSize
public int getMaxBatchSize()
Returns the maximum transaction batch size- Returns:
- the maximum transaction batch size
-
-