public class StringResourceRepositoryImpl extends Object implements StringResourceRepository
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 resources
public StringResource getStringResource(String name)
StringResourceRepository
getStringResource
in interface StringResourceRepository
name
- String name to retrieve from the repository.StringResourceRepository.getStringResource(java.lang.String)
public void putStringResource(String name, 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(String name, String body, 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(String name)
StringResourceRepository
removeStringResource
in interface StringResourceRepository
name
- The string name to remove from the repository.StringResourceRepository.removeStringResource(java.lang.String)
public String getEncoding()
StringResourceRepository
getEncoding
in interface StringResourceRepository
StringResourceRepository.getEncoding()
public void setEncoding(String encoding)
StringResourceRepository
setEncoding
in interface StringResourceRepository
encoding
- The encoding to use.StringResourceRepository.setEncoding(java.lang.String)
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.