BEA Systems, Inc.

theory.smart.ebusiness.troubleticket
Class TroubleTicketImpl

java.lang.Object
  |
  +--theory.smart.foundation.EntityImpl
        |
        +--theory.smart.ebusiness.troubleticket.TroubleTicketImpl

public class TroubleTicketImpl
extends EntityImpl

The trouble ticket provides a mechanism by which customer issue can be logged and tracked. It employs a workflow and a journaling capability to ensure that customer problems are dealt with according to company policy. The workflow can be adapted to particular business requirements.

 Primary Key = theory.smart.ebusiness.troubleticket.TroubleTicketPk
 

See Also:
TroubleTicket, TroubleTicketHome, TroubleTicketValue, Serialized Form

Field Summary
 java.lang.String category
           category [TroubleTicket] <*>------> [String]
 SmartHandle customer
           customer [TroubleTicket] <>------> [theory.smart.ebusiness.customer.Customer]
 java.sql.Date dateOpened
           dateOpened [TroubleTicket] <*>------> [java.sql.Date]
 java.lang.String description
           description [TroubleTicket] <*>------> [String]
 java.lang.String identifier
           identifier [TroubleTicket] <*>------> [String] (Primary Key)
 com.sun.java.util.collections.LinkedList journals
           journal (List) [TroubleTicket] <*>------> [theory.smart.ebusiness.troubleticket.JournalEntry] 0..*
 WorkflowContext ticketStatus
           ticketStatus [TroubleTicket] <*>------> [theory.smart.ebusiness.troubleticket.TroubleTicketWorkflow]
 Workflow ticketStatusWorkflow
           
 
Fields inherited from class theory.smart.foundation.EntityImpl
ctx, isDirty, isLoaded
 
Constructor Summary
TroubleTicketImpl()
           
 
Method Summary
 void accept(java.lang.String agentId, java.lang.String notes)
          The agent analyzes the trouble ticket and adds comments.
 void addFirstJournal(JournalEntry journal)
          Inserts the given journal at the beginning of the journal list.
 void addJournal(int index, JournalEntry journal)
          Inserts the specified journal at the specified position in the journal list.
 boolean addJournal(JournalEntry journal)
          Appends the specified journal to the end of the journal list.
 boolean addJournals(int index, com.sun.java.util.collections.LinkedList journals)
          Inserts all of the journals in the specified collection into this list, starting at the specified position.
 boolean addJournals(com.sun.java.util.collections.LinkedList journals)
          Appends all of the journals in the specified collection to the end of the journal list, in the order that they are returned by the specified collection's iterator.
 void addLastJournal(JournalEntry journal)
          Appends the given journal to the end of the journal list.
 void assign(java.lang.String agentId, java.lang.String notes)
          The problem is assigned to a particular customer service representative.
 boolean containsJournal(JournalEntry journal)
          Returns true if the journal list contains the specified element.
 void customerClose(java.lang.String agentId, java.lang.String notes)
          The customer can at anytime choose to close the ticket.
 void ejbActivate()
          ejbActivate method.
 TroubleTicketPk ejbCreate(TroubleTicketPk troubleTicketPk)
           
 java.util.Enumeration ejbFindAll()
           
 TroubleTicketPk ejbFindByPrimaryKey(TroubleTicketPk pk)
           
 void ejbLoad()
          ejbLoad method.
 void ejbPassivate()
          ejbPassivate method.
 void ejbPostCreate(TroubleTicketPk troubleTicketPk)
           
 void ejbRemove()
          ejbRemove method.
 void ejbStore()
          ejbStore method.
 java.lang.String getCategory()
          Get the value of category
 Customer getCustomer()
          Get the remote object reference of customer
 java.sql.Date getDateOpened()
          Get the value of dateOpened
 java.lang.String getDescription()
          Get the value of description
 void getFeedbackFromCustomer(java.lang.String agentId, java.lang.String notes)
          The customer service representative reads the customer's response and continues to work on the problem.
 JournalEntry getFirstJournal()
          Returns the first journal in the journal list.
 java.lang.String getIdentifier()
           
 JournalEntry getJournal(int index)
          Returns the journal at the specified position in the journal list.
 com.sun.java.util.collections.LinkedList getJournals()
          Returns all of the journals in the journal list.
 com.sun.java.util.collections.LinkedList getJournals(int fromIndex, int toIndex)
          Returns a view of the portion of the journal list between fromIndex, inclusive, and toIndex, exclusive.
 JournalEntry getLastJournal()
          Returns the last journal in the journal list.
 java.lang.String getLatestStatus()
          Return the state of the ticketStatus workflow.
 int getNumberOfJournals()
          Returns the number of journals in the journal list.
 java.lang.String getTicketStatus()
          Returns the current state name of the theory.smart.ebusiness.troubleticket.TroubleTicketWorkflow workflow
 TroubleTicketValue getTroubleTicketByValue()
          Get all of TroubleTicket's attributes.
 int indexOfJournal(JournalEntry journal)
          Returns the index in the journal list of the first occurrence of the specified element, or -1 if the journal list does not contain this element.
 boolean isJournalsEmtpy()
          Returns true if the journal list contains no journals.
 void journal(java.lang.String agentId, java.lang.String notes)
          The agent analyzes the problem and provides additional feedback without changing the state.
 int lastIndexOfJournal(JournalEntry journal)
          Returns the index in the journal list of the last occurrence of the specified element, or -1 if the journal list does not contain this element.
 void open()
          The customer describes a problem and refers it to customer service.
 void read(java.lang.String agentId, java.lang.String notes)
          The assigned agent reads the ticket and adds any comments.
 void reject(java.lang.String agentId, java.lang.String notes)
          The customer service representative determines that the problem report is not a valid one and provides feedback to the customer.
 void removeAllJournals()
          Removes all of the journals from the journal list.
 JournalEntry removeFirstJournal()
          Removes and returns the first journal from the journal list.
 JournalEntry removeJournal(int index)
          Removes the journal at the specified position in the journal list.
 boolean removeJournal(JournalEntry journal)
          Removes the first occurrence of the specified journal in the journal list.
 JournalEntry removeLastJournal()
          Removes and returns the last journal from the journal list.
 void requestFeedbackFromCustomer(java.lang.String agentId, java.lang.String notes)
          This method is use to request additional information from the customer as to the nature of the problem.
 void resolve(java.lang.String agentId, java.lang.String notes)
          The customer service representative determines that the problem has been resolved and provides the customer with a solution.
 void setCategory(java.lang.String category)
          Set the value of category
 void setCustomer(Customer customer)
          Set the remote object reference of customer
 void setDateOpened(java.sql.Date dateOpened)
          Set the value of dateOpened
 void setDescription(java.lang.String description)
          Set the value of description
 void setEntityContext(javax.ejb.EntityContext ctx)
          setEntityContext method.
 JournalEntry setJournal(int index, JournalEntry journal)
          Replaces the journal at the specified position in the journal list with the specified element.
 void setTroubleTicketByValue(TroubleTicketValue value)
          Set all of TroubleTicket's attributes to the passed in value.
 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

identifier

public java.lang.String identifier
                  identifier
 [TroubleTicket] <*>------> [String] (Primary Key)

 

category

public java.lang.String category
                  category
 [TroubleTicket] <*>------> [String] 

 

dateOpened

public java.sql.Date dateOpened
                  dateOpened
 [TroubleTicket] <*>------> [java.sql.Date] 

 

description

public java.lang.String description
                  description
 [TroubleTicket] <*>------> [String] 

 

journals

public com.sun.java.util.collections.LinkedList journals
                  journal (List)
 [TroubleTicket] <*>------> [theory.smart.ebusiness.troubleticket.JournalEntry] 
                     0..*
 

ticketStatus

public WorkflowContext ticketStatus
                  ticketStatus
 [TroubleTicket] <*>------> [theory.smart.ebusiness.troubleticket.TroubleTicketWorkflow] 

 

ticketStatusWorkflow

public transient Workflow ticketStatusWorkflow

customer

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

 
Constructor Detail

TroubleTicketImpl

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

getTroubleTicketByValue

public TroubleTicketValue getTroubleTicketByValue()
                                           throws java.rmi.RemoteException
Get all of TroubleTicket's attributes.
Returns:
TroubleTicketValue the TroubleTicket value object

setTroubleTicketByValue

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

ejbCreate

public TroubleTicketPk ejbCreate(TroubleTicketPk troubleTicketPk)
                          throws javax.ejb.CreateException,
                                 java.rmi.RemoteException

ejbPostCreate

public void ejbPostCreate(TroubleTicketPk troubleTicketPk)
                   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 TroubleTicketPk ejbFindByPrimaryKey(TroubleTicketPk pk)
                                    throws javax.ejb.FinderException,
                                           java.rmi.RemoteException

ejbFindAll

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

getIdentifier

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

getCategory

public java.lang.String getCategory()
                             throws java.rmi.RemoteException
Get the value of category
Returns:
category.

setCategory

public void setCategory(java.lang.String category)
                 throws java.rmi.RemoteException
Set the value of category
Parameters:
category - category to be added

getDateOpened

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

setDateOpened

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

getDescription

public java.lang.String getDescription()
                                throws java.rmi.RemoteException
Get the value of description
Returns:
description.

setDescription

public void setDescription(java.lang.String description)
                    throws java.rmi.RemoteException
Set the value of description
Parameters:
description - description to be added

addJournal

public void addJournal(int index,
                       JournalEntry journal)
Inserts the specified journal at the specified position in the journal list. Shifts the journal currently at that position (if any) and any subsequent journals to the right (adds one to their indices).
Parameters:
index - index at which the specified journal is to be inserted.
journal - journal to be inserted.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).

addJournal

public boolean addJournal(JournalEntry journal)
Appends the specified journal to the end of the journal list.
Parameters:
journal - journal to be appended to the journal list.
Returns:
true (as per the general contract of Collection.add).

addJournals

public boolean addJournals(int index,
                           com.sun.java.util.collections.LinkedList journals)
Inserts all of the journals in the specified collection into this list, starting at the specified position. Shifts the element currently at that position (if any) and any subsequent journals to the right (increases their indices). The new journals will appear in the journal list in the order that they are returned by the specified collection's iterator.
Parameters:
index - index at which to insert first element from the specified collection.
journals - journals to be inserted into the journal list.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).

addJournals

public boolean addJournals(com.sun.java.util.collections.LinkedList journals)
Appends all of the journals in the specified collection to the end of the journal list, in the order that they are returned by the specified collection's iterator. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection is the journal list, and the journal list is nonempty.)
Parameters:
journals - journals to be inserted into the journal list.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).

addFirstJournal

public void addFirstJournal(JournalEntry journal)
Inserts the given journal at the beginning of the journal list.

addLastJournal

public void addLastJournal(JournalEntry journal)
Appends the given journal to the end of the journal list. (Identical in function to the add method; included only for consistency.)

containsJournal

public boolean containsJournal(JournalEntry journal)
Returns true if the journal list contains the specified element. More formally, returns true if and only if the journal list contains at least one journal e such that (o==null ? e==null : o.equals(e)).
Parameters:
journal - journal whose presence in the journal list is to be tested.
Returns:
true if the journal list contains the specified element.

getJournal

public JournalEntry getJournal(int index)
Returns the journal at the specified position in the journal list.
Parameters:
index - index of journal to return.
Returns:
the journal at the specified position in the journal list.
Throws:
IndexOutOfBoundsException - if the specified index is is out of range (index < 0 || index >= size()).

getJournals

public com.sun.java.util.collections.LinkedList getJournals(int fromIndex,
                                                            int toIndex)
Returns a view of the portion of the journal list between fromIndex, inclusive, and toIndex, exclusive.
Parameters:
fromIndex - low endpoint (inclusive) of the subList.
toKey - high endpoint (exclusive) of the subList.
Returns:
a view of the specified range within the journal list.
Throws:
IndexOutOfBoundsException - endpoint index value out of range (fromIndex < 0 || toIndex > size)
java.lang.IllegalArgumentException - endpoint indices out of order (fromIndex > toIndex)

getJournals

public com.sun.java.util.collections.LinkedList getJournals()
Returns all of the journals in the journal list.
Returns:
all of the journals in the journal list.

getFirstJournal

public JournalEntry getFirstJournal()
Returns the first journal in the journal list.
Returns:
the first journal in the journal list.

getLastJournal

public JournalEntry getLastJournal()
Returns the last journal in the journal list.
Returns:
the last journal in the journal list.
Throws:
java.util.NoSuchElementException - if the journal list is empty.

getNumberOfJournals

public int getNumberOfJournals()
Returns the number of journals in the journal list.
Returns:
the number of journals in the journal list.

indexOfJournal

public int indexOfJournal(JournalEntry journal)
Returns the index in the journal list of the first occurrence of the specified element, or -1 if the journal list does not contain this element. More formally, returns the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.
Parameters:
journal - journal to search for.
Returns:
the index in the journal list of the first occurrence of the specified element, or -1 if the journal list does not contain this element.

isJournalsEmtpy

public boolean isJournalsEmtpy()
Returns true if the journal list contains no journals.

Returns:
true if the journal list contains no journals.

lastIndexOfJournal

public int lastIndexOfJournal(JournalEntry journal)
Returns the index in the journal list of the last occurrence of the specified element, or -1 if the journal list does not contain this element. More formally, returns the highest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.
Parameters:
journal - journal to search for.
Returns:
the index in the journal list of the last occurrence of the specified element, or -1 if the journal list does not contain this element.

removeAllJournals

public void removeAllJournals()
Removes all of the journals from the journal list.

removeJournal

public JournalEntry removeJournal(int index)
Removes the journal at the specified position in the journal list. Shifts any subsequent journals to the left (subtracts one from their indices). Returns the journal that was removed from the journal list.
Parameters:
index - the index of the journal to removed.
Returns:
the journal previously at the specified position.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index >= size()).

removeJournal

public boolean removeJournal(JournalEntry journal)
Removes the first occurrence of the specified journal in the journal list. If the journal list does not contain the element, it is unchanged. More formally, removes the journal with the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))) (if such an journal exists).
Parameters:
journal - journal to be removed from the journal list, if present.
Returns:
true if the journal list contained the specified element.

removeFirstJournal

public JournalEntry removeFirstJournal()
Removes and returns the first journal from the journal list.
Returns:
the first journal from the journal list.
Throws:
java.util.NoSuchElementException - if the journal list is empty.

removeLastJournal

public JournalEntry removeLastJournal()
Removes and returns the last journal from the journal list.
Returns:
the last journal from the journal list.
Throws:
java.util.NoSuchElementException - if the journal list is empty.

setJournal

public JournalEntry setJournal(int index,
                               JournalEntry journal)
Replaces the journal at the specified position in the journal list with the specified element.
Parameters:
index - index of journal to replace.
journal - journal to be stored at the specified position.
Returns:
the journal previously at the specified position.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index >= size()).

getTicketStatus

public java.lang.String getTicketStatus()
Returns the current state name of the theory.smart.ebusiness.troubleticket.TroubleTicketWorkflow workflow

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

getLatestStatus

public java.lang.String getLatestStatus()
                                 throws java.rmi.RemoteException
Return the state of the ticketStatus workflow.

open

public void open()
          throws java.rmi.RemoteException,
                 IllegalWorkflowTransitionException
The customer describes a problem and refers it to customer service.

assign

public void assign(java.lang.String agentId,
                   java.lang.String notes)
            throws java.rmi.RemoteException,
                   IllegalWorkflowTransitionException
The problem is assigned to a particular customer service representative. A journal entry is made with the notes.

read

public void read(java.lang.String agentId,
                 java.lang.String notes)
          throws java.rmi.RemoteException,
                 IllegalWorkflowTransitionException
The assigned agent reads the ticket and adds any comments. Invoking this method acknowledges receipt of the ticket.

accept

public void accept(java.lang.String agentId,
                   java.lang.String notes)
            throws java.rmi.RemoteException,
                   IllegalWorkflowTransitionException
The agent analyzes the trouble ticket and adds comments. The agent acknowledges that there is an issue that will require research.

journal

public void journal(java.lang.String agentId,
                    java.lang.String notes)
             throws java.rmi.RemoteException,
                    IllegalWorkflowTransitionException
The agent analyzes the problem and provides additional feedback without changing the state. A journal entry is added with the notes.

reject

public void reject(java.lang.String agentId,
                   java.lang.String notes)
            throws java.rmi.RemoteException,
                   IllegalWorkflowTransitionException
The customer service representative determines that the problem report is not a valid one and provides feedback to the customer.

customerClose

public void customerClose(java.lang.String agentId,
                          java.lang.String notes)
                   throws java.rmi.RemoteException,
                          IllegalWorkflowTransitionException
The customer can at anytime choose to close the ticket. This is an acknowledgement by the customer that the problem is resolved.

resolve

public void resolve(java.lang.String agentId,
                    java.lang.String notes)
             throws java.rmi.RemoteException,
                    IllegalWorkflowTransitionException
The customer service representative determines that the problem has been resolved and provides the customer with a solution.

requestFeedbackFromCustomer

public void requestFeedbackFromCustomer(java.lang.String agentId,
                                        java.lang.String notes)
                                 throws java.rmi.RemoteException,
                                        IllegalWorkflowTransitionException
This method is use to request additional information from the customer as to the nature of the problem.

getFeedbackFromCustomer

public void getFeedbackFromCustomer(java.lang.String agentId,
                                    java.lang.String notes)
                             throws java.rmi.RemoteException,
                                    IllegalWorkflowTransitionException
The customer service representative reads the customer's response and continues to work on the problem.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved