View Javadoc

1   /*
2    *  jDTAUS Core RI Client Container
3    *  Copyright (C) 2005 Christian Schulte
4    *  <cs@schulte.it>
5    *
6    *  This library is free software; you can redistribute it and/or
7    *  modify it under the terms of the GNU Lesser General Public
8    *  License as published by the Free Software Foundation; either
9    *  version 2.1 of the License, or any later version.
10   *
11   *  This library is distributed in the hope that it will be useful,
12   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14   *  Lesser General Public License for more details.
15   *
16   *  You should have received a copy of the GNU Lesser General Public
17   *  License along with this library; if not, write to the Free Software
18   *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19   *
20   */
21  package org.jdtaus.core.container.ri.client.test;
22  
23  import org.jdtaus.core.container.ContainerFactory;
24  import org.jdtaus.core.container.ContainerInitializer;
25  import org.jdtaus.core.container.PropertyException;
26  
27  /**
28   * Implementation for testing dependency cycle detection.
29   *
30   * @author <a href="mailto:cs@schulte.it">Christian Schulte</a>
31   * @version $JDTAUS: CycleTestImplementation.java 8641 2012-09-27 06:45:17Z schulte $
32   */
33  public final class CycleTestImplementation implements CycleTestSpecification,
34                                                        ContainerInitializer
35  {
36      //--Implementation----------------------------------------------------------
37  
38      // This section is managed by jdtaus-container-mojo.
39  
40  
41      //----------------------------------------------------------Implementation--
42      //--Constructors------------------------------------------------------------
43  
44  // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausConstructors
45      // This section is managed by jdtaus-container-mojo.
46  
47      /** Standard implementation constructor <code>org.jdtaus.core.container.ri.client.test.CycleTestImplementation</code>. */
48      public CycleTestImplementation()
49      {
50          super();
51      }
52  
53  // </editor-fold>//GEN-END:jdtausConstructors
54  
55      //------------------------------------------------------------Constructors--
56      //--Dependencies------------------------------------------------------------
57  
58  // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausDependencies
59      // This section is managed by jdtaus-container-mojo.
60  
61      /**
62       * Gets the configured <code>Dependency</code> implementation.
63       *
64       * @return the configured <code>Dependency</code> implementation.
65       */
66      private CycleTestSpecification1 getDependency()
67      {
68          return (CycleTestSpecification1) ContainerFactory.getContainer().
69              getDependency( this, "Dependency");
70  
71      }
72  
73  // </editor-fold>//GEN-END:jdtausDependencies
74  
75      //------------------------------------------------------------Dependencies--
76      //--Properties--------------------------------------------------------------
77  
78  // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausProperties
79      // This section is managed by jdtaus-container-mojo.
80  
81  // </editor-fold>//GEN-END:jdtausProperties
82  
83      //--------------------------------------------------------------Properties--
84      //--ContainerInitializer----------------------------------------------------
85  
86      /**
87       * Initializes the instance.
88       *
89       * @see #assertValidProperties
90       */
91      public void initialize()
92      {
93          this.assertValidProperties();
94          this.getDependency();
95      }
96  
97      //----------------------------------------------------ContainerInitializer--
98  
99      /**
100      * Checks configured properties.
101      *
102      * @throws PropertyException for illegal property values.
103      */
104     private void assertValidProperties()
105     {
106     }
107 
108 }