com.togethersoft.openapi.sci.pattern
Interface SciPattern


public interface SciPattern

A pattern performing special kinds of actions upon an object (objects).


A behavior of a pattern is defined by its properties set. Method getProperties returns
PropertyMap instance containing a set of all the properties for this pattern.


Every pattern has a SciPatternProperty.PATTERN_CATEGORY property which indicates
a kind of an object this pattern is applicable to. The possible categories are defined
in SciPatternCategory interface.


A pattern has an apply method which makes the pattern perform desired actions, and method
canApply which checks whether the pattern can be applied to the target object (objects)
with the current values of pattern's properties.


prepare method checks if it is possible at all to apply this pattern
to the target object (objects) and
makes some start-up preparations for the pattern. It returns true if everything is okay,
and false if the pattern cannot be applied to the target object (objects) at all.

Author:
TogetherSoft
Since: Together 3.0
See Also: SciPatternProperty, SciPatternCategory, SciPatternManager

Method Summary
 voidapply()
          Makes this pattern perform desired actions upon a target object (objects).
 booleancanApply()
          Checks whether this pattern can be applied to the target object (objects)
with the current values of properties.
 PropertyMapgetProperties()
          Returns PropertyMap containing all properties for this pattern.
 booleanprepare()
          Checks if it is possible at all to apply this pattern
to the target object (objects) and
makes some start-up preparations for this pattern.

Method Detail

apply

public void apply()
Makes this pattern perform desired actions upon a target object (objects).

canApply

public boolean canApply()
Checks whether this pattern can be applied to the target object (objects)
with the current values of properties.
Returns: true if this pattern can be applied to the target object (objects) with
the currnet values of properties

getProperties

public PropertyMap getProperties()
Returns PropertyMap containing all properties for this pattern.
Returns: PropertyMap containing all properties for this pattern
See Also:
PropertyMap

prepare

public boolean prepare()
Checks if it is possible at all to apply this pattern
to the target object (objects) and
makes some start-up preparations for this pattern.
Returns: true if everything is okay,
and false if this pattern cannot be applied to the target object (objects) at all