com.arsdigita.toolbox.ui
Class PrivilegedComponentSelector
java.lang.Object
com.arsdigita.bebop.Completable
com.arsdigita.bebop.CompoundComponent
com.arsdigita.toolbox.ui.PrivilegedComponentSelector
- All Implemented Interfaces:
- Component, Lockable
- public class PrivilegedComponentSelector
- extends CompoundComponent
This component wraps two other components and chooses one of
them based on whether or not a given party (specified in a
RequestLocal) has a given privilege on a given object (also
specified in a RequestLocal).
Method Summary |
void |
generateXML(PageState ps,
Element parent)
Adds a DOM subtree representing this component under the given
parent node. |
Methods inherited from class com.arsdigita.bebop.CompoundComponent |
add, add, children, contains, get, getClassAttr, getContainer, getIdAttr, getKey, getStyleAttr, indexOf, isEmpty, isLocked, isVisible, lock, register, register, respond, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible, size |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrivilegedComponentSelector
public PrivilegedComponentSelector(PrivilegeDescriptor requiredPrivilege,
RequestLocal objectRL,
Component priviledgedComponent,
Component unprivilegedComponent)
Construct a new PrivilegedComponentSelector.
- Parameters:
requiredPrivilege
- Privilege that will be checkedobjectRL
- RequestLocal in which the object on which
permission will be checked is storedunprivilegedComponent
- Component to be displayed when the
current user lacks the required privilege on the specified
object
generateXML
public void generateXML(PageState ps,
Element parent)
- Description copied from interface:
Component
Adds a DOM subtree representing this component under the given
parent node. Uses the request values stored in state
.
- Specified by:
generateXML
in interface Component
- Overrides:
generateXML
in class CompoundComponent
- See Also:
Component.generateXML( PageState, Element )
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC