|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.navigator.displayer.AbstractMenuDisplayer
public abstract class AbstractMenuDisplayer
Abstract implementation of MenuDisplayer that can be used as
a basis for other menu displayers.
| Field Summary | |
|---|---|
protected MessageResources |
displayStrings
|
protected org.apache.commons.logging.Log |
log
|
protected MenuDisplayerMapping |
mapping
|
protected String |
name
|
protected javax.servlet.jsp.JspWriter |
out
|
protected PermissionsAdapter |
permissionsAdapter
Holds value of property permissionsAdapter. |
protected String |
target
|
| Fields inherited from interface net.sf.navigator.displayer.MenuDisplayer |
|---|
_SELF, DEFAULT_CONFIG, EMPTY, NBSP |
| Constructor Summary | |
|---|---|
AbstractMenuDisplayer()
|
|
| Method Summary | |
|---|---|
abstract void |
display(MenuComponent menu)
|
void |
end(javax.servlet.jsp.PageContext pageContext)
Lifecycle method that should be called when the MenuDisplayer
is done being used. |
String |
getConfig()
Returns the name of the message resources bundle that contains display and/or configuration definitions. |
String |
getName()
Returns the name of the MenuDisplayer. |
PermissionsAdapter |
getPermissionsAdapter()
Getter for property permissionsAdapter. |
String |
getTarget()
Returns the target name for any hrefs that may be generated. |
protected String |
getTarget(MenuComponent menu)
Convenience method that will first return the target for the displayer if it is not null. |
void |
init(javax.servlet.jsp.PageContext pageContext,
MenuDisplayerMapping mapping)
Lifecycle method that should be called when the MenuDisplayer
is being prepared for use. |
boolean |
isAllowed(MenuComponent menu)
Returns true if the specified component is usable. |
void |
setConfig(String config)
Sets the name of the message resources bundle that contains display and/or configuration definitions. |
void |
setName(String name)
Sets the name of the MenuDisplayer |
void |
setPermissionsAdapter(PermissionsAdapter permissionsAdapter)
Setter for property permissionsAdapter. |
void |
setTarget(String target)
Setter for property target. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final transient org.apache.commons.logging.Log log
protected String name
protected MessageResources displayStrings
protected javax.servlet.jsp.JspWriter out
protected String target
protected PermissionsAdapter permissionsAdapter
protected MenuDisplayerMapping mapping
| Constructor Detail |
|---|
public AbstractMenuDisplayer()
| Method Detail |
|---|
public String getName()
MenuDisplayerMenuDisplayer.
getName in interface MenuDisplayerpublic void setName(String name)
MenuDisplayerMenuDisplayer
setName in interface MenuDisplayername - New value of property name.public String getConfig()
MenuDisplayer
getConfig in interface MenuDisplayerpublic void setConfig(String config)
MenuDisplayer
setConfig in interface MenuDisplayerconfig - New value of property config.public String getTarget()
MenuDisplayer
getTarget in interface MenuDisplayerprotected String getTarget(MenuComponent menu)
menu.getTarget().
public void setTarget(String target)
MenuDisplayer
setTarget in interface MenuDisplayertarget - New value of property target.public PermissionsAdapter getPermissionsAdapter()
getPermissionsAdapter in interface MenuDisplayerpublic void setPermissionsAdapter(PermissionsAdapter permissionsAdapter)
setPermissionsAdapter in interface MenuDisplayerpermissionsAdapter - New value of property permissionsAdapter.
public void init(javax.servlet.jsp.PageContext pageContext,
MenuDisplayerMapping mapping)
MenuDisplayer
is being prepared for use.
init in interface MenuDisplayerpageContext - The JSP pageContext to give the displayer access
to any resources it may need.mapping - The menu displayer mapping used to embody the xml
definition.
public abstract void display(MenuComponent menu)
throws javax.servlet.jsp.JspException,
IOException
display in interface MenuDisplayerjavax.servlet.jsp.JspException
IOExceptionpublic void end(javax.servlet.jsp.PageContext pageContext)
MenuDisplayerMenuDisplayer
is done being used.
end in interface MenuDisplayerpageContext - The JSP pageContext to give the displayer access
to any resources it may need.public boolean isAllowed(MenuComponent menu)
true if the specified component is usable.
If permissionsAdapter is not defined, this method will
return true. Otherwise, the adapter will be used to check
permissions on the menu.
menu - The menu component.
true if the menu component is usable.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||