View Javadoc

1   package com.sourceforge.jpatterns.patterns;
2   
3   import com.sourceforge.jpatterns.core.configuration.exceptions.JPInitializationException;
4   import com.sourceforge.jpatterns.core.configuration.model.JPatternsConfigsBean;
5   import com.sourceforge.jpatterns.schema.CastorSectionType;
6   import com.zmicer.utils.model.ICheckable;
7   
8   import java.io.Serializable;
9   
10  /**
11   * The interface defines the JPatterns pattern - the base of the framework. All the patterns interfaces would extend this one.
12   * It is to allow us operating with the base concept entities in some places, also it introduced some common for all the JPatterns method.
13   * <p/>
14   * $Author::                    $<br/>
15   * $Rev::                       $<br/> * $Date::                      $<br/>
16   */
17  public interface IJPattern extends ICheckable, Serializable
18  {
19      /**
20       * Perform the initialization of the JPatterns with the appropriate child instance of <code>CastorSectionType</code> castor config
21       * class and the <code>JPatternsConfigsBean</code> bean storing all the consumer configuration.
22       *
23       * @param castorSectionType castor config object of <code>CastorSectionType</code> class.
24       *                          Can not be null (otherwise <code>IllegalArgumentException</code> would appear).
25       * @param configBean        <code>JPatternsConfigsBean</code> config bean with all the JPatterns consumer configuration.
26       *                          Can not be null (otherwise <code>IllegalArgumentException</code> would appear).
27       *
28       * @throws JPInitializationException in the case the given CastorSectionType is not of the appropriate type
29       */
30      void init(CastorSectionType castorSectionType, JPatternsConfigsBean configBean) throws JPInitializationException;
31  
32      /**
33       * Make the check this type of the castor config fits the pattern
34       *
35       * @param castorSectionType the castor config object which is the root configuration storage for all the patterns (according to the XSD scheme)
36       *
37       * @return true if this fits to the pattern implementation nature, and false otherwise
38       */
39      boolean checkCastorConfig(CastorSectionType castorSectionType);
40  }