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