Decision Center API

ilog.rules.teamserver.web.model
Class IlrUICommandModelDelegate

java.lang.Object
  extended by ilog.rules.teamserver.web.model.IlrUICommandModelDelegate
All Implemented Interfaces:
IlrUICommandModel, IlrUIModel, Serializable

public class IlrUICommandModelDelegate
extends Object
implements IlrUICommandModel

An implementation of a command model which delegates its calls to another command model.

Use this class when you want to redefine a few methods from an existing command model. For instance, you could redefine the delete button of the TableToolbarBean the following way:

 public class MyTableToolbarBean extends TableToolbarBean {
   public MyTableToolbarBean() {
     setDelete(new IlrUICommandModelDelegate(getDelete()) {
       public boolean isRendered() {
         return ManagerBean.getInstance().getSession().isUserInRole("anEditorRole");
       }
     });
   }
 }
 

See Also:
Serialized Form

Constructor Summary
IlrUICommandModelDelegate(IlrUICommandModel delegate)
           
 
Method Summary
 String action()
          Action to execute when the command is triggered (button or link clicked).
 String getDescription()
          Gets the description for the command.
 String getDescriptionStyleClass()
          Gets the CSS class to use when displaying the description of the object.
 String getHref()
          Gets the destination URL or an anchor point.
 String getIcon()
          Gets the icon to display for the command.
 String getIconStyleClass()
          Gets the CSS class to use when displaying the icon of the object using css rule.
 String getKey()
          Gets the key name of the command.
 String getOnclick()
          Gets the JavaScript code to execute when the command is clicked on the browser.
 String getStyleClass()
          Gets the CSS class for the graphical object.
 String getTarget()
          Gets the window or frame at which to target content
 String getTitle()
          Gets the title of the graphical object.
 String getTooltip()
          Gets the tooltip to display for the command.
 boolean isDisabledOnMultiSelection()
          Tells whether the command is disabled or not on multi selection.
 boolean isDisabledOnNoSelection()
          Tells whether the command is disabled or not on no selection.
 boolean isDisabledOnOneSelection()
          Tells whether the command is disabled or not on one selection.
 boolean isDisabledOnTwoSelection()
          Tells whether the command is disabled or not on two selections.
 boolean isEnabled()
          Tells whether the associated graphical object must be enabled or not.
 boolean isIconRendered()
          Tells whether the title is rendered or not.
 boolean isRendered()
          Tells whether the associated graphical object must be displayed or not.
 boolean isTitleRendered()
          Tells whether the title is rendered or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlrUICommandModelDelegate

public IlrUICommandModelDelegate(IlrUICommandModel delegate)
Method Detail

isRendered

public boolean isRendered()
Description copied from interface: IlrUICommandModel
Tells whether the associated graphical object must be displayed or not.

Specified by:
isRendered in interface IlrUICommandModel

isEnabled

public boolean isEnabled()
Description copied from interface: IlrUICommandModel
Tells whether the associated graphical object must be enabled or not.

If the object is a button, it will be grayed out when the isEnabled method returns false.

Specified by:
isEnabled in interface IlrUICommandModel

action

public String action()
Description copied from interface: IlrUICommandModel
Action to execute when the command is triggered (button or link clicked).

Specified by:
action in interface IlrUICommandModel
Returns:
A navigation constant.

getKey

public String getKey()
Description copied from interface: IlrUICommandModel
Gets the key name of the command.

Specified by:
getKey in interface IlrUICommandModel

getTitle

public String getTitle()
Description copied from interface: IlrUICommandModel
Gets the title of the graphical object.

Specified by:
getTitle in interface IlrUICommandModel

getStyleClass

public String getStyleClass()
Description copied from interface: IlrUICommandModel
Gets the CSS class for the graphical object.

Specified by:
getStyleClass in interface IlrUICommandModel

getDescription

public String getDescription()
Description copied from interface: IlrUICommandModel
Gets the description for the command.

In the Decision Center console, it will be displayed below the links (cf Configure page).

Specified by:
getDescription in interface IlrUICommandModel

getTooltip

public String getTooltip()
Description copied from interface: IlrUICommandModel
Gets the tooltip to display for the command.

Specified by:
getTooltip in interface IlrUICommandModel

getIcon

public String getIcon()
Description copied from interface: IlrUICommandModel
Gets the icon to display for the command.

Specified by:
getIcon in interface IlrUICommandModel

getOnclick

public String getOnclick()
Description copied from interface: IlrUICommandModel
Gets the JavaScript code to execute when the command is clicked on the browser.

Specified by:
getOnclick in interface IlrUICommandModel
Returns:
A piece of JavaScript code returning a boolean. Can be null.

getHref

public String getHref()
Description copied from interface: IlrUICommandModel
Gets the destination URL or an anchor point.

Specified by:
getHref in interface IlrUICommandModel
Returns:
a destination URL or an anchor point.

getTarget

public String getTarget()
Description copied from interface: IlrUICommandModel
Gets the window or frame at which to target content

Specified by:
getTarget in interface IlrUICommandModel
Returns:
The name of the target window or frame or one of _blank, _parent, _top or _self.

getDescriptionStyleClass

public String getDescriptionStyleClass()
Description copied from interface: IlrUICommandModel
Gets the CSS class to use when displaying the description of the object.

Specified by:
getDescriptionStyleClass in interface IlrUICommandModel

getIconStyleClass

public String getIconStyleClass()
Description copied from interface: IlrUICommandModel
Gets the CSS class to use when displaying the icon of the object using css rule.

Specified by:
getIconStyleClass in interface IlrUICommandModel

isTitleRendered

public boolean isTitleRendered()
Description copied from interface: IlrUICommandModel
Tells whether the title is rendered or not.

Specified by:
isTitleRendered in interface IlrUICommandModel
See Also:
IlrUICommandModel.getTitle()

isIconRendered

public boolean isIconRendered()
Description copied from interface: IlrUICommandModel
Tells whether the title is rendered or not.

Specified by:
isIconRendered in interface IlrUICommandModel
See Also:
IlrUICommandModel.getIcon()

isDisabledOnNoSelection

public boolean isDisabledOnNoSelection()
Description copied from interface: IlrUICommandModel
Tells whether the command is disabled or not on no selection.

Specified by:
isDisabledOnNoSelection in interface IlrUICommandModel

isDisabledOnOneSelection

public boolean isDisabledOnOneSelection()
Description copied from interface: IlrUICommandModel
Tells whether the command is disabled or not on one selection.

Specified by:
isDisabledOnOneSelection in interface IlrUICommandModel

isDisabledOnTwoSelection

public boolean isDisabledOnTwoSelection()
Description copied from interface: IlrUICommandModel
Tells whether the command is disabled or not on two selections.

Specified by:
isDisabledOnTwoSelection in interface IlrUICommandModel

isDisabledOnMultiSelection

public boolean isDisabledOnMultiSelection()
Description copied from interface: IlrUICommandModel
Tells whether the command is disabled or not on multi selection.

Specified by:
isDisabledOnMultiSelection in interface IlrUICommandModel

Decision Center API

© Copyright IBM Corp. 1987, 2013