Class PBEMethod

Object
  |
  +--PBEUnit
        |
        +--PBEAttribute
              |
              +--PBEMethod
Direct Known Subclasses:
PBEAttributeMethod, PBEClearMethod, PBECommand, PBEDebugMethod, PBEEnabledMethod, PBEGuestMethod, PBEInitCommand, PBEMultiCommand

public class PBEMethod
extends PBEAttribute


Description:
PBEMethod provides functionality for enabling and disabling. It also provides before/after activation event triggering.


Fields inherited from class PBEAttribute
enabled, iAfter, iBefore, iOn, iStatus, iValue, name, object, visible
 
Constructor Summary
PBEMethod()
           
 
Method Summary
protected  void activate()
          This method does the actual work of the activation.
 void afterActivate(varchar string)
           
 void beforeActivate(varchar string)
           
 void doAfterActivate(varchar string)
           
 void doBeforeActivate(varchar string)
           
 varchar getAttributeStatus()
          This method is a hook that enables or disables the method depending on the status of the object attributes.
 void inputValue(generic v, boolean is_first)
           
 boolean performActivation()
          This method performs activation.
 void prepareAction(varchar when, varchar action)
           
 
Methods inherited from class PBEAttribute
afterInput, beforeInput, disable, doAfterInput, doBeforeInput, doOnOutput, enable, enabled, getStatus, getValue, getValue, globalReference, hide, onOutput, outputValue, prepareAction, setStatus, setValue, setValue, show
 
Methods inherited from class PBEUnit
compileActions, compileConditions, prepareEvent
 

Constructor Detail

PBEMethod

public PBEMethod()
Method Detail

inputValue

public void inputValue(generic v,
                       boolean is_first)
Overrides:
inputValue in class PBEAttribute

doBeforeActivate

public void doBeforeActivate(varchar string)

beforeActivate

public void beforeActivate(varchar string)

doAfterActivate

public void doAfterActivate(varchar string)

afterActivate

public void afterActivate(varchar string)

prepareAction

public void prepareAction(varchar when,
                          varchar action)

getAttributeStatus

public varchar getAttributeStatus()
This method is a hook that enables or disables the method depending on the status of the object attributes. Some methods require input, and there will use the method to check the status of all input. By default this function returns "" which means that the status of the attributes is ignored.

performActivation

public boolean performActivation()
This method performs activation. It returns $true if the method was executed, and no error occurred. In this case status will be set to "". If the function returns $false then the method was not executed. If status is $null then the method was not executed, but no error occured. In this case the result should be ignored. If the status is non-empty then an error occured.

activate

protected void activate()
This method does the actual work of the activation. The method sets status according to the result. A result of "" means the function was executed successfully. A result of $null means the function was not executed, but no error occurred. A non- empty string result is an error.