public class StringResourceRepositoryImpl extends java.lang.Object implements StringResourceRepository
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
encoding
Current Repository encoding.
|
protected java.util.Map<java.lang.String,StringResource> |
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.
|
protected java.util.Map<java.lang.String,StringResource> resources
private java.lang.String encoding
public StringResource getStringResource(java.lang.String name)
StringResourceRepository
getStringResource
in interface StringResourceRepository
name
- String name to retrieve from the repository.StringResourceRepository.getStringResource(java.lang.String)
public void putStringResource(java.lang.String name, java.lang.String body)
StringResourceRepository
putStringResource
in interface StringResourceRepository
name
- 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)
StringResourceRepository
putStringResource
in interface StringResourceRepository
name
- 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)
StringResourceRepository
removeStringResource
in interface StringResourceRepository
name
- The string name to remove from the repository.StringResourceRepository.removeStringResource(java.lang.String)
public java.lang.String getEncoding()
StringResourceRepository
getEncoding
in interface StringResourceRepository
StringResourceRepository.getEncoding()
public void setEncoding(java.lang.String encoding)
StringResourceRepository
setEncoding
in interface StringResourceRepository
encoding
- The encoding to use.StringResourceRepository.setEncoding(java.lang.String)