openfuture.util.masterdata
Class MRMasterDataSource

java.lang.Object
  |
  +--openfuture.util.masterdata.MRMasterDataSource
All Implemented Interfaces:
IMasterDataSource

public class MRMasterDataSource
extends java.lang.Object
implements IMasterDataSource

Masterdata source using MessageResources in order to retrieve localized master data.

Created: Mon May 28 06:36:47 2001

Version:
$Revision: 1.4 $
Author:
Wolfgang Reissenberger

Constructor Summary
MRMasterDataSource(java.lang.String type, org.apache.struts.util.MessageResources resources, java.util.LinkedList locales, java.util.LinkedList keys, java.lang.String prefix)
          Creates a new RBMasterDataSource instance.
 
Method Summary
protected  LocalizedMasterDataContainer getContainer()
          Get the value of container.
 IMasterDataContainer getMasterData(java.lang.String type)
          If getType() returns null or is equal to type, the container with master data is returned.
 java.lang.String getType()
          Get the value of type.
protected  void setContainer(LocalizedMasterDataContainer v)
          Set the value of container.
protected  void setType(java.lang.String v)
          Set the value of type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MRMasterDataSource

public MRMasterDataSource(java.lang.String type,
                          org.apache.struts.util.MessageResources resources,
                          java.util.LinkedList locales,
                          java.util.LinkedList keys,
                          java.lang.String prefix)
Creates a new RBMasterDataSource instance. For each given Locale, a vector of LDMasterData is added, one for each of the given keys. The description is retreived from the given message resources. The given search string in the resources is the concatenation of the given prefix and the respective key.

Special case: If the key is null or an empty string, the empty string is added as key and as value for each resource bundle.

Parameters:
type - type of master data
resources - Struts message resources
locales - list of Locale objects.
keys - vector of String objects.
prefix - prefix of the resource bundle entries.
Method Detail

getMasterData

public IMasterDataContainer getMasterData(java.lang.String type)
If getType() returns null or is equal to type, the container with master data is returned. Otherwise, null will be returned.
Specified by:
getMasterData in interface IMasterDataSource
Parameters:
type - master data type
Returns:
a master data container.

getType

public java.lang.String getType()
Get the value of type.
Returns:
value of type.

setType

protected void setType(java.lang.String v)
Set the value of type.
Parameters:
v - Value to assign to type.

getContainer

protected LocalizedMasterDataContainer getContainer()
Get the value of container.
Returns:
value of container.

setContainer

protected void setContainer(LocalizedMasterDataContainer v)
Set the value of container.
Parameters:
v - Value to assign to container.


Copyright © 2000 -- 2003 openfuture.de. All Rights Reserved.