|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.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()
MenuDisplayer
MenuDisplayer
.
getName
in interface MenuDisplayer
public void setName(String name)
MenuDisplayer
MenuDisplayer
setName
in interface MenuDisplayer
name
- New value of property name.public String getConfig()
MenuDisplayer
getConfig
in interface MenuDisplayer
public void setConfig(String config)
MenuDisplayer
setConfig
in interface MenuDisplayer
config
- New value of property config.public String getTarget()
MenuDisplayer
getTarget
in interface MenuDisplayer
protected String getTarget(MenuComponent menu)
menu.getTarget()
.
public void setTarget(String target)
MenuDisplayer
setTarget
in interface MenuDisplayer
target
- New value of property target.public PermissionsAdapter getPermissionsAdapter()
getPermissionsAdapter
in interface MenuDisplayer
public void setPermissionsAdapter(PermissionsAdapter permissionsAdapter)
setPermissionsAdapter
in interface MenuDisplayer
permissionsAdapter
- New value of property permissionsAdapter.public void init(javax.servlet.jsp.PageContext pageContext, MenuDisplayerMapping mapping)
MenuDisplayer
is being prepared for use.
init
in interface MenuDisplayer
pageContext
- 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 MenuDisplayer
javax.servlet.jsp.JspException
IOException
public void end(javax.servlet.jsp.PageContext pageContext)
MenuDisplayer
MenuDisplayer
is done being used.
end
in interface MenuDisplayer
pageContext
- 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 |