All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.ibm.beans.dip.DipInfo

public interface interface DipInfo
This interface describes information about a dip that can be applied to a dippable class.


Method Index

 o isRemovable()
Indicates if the dip can be removed from the dipped object.
 o priority()
Gets the priority of this dip in relation to all other dips.
 o typeName()
Gets the dip type name as a String.
 o worksWith(String)
Indicates if another dip can work with this dip.

Methods

 o priority
 public abstract int priority()
Gets the priority of this dip in relation to all other dips. Priority determines the execution order of the dips applied to a dippable class implemented with the DippableSupportImp class.

The DipInfo.priority() method should be implemented as a final method to help protect the security of the dip and possibly help improve performance.

Understanding Priority

Because the priority is an integer, it can be set to any integer value. Priorities are compared using a purely numeric comparison, where a priority of 1000 is greater than a priority of 1.

If the dip does not need to set a specific priority in relation to other dips, its priority should be set to '500'. A value of 500 is the default dip priority. If your dip needs to be greater or lesser than the default dip priority, then make it divisible by 100. For example: 600, 700, 400. The only reason a dip should have a priority not divisible by 100 is if a dip is forcing a relationship order with another dip. For example, if dip 'A' must always occur right before dip 'B', the dip owners could force this by setting the priority of dip 'A' to 515 and the priority of dip 'B' to 514.

Returns:
The priority of the dip.
 o typeName
 public abstract String typeName()
Gets the dip type name as a String. The type name may not be the class name of the dip.

The DipInfo.typeName() method should be implemented as a final method to help protect the security of the dip and possibly help improve performance.

Different dips will be compared against each other using the dip type name. This will affect the adding and removing of dips to the dippable class. While adding a dip, if the dip type name to be added is equal to the type name of a dip already applied to the dippable object, the new dip will not be added again. While removing a dip ( using the Dippable.removeDip(String) method), only the dip whose type name is equal to the input parameter of the removeDip() method will be removed.

Returns:
The type name of the dip.
 o worksWith
 public abstract boolean worksWith(String dipTypeName)
Indicates if another dip can work with this dip. Once this dip is applied to a dippable object, this dip can reject any subsequent dips asking to be applied to the same dippable object.

Parameters:
dipTypeName - The type name of the new dip requesting to be added to the dippable object.
Returns:
true if the new dip should be added; false otherwise.
 o isRemovable
 public abstract boolean isRemovable()
Indicates if the dip can be removed from the dipped object.

Returns:
true if the dip can be removed; false otherwise.

All Packages  Class Hierarchy  This Package  Previous  Next  Index