msi.web.application
Class LPCodes

java.lang.Object
  extended bymsi.web.application.LPCodes

public class LPCodes
extends java.lang.Object

Nice little static object for handing out the leasepak codes. This works with both the LPCodesUpdate object and the LPCodesServiceListener to update codes.

Author:
Joseph Acosta Copyright by NetSol - Sep 15, 2004

Method Summary
 java.lang.String appStatusCodes()
           
 void getAllCodes()
          reads in the lpcodes file
 java.util.Hashtable getCodes(java.lang.String Code)
          Special function to get the states from the lpcode.txt file.
static LPCodes getInstance()
          You never call the object directly you just get an instance of it.
 void getRefreshCodes()
          getRefreshCodes is an internal method to refresh the codes
 java.util.Hashtable getStateCodes()
          Special function to get the states from the lpcode.txt file.
 void reReadCodes()
           
 void setLPCodeType(java.lang.String type_str)
          Set the code type that you want to get.
 void setTimerInterval(long timeLen_l)
          Setup the timer interval and then start the timer.
 void setupLPCodes(java.lang.String svrRoot)
          Setup the codes server, or initialize this.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static LPCodes getInstance()
You never call the object directly you just get an instance of it. Its called lazy instantiation.


reReadCodes

public void reReadCodes()

setTimerInterval

public void setTimerInterval(long timeLen_l)
Setup the timer interval and then start the timer.

Parameters:
timeLen_l - - the time to repol for new codes.

setupLPCodes

public void setupLPCodes(java.lang.String svrRoot)
Setup the codes server, or initialize this. It will setup the codes file to use.

Parameters:
svrRoot - - this is the root directory of the server.

setLPCodeType

public void setLPCodeType(java.lang.String type_str)
Set the code type that you want to get.

Parameters:
type_str - - set the type or name of the codes to get.

getStateCodes

public java.util.Hashtable getStateCodes()
Special function to get the states from the lpcode.txt file. The result is a Hashtable containing the states in longname as key, and shortname as value.

Returns:
Hashtable.

getCodes

public java.util.Hashtable getCodes(java.lang.String Code)
Special function to get the states from the lpcode.txt file. The result is a Hashtable containing the states in longname as key, and shortname as value.

Returns:
Hashtable.

getAllCodes

public void getAllCodes()
                 throws java.lang.Exception
reads in the lpcodes file

Returns:
void.
Throws:
throws - Exception.
java.lang.Exception

getRefreshCodes

public void getRefreshCodes()
getRefreshCodes is an internal method to refresh the codes


appStatusCodes

public java.lang.String appStatusCodes()