|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.velocity.runtime.resource.util.StringResourceRepositoryImpl
public class StringResourceRepositoryImpl
Default implementation of StringResourceRepository. Uses a HashMap for storage
Field Summary | |
---|---|
protected Map |
resources
mem store |
Constructor Summary | |
---|---|
StringResourceRepositoryImpl()
|
Method Summary | |
---|---|
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 |
removeStringResource(String name)
delete a string resource with given key. |
void |
setEncoding(String encoding)
Sets the encoding of the repository. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map resources
Constructor Detail |
---|
public StringResourceRepositoryImpl()
Method Detail |
---|
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 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |