001/*
002 *  jDTAUS Core RI Client Container
003 *  Copyright (C) 2005 Christian Schulte
004 *  <cs@schulte.it>
005 *
006 *  This library is free software; you can redistribute it and/or
007 *  modify it under the terms of the GNU Lesser General Public
008 *  License as published by the Free Software Foundation; either
009 *  version 2.1 of the License, or any later version.
010 *
011 *  This library is distributed in the hope that it will be useful,
012 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
013 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014 *  Lesser General Public License for more details.
015 *
016 *  You should have received a copy of the GNU Lesser General Public
017 *  License along with this library; if not, write to the Free Software
018 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
019 *
020 */
021package org.jdtaus.core.container.ri.client.test;
022
023import org.jdtaus.core.container.ContainerFactory;
024import org.jdtaus.core.container.ContainerInitializer;
025
026/**
027 * Implementation used for testing the {@code Container} runtime.
028 *
029 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a>
030 * @version $JDTAUS: TestImplementation.java 8641 2012-09-27 06:45:17Z schulte $
031 */
032public class TestImplementation
033    implements MultitonSpecification, ContainerInitializer
034{
035    //--Implementation----------------------------------------------------------
036
037    // This section is managed by jdtaus-container-mojo.
038
039
040    //----------------------------------------------------------Implementation--
041    //--Constructors------------------------------------------------------------
042
043// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausConstructors
044    // This section is managed by jdtaus-container-mojo.
045
046    /** Standard implementation constructor <code>org.jdtaus.core.container.ri.client.test.TestImplementation</code>. */
047    public TestImplementation()
048    {
049        super();
050    }
051
052// </editor-fold>//GEN-END:jdtausConstructors
053
054    //------------------------------------------------------------Constructors--
055    //--ContainerInitializer----------------------------------------------------
056
057    /** Flag indicating that the {@link #initialize()} method got called. */
058    private boolean initialized;
059
060    public void initialize()
061    {
062        this.initialized = true;
063    }
064
065    //----------------------------------------------------ContainerInitializer--
066    //--Dependencies------------------------------------------------------------
067
068// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausDependencies
069    // This section is managed by jdtaus-container-mojo.
070
071    /**
072     * Gets the configured <code>CycleTestSpecification</code> implementation.
073     *
074     * @return the configured <code>CycleTestSpecification</code> implementation.
075     */
076    protected CycleTestSpecification getCycleTestSpecification()
077    {
078        return (CycleTestSpecification) ContainerFactory.getContainer().
079            getDependency( this, "CycleTestSpecification");
080
081    }
082
083    /**
084     * Gets the configured <code>MultitonSpecification</code> implementation.
085     *
086     * @return the configured <code>MultitonSpecification</code> implementation.
087     */
088    protected MultitonSpecification getMultitonSpecification()
089    {
090        return (MultitonSpecification) ContainerFactory.getContainer().
091            getDependency( this, "MultitonSpecification");
092
093    }
094
095// </editor-fold>//GEN-END:jdtausDependencies
096
097    //------------------------------------------------------------Dependencies--
098    //--Properties--------------------------------------------------------------
099
100// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausProperties
101    // This section is managed by jdtaus-container-mojo.
102
103    /**
104     * Gets the value of property <code>stringObject</code>.
105     *
106     * @return Test-Property
107     */
108    public java.lang.String getStringObject()
109    {
110        return (java.lang.String) ContainerFactory.getContainer().
111            getProperty( this, "stringObject" );
112
113    }
114
115    /**
116     * Gets the value of property <code>shortObject</code>.
117     *
118     * @return Test-Property
119     */
120    public java.lang.Short getShortObject()
121    {
122        return (java.lang.Short) ContainerFactory.getContainer().
123            getProperty( this, "shortObject" );
124
125    }
126
127    /**
128     * Gets the value of property <code>short</code>.
129     *
130     * @return Test-Property
131     */
132    public short getShort()
133    {
134        return ( (java.lang.Short) ContainerFactory.getContainer().
135            getProperty( this, "short" ) ).shortValue();
136
137    }
138
139    /**
140     * Gets the value of property <code>longObject</code>.
141     *
142     * @return Test-Property
143     */
144    public java.lang.Long getLongObject()
145    {
146        return (java.lang.Long) ContainerFactory.getContainer().
147            getProperty( this, "longObject" );
148
149    }
150
151    /**
152     * Gets the value of property <code>long</code>.
153     *
154     * @return Test-Property
155     */
156    public long getLong()
157    {
158        return ( (java.lang.Long) ContainerFactory.getContainer().
159            getProperty( this, "long" ) ).longValue();
160
161    }
162
163    /**
164     * Gets the value of property <code>integerObject</code>.
165     *
166     * @return Test-Property
167     */
168    public java.lang.Integer getIntegerObject()
169    {
170        return (java.lang.Integer) ContainerFactory.getContainer().
171            getProperty( this, "integerObject" );
172
173    }
174
175    /**
176     * Gets the value of property <code>int</code>.
177     *
178     * @return Test-Property
179     */
180    public int getInt()
181    {
182        return ( (java.lang.Integer) ContainerFactory.getContainer().
183            getProperty( this, "int" ) ).intValue();
184
185    }
186
187    /**
188     * Gets the value of property <code>floatObject</code>.
189     *
190     * @return Test-Property
191     */
192    public java.lang.Float getFloatObject()
193    {
194        return (java.lang.Float) ContainerFactory.getContainer().
195            getProperty( this, "floatObject" );
196
197    }
198
199    /**
200     * Gets the value of property <code>float</code>.
201     *
202     * @return Test-Property
203     */
204    public float getFloat()
205    {
206        return ( (java.lang.Float) ContainerFactory.getContainer().
207            getProperty( this, "float" ) ).floatValue();
208
209    }
210
211    /**
212     * Gets the value of property <code>doubleObject</code>.
213     *
214     * @return Test-Property
215     */
216    public java.lang.Double getDoubleObject()
217    {
218        return (java.lang.Double) ContainerFactory.getContainer().
219            getProperty( this, "doubleObject" );
220
221    }
222
223    /**
224     * Gets the value of property <code>double</code>.
225     *
226     * @return Test-Property
227     */
228    public double getDouble()
229    {
230        return ( (java.lang.Double) ContainerFactory.getContainer().
231            getProperty( this, "double" ) ).doubleValue();
232
233    }
234
235    /**
236     * Gets the value of property <code>characterObject</code>.
237     *
238     * @return Test-Property
239     */
240    public java.lang.Character getCharacterObject()
241    {
242        return (java.lang.Character) ContainerFactory.getContainer().
243            getProperty( this, "characterObject" );
244
245    }
246
247    /**
248     * Gets the value of property <code>char</code>.
249     *
250     * @return Test-Property
251     */
252    public char getChar()
253    {
254        return ( (java.lang.Character) ContainerFactory.getContainer().
255            getProperty( this, "char" ) ).charValue();
256
257    }
258
259    /**
260     * Gets the value of property <code>byteObject</code>.
261     *
262     * @return Test-Property
263     */
264    public java.lang.Byte getByteObject()
265    {
266        return (java.lang.Byte) ContainerFactory.getContainer().
267            getProperty( this, "byteObject" );
268
269    }
270
271    /**
272     * Gets the value of property <code>byte</code>.
273     *
274     * @return Test-Property
275     */
276    public byte getByte()
277    {
278        return ( (java.lang.Byte) ContainerFactory.getContainer().
279            getProperty( this, "byte" ) ).byteValue();
280
281    }
282
283    /**
284     * Gets the value of property <code>booleanObject</code>.
285     *
286     * @return Test-Property
287     */
288    public java.lang.Boolean isBooleanObject()
289    {
290        return (java.lang.Boolean) ContainerFactory.getContainer().
291            getProperty( this, "booleanObject" );
292
293    }
294
295    /**
296     * Gets the value of property <code>boolean</code>.
297     *
298     * @return Test-Property
299     */
300    public boolean isBoolean()
301    {
302        return ( (java.lang.Boolean) ContainerFactory.getContainer().
303            getProperty( this, "boolean" ) ).booleanValue();
304
305    }
306
307// </editor-fold>//GEN-END:jdtausProperties
308
309    //--------------------------------------------------------------Properties--
310    //--TestSpecification-------------------------------------------------------
311
312    public boolean isInitialized()
313    {
314        return this.initialized;
315    }
316
317    public MultitonSpecification getDependency()
318    {
319        return this.getMultitonSpecification();
320    }
321
322    //-------------------------------------------------------TestSpecification--
323}