org.omnaest.i18nbinder.grouping
Class FileGroupToPropertiesAdapter

java.lang.Object
  extended by org.omnaest.i18nbinder.grouping.FileGroupToPropertiesAdapter

public class FileGroupToPropertiesAdapter
extends Object

Adapter to allow easy access to properties of all files which are part of a FileGroup.

Author:
Omnaest

Nested Class Summary
protected static class FileGroupToPropertiesAdapter.PropertyFileAndProperty
          Container for a Property and its respective PropertyFile.
 
Field Summary
protected  FileGroup fileGroup
           
static String LINE_SEPARATOR
           
static String MULTILINE_VALUES_SEPARATOR
           
 
Constructor Summary
FileGroupToPropertiesAdapter(FileGroup fileGroup)
           
 
Method Summary
 List<String> determineGroupTokenList()
          Determines the tokens of the FileGroup.
 Set<String> determinePropertyKeySet()
          Determines all property keys which are occurring at least in one of the files of the FileGroup.
 FileGroup getFileGroup()
           
protected  org.omnaest.utils.propertyfile.PropertyFile resolveAndLoadPropertyFile(String groupToken)
          Resolves and loads a PropertyFile
protected  org.omnaest.utils.propertyfile.PropertyFile resolvePropertyFile(String groupToken, String fileEncoding)
          Resolves a PropertyFile for the given group token using the FileGroup.
protected  FileGroupToPropertiesAdapter.PropertyFileAndProperty resolvePropertyFileAndProperty(String propertyKey, String groupToken)
           
 String resolvePropertyValue(String propertyKey, String groupToken)
           
 void setFileEncoding(String fileEncoding)
           
 void setFileGroup(FileGroup fileGroup)
           
 void writePropertyValue(String propertyKey, String groupToken, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINE_SEPARATOR

public static final String LINE_SEPARATOR

MULTILINE_VALUES_SEPARATOR

public static final String MULTILINE_VALUES_SEPARATOR

fileGroup

protected FileGroup fileGroup
Constructor Detail

FileGroupToPropertiesAdapter

public FileGroupToPropertiesAdapter(FileGroup fileGroup)
Method Detail

getFileGroup

public FileGroup getFileGroup()

setFileGroup

public void setFileGroup(FileGroup fileGroup)

resolvePropertyFile

protected org.omnaest.utils.propertyfile.PropertyFile resolvePropertyFile(String groupToken,
                                                                          String fileEncoding)
Resolves a PropertyFile for the given group token using the FileGroup.

Parameters:
groupToken -
fileEncoding -
Returns:

resolveAndLoadPropertyFile

protected org.omnaest.utils.propertyfile.PropertyFile resolveAndLoadPropertyFile(String groupToken)
Resolves and loads a PropertyFile

Parameters:
groupToken -
Returns:
See Also:
#resolvePropertyFile(String)

resolvePropertyFileAndProperty

protected FileGroupToPropertiesAdapter.PropertyFileAndProperty resolvePropertyFileAndProperty(String propertyKey,
                                                                                              String groupToken)
Parameters:
propertyKey -
groupToken -
Returns:
See Also:
FileGroupToPropertiesAdapter.PropertyFileAndProperty

writePropertyValue

public void writePropertyValue(String propertyKey,
                               String groupToken,
                               String value)

resolvePropertyValue

public String resolvePropertyValue(String propertyKey,
                                   String groupToken)

determineGroupTokenList

public List<String> determineGroupTokenList()
Determines the tokens of the FileGroup.

Returns:

determinePropertyKeySet

public Set<String> determinePropertyKeySet()
Determines all property keys which are occurring at least in one of the files of the FileGroup.

Returns:

setFileEncoding

public void setFileEncoding(String fileEncoding)


Copyright © 2012. All Rights Reserved.