com.ibm.as400.ui.framework.java
Class Capabilities

java.lang.Object
  extended by com.ibm.as400.ui.framework.java.Capabilities

public class Capabilities
extends Object

Defines the capabilities of a DataBean by encapsulating a list of unsupported attributes. Clients of the DataBean can query its associated Capabilities object to learn whether a particular attribute is supported.

A list of instructions, or HandlerTasks, may optionally be associated with each unsupported attribute. These instructions are carried out by the UI framework. Typically they involve disabling or removing certain UI components from a panel.

Since:
v4r2m0
Version:
1.0, 04/15/98
Author:
D. Petty
See Also:
DataBean, HandlerTask

Constructor Summary
Constructor and Description
Capabilities()
          Constructs a Capabilities object.
 
Method Summary
Modifier and Type Method and Description
 HandlerTask[] getHandlerTasksFor(String attribute)
          Returns a list of HandlerTasks associated with an unsupported attribute.
 boolean isCapable(String attribute)
          Determines whether the DataBean associated with this object supports a particular attribute.
 void setCapable(String attribute)
          Sets an indication that a particular attribute is supported by the DataBean associated with this object.
 void setNotCapable(String attribute, HandlerTask[] handlerTasks)
          Sets an indication that a particular attribute is not supported by the DataBean associated with this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Capabilities

public Capabilities()
Constructs a Capabilities object.

Since:
v4r2m0
Method Detail

setNotCapable

public void setNotCapable(String attribute,
                          HandlerTask[] handlerTasks)
Sets an indication that a particular attribute is not supported by the DataBean associated with this object. Optionally associates a list of HandlerTasks with the attribute. The HandlerTasks indicate which panel components are affected by the unsupported attribute, and what action should be taken on them.

Parameters:
attribute - the attribute for which the indication is to be set
handlerTasks - an array of HandlerTask objects (may be null)
Since:
v4r2m0
See Also:
setCapable(java.lang.String), HandlerTask

setCapable

public void setCapable(String attribute)
Sets an indication that a particular attribute is supported by the DataBean associated with this object.

Parameters:
attribute - the attribute for which the indication is to be set
Since:
v4r2m0
See Also:
setNotCapable(java.lang.String, com.ibm.as400.ui.framework.java.HandlerTask[])

isCapable

public boolean isCapable(String attribute)
Determines whether the DataBean associated with this object supports a particular attribute.

Parameters:
attribute - the attribute to be checked
Returns:
true if the DataBean supports the specified attribute; false otherwise.
Since:
v4r2m0

getHandlerTasksFor

public HandlerTask[] getHandlerTasksFor(String attribute)
Returns a list of HandlerTasks associated with an unsupported attribute. If the attribute is supported, or if there are no HandlerTasks associated with the attribute, this method returns an array of length 0.

Parameters:
attribute - the attribute for which handler tasks are to be returned
Returns:
an array of HandlerTasks
Since:
v4r2m0
See Also:
HandlerTask