|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.instantbank.component.lettertemplate.ejb.LetterTemplateEJB
Session Stateful EJB for lettertemplate application
Field Summary | |
(package private) java.lang.String |
companyId
current company |
private javax.ejb.SessionContext |
context
session context |
private Debug |
debug
for debugging |
private LetterTemplateDAO |
lettertemplateDao
LetterTemplateDAO object for interacting with the database |
private java.util.Hashtable |
systemAlias
Hashtable of system Fields for current company key: fieldId (in Long), value: Field object |
private java.util.Hashtable |
systemFields
Hashtable of system Alias key: String = tableAlias|rootType value: Alias object |
(package private) java.lang.Long |
userId
current user |
Constructor Summary | |
LetterTemplateEJB()
Constructor |
Method Summary | |
java.util.ArrayList |
applyImagesRepository(java.util.ArrayList items)
Applies a set of changes in the images of the current company; |
java.util.ArrayList |
applyItemsCategory(java.util.ArrayList items)
Applies a set of changes in the categories of the current company; |
java.util.ArrayList |
applyItemsComponent(java.util.ArrayList items)
Applies a set of changes in the components of the current company where the relationship between Template and Component doesn't exist. |
java.util.ArrayList |
applyItemsTemplate(java.util.ArrayList items)
Applies a set of changes in the templates of the current company; |
void |
ejbActivate()
Actions after swapping |
void |
ejbCreate(java.lang.String companyId,
java.lang.Long userId)
Get attribute values: companyId, userId and LetterTemplateDAO object (lettertemplateDao attribute) |
void |
ejbPassivate()
Actions before swapping |
void |
ejbRemove()
Action before removing EJB instance |
java.util.ArrayList[] |
executeSQL(java.lang.String sentenceSQL,
java.lang.Long[] selectFields,
java.util.Hashtable jobORDERhashtable)
Gets a result set executing a SQL sentence, associated with a letter job. |
java.util.ArrayList |
generatePreviewTemplate(long templateCode,
long loanCode,
java.lang.Long[] templateVarsCodes)
Gets template variables values for one loan of the current company, which will be used in a preview of the template. |
private LetterTemplateDAO |
getDao()
Obtains a DAO instance assigning to lettertemplateDao attribute |
private java.util.Hashtable |
getSystemAlias()
Obtains a value for systemAlias attribute |
private java.util.Hashtable |
getSystemFields()
Obtains a value for systemFields attribute |
void |
insertLetterARHistory(java.sql.Connection dbConnection,
long lCompID,
long lAgrmID,
java.sql.Date procDate,
long lLettID,
long lLettCode,
long lActionCode,
long lResultCode)
|
java.util.Hashtable |
loadAlias()
Loads data of system Alias |
java.util.ArrayList |
loadAllTemplatesDescription()
Loads code, print type and name of templates and their categories names. |
java.util.Hashtable |
loadCalendars()
Loads all the calendars of the current company |
CodeDescription[] |
loadCategories()
Loads all [code, description] of the categories of the current company; ordered by name |
CodeDescription[] |
loadCodesStamps(long category,
int printType,
java.lang.String name,
java.lang.String header,
java.lang.String body,
java.lang.String closing)
Loads code and stamp of template and components |
CompanyLocation |
loadCompanyLocation(long ftpId)
Load the data of company locations. |
java.lang.String |
loadCompanyWorkDir()
Loads the temporal directory path of the current company. |
LetterComponent |
loadComponent(long code)
Loads a letters component of the current company, corresponding to a code. |
CodeDescription |
loadComponentCode(int componentType,
int printType,
java.lang.String name)
Load [code, stamp] for specified component |
CodeDescription[] |
loadComponentsDescription(int componentType,
int printType)
Loads code and description of all components, for the current company, for the specified component type and print type; ordered by name |
java.util.ArrayList |
loadFieldMenus()
Loads system field Menus with its values ordered by description (name of menu); |
java.util.Hashtable |
loadFields()
Loads data of system Fields for current company |
java.util.ArrayList |
loadFieldsDisplay()
Loads company fields with display information and menu references (for current company), ordered by fieldId; |
CodeDescription[] |
loadFTPCodes()
Loads all [code, name] of the ftp's of the current company, ordered by name |
byte[] |
loadImageRepository(java.lang.String nameImage)
Loads an image of the current company; |
CodeDescription[] |
loadImagesNamesRepository()
Loads all [code, description] of the images of the current company; ordered by name |
CodeDescription[] |
loadJobsCodes()
Loads all [code, name] of the jobs of the current company; ordered by name |
LetterBatchReviewModel |
loadLetterBatchReview(java.lang.String dayMonthYear)
Review the batch of letters jobs |
LetterBatchStartModel |
loadLetterJob()
Loads all letters Job information. |
java.lang.String |
loadLoanDummy()
Load the dummy loan of a company. |
CodeDescription[] |
loadPrintTypes()
Loads code and description of printTypes; ordered by description |
java.sql.Date |
loadSysDate()
Loads the date (Oracle SYSDATE() function). |
Template |
loadTemplate(long templateCode)
Loads a letters template of the current company, corresponding to a code. |
CodeDescription[] |
loadTemplateCodeDescription(long category,
int printType,
java.lang.String name)
Loads code and description of one template and its components for the specified template code |
CodeDescription[] |
loadTemplateCodes(long templateCode)
Loads code and description of one template and its components for the specified template code |
CodeDescription[] |
loadTemplateCodes(long category,
int printType,
java.lang.String name)
Loads code and stamp of one template and its components for the specified template code |
java.sql.Date |
loadTemplateDate(long templateCode)
Load the date of template. |
CodeDescription[] |
loadTemplatesDescription(long category,
int printType)
Loads code and description of all templates, for the current company and for the specified category; ordered by name. |
java.util.ArrayList |
loadUnlikedComponents()
If the relationship between Template and Component doesn't exist loads code, name and print type of components and name of component type. |
CodeDescription[] |
loadVariableFormats()
Loads code and description of format of letter variables; ordered by description |
java.util.ArrayList |
loadVariables()
Loads name of letter variables of the current company, ordered by name |
void |
removeComponent(long code)
Removes a letters component of the current company, corresponding to a code. |
void |
removeImageRepository(java.lang.String nameImage)
Removes an image of the current company |
void |
removeTemplate(long code)
Removes a letters template (not its components) of the current company, corresponding to a code. |
void |
setSessionContext(javax.ejb.SessionContext sc)
Set session context |
CodeDescription |
storeComponent(LetterComponent component)
Stores a letters component for the current company, generating code for the component if it is new. |
CodeDescription |
storeComponentAs(long templateCode,
LetterComponent component)
Store as a letters component for the current company, generating code for the component if it is new. |
long |
storeImageRepository(java.lang.String nameImage,
byte[] image)
Stores a new image for the current company |
void |
storeLetterFtpJobLog(long jobLogId,
java.lang.String fullFilePath,
boolean succes,
int attempts,
java.lang.String ip,
java.lang.String path,
java.lang.String failureDescription)
Store the Log of ftps made for executed letter jobs of the current company. |
LettersJobLogBean |
storeLetterJobLog(long jobId,
java.sql.Date executionDate,
java.lang.String success,
long resultSetLength,
java.lang.String loggeableResultSet,
java.lang.String foTemplate)
Store the log of executed letter jobs of the current company. |
CodeDescription[] |
storeTemplate(Template template)
Stores a letters template for the current company, generating code for the template if it is new, and generating code for each component if it is new. |
void |
updateJobExecDate(long jobId,
java.sql.Date date)
Update the date of execution of the letter job of the current company. |
void |
updateLetterFtpJobLog(long jobLogId,
java.lang.String fullFilePath,
boolean succes,
int attempts,
java.lang.String ip,
java.lang.String path,
java.lang.String failureDescription)
Update the Log of ftps made for executed letter jobs of the current company. |
Methods inherited from class java.lang.Object |
|
Field Detail |
java.lang.String companyId
java.lang.Long userId
private javax.ejb.SessionContext context
private LetterTemplateDAO lettertemplateDao
private java.util.Hashtable systemAlias
private java.util.Hashtable systemFields
private Debug debug
Constructor Detail |
public LetterTemplateEJB()
Method Detail |
public void setSessionContext(javax.ejb.SessionContext sc)
setSessionContext
in interface javax.ejb.SessionBean
sc
- The new sessionContext valuepublic void ejbActivate()
ejbActivate
in interface javax.ejb.SessionBean
public void ejbPassivate()
ejbPassivate
in interface javax.ejb.SessionBean
public void ejbCreate(java.lang.String companyId, java.lang.Long userId)
companyId
- current companyuserId
- current userpublic void ejbRemove()
ejbRemove
in interface javax.ejb.SessionBean
public java.util.Hashtable loadFields() throws DAOException
DAOException
- public java.util.ArrayList loadFieldsDisplay() throws DAOException
DAOException
- public java.util.ArrayList loadFieldMenus() throws DAOException
DAOException
- public java.util.Hashtable loadAlias() throws DAOException
DAOException
- public java.util.ArrayList loadVariables() throws DAOException
DAOException
- public CodeDescription[] loadVariableFormats() throws DAOException
DAOException
- public CodeDescription[] loadPrintTypes() throws DAOException
DAOException
- public CodeDescription[] loadCategories() throws DAOException
DAOException
- public java.util.ArrayList applyItemsCategory(java.util.ArrayList items) throws DAOException
items
- ArrayList with 3 elements of
type String[] representing the attributes of items to apply:
code, name and status;
status indicates if the item is for inserting, deleting or updatingDAOException
- public long storeImageRepository(java.lang.String nameImage, byte[] image) throws DAOException
nameImage
- name of imageimage
- bytes of imageDAOException
- public CodeDescription[] loadImagesNamesRepository() throws DAOException
DAOException
- public byte[] loadImageRepository(java.lang.String nameImage) throws DAOException
nameImage
- name of imageDAOException
- public void removeImageRepository(java.lang.String nameImage) throws DAOException
nameImage
- name of imageDAOException
- public java.util.ArrayList applyImagesRepository(java.util.ArrayList items) throws DAOException
items
- ArrayList with 2 elements of
type String[] representing the attributes of items to apply:
code, name and status;
status indicates if the item is for deleting or updatingDAOException
- public CodeDescription[] storeTemplate(Template template) throws DAOException
template
- to storeDAOException
- public CodeDescription[] loadTemplatesDescription(long category, int printType) throws DAOException
category
- specified letter categoryprintType
- specified print typeDAOException
- public CodeDescription[] loadTemplateCodes(long templateCode) throws DAOException
templateCode
- code of templateDAOException
- public CodeDescription[] loadTemplateCodes(long category, int printType, java.lang.String name) throws DAOException
category
- category of templateprintType
- type of printname
- name of templateDAOException
- public CodeDescription[] loadTemplateCodeDescription(long category, int printType, java.lang.String name) throws DAOException
category
- category of templateprintType
- type of printname
- name of templateDAOException
- public CodeDescription[] loadCodesStamps(long category, int printType, java.lang.String name, java.lang.String header, java.lang.String body, java.lang.String closing) throws DAOException
category
- category of templateprintType
- type of printname
- name of templateheader
- name of component headerbody
- name of component bodyclosing
- name of component closingDAOException
- public Template loadTemplate(long templateCode) throws DAOException
templateCode
- code of templateDAOException
- public void removeTemplate(long code) throws DAOException
code
- code of templateDAOException
- public java.util.ArrayList loadAllTemplatesDescription() throws DAOException
DAOException
- public java.util.ArrayList applyItemsTemplate(java.util.ArrayList items) throws DAOException
items
- ArrayList with 4 elements of type String[]
representing the attributes of items to apply:
code of template, code of category, name of template and status;
status indicates if the item is for deleting or updatingDAOException
- public java.sql.Date loadTemplateDate(long templateCode) throws DAOException
templateCode
- Code of template.DAOException
- public java.lang.String loadLoanDummy() throws DAOException
DAOException
- java.rmi.RemoteException
- Description of the Exceptionpublic CodeDescription storeComponent(LetterComponent component) throws DAOException
component
- is the letter component to storeDAOException
- public CodeDescription storeComponentAs(long templateCode, LetterComponent component) throws DAOException
templateCode
- Code of templatecomponent
- letters componentDAOException
- public CodeDescription[] loadComponentsDescription(int componentType, int printType) throws DAOException
componentType
- type of components to loadprintType
- print type of components to loadDAOException
- public LetterComponent loadComponent(long code) throws DAOException
code
- code of letters componentDAOException
- public void removeComponent(long code) throws DAOException
code
- code of componentDAOException
- public CodeDescription loadComponentCode(int componentType, int printType, java.lang.String name) throws DAOException
componentType
- type of component (HEADER, BODY or CLOSING)printType
- type of printname
- name of componentDAOException
- public java.util.ArrayList loadUnlikedComponents() throws DAOException
DAOException
- public java.util.ArrayList applyItemsComponent(java.util.ArrayList items) throws DAOException
items
- ArrayList with 3 elements of
type String[] representing the attributes of items to apply:
code and name of component and status;
status indicates if the item is for deleting or updatingDAOException
- public java.util.ArrayList generatePreviewTemplate(long templateCode, long loanCode, java.lang.Long[] templateVarsCodes) throws DAOException
templateCode
- is the code of template to previewloanCode
- is the code of the loan (i.e. agreement)templateVarsCodes
- template variables codesDAOException
- public java.util.ArrayList[] executeSQL(java.lang.String sentenceSQL, java.lang.Long[] selectFields, java.util.Hashtable jobORDERhashtable) throws DAOException
sentenceSQL
- SQL sentence for executingselectFields
- output fields idsjobORDERhashtable
- Hashtable of job ORDER elements:
key: fieldId (in Long), value: JobORDERelementDAOException
- public CodeDescription[] loadFTPCodes() throws DAOException
DAOException
- public CodeDescription[] loadJobsCodes() throws DAOException
DAOException
- public java.util.Hashtable loadCalendars() throws DAOException
DAOException
- public LetterBatchStartModel loadLetterJob() throws DAOException
DAOException
- public java.sql.Date loadSysDate() throws DAOException
DAOException
- public java.lang.String loadCompanyWorkDir() throws DAOException
DAOException
- public LettersJobLogBean storeLetterJobLog(long jobId, java.sql.Date executionDate, java.lang.String success, long resultSetLength, java.lang.String loggeableResultSet, java.lang.String foTemplate) throws DAOException
success
- Indicates if the job was sucessfully executed (yes) or
not (no).resultSetLength
- Number of records retrieved by the job execution.loggeableResultSet
- Result set with the records retrieved by
the job execution.foTemplate
- Transformed text of template used by the job execution.jobId
- Description of the ParameterexecutionDate
- Description of the ParameterDAOException
- public void storeLetterFtpJobLog(long jobLogId, java.lang.String fullFilePath, boolean succes, int attempts, java.lang.String ip, java.lang.String path, java.lang.String failureDescription) throws DAOException
succes
- Indicates if the JOB_FILE was sucessfully sent by ftp (yes)
or not (no).attempts
- Number of failed attempts in sending by ftp the JOB_FILE.ip
- IP address used in last attempt in sending by ftp the JOB_FILE.path
- complementary PATH of LAST_FTP_IP_ADDRESS.failureDescription
- explanation in failure case.jobLogId
- Description of the ParameterfullFilePath
- Description of the ParameterDAOException
- public void updateLetterFtpJobLog(long jobLogId, java.lang.String fullFilePath, boolean succes, int attempts, java.lang.String ip, java.lang.String path, java.lang.String failureDescription) throws DAOException
succes
- Indicates if the JOB_FILE was sucessfully sent by ftp (yes)
or not (no).attempts
- Number of failed attempts in sending by ftp the JOB_FILE.ip
- IP address used in last attempt in sending by ftp the JOB_FILE.path
- complementary PATH of LAST_FTP_IP_ADDRESS.failureDescription
- explanation in failure case.jobLogId
- Description of the ParameterfullFilePath
- Description of the ParameterDAOException
- public void updateJobExecDate(long jobId, java.sql.Date date) throws DAOException
date
- The date of execution of the letter job.jobId
- Description of the ParameterDAOException
- public CompanyLocation loadCompanyLocation(long ftpId) throws DAOException
ftpId
- The code of ftp.DAOException
- public LetterBatchReviewModel loadLetterBatchReview(java.lang.String dayMonthYear) throws DAOException
dayMonthYear
- The date to ask for letter Job Log informationDAOException
- private LetterTemplateDAO getDao() throws DAOException
DAOException
- private java.util.Hashtable getSystemAlias() throws DAOException
DAOException
- private java.util.Hashtable getSystemFields() throws DAOException
DAOException
- public void insertLetterARHistory(java.sql.Connection dbConnection, long lCompID, long lAgrmID, java.sql.Date procDate, long lLettID, long lLettCode, long lActionCode, long lResultCode) throws java.rmi.RemoteException, DAOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |