public class StringResourceRepositoryImpl extends Object implements StringResourceRepository
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,StringResource> |
resources
mem store
|
| Constructor and Description |
|---|
StringResourceRepositoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
getEncoding()
Returns the current encoding of this repository.
|
StringResource |
getStringResource(String name)
get the string resource that is stored with given key
|
void |
putStringResource(String name,
String body)
add a string resource with given key.
|
void |
putStringResource(String name,
String body,
String encoding)
add a string resource with given key.
|
void |
removeStringResource(String name)
delete a string resource with given key.
|
void |
setEncoding(String encoding)
Sets the default encoding of the repository.
|
protected Map<String,StringResource> resources
public StringResource getStringResource(String name)
StringResourceRepositorygetStringResource in interface StringResourceRepositoryname - String name to retrieve from the repository.StringResourceRepository.getStringResource(java.lang.String)public void putStringResource(String name, 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(String name, String body, 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(String name)
StringResourceRepositoryremoveStringResource in interface StringResourceRepositoryname - The string name to remove from the repository.StringResourceRepository.removeStringResource(java.lang.String)public String getEncoding()
StringResourceRepositorygetEncoding in interface StringResourceRepositoryStringResourceRepository.getEncoding()public void setEncoding(String encoding)
StringResourceRepositorysetEncoding in interface StringResourceRepositoryencoding - The encoding to use.StringResourceRepository.setEncoding(java.lang.String)Copyright © 2000–2021 The Apache Software Foundation. All rights reserved.