|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthelma.framework.core.Skin
public final class Skin
This represents a Helma skin, i.e. a template created from containing Macro tags that will be dynamically evaluated.. It uses the request path array from the RequestEvaluator object to resolve Macro handlers by type name.
Constructor Summary | |
---|---|
Skin(char[] content,
int length,
Application app)
Create a skin without any restrictions on the macros from a char array. |
|
Skin(java.lang.String content,
Application app)
Create a skin without any restrictions on which macros are allowed to be called from it |
|
Skin(java.lang.String content,
Application app,
java.util.HashSet sandbox)
Create a skin with a sandbox which contains the names of macros allowed to be called |
Method Summary | |
---|---|
void |
allowMacro(java.lang.String macroname)
Adds a macro to the list of allowed macros. |
boolean |
containsMacro(java.lang.String macroname)
Check if a certain macro is present in this skin. |
static Skin |
getSkin(Resource res,
Application app)
|
java.lang.String |
getSource()
Get the raw source text this skin was parsed from |
Skin |
getSubskin(java.lang.String name)
Get a subskin by name |
java.lang.String[] |
getSubskinNames()
Return an array of subskin names defined in this skin |
boolean |
hasMainskin()
Check if this skin has a main skin, as opposed to consisting just of subskins |
boolean |
hasSubskin(java.lang.String name)
Check if this skin contains a subskin with the given name |
void |
render(RequestEvaluator reval,
java.lang.Object thisObject,
java.lang.Object paramObject)
Render this skin |
java.lang.String |
renderAsString(RequestEvaluator reval,
java.lang.Object thisObject,
java.lang.Object paramObject)
Render this skin and return it as string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Skin(java.lang.String content, Application app)
public Skin(java.lang.String content, Application app, java.util.HashSet sandbox)
public Skin(char[] content, int length, Application app)
Method Detail |
---|
public static Skin getSkin(Resource res, Application app) throws java.io.IOException
java.io.IOException
public boolean hasMainskin()
public boolean hasSubskin(java.lang.String name)
name
- a subskin name
public Skin getSubskin(java.lang.String name)
name
- the subskin name
public java.lang.String[] getSubskinNames()
public java.lang.String getSource()
public java.lang.String renderAsString(RequestEvaluator reval, java.lang.Object thisObject, java.lang.Object paramObject) throws RedirectException, java.io.UnsupportedEncodingException
RedirectException
java.io.UnsupportedEncodingException
public void render(RequestEvaluator reval, java.lang.Object thisObject, java.lang.Object paramObject) throws RedirectException, java.io.UnsupportedEncodingException
RedirectException
java.io.UnsupportedEncodingException
public boolean containsMacro(java.lang.String macroname)
public void allowMacro(java.lang.String macroname)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |