com.instantbank.lettertemplate.control.event
Class ImagesRepositoryEvent

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

public class ImagesRepositoryEvent
extends LetterTemplateEventSupport

letter Images 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 Images model data.

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

Field Summary
private  int actionType
          action requested by the user
private  java.lang.String companyId
          current company
private  java.lang.String description
          name of image to store
private  byte[] image
          image to store
private  java.util.ArrayList items
          items for changing the images list of the current company
static int LIST_IMAGES_NAMES
          action constant of getting the images list of the current company
static int PRE_STORE_IMAGE
          action constant of getting the images list of the current company
static int STORE_IMAGE
          action constant of getting the images list of the current company
static int UPDATE_IMAGES_NAMES
          action constant of getting the images list of the current company
private  java.lang.Long userId
          current user
 
Constructor Summary
ImagesRepositoryEvent(int actionType, java.lang.String companyId, java.lang.Long userId, java.lang.String description, byte[] image, java.util.ArrayList items)
          constructor: initializes attributes
 
Method Summary
 int getActionType()
          get method for actionType
 java.lang.String getCompanyId()
          get method for companyId
 java.lang.String getDescription()
          get method for description
 java.lang.String getEventName()
          Gets the eventName attribute of the ImagesRepositoryEvent object
 byte[] getImage()
          get method for image
 java.util.ArrayList getItems()
          get method for items
 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_IMAGES_NAMES

public static final int LIST_IMAGES_NAMES
action constant of getting the images list of the current company

UPDATE_IMAGES_NAMES

public static final int UPDATE_IMAGES_NAMES
action constant of getting the images list of the current company

PRE_STORE_IMAGE

public static final int PRE_STORE_IMAGE
action constant of getting the images list of the current company

STORE_IMAGE

public static final int STORE_IMAGE
action constant of getting the images list of the current company

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

description

private java.lang.String description
name of image to store

image

private byte[] image
image to store

items

private java.util.ArrayList items
items for changing the images list of the current company
Constructor Detail

ImagesRepositoryEvent

public ImagesRepositoryEvent(int actionType,
                             java.lang.String companyId,
                             java.lang.Long userId,
                             java.lang.String description,
                             byte[] image,
                             java.util.ArrayList items)
constructor: initializes attributes
Parameters:
actionType - action requested by the user
companyId - current company
userId - current user
items - for changing the images list of the current company
description - name of new image
image - bytes of image
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

getDescription

public java.lang.String getDescription()
get method for description
Returns:
The description value

getImage

public byte[] getImage()
get method for image
Returns:
The image value

getItems

public java.util.ArrayList getItems()
get method for items
Returns:
The items 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()
Gets the eventName attribute of the ImagesRepositoryEvent object
Overrides:
getEventName in class LetterTemplateEventSupport
Returns:
The eventName value