|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--suncertify.common.PropertiesWrapper
PropertiesWrapper wrapps the Property object so only application specific property data can be stored. Apprtiopriate getters and setters method returns configuration values of the specified attributes. Property values are inicialized during object creatino from the specified file, if the file does not exist or does not have the desired property the default value of the prtoperty is used. Current values of the properties can be easy stored using storeProperties method.
Field Summary | |
static java.lang.String |
SERVER_LOGIN
login string representing server login (server generates logins) |
Method Summary | |
java.lang.String |
getDbFileName()
Returns data base file name stored in properties |
static java.lang.String |
getDbFileNameDefault()
Resturns default value of the data base file name |
java.lang.String |
getHostName()
Returns the host name stored in properties |
static java.lang.String |
getHostNameDefault()
Resturns default value of the host name |
static PropertiesWrapper |
getInstance()
Method returns reference to the PropertiesWrapper instance. |
int |
getListenPort()
Returns listen port stored in properties |
static int |
getListenPortDefault()
Returns default value for the listen port |
java.lang.String |
getLoginName()
Returns login name stored in properties |
static java.lang.String |
getLoginNameDefault()
Returns default value of the login name |
void |
setDbFileName(java.lang.String string)
Sets new value of the data base filename in properties |
void |
setHostName(java.lang.String string)
Sets new value of host name in properties |
void |
setListenPort(int i)
Sets new value of the listen port in properties |
void |
setLoginName(java.lang.String string)
Sets new value of the login name in properties |
void |
storeProperties()
Stores current properties values in a property file set in constructor. |
java.lang.String |
toString()
Returns string reprezentation of the object |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String SERVER_LOGIN
Method Detail |
public static PropertiesWrapper getInstance()
public void storeProperties() throws java.io.IOException
java.io.IOException
- thrown in case IO exception occuredpublic java.lang.String getHostName()
public int getListenPort()
public java.lang.String getDbFileName()
public java.lang.String getLoginName()
public void setHostName(java.lang.String string)
string
- new value of the host namepublic void setListenPort(int i)
i
- new value of the listen portpublic void setLoginName(java.lang.String string)
string
- new value of the login namepublic void setDbFileName(java.lang.String string)
string
- new value of the data base filenamepublic static java.lang.String getDbFileNameDefault()
public static java.lang.String getHostNameDefault()
public static int getListenPortDefault()
public static java.lang.String getLoginNameDefault()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |