BEA Systems, Inc.

theory.smart.ebusiness.session
Class EBusinessSessionImpl

java.lang.Object
  |
  +--theory.smart.foundation.EntityImpl
        |
        +--theory.smart.ebusiness.session.EBusinessSessionImpl

public class EBusinessSessionImpl
extends EntityImpl

An EBusinessSession is the mechanism by which the logical flow of a session is maintained. It provides support for implementations where a user is guided through a series of separate pages that must share a common context. It is targeted at a usage model where by a customer may or may not have a registered identity on the system. Customers that are not identified can simply browse, where as registered customers can initiate purchases. A final level of authentication is required when a user wishes to complete a transaction or modify their profile. An EBusinessSession also provides the mechanism by which a Customer, Order, and Invoice are bound together.

 Primary Key = theory.smart.ebusiness.session.EBusinessSessionPk
 

See Also:
EBusinessSession, EBusinessSessionHome, EBusinessSessionValue, Serialized Form

Field Summary
 java.sql.Date accessDate
           accessDate [EBusinessSession] <*>------> [java.sql.Date]
 java.sql.Date creationDate
           creationDate [EBusinessSession] <*>------> [java.sql.Date]
 SmartHandle customer
           customer [EBusinessSession] <>------> [theory.smart.ebusiness.customer.Customer]
 SmartHandle order
           order [EBusinessSession] <>------> [theory.smart.ebusiness.order.Order]
 SmartHandle pendingInvoice
           pendingInvoice [EBusinessSession] <>------> [theory.smart.ebusiness.invoicing.Invoice]
 java.lang.String sessionKey
           sessionKey [EBusinessSession] <*>------> [String] (Primary Key)
 WorkflowContext sessionState
           sessionState [EBusinessSession] <*>------> [theory.smart.ebusiness.session.EBusinessSessionWorkflow]
 Workflow sessionStateWorkflow
           
 
Fields inherited from class theory.smart.foundation.EntityImpl
ctx, isDirty, isLoaded
 
Constructor Summary
EBusinessSessionImpl()
           
 
Method Summary
 void assignCustomer(Customer customer)
          This will set the customer on the session and become registered.
 void authenticate(Customer customer, java.lang.String password)
          Verify that the customer and the password specified are correct.
 void authenticate(java.lang.String password)
           
 void becomeGuest()
          This method will disassociate the customer from a session and transition the session into the guest state.
 void cancelEnrollment()
          End the process of enrolling before it is completed and return to the guest state.
 void disableAuthentication()
          Transitions workflow out of the authenticated state .
 void ejbActivate()
          ejbActivate method.
 EBusinessSessionPk ejbCreate(EBusinessSessionPk eBusinessSessionPk)
           
 java.util.Enumeration ejbFindAll()
           
 EBusinessSessionPk ejbFindByPrimaryKey(EBusinessSessionPk pk)
           
 void ejbLoad()
          ejbLoad method.
 void ejbPassivate()
          ejbPassivate method.
 void ejbPostCreate(EBusinessSessionPk eBusinessSessionPk)
           
 void ejbRemove()
          ejbRemove method.
 void ejbStore()
          ejbStore method.
 void enroll()
          Is used by the client to determine if it is safe to atempt to enroll a guest as a customer.
 java.sql.Date getAccessDate()
          Get the value of accessDate
 java.sql.Date getCreationDate()
          Get the value of creationDate
 Customer getCustomer()
          Get the remote object reference of customer
 EBusinessSessionValue getEBusinessSessionByValue()
          Get all of EBusinessSession's attributes.
 Order getOrder()
          Get the remote object reference of order
 Invoice getPendingInvoice()
          Get the remote object reference of pendingInvoice
 java.lang.String getSessionKey()
           
 java.lang.String getSessionState()
          Returns the current state name of the theory.smart.ebusiness.session.EBusinessSessionWorkflow workflow
 void mergeSession(EBusinessSession session)
          Merge two sessions by combining the orders and invoices and synchronizing the workflows.
 void setAccessDate(java.sql.Date accessDate)
          Set the value of accessDate
 void setCreationDate(java.sql.Date creationDate)
          Set the value of creationDate
 void setCustomer(Customer customer)
          Set the remote object reference of customer
 void setEBusinessSessionByValue(EBusinessSessionValue value)
          Set all of EBusinessSession's attributes to the passed in value.
 void setEntityContext(javax.ejb.EntityContext ctx)
          setEntityContext method.
 void setOrder(Order order)
          Set the remote object reference of order
 void setPendingInvoice(Invoice pendingInvoice)
          Set the remote object reference of pendingInvoice
 void unsetEntityContext()
          unsetEntityContext method.
 
Methods inherited from class theory.smart.foundation.EntityImpl
ejbCreate, ejbPostCreate, getEntityContext, isModified
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sessionKey

public java.lang.String sessionKey
                  sessionKey
 [EBusinessSession] <*>------> [String] (Primary Key)

 

creationDate

public java.sql.Date creationDate
                  creationDate
 [EBusinessSession] <*>------> [java.sql.Date] 

 

accessDate

public java.sql.Date accessDate
                  accessDate
 [EBusinessSession] <*>------> [java.sql.Date] 

 

pendingInvoice

public SmartHandle pendingInvoice
                  pendingInvoice
 [EBusinessSession] <>------> [theory.smart.ebusiness.invoicing.Invoice] 

 

customer

public SmartHandle customer
                  customer
 [EBusinessSession] <>------> [theory.smart.ebusiness.customer.Customer] 

 

order

public SmartHandle order
                  order
 [EBusinessSession] <>------> [theory.smart.ebusiness.order.Order] 

 

sessionState

public WorkflowContext sessionState
                  sessionState
 [EBusinessSession] <*>------> [theory.smart.ebusiness.session.EBusinessSessionWorkflow] 

 

sessionStateWorkflow

public transient Workflow sessionStateWorkflow
Constructor Detail

EBusinessSessionImpl

public EBusinessSessionImpl()
                     throws javax.ejb.CreateException
Method Detail

getEBusinessSessionByValue

public EBusinessSessionValue getEBusinessSessionByValue()
                                                 throws java.rmi.RemoteException
Get all of EBusinessSession's attributes.
Returns:
EBusinessSessionValue the EBusinessSession value object

setEBusinessSessionByValue

public void setEBusinessSessionByValue(EBusinessSessionValue value)
                                throws java.rmi.RemoteException
Set all of EBusinessSession's attributes to the passed in value. Note: Primary key attributes are not set.
Parameters:
EBusinessSessionValue - the EBusinessSession value object

ejbCreate

public EBusinessSessionPk ejbCreate(EBusinessSessionPk eBusinessSessionPk)
                             throws javax.ejb.CreateException,
                                    java.rmi.RemoteException

ejbPostCreate

public void ejbPostCreate(EBusinessSessionPk eBusinessSessionPk)
                   throws javax.ejb.CreateException,
                          java.rmi.RemoteException

ejbLoad

public void ejbLoad()
             throws java.rmi.RemoteException
Description copied from class: EntityImpl
ejbLoad method.
Overrides:
ejbLoad in class EntityImpl

ejbStore

public void ejbStore()
              throws java.rmi.RemoteException
Description copied from class: EntityImpl
ejbStore method.
Overrides:
ejbStore in class EntityImpl

ejbRemove

public void ejbRemove()
               throws java.rmi.RemoteException,
                      javax.ejb.RemoveException
Description copied from class: EntityImpl
ejbRemove method.
Overrides:
ejbRemove in class EntityImpl

ejbActivate

public void ejbActivate()
                 throws java.rmi.RemoteException
Description copied from class: EntityImpl
ejbActivate method.
Overrides:
ejbActivate in class EntityImpl

ejbPassivate

public void ejbPassivate()
                  throws java.rmi.RemoteException
Description copied from class: EntityImpl
ejbPassivate method.
Overrides:
ejbPassivate in class EntityImpl

setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
                      throws java.rmi.RemoteException
Description copied from class: EntityImpl
setEntityContext method.
Overrides:
setEntityContext in class EntityImpl

unsetEntityContext

public void unsetEntityContext()
                        throws java.rmi.RemoteException
Description copied from class: EntityImpl
unsetEntityContext method.
Overrides:
unsetEntityContext in class EntityImpl

ejbFindByPrimaryKey

public EBusinessSessionPk ejbFindByPrimaryKey(EBusinessSessionPk pk)
                                       throws javax.ejb.FinderException,
                                              java.rmi.RemoteException

ejbFindAll

public java.util.Enumeration ejbFindAll()
                                 throws javax.ejb.FinderException,
                                        java.rmi.RemoteException

getSessionKey

public java.lang.String getSessionKey()
                               throws java.rmi.RemoteException

getCreationDate

public java.sql.Date getCreationDate()
                              throws java.rmi.RemoteException
Get the value of creationDate
Returns:
creationDate.

setCreationDate

public void setCreationDate(java.sql.Date creationDate)
                     throws java.rmi.RemoteException
Set the value of creationDate
Parameters:
creationDate - creationDate to be added

getAccessDate

public java.sql.Date getAccessDate()
                            throws java.rmi.RemoteException
Get the value of accessDate
Returns:
accessDate.

setAccessDate

public void setAccessDate(java.sql.Date accessDate)
                   throws java.rmi.RemoteException
Set the value of accessDate
Parameters:
accessDate - accessDate to be added

getPendingInvoice

public Invoice getPendingInvoice()
                          throws java.rmi.RemoteException
Get the remote object reference of pendingInvoice
Returns:
pendingInvoice.

setPendingInvoice

public void setPendingInvoice(Invoice pendingInvoice)
                       throws java.rmi.RemoteException
Set the remote object reference of pendingInvoice
Parameters:
pendingInvoices - pendingInvoice to be added

getCustomer

public Customer getCustomer()
                     throws java.rmi.RemoteException
Get the remote object reference of customer
Returns:
customer.

setCustomer

public void setCustomer(Customer customer)
                 throws java.rmi.RemoteException
Set the remote object reference of customer
Parameters:
customers - customer to be added

getOrder

public Order getOrder()
               throws java.rmi.RemoteException
Get the remote object reference of order
Returns:
order.

setOrder

public void setOrder(Order order)
              throws java.rmi.RemoteException
Set the remote object reference of order
Parameters:
orders - order to be added

getSessionState

public java.lang.String getSessionState()
Returns the current state name of the theory.smart.ebusiness.session.EBusinessSessionWorkflow workflow

becomeGuest

public void becomeGuest()
                 throws java.rmi.RemoteException,
                        IllegalWorkflowTransitionException
This method will disassociate the customer from a session and transition the session into the guest state. An example of this would be a new user that inadvertently began browsing as an existing user.

enroll

public void enroll()
            throws java.rmi.RemoteException,
                   IllegalWorkflowTransitionException
Is used by the client to determine if it is safe to atempt to enroll a guest as a customer. When the enrollment is complete the client must either assign the customer or cancel enrollment.

cancelEnrollment

public void cancelEnrollment()
                      throws java.rmi.RemoteException,
                             IllegalWorkflowTransitionException
End the process of enrolling before it is completed and return to the guest state.

assignCustomer

public void assignCustomer(Customer customer)
                    throws java.rmi.RemoteException,
                           IllegalWorkflowTransitionException
This will set the customer on the session and become registered.

authenticate

public void authenticate(Customer customer,
                         java.lang.String password)
                  throws java.rmi.RemoteException,
                         IllegalWorkflowTransitionException
Verify that the customer and the password specified are correct. It will verify that there is such a customer and associate the customer with the session. If not, the session will be transitioned to guest and an exception will be thrown. If the customer exists it will then proceed to verify the correctness of the password. If the password is incorrect the state will be set to registered and an exception will be thrown. After a successful authentication the session will be placed in the authenticated state.

disableAuthentication

public void disableAuthentication()
                           throws java.rmi.RemoteException,
                                  IllegalWorkflowTransitionException
Transitions workflow out of the authenticated state . This informs the client application that it must re-request authenitcation before performing any additional operations that require authentication.

authenticate

public void authenticate(java.lang.String password)
                  throws java.rmi.RemoteException,
                         IllegalWorkflowTransitionException

mergeSession

public void mergeSession(EBusinessSession session)
                  throws java.rmi.RemoteException
Merge two sessions by combining the orders and invoices and synchronizing the workflows.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved