com.carlosbcruz.account.util
Class AccountProperties

java.lang.Object
  extended by com.carlosbcruz.account.util.AccountProperties

public class AccountProperties
extends java.lang.Object

General Properties for the Account Application

Author:
Carlos Fernando Bella Cruz - pessoal@carlosbcruz.com

Field Summary
static java.lang.String BANK_TYPE_DESCRIPTION_GROUP
           
static java.lang.String LAST_INPUT_DIRECTORY
           
static java.lang.String QUICK_DESCRIPTION_GROUP
           
 
Constructor Summary
AccountProperties()
           
 
Method Summary
static void addGroupProperty(java.lang.String propertyKey, java.lang.String value)
          Insert a property at the end of a group
static java.util.Vector getGroupProperty(java.lang.String propertyKey)
          Return a group of properties specifying the group property key
static java.lang.String getGroupProperty(java.lang.String propertyKey, int index)
          Return specific groups property element by its index
static java.lang.String getStringProperty(java.lang.String propertyKey)
          Get the property to a key.
static void removeAllGroupKeysProperty(java.lang.String propertyKey)
          Remove all the properties that belongs to a group
static void removeGroupKeyPropertyByPosition(java.lang.String propertyKey, int position)
          Remove a property from a group informing the position
static void saveProperties()
          Save the properties in the application file
static void setStringProperty(java.lang.String propertyKey, java.lang.String propertyValue)
          Set an Account property
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAST_INPUT_DIRECTORY

public static java.lang.String LAST_INPUT_DIRECTORY

QUICK_DESCRIPTION_GROUP

public static java.lang.String QUICK_DESCRIPTION_GROUP

BANK_TYPE_DESCRIPTION_GROUP

public static java.lang.String BANK_TYPE_DESCRIPTION_GROUP
Constructor Detail

AccountProperties

public AccountProperties()
Method Detail

getStringProperty

public static java.lang.String getStringProperty(java.lang.String propertyKey)
Get the property to a key. A default value is returned if not found

Parameters:
propertyKey - The parameter key
Returns:
the value

removeAllGroupKeysProperty

public static void removeAllGroupKeysProperty(java.lang.String propertyKey)
Remove all the properties that belongs to a group

Parameters:
propertyKey - The group to be removed

removeGroupKeyPropertyByPosition

public static void removeGroupKeyPropertyByPosition(java.lang.String propertyKey,
                                                    int position)
Remove a property from a group informing the position

Parameters:
propertyKey - The group key identification
position - Position to be removed

addGroupProperty

public static void addGroupProperty(java.lang.String propertyKey,
                                    java.lang.String value)
Insert a property at the end of a group

Parameters:
propertyKey - Property Group
value - The value

getGroupProperty

public static java.util.Vector getGroupProperty(java.lang.String propertyKey)
Return a group of properties specifying the group property key

Parameters:
propertyKey - group property key
Returns:
The vector with all the group contents

getGroupProperty

public static java.lang.String getGroupProperty(java.lang.String propertyKey,
                                                int index)
Return specific groups property element by its index

Parameters:
propertyKey - group property key
index - the property position
Returns:
The property requested

setStringProperty

public static void setStringProperty(java.lang.String propertyKey,
                                     java.lang.String propertyValue)
Set an Account property

Parameters:
propertyKey - the Key
propertyValue - the Value

saveProperties

public static void saveProperties()
Save the properties in the application file