BEA Systems, Inc.

theory.smart.ebusiness.session
Interface EBusinessSession


public interface EBusinessSession
extends Entity

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
 
                  sessionKey
 [EBusinessSession] <*>------> [String] (Primary Key)

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

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

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

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

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

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

 

See Also:
EBusinessSessionPk, EBusinessSessionHome, EBusinessSessionImpl, EBusinessSessionValue

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 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 setOrder(Order order)
          Set the remote object reference of order
 void setPendingInvoice(Invoice pendingInvoice)
          Set the remote object reference of pendingInvoice
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

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

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:
creationDates - 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:
accessDates - 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()
                                 throws java.rmi.RemoteException
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