BEA Systems, Inc.

theory.smart.ebusiness.troubleticket
Class TroubleTicketManagerImpl

java.lang.Object
  |
  +--theory.smart.foundation.SessionImpl
        |
        +--theory.smart.ebusiness.troubleticket.TroubleTicketManagerImpl

public class TroubleTicketManagerImpl
extends SessionImpl

This is a front-end to the trouble ticket system. It creates tickets and helps you move thru the ticket workflow. Constructor takes a sequencer key. If no sequencer with that key exists, a new one is created Each workflow-associated method takes in the minimum parameters needed to make the state transition. It fills in the ones it can (like status and effectiveDate), and it tries to move the workflow. If the transition is invalid, it passes the exception on thru to the caller of the method. openTicket uses sequencer to create a new ticket entity Stateful session bean This Bean is configurable with the following properties: TroubleTicketHome - Specifies the JNDI name for allocating trouble tickets. The default is theory.smart.ebusiness.troubleticket.TroubleTicket AlphaNumericSequencerHome - Specifies the JNDI name for allocating Aphanumeric Sequence. The default is theory.smart.axiom.util.AlphaNumericSequencer SequencerPrefix - Specifies the Prefix for allocating Trouble Ticket. Default is ticket SequencerSuffix - Specifies the Suffix for allocating Trouble Ticket. Default is ""

See Also:
TroubleTicketManager, TroubleTicketManagerHome, Serialized Form

Field Summary
 SmartHandle troubleTicketGenerator
           troubleTicketGenerator [TroubleTicketManager] <>------> [theory.smart.axiom.util.AlphaNumericSequencer]
 
Fields inherited from class theory.smart.foundation.SessionImpl
ctx
 
Constructor Summary
TroubleTicketManagerImpl()
           
 
Method Summary
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbPostCreate()
           
 void ejbRemove()
           
 java.util.Enumeration getAllTickets()
          Return a list of all the open trouble tickets in the system.
 java.lang.String[] getAllTicketSummaries()
          Get a summary of all the trouble tickets on the system.
 java.util.Vector getTicketsByCustomer(java.lang.String customerKey)
          Get all of the trouble tickets associated with the specified customer.
 TroubleTicket getTroubleTicket(java.lang.String ticketId)
          Get the ticket associated with the specified key.
 AlphaNumericSequencer getTroubleTicketGenerator()
          Get the remote object reference of troubleTicketGenerator
 java.lang.String openTroubleTicket(java.lang.String category, Customer customer, java.lang.String description)
          Create a new trouble ticket with the specified category, customer, and description.
 void purgeAllTickets()
          Deletes all closed or rejected tickets.
 void purgeTicket(java.lang.String ticketId)
          Purge a ticket that is in the closed or rejected state.
 void setSessionContext(javax.ejb.SessionContext ctx)
           
 void setTroubleTicketGenerator(AlphaNumericSequencer troubleTicketGenerator)
          Set the remote object reference of troubleTicketGenerator
 void setTroubleTicketGenerator(java.lang.String sequencerKey)
          Assign the sequence generator used for the creation of trouble ticket keys.
 
Methods inherited from class theory.smart.foundation.SessionImpl
getSessionContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

troubleTicketGenerator

public SmartHandle troubleTicketGenerator
                  troubleTicketGenerator
 [TroubleTicketManager] <>------> [theory.smart.axiom.util.AlphaNumericSequencer]

 
Constructor Detail

TroubleTicketManagerImpl

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

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException,
                      java.rmi.RemoteException
Overrides:
ejbCreate in class SessionImpl

ejbPostCreate

public void ejbPostCreate()
                   throws javax.ejb.CreateException,
                          java.rmi.RemoteException
Overrides:
ejbPostCreate in class SessionImpl

ejbActivate

public void ejbActivate()
                 throws java.rmi.RemoteException
Overrides:
ejbActivate in class SessionImpl

ejbPassivate

public void ejbPassivate()
                  throws java.rmi.RemoteException
Overrides:
ejbPassivate in class SessionImpl

ejbRemove

public void ejbRemove()
               throws java.rmi.RemoteException
Overrides:
ejbRemove in class SessionImpl

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
                       throws java.rmi.RemoteException
Overrides:
setSessionContext in class SessionImpl

getTroubleTicketGenerator

public AlphaNumericSequencer getTroubleTicketGenerator()
                                                throws java.rmi.RemoteException
Get the remote object reference of troubleTicketGenerator
Returns:
troubleTicketGenerator.

setTroubleTicketGenerator

public void setTroubleTicketGenerator(AlphaNumericSequencer troubleTicketGenerator)
                               throws java.rmi.RemoteException
Set the remote object reference of troubleTicketGenerator
Parameters:
troubleTicketGenerators - troubleTicketGenerator to be added

setTroubleTicketGenerator

public void setTroubleTicketGenerator(java.lang.String sequencerKey)
                               throws java.rmi.RemoteException
Assign the sequence generator used for the creation of trouble ticket keys. This method allows the programmer to configure the sequence generator at runtime. Care must be taken to ensure uniqueness when changing to a different generator.

openTroubleTicket

public java.lang.String openTroubleTicket(java.lang.String category,
                                          Customer customer,
                                          java.lang.String description)
                                   throws java.rmi.RemoteException,
                                          javax.ejb.CreateException,
                                          IllegalWorkflowTransitionException
Create a new trouble ticket with the specified category, customer, and description. The newly generated key for the ticket is returned.

getTroubleTicket

public TroubleTicket getTroubleTicket(java.lang.String ticketId)
                               throws java.rmi.RemoteException
Get the ticket associated with the specified key.

getAllTickets

public java.util.Enumeration getAllTickets()
                                    throws java.rmi.RemoteException,
                                           javax.ejb.FinderException
Return a list of all the open trouble tickets in the system.

getAllTicketSummaries

public java.lang.String[] getAllTicketSummaries()
                                         throws java.rmi.RemoteException
Get a summary of all the trouble tickets on the system.

getTicketsByCustomer

public java.util.Vector getTicketsByCustomer(java.lang.String customerKey)
                                      throws java.rmi.RemoteException,
                                             javax.ejb.FinderException,
                                             javax.naming.NamingException
Get all of the trouble tickets associated with the specified customer.

purgeTicket

public void purgeTicket(java.lang.String ticketId)
                 throws java.rmi.RemoteException
Purge a ticket that is in the closed or rejected state.

purgeAllTickets

public void purgeAllTickets()
                     throws java.rmi.RemoteException
Deletes all closed or rejected tickets.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved