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;
025import org.jdtaus.core.container.PropertyException;
026
027/**
028 * Implementation for testing dependency cycle detection.
029 *
030 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a>
031 * @version $JDTAUS: CycleTestImplementation1.java 8641 2012-09-27 06:45:17Z schulte $
032 */
033public final class CycleTestImplementation1 implements CycleTestSpecification1,
034                                                       ContainerInitializer
035{
036    //--Implementation----------------------------------------------------------
037
038    // This section is managed by jdtaus-container-mojo.
039
040
041    //----------------------------------------------------------Implementation--
042    //--Constructors------------------------------------------------------------
043
044// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausConstructors
045    // This section is managed by jdtaus-container-mojo.
046
047    /** Standard implementation constructor <code>org.jdtaus.core.container.ri.client.test.CycleTestImplementation1</code>. */
048    public CycleTestImplementation1()
049    {
050        super();
051    }
052
053// </editor-fold>//GEN-END:jdtausConstructors
054
055    //------------------------------------------------------------Constructors--
056    //--Dependencies------------------------------------------------------------
057
058// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausDependencies
059    // This section is managed by jdtaus-container-mojo.
060
061    /**
062     * Gets the configured <code>Dependency</code> implementation.
063     *
064     * @return the configured <code>Dependency</code> implementation.
065     */
066    private CycleTestSpecification2 getDependency()
067    {
068        return (CycleTestSpecification2) ContainerFactory.getContainer().
069            getDependency( this, "Dependency");
070
071    }
072
073// </editor-fold>//GEN-END:jdtausDependencies
074
075    //------------------------------------------------------------Dependencies--
076    //--Properties--------------------------------------------------------------
077
078// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:jdtausProperties
079    // This section is managed by jdtaus-container-mojo.
080
081// </editor-fold>//GEN-END:jdtausProperties
082
083    //--------------------------------------------------------------Properties--
084    //--ContainerInitializer----------------------------------------------------
085
086    /**
087     * Initializes the instance.
088     *
089     * @see #assertValidProperties
090     */
091    public void initialize()
092    {
093        this.assertValidProperties();
094        this.getDependency();
095    }
096
097    //----------------------------------------------------ContainerInitializer--
098
099    /**
100     * Checks configured properties.
101     *
102     * @throws PropertyException for illegal property values.
103     */
104    private void assertValidProperties()
105    {
106    }
107
108}