public class StringResourceRepositoryImpl extends java.lang.Object implements StringResourceRepository
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map |
resources
mem store
|
| Constructor and Description |
|---|
StringResourceRepositoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getEncoding()
Returns the current encoding of this repository.
|
StringResource |
getStringResource(java.lang.String name)
get the string resource that is stored with given key
|
void |
putStringResource(java.lang.String name,
java.lang.String body)
add a string resource with given key.
|
void |
putStringResource(java.lang.String name,
java.lang.String body,
java.lang.String encoding)
add a string resource with given key.
|
void |
removeStringResource(java.lang.String name)
delete a string resource with given key.
|
void |
setEncoding(java.lang.String encoding)
Sets the default encoding of the repository.
|
public StringResource getStringResource(java.lang.String name)
StringResourceRepositorygetStringResource in interface StringResourceRepositoryname - String name to retrieve from the repository.StringResourceRepository.getStringResource(java.lang.String)public void putStringResource(java.lang.String name,
java.lang.String body)
StringResourceRepositoryputStringResource in interface StringResourceRepositoryname - The String name to store the template under.body - A String containing a template.StringResourceRepository.putStringResource(java.lang.String, java.lang.String)public void putStringResource(java.lang.String name,
java.lang.String body,
java.lang.String encoding)
StringResourceRepositoryputStringResource in interface StringResourceRepositoryname - The String name to store the template under.body - A String containing a template.encoding - The encoding of this string templateStringResourceRepository.putStringResource(java.lang.String, java.lang.String, java.lang.String)public void removeStringResource(java.lang.String name)
StringResourceRepositoryremoveStringResource in interface StringResourceRepositoryname - The string name to remove from the repository.StringResourceRepository.removeStringResource(java.lang.String)public java.lang.String getEncoding()
StringResourceRepositorygetEncoding in interface StringResourceRepositoryStringResourceRepository.getEncoding()public void setEncoding(java.lang.String encoding)
StringResourceRepositorysetEncoding in interface StringResourceRepositoryencoding - The encoding to use.StringResourceRepository.setEncoding(java.lang.String)