com.instantbank.component.lettertemplate.ejb
Class LetterTemplateEJB

java.lang.Object
  |
  +--com.instantbank.component.lettertemplate.ejb.LetterTemplateEJB
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

public class LetterTemplateEJB
extends java.lang.Object
implements javax.ejb.SessionBean

Session Stateful EJB for lettertemplate application

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

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
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

companyId

java.lang.String companyId
current company

userId

java.lang.Long userId
current user

context

private javax.ejb.SessionContext context
session context

lettertemplateDao

private LetterTemplateDAO lettertemplateDao
LetterTemplateDAO object for interacting with the database

systemAlias

private java.util.Hashtable systemAlias
Hashtable of system Fields for current company key: fieldId (in Long), value: Field object

systemFields

private java.util.Hashtable systemFields
Hashtable of system Alias key: String = tableAlias|rootType value: Alias object

debug

private Debug debug
for debugging
Constructor Detail

LetterTemplateEJB

public LetterTemplateEJB()
Constructor
Method Detail

setSessionContext

public void setSessionContext(javax.ejb.SessionContext sc)
Set session context
Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
sc - The new sessionContext value

ejbActivate

public void ejbActivate()
Actions after swapping
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Actions before swapping
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

ejbCreate

public void ejbCreate(java.lang.String companyId,
                      java.lang.Long userId)
Get attribute values: companyId, userId and LetterTemplateDAO object (lettertemplateDao attribute)
Parameters:
companyId - current company
userId - current user

ejbRemove

public void ejbRemove()
Action before removing EJB instance
Specified by:
ejbRemove in interface javax.ejb.SessionBean

loadFields

public java.util.Hashtable loadFields()
                               throws DAOException
Loads data of system Fields for current company
Returns:
Hashtable of system Fields for current company key: fieldId (in Long), value: com.instantbank.component.job.util.Field object
Throws:
DAOException -  

loadFieldsDisplay

public java.util.ArrayList loadFieldsDisplay()
                                      throws DAOException
Loads company fields with display information and menu references (for current company), ordered by fieldId;
Returns:
ArrayList of company fields where each element is an inner ArrayList composed of: fieldId(Long), displayName(String), dataType(String), menuId(Long), menuName (String)
Throws:
DAOException -  

loadFieldMenus

public java.util.ArrayList loadFieldMenus()
                                   throws DAOException
Loads system field Menus with its values ordered by description (name of menu);
Returns:
ArrayList of menus where each element is an inner ArrayList composed of: menuName(String), menuValues(ArrayList); each menuValues element is a String[] with an internalValue(String) and display(String)
Throws:
DAOException -  

loadAlias

public java.util.Hashtable loadAlias()
                              throws DAOException
Loads data of system Alias
Returns:
Hashtable of system Alias key: String[2] = [tableAlias, rootType], value: com.instantbank.component.job.util.Alias object
Throws:
DAOException -  

loadVariables

public java.util.ArrayList loadVariables()
                                  throws DAOException
Loads name of letter variables of the current company, ordered by name
Returns:
ArrayList of variables where each element is an inner ArrayList with the following elements of a variable: fieldId(Long): code of field (variable) in the system, name(String): name of variable to display in user interface, type(String): type of variable: numeric: LetterTemplateGlobals.FIELD_NUMERIC, string: LetterTemplateGlobals.FIELD_STRING, date: LetterTemplateGlobals.FIELD_DATE
Throws:
DAOException -  

loadVariableFormats

public CodeDescription[] loadVariableFormats()
                                      throws DAOException
Loads code and description of format of letter variables; ordered by description
Returns:
CodeDescription[] object with [code, description] of formats
Throws:
DAOException -  

loadPrintTypes

public CodeDescription[] loadPrintTypes()
                                 throws DAOException
Loads code and description of printTypes; ordered by description
Returns:
CodeDescription[] object with [code, description] of printTypes
Throws:
DAOException -  

loadCategories

public CodeDescription[] loadCategories()
                                 throws DAOException
Loads all [code, description] of the categories of the current company; ordered by name
Returns:
CodeDescription[] object with [code, description] of the categories
Throws:
DAOException -  

applyItemsCategory

public java.util.ArrayList applyItemsCategory(java.util.ArrayList items)
                                       throws DAOException
Applies a set of changes in the categories of the current company;
Parameters:
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 updating
Returns:
ArrayList with 2 elements: (0) possible problem (String), (1) current categories list (CodeDescription[])
Throws:
DAOException -  

storeImageRepository

public long storeImageRepository(java.lang.String nameImage,
                                 byte[] image)
                          throws DAOException
Stores a new image for the current company
Parameters:
nameImage - name of image
image - bytes of image
Returns:
code (long) assigned to the image
Throws:
DAOException -  

loadImagesNamesRepository

public CodeDescription[] loadImagesNamesRepository()
                                            throws DAOException
Loads all [code, description] of the images of the current company; ordered by name
Returns:
CodeDescription[] object with [code, description] of images
Throws:
DAOException -  

loadImageRepository

public byte[] loadImageRepository(java.lang.String nameImage)
                           throws DAOException
Loads an image of the current company;
Parameters:
nameImage - name of image
Returns:
byte[] with bytes of image
Throws:
DAOException -  

removeImageRepository

public void removeImageRepository(java.lang.String nameImage)
                           throws DAOException
Removes an image of the current company
Parameters:
nameImage - name of image
Throws:
DAOException -  

applyImagesRepository

public java.util.ArrayList applyImagesRepository(java.util.ArrayList items)
                                          throws DAOException
Applies a set of changes in the images of the current company;
Parameters:
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 updating
Returns:
ArrayList with 2 elements (0) possible problem (String), (1) current images list (CodeDescription[])
Throws:
DAOException -  

storeTemplate

public CodeDescription[] storeTemplate(Template template)
                                throws DAOException
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. If the template exists before, its version is validated and the old template is replaced. The associations between the template and its components are established if these associations are new.
Parameters:
template - to store
Returns:
CodeDescription[] with 4 [code, stamp] in the following order: template, HEADER, BODY, CLOSING
Throws:
DAOException -  

loadTemplatesDescription

public CodeDescription[] loadTemplatesDescription(long category,
                                                  int printType)
                                           throws DAOException
Loads code and description of all templates, for the current company and for the specified category; ordered by name.
Parameters:
category - specified letter category
printType - specified print type
Returns:
CodeDescription[] object with [code, description] of templates
Throws:
DAOException -  

loadTemplateCodes

public CodeDescription[] loadTemplateCodes(long templateCode)
                                    throws DAOException
Loads code and description of one template and its components for the specified template code
Parameters:
templateCode - code of template
Returns:
CodeDescription[] object with [code, description] of template
Throws:
DAOException -  

loadTemplateCodes

public CodeDescription[] loadTemplateCodes(long category,
                                           int printType,
                                           java.lang.String name)
                                    throws DAOException
Loads code and stamp of one template and its components for the specified template code
Parameters:
category - category of template
printType - type of print
name - name of template
Returns:
CodeDescription[] composed by [code, stamp] of template and its components ordered by template, HEADER, BODY, CLOSING
Throws:
DAOException -  

loadTemplateCodeDescription

public CodeDescription[] loadTemplateCodeDescription(long category,
                                                     int printType,
                                                     java.lang.String name)
                                              throws DAOException
Loads code and description of one template and its components for the specified template code
Parameters:
category - category of template
printType - type of print
name - name of template
Returns:
CodeDescription[] composed by [code, description] of template and its components ordered by template, HEADER, BODY, CLOSING
Throws:
DAOException -  

loadCodesStamps

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
Loads code and stamp of template and components
Parameters:
category - category of template
printType - type of print
name - name of template
header - name of component header
body - name of component body
closing - name of component closing
Returns:
CodeDescription[i] for i = 1(HEADER),2(BODY),3(CLOSING) is: [code, stamp] of component, if it exists, [LetterTemplateGlobals.UNDEF,LetterTemplateGlobals.STR_UNDEF] if component doesn't exist
Throws:
DAOException -  

loadTemplate

public Template loadTemplate(long templateCode)
                      throws DAOException
Loads a letters template of the current company, corresponding to a code.
Parameters:
templateCode - code of template
Returns:
Template selected
Throws:
DAOException -  

removeTemplate

public void removeTemplate(long code)
                    throws DAOException
Removes a letters template (not its components) of the current company, corresponding to a code.
Parameters:
code - code of template
Throws:
DAOException -  

loadAllTemplatesDescription

public java.util.ArrayList loadAllTemplatesDescription()
                                                throws DAOException
Loads code, print type and name of templates and their categories names.
Returns:
ArrayList of variables where each element is an inner ArrayList with the following elements of a variable: code(Long): code of template, nameCategory(String): name of category, type(String): print type, nameTemplate (String): name of template.
Throws:
DAOException -  

applyItemsTemplate

public java.util.ArrayList applyItemsTemplate(java.util.ArrayList items)
                                       throws DAOException
Applies a set of changes in the templates of the current company;
Parameters:
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 updating
Returns:
ArrayList with 2 elements: (0) possible problem (String), (1) current Template description list (ArrayList)
Throws:
DAOException -  

loadTemplateDate

public java.sql.Date loadTemplateDate(long templateCode)
                               throws DAOException
Load the date of template.
Parameters:
templateCode - Code of template.
Returns:
date date of template.
Throws:
DAOException -  

loadLoanDummy

public java.lang.String loadLoanDummy()
                               throws DAOException
Load the dummy loan of a company.
Returns:
code dummy agreement code.
Throws:
DAOException -  
java.rmi.RemoteException - Description of the Exception

storeComponent

public CodeDescription storeComponent(LetterComponent component)
                               throws DAOException
Stores a letters component for the current company, generating code for the component if it is new. If the component exists before, its version is validated and the old component is replaced.
Parameters:
component - is the letter component to store
Returns:
CodeDescription: [code, stamp] of component
Throws:
DAOException -  

storeComponentAs

public CodeDescription storeComponentAs(long templateCode,
                                        LetterComponent component)
                                 throws DAOException
Store as a letters component for the current company, generating code for the component if it is new. If the component exists before, its version is validated and the old component is replaced. The association between the template and the component is established.
Parameters:
templateCode - Code of template
component - letters component
Returns:
CodeDescription [code, stamp] of component
Throws:
DAOException -  

loadComponentsDescription

public CodeDescription[] loadComponentsDescription(int componentType,
                                                   int printType)
                                            throws DAOException
Loads code and description of all components, for the current company, for the specified component type and print type; ordered by name
Parameters:
componentType - type of components to load
printType - print type of components to load
Returns:
CodeDescription[] object with [code, description] of components
Throws:
DAOException -  

loadComponent

public LetterComponent loadComponent(long code)
                              throws DAOException
Loads a letters component of the current company, corresponding to a code.
Parameters:
code - code of letters component
Returns:
LetterComponent is the loaded component
Throws:
DAOException -  

removeComponent

public void removeComponent(long code)
                     throws DAOException
Removes a letters component of the current company, corresponding to a code.
Parameters:
code - code of component
Throws:
DAOException -  

loadComponentCode

public CodeDescription loadComponentCode(int componentType,
                                         int printType,
                                         java.lang.String name)
                                  throws DAOException
Load [code, stamp] for specified component
Parameters:
componentType - type of component (HEADER, BODY or CLOSING)
printType - type of print
name - name of component
Returns:
CodeDescription [code, stamp] if the component exists, [LetterTemplateGlobals.UNDEF,LetterTemplateGlobals.STR_UNDEF] if the component doesn't exist
Throws:
DAOException -  

loadUnlikedComponents

public java.util.ArrayList loadUnlikedComponents()
                                          throws DAOException
If the relationship between Template and Component doesn't exist loads code, name and print type of components and name of component type.
Returns:
ArrayList of variables where each element is an inner ArrayList with the following elements of a variable: code(Long): code of component, nameComponentType(String):name of component type, type(String): print type, nameComponent (String): name of component.
Throws:
DAOException -  

applyItemsComponent

public java.util.ArrayList applyItemsComponent(java.util.ArrayList items)
                                        throws DAOException
Applies a set of changes in the components of the current company where the relationship between Template and Component doesn't exist.
Parameters:
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 updating
Returns:
ArrayList with 2 elements: (0) possible problem (String), (1) current Template description list (ArrayList)
Throws:
DAOException -  

generatePreviewTemplate

public java.util.ArrayList generatePreviewTemplate(long templateCode,
                                                   long loanCode,
                                                   java.lang.Long[] templateVarsCodes)
                                            throws DAOException
Gets template variables values for one loan of the current company, which will be used in a preview of the template.
Parameters:
templateCode - is the code of template to preview
loanCode - is the code of the loan (i.e. agreement)
templateVarsCodes - template variables codes
Returns:
ArrayList of one tuple that is an Object[] of Strings; each String is the value of a template variable for the chosen loan
Throws:
DAOException -  

executeSQL

public java.util.ArrayList[] executeSQL(java.lang.String sentenceSQL,
                                        java.lang.Long[] selectFields,
                                        java.util.Hashtable jobORDERhashtable)
                                 throws DAOException
Gets a result set executing a SQL sentence, associated with a letter job.
Parameters:
sentenceSQL - SQL sentence for executing
selectFields - output fields ids
jobORDERhashtable - Hashtable of job ORDER elements: key: fieldId (in Long), value: JobORDERelement
Returns:
ArrayList[] as following: ArrayList[0]: first column of the result set (i.e. agreement code) it is an ArrayList of String elements. ArrayList[1]: the others columns of the result set it is an ArrayList of String[] elements.
Throws:
DAOException -  

loadFTPCodes

public CodeDescription[] loadFTPCodes()
                               throws DAOException
Loads all [code, name] of the ftp's of the current company, ordered by name
Returns:
CodeDescription[] object with [code, name] of the ftp's
Throws:
DAOException -  

loadJobsCodes

public CodeDescription[] loadJobsCodes()
                                throws DAOException
Loads all [code, name] of the jobs of the current company; ordered by name
Returns:
CodeDescription[] object with [code, name] of the jobs
Throws:
DAOException -  

loadCalendars

public java.util.Hashtable loadCalendars()
                                  throws DAOException
Loads all the calendars of the current company
Returns:
Hashtable of company calendars: key: year (Integer), value: String of 365/366 characters representing the year calendar (each day of year is a character : 'P' is it is workable(processing) day, 'N' otherwise)
Throws:
DAOException -  

loadLetterJob

public LetterBatchStartModel loadLetterJob()
                                    throws DAOException
Loads all letters Job information.
Returns:
answer The LetterBatchStartModel object with all letters Job when each atribute represents: Jobs to run, Jobs out of frequency and other Jobs(inactive,no yet active and on request)
Throws:
DAOException -  

loadSysDate

public java.sql.Date loadSysDate()
                          throws DAOException
Loads the date (Oracle SYSDATE() function).
Returns:
date The date of Oracle SYSDATE() function.
Throws:
DAOException -  

loadCompanyWorkDir

public java.lang.String loadCompanyWorkDir()
                                    throws DAOException
Loads the temporal directory path of the current company.
Returns:
path Path for the Downloads generated by the system.
Throws:
DAOException -  

storeLetterJobLog

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
Store the log of executed letter jobs of the current company.
Parameters:
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 Parameter
executionDate - Description of the Parameter
Returns:
answer The LettersJobLogBean object with the log code, job id and execution date of executed letter jobs.
Throws:
DAOException -  

storeLetterFtpJobLog

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
Store the Log of ftps made for executed letter jobs of the current company.
Parameters:
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 Parameter
fullFilePath - Description of the Parameter
Throws:
DAOException -  

updateLetterFtpJobLog

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
Update the Log of ftps made for executed letter jobs of the current company.
Parameters:
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 Parameter
fullFilePath - Description of the Parameter
Throws:
DAOException -  

updateJobExecDate

public void updateJobExecDate(long jobId,
                              java.sql.Date date)
                       throws DAOException
Update the date of execution of the letter job of the current company.
Parameters:
date - The date of execution of the letter job.
jobId - Description of the Parameter
Throws:
DAOException -  

loadCompanyLocation

public CompanyLocation loadCompanyLocation(long ftpId)
                                    throws DAOException
Load the data of company locations.
Parameters:
ftpId - The code of ftp.
Returns:
answer The CompanyLocation object with location id, path ip address, ftp login name and ftp password.
Throws:
DAOException -  

loadLetterBatchReview

public LetterBatchReviewModel loadLetterBatchReview(java.lang.String dayMonthYear)
                                             throws DAOException
Review the batch of letters jobs
Parameters:
dayMonthYear - The date to ask for letter Job Log information
Returns:
answer The LetterBatchReviewModel object with Job Log information.
Throws:
DAOException -  

getDao

private LetterTemplateDAO getDao()
                          throws DAOException
Obtains a DAO instance assigning to lettertemplateDao attribute
Returns:
The dao value
Throws:
DAOException -  

getSystemAlias

private java.util.Hashtable getSystemAlias()
                                    throws DAOException
Obtains a value for systemAlias attribute
Returns:
The systemAlias value
Throws:
DAOException -  

getSystemFields

private java.util.Hashtable getSystemFields()
                                     throws DAOException
Obtains a value for systemFields attribute
Returns:
The systemFields value
Throws:
DAOException -  

insertLetterARHistory

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