com.instantbank.lettertemplate.control.event
Class SetLetterJobEvent

java.lang.Object
  |
  +--com.instantbank.lettertemplate.control.event.LetterTemplateEventSupport
        |
        +--com.instantbank.lettertemplate.control.event.SetLetterJobEvent
All Implemented Interfaces:
LetterTemplateEvent, java.io.Serializable

public class SetLetterJobEvent
extends LetterTemplateEventSupport

Set Letter job usecase: This event is sent from the web tier to the EJB Controller to notify the EJB Controller that an action needs to be made in the letter Jobs model data.

Author:
Instant-bank (Consuelo Franky)
See Also:
Serialized Form

Field Summary
private  int actionType
          action requested by the user
private  java.lang.String companyId
          current company
private  Debug debug
           
static int GET_JOB
          action constant of getting a job
static int GET_TEMPLATE_FIELDS
          action constant of getting the fields of a letter template
private  java.lang.Long jobId
          job identifier
private  JobModel jobModel
          job Model corresponding to the job to save
static int LIST_JOBS
          action constant of getting the jobs list of the current company
static int REMOVE_JOB
          action constant of removing a job
static int SAVE_JOB
          action constant of saving a job
private  java.lang.Long templateId
          template identifier associated to the job
private  java.lang.Long userId
          current user
 
Constructor Summary
SetLetterJobEvent(int actionType, java.lang.String companyId, java.lang.Long userId, java.lang.Long templateId, java.lang.Long jobId, JobModel jobModel)
          constructor: initializes attributes
 
Method Summary
 int getActionType()
          get method for actionType
 java.lang.String getCompanyId()
          get method for companyId
 java.lang.String getEventName()
          JNDI name for the event: Controller EJB registers this env variable
 java.lang.Long getJobId()
          get method for jobId
 JobModel getJobModel()
          get method for jobModel
 java.lang.Long getTemplateId()
          get method for templateId
 java.lang.Long getUserId()
          get method for userId
 java.lang.String toString()
          String representation of the event
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

LIST_JOBS

public static final int LIST_JOBS
action constant of getting the jobs list of the current company

GET_TEMPLATE_FIELDS

public static final int GET_TEMPLATE_FIELDS
action constant of getting the fields of a letter template

GET_JOB

public static final int GET_JOB
action constant of getting a job

SAVE_JOB

public static final int SAVE_JOB
action constant of saving a job

REMOVE_JOB

public static final int REMOVE_JOB
action constant of removing a job

actionType

private int actionType
action requested by the user

companyId

private java.lang.String companyId
current company

userId

private java.lang.Long userId
current user

templateId

private java.lang.Long templateId
template identifier associated to the job

jobId

private java.lang.Long jobId
job identifier

jobModel

private JobModel jobModel
job Model corresponding to the job to save

debug

private Debug debug
Constructor Detail

SetLetterJobEvent

public SetLetterJobEvent(int actionType,
                         java.lang.String companyId,
                         java.lang.Long userId,
                         java.lang.Long templateId,
                         java.lang.Long jobId,
                         JobModel jobModel)
constructor: initializes attributes
Parameters:
actionType - action requested by the user
companyId - current company
userId - current user
templateId - template identifier associated to the job
jobId - job identifier
jobModel - job Model corresponding to the job to save
Method Detail

getActionType

public int getActionType()
get method for actionType
Returns:
The actionType value

getCompanyId

public java.lang.String getCompanyId()
get method for companyId
Returns:
The companyId value

getUserId

public java.lang.Long getUserId()
get method for userId
Returns:
The userId value

getTemplateId

public java.lang.Long getTemplateId()
get method for templateId
Returns:
The templateId value

getJobId

public java.lang.Long getJobId()
get method for jobId
Returns:
The jobId value

getJobModel

public JobModel getJobModel()
get method for jobModel
Returns:
The jobModel value

toString

public java.lang.String toString()
String representation of the event
Overrides:
toString in class java.lang.Object
Returns:
text of event

getEventName

public java.lang.String getEventName()
JNDI name for the event: Controller EJB registers this env variable
Overrides:
getEventName in class LetterTemplateEventSupport
Returns:
The eventName value