Package net.sf.jguiraffe.resources
Interface ResourceGroup
-
public interface ResourceGroupDefinition of an interface for resource groups.
Resources can be organized in logical groups. Each group allows access to the resources it contains and to a collection of all available keys. The resources of a group all belong to the same
Locale.- Version:
- $Id: ResourceGroup.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<Object>getKeys()Returns a collection with the resource keys defined in this resource group.LocalegetLocale()Returns theLocaleof this resource groupObjectgetName()Returns the name of this resource group.ObjectgetResource(Object key)Returns the resource with the specified key.
-
-
-
Method Detail
-
getName
Object getName()
Returns the name of this resource group. It is up to a concrete implementation what this name means in practice.- Returns:
- the name of this resource group
-
getKeys
Set<Object> getKeys()
Returns a collection with the resource keys defined in this resource group. The keys in this collection can be passed to thegetResource()method.- Returns:
- the collection with defined resource keys
-
getLocale
Locale getLocale()
Returns theLocaleof this resource group- Returns:
- the Locale
-
getResource
Object getResource(Object key) throws MissingResourceException
Returns the resource with the specified key. This is the main method for accessing resources in this group.- Parameters:
key- the resource key- Returns:
- the resource with this key
- Throws:
MissingResourceException- if the resource cannot be found
-
-