atg.commerce.fulfillment.scenario
Class ScenarioEvent

java.lang.Object
  extended by atg.commerce.fulfillment.scenario.ScenarioEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ItemAddedToOrder, ItemQuantityChanged, ItemRemovedFromOrder, OrderModified, PaymentGroupModified, ShippingGroupModified

public abstract class ScenarioEvent
extends java.lang.Object
implements java.io.Serializable

ScenarioEvent.java Created: Thu Mar 02 11:07:18 2000

See Also:
Serialized Form

Nested Class Summary
protected static class ScenarioEvent.ProfileToolsSingleton
          Static inner class useful to retrieve ProfileTools component from the global nucleus only once.
 
Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
ScenarioEvent()
          Initializes the profileId, profile, sessionId and parentSessionId properties of this message when this message is fired in context of HTTP request.
 
Method Summary
protected  java.lang.String appendBaseToString(java.lang.StringBuffer pBuf)
          Returns readable string appending the contents of this Message with the parameter pBuf passed.
 java.lang.String getId()
          The id of this message
 java.lang.String getParentSessionId()
          Returns the parent session id.
 RepositoryItem getProfile()
          The profile of the user owning the objects referred to by this event.
 java.lang.String getProfileId()
          Returns the profile id of the user associated with the request when this message is sent in the context of an HTTP request.
 ProfileTools getProfileTools()
          Returns ProfileTools to retrieve the profile item.
 java.lang.String getSessionId()
          Returns the current session id associated with the request when this message is sent in the context of an HTTP request.
 java.lang.String getSiteId()
          Returns the site id associated with the event
 java.lang.String getType()
          Returns the JMS type of this event.
 RepositoryItem lookUpProfile()
          Retrieves the profile corresponding to the profileId of this message.
 void setId(java.lang.String pId)
           
 void setParentSessionId(java.lang.String pParentSessionId)
          Sets the parent session id.
 void setProfile(RepositoryItem pProfile)
          Sets the profile property.
 void setProfileId(java.lang.String pProfileId)
          Sets the profile id.
 void setSessionId(java.lang.String pSessionId)
          Sets the session id
 void setSiteId(java.lang.String pSiteId)
          The site id associated with the event
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

ScenarioEvent

public ScenarioEvent()
Initializes the profileId, profile, sessionId and parentSessionId properties of this message when this message is fired in context of HTTP request.

Method Detail

getType

public java.lang.String getType()
Returns the JMS type of this event.


setId

public void setId(java.lang.String pId)

getId

public java.lang.String getId()
The id of this message


setProfile

public void setProfile(RepositoryItem pProfile)
Sets the profile property. Also sets the profileId property based on the pProfile passed.


getProfile

public RepositoryItem getProfile()
The profile of the user owning the objects referred to by this event. If the profile is null, then the profile corresponding to profileId is looked up from ProfileAdapterRepository using the lookUpProfile().


getParentSessionId

public java.lang.String getParentSessionId()
Returns the parent session id. This may be different than the request's current session id on app servers which use a separate session id for each web application.


setParentSessionId

public void setParentSessionId(java.lang.String pParentSessionId)
Sets the parent session id.


getSessionId

public java.lang.String getSessionId()
Returns the current session id associated with the request when this message is sent in the context of an HTTP request.


setSessionId

public void setSessionId(java.lang.String pSessionId)
Sets the session id


getProfileId

public java.lang.String getProfileId()
Returns the profile id of the user associated with the request when this message is sent in the context of an HTTP request.


setProfileId

public void setProfileId(java.lang.String pProfileId)
Sets the profile id. Also resets the profile property to null.


setSiteId

public void setSiteId(java.lang.String pSiteId)
The site id associated with the event

Parameters:
pSite - site id to set

getSiteId

public java.lang.String getSiteId()
Returns the site id associated with the event

Returns:
the site id associated with the event

lookUpProfile

public RepositoryItem lookUpProfile()
Retrieves the profile corresponding to the profileId of this message. If profileId is null or any error happens while retrieving the profile null is returned.


getProfileTools

public ProfileTools getProfileTools()
Returns ProfileTools to retrieve the profile item. This actually access ProfileToolsSingleton.sProfileTools to get the ProfileTools

Returns:

appendBaseToString

protected java.lang.String appendBaseToString(java.lang.StringBuffer pBuf)
Returns readable string appending the contents of this Message with the parameter pBuf passed. This may be used by sub-classes of this class to append the contents of this base class to the sub-class's String form.