com.bankframe.services.resource
Interface BankFrameResource

All Known Implementing Classes:
BankFrameMessageResource, BankFrameResourceBundle, BankFrameResourceSubset, BaseBankFrameResource, NoReloadBankFrameResourceBundle, NoReloadBaseBankFrameResource

public interface BankFrameResource

This interface defines the methods provided by a BankFrameResource.


Method Summary
 Object get(String key)
          This method gets a value.
 Boolean getBoolean(String keyName)
          This method gets the value of the specified property as a Boolean value.
 String getDescription(String key)
          This method gets a textual description for the specified key (or subset)
 String getDescription(String key, Locale locale)
          This method gets a textual description for the specified key (or subset) localised to the specified locale
 Double getDouble(String keyName)
          This method gets the value of the specified property as a Double object.
 Integer getInteger(String keyName)
          This method gets the value of the specified property as an Integer object.
 Long getLong(String keyName)
          This method gets the value of the specified property as a Long object.
 String getString(String key)
          This method gets a value.
 BankFrameResource getSubset(String prefix)
          This method gets a subset of values whose keys all begin with the specified prefix.
 Enumeration keys()
          Gets all the keys in the properties file.
 Object put(String key, Object value)
          This method adds a key/value to the resource.
 void remove(Enumeration keys)
          This method removes keys from the resource.
 Object remove(String key)
          This method removes a value from the resource.
 void removeAll()
          This method releases all resources used by this instance.
 void removeSubset(String prefix)
          This method removes a subset of values from the resource.
 int size()
          This method returns the number of elements in the resource
 

Method Detail

get

Object get(String key)
This method gets a value.

Parameters:
key - The key for the value to get
Returns:
the value or null if the value is not found

getString

String getString(String key)
This method gets a value.

Parameters:
key - The key for the value to get
Returns:
the value or null if the value is not found

getLong

Long getLong(String keyName)
This method gets the value of the specified property as a Long object.

Parameters:
keyName - The key to be read from the property file
Returns:
the value of the specifed property or null if a value does not exist

getInteger

Integer getInteger(String keyName)
This method gets the value of the specified property as an Integer object.

Parameters:
keyName - The key to be read from the property file
Returns:
the value of the specifed property or null if a value does not exist

getDouble

Double getDouble(String keyName)
This method gets the value of the specified property as a Double object.

Parameters:
keyName - The key to be read from the property file
Returns:
the value of the specifed property or null if a value does not exist

getBoolean

Boolean getBoolean(String keyName)
This method gets the value of the specified property as a Boolean value. If the value contains 'true' this method will return Boolean.TRUE, or Boolean.FALSE otherwise.

Parameters:
keyName - The key to be read from the property file
Returns:
the value of the specifed property or null if a value does not exist

getSubset

BankFrameResource getSubset(String prefix)
This method gets a subset of values whose keys all begin with the specified prefix.

Parameters:
prefix - The prefix that the subset starts with
Returns:
a BankFrameResource instance containing the subset

keys

Enumeration keys()
Gets all the keys in the properties file.

Returns:
an enumeration of key values.

put

Object put(String key,
           Object value)
This method adds a key/value to the resource. If the key already exists in the resource then this key is updated with the new value.

Parameters:
key - the name of the value
value - the value

remove

Object remove(String key)
This method removes a value from the resource.

Parameters:
key - the name of the key to remove

remove

void remove(Enumeration keys)
This method removes keys from the resource.

Parameters:
keys - an enumeration of the keys to remove

removeAll

void removeAll()
This method releases all resources used by this instance.


removeSubset

void removeSubset(String prefix)
This method removes a subset of values from the resource.

Parameters:
prefix - the prefix that the subset starts with

size

int size()
This method returns the number of elements in the resource


getDescription

String getDescription(String key)
This method gets a textual description for the specified key (or subset)


getDescription

String getDescription(String key,
                      Locale locale)
This method gets a textual description for the specified key (or subset) localised to the specified locale



Copyright © 2005, 2007, Oracle. All rights reserved.