notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r1516 - in trunk/main/metro: . runtime/etc/data runtime/etc/data/state runtime/src/main/net/dpml/metro/builder runtime/src/main/net/dpml/metro/runtime runtime/src/test/net/dpml/metro runtime/src/test/net/dpml/metro/runtime state/api state/api/src/main/net/dpml/state state/api/src/test/net/dpml/state state/api/src/test/net/dpml/state/test state/impl state/impl/src/test/net/dpml/state tools/src/main/net/dpml/metro/tools
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r1516 - in trunk/main/metro: . runtime/etc/data runtime/etc/data/state runtime/src/main/net/dpml/metro/builder runtime/src/main/net/dpml/metro/runtime runtime/src/test/net/dpml/metro runtime/src/test/net/dpml/metro/runtime state/api state/api/src/main/net/dpml/state state/api/src/test/net/dpml/state state/api/src/test/net/dpml/state/test state/impl state/impl/src/test/net/dpml/state tools/src/main/net/dpml/metro/tools
- Date: Tue, 20 Jun 2006 07:37:53 +0200
Author: mcconnell
Date: 2006-06-20 07:37:45 +0200 (Tue, 20 Jun 2006)
New Revision: 1516
Added:
trunk/main/metro/runtime/etc/data/state/
trunk/main/metro/runtime/etc/data/state/example.xgraph
trunk/main/metro/runtime/src/test/net/dpml/metro/runtime/AbstractEncodingTestCase.java
trunk/main/metro/runtime/src/test/net/dpml/metro/runtime/DefaultStateMachineTestCase.java
trunk/main/metro/state/api/etc/
trunk/main/metro/state/api/src/test/net/dpml/state/test/
Removed:
trunk/main/metro/runtime/src/test/net/dpml/metro/DefaultStateMachineTestCase.java
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultStateMachineTestCase.java
trunk/main/metro/state/impl/etc/
trunk/main/metro/state/impl/src/test/net/dpml/state/test/
Modified:
trunk/main/metro/module.xml
trunk/main/metro/runtime/src/main/net/dpml/metro/builder/ComponentTypeDecoder.java
trunk/main/metro/runtime/src/main/net/dpml/metro/builder/ComponentTypeEncoder.java
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultProvider.java
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultStateMachine.java
trunk/main/metro/state/api/src/main/net/dpml/state/DefaultInterface.java
trunk/main/metro/state/api/src/main/net/dpml/state/DefaultOperation.java
trunk/main/metro/state/api/src/main/net/dpml/state/DefaultState.java
trunk/main/metro/state/api/src/main/net/dpml/state/DefaultTransition.java
trunk/main/metro/state/api/src/main/net/dpml/state/DefaultTrigger.java
trunk/main/metro/state/api/src/main/net/dpml/state/ExecAction.java
trunk/main/metro/state/api/src/main/net/dpml/state/StateDecoder.java
trunk/main/metro/state/api/src/main/net/dpml/state/StateEncoder.java
trunk/main/metro/state/api/src/test/net/dpml/state/EmptyTestCase.java
trunk/main/metro/state/api/src/test/net/dpml/state/TransitionTestCase.java
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultOperationTestCase.java
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultStateTestCase.java
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultTransitionTestCase.java
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultTriggerTestCase.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ApplyDataType.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ExecDataType.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/InterfaceDataType.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/OperationDataType.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateDataType.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateTask.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/TransitionDataType.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/TriggerDataType.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/TypeBuilderTask.java
Log:
state reshuffle continued
Modified: trunk/main/metro/module.xml
===================================================================
--- trunk/main/metro/module.xml 2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/module.xml 2006-06-20 05:37:45 UTC (rev 1516)
@@ -8,8 +8,20 @@
<types>
<type id="jar"/>
</types>
+ <dependencies>
+ <runtime>
+ <include ref="dpml/transit/dpml-transit-main"/>
+ </runtime>
+ <test>
+ <include ref="ant/ant-junit"/>
+ </test>
+ </dependencies>
+ <filters>
+ <feature token="STATE-XSD-URI" id="uri" type="xsd"
ref="dpml/lang/dpml-state" alias="true"/>
+ </filters>
</project>
-
+
+ <!--
<project name="dpml-state-impl" basedir="state/impl">
<types>
<type id="jar"/>
@@ -27,6 +39,7 @@
<feature token="STATE-XSD-URI" id="uri" type="xsd"
ref="dpml/lang/dpml-state" alias="true"/>
</filters>
</project>
+ -->
<project name="dpml-job-api" basedir="job/api">
<types>
@@ -39,6 +52,7 @@
</dependencies>
</project>
+ <!--
<project name="dpml-job-impl" basedir="job/impl">
<types>
<type id="jar"/>
@@ -53,6 +67,7 @@
</test>
</dependencies>
</project>
+ -->
<project name="dpml-metro-component" basedir="component">
<types>
@@ -87,7 +102,7 @@
</runtime>
<test>
<include ref="ant/ant-junit"/>
- <include key="dpml-state-impl"/>
+ <!--<include key="dpml-state-impl"/>-->
</test>
</dependencies>
<filters>
@@ -115,8 +130,8 @@
<include ref="dpml/util/dpml-logging-api" tag="public"/>
<include ref="dpml/metro/dpml-metro-component" tag="protected"/>
<include ref="dpml/metro/dpml-metro-model" tag="protected"/>
- <include ref="dpml/metro/dpml-job-impl"/>
- <include ref="dpml/metro/dpml-state-impl"/>
+ <!--<include ref="dpml/metro/dpml-job-impl"/>-->
+ <!--<include ref="dpml/metro/dpml-state-impl"/>-->
</runtime>
<test>
<include ref="ant/ant-junit"/>
Added: trunk/main/metro/runtime/etc/data/state/example.xgraph
===================================================================
--- trunk/main/metro/runtime/etc/data/state/example.xgraph 2006-06-20
05:13:57 UTC (rev 1515)
+++ trunk/main/metro/runtime/etc/data/state/example.xgraph 2006-06-20
05:37:45 UTC (rev 1516)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<state xmlns="@STATE-XSD-URI@"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <trigger event="initialization">
+ <transition name="init" target="available/started">
+ <operation name="startup" method="start"/>
+ </transition>
+ </trigger>
+
+ <state name="available">
+
+ <operation name="audit" method="audit"/>
+ <trigger event="termination">
+ <transition name="terminate" target="../terminated"/>
+ </trigger>
+
+ <state name="started">
+ <interface class="org.acme.ManagementInterface"/>
+ <transition name="stop" target="../stopped">
+ <operation name="shutdown" method="stop"/>
+ </transition>
+ <trigger event="termination">
+ <apply id="stop"/>
+ </trigger>
+ </state>
+
+ <state name="stopped">
+ <transition name="start" target="../started">
+ <operation name="start" method="start"/>
+ </transition>
+ </state>
+
+ </state>
+
+ <state name="terminated" terminal="true"/>
+
+</state>
+
Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/builder/ComponentTypeDecoder.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/builder/ComponentTypeDecoder.java
2006-06-20 05:13:57 UTC (rev 1515)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/builder/ComponentTypeDecoder.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -41,8 +41,8 @@
import net.dpml.metro.info.Priority;
import net.dpml.state.State;
-import net.dpml.state.impl.StateDecoder;
-import net.dpml.state.impl.DefaultState;
+import net.dpml.state.StateDecoder;
+import net.dpml.state.DefaultState;
import net.dpml.util.DOM3DocumentBuilder;
import net.dpml.util.DecodingException;
Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/builder/ComponentTypeEncoder.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/builder/ComponentTypeEncoder.java
2006-06-20 05:13:57 UTC (rev 1515)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/builder/ComponentTypeEncoder.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -35,7 +35,7 @@
import net.dpml.metro.info.Descriptor;
import net.dpml.state.State;
-import net.dpml.state.impl.StateEncoder;
+import net.dpml.state.StateEncoder;
/**
* Type builder.
Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultProvider.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultProvider.java
2006-06-20 05:13:57 UTC (rev 1515)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultProvider.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -44,7 +44,6 @@
import net.dpml.state.StateListener;
import net.dpml.state.UnknownTransitionException;
import net.dpml.state.UnknownOperationException;
-import net.dpml.state.impl.DefaultStateMachine;
import net.dpml.lang.UnknownKeyException;
Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultStateMachine.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultStateMachine.java
2006-06-20 05:13:57 UTC (rev 1515)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultStateMachine.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -46,6 +46,8 @@
import net.dpml.state.IntegrityRuntimeException;
import net.dpml.state.StateListener;
import net.dpml.state.StateEvent;
+import net.dpml.state.ExecAction;
+import net.dpml.state.ApplyAction;
import net.dpml.util.Logger;
import net.dpml.util.UnicastEventSource;
Deleted:
trunk/main/metro/runtime/src/test/net/dpml/metro/DefaultStateMachineTestCase.java
===================================================================
---
trunk/main/metro/runtime/src/test/net/dpml/metro/DefaultStateMachineTestCase.java
2006-06-20 05:13:57 UTC (rev 1515)
+++
trunk/main/metro/runtime/src/test/net/dpml/metro/DefaultStateMachineTestCase.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -1,294 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.metro.runtime;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import net.dpml.state.State;
-import net.dpml.state.Transition;
-import net.dpml.state.Operation;
-import net.dpml.state.Interface;
-import net.dpml.state.Trigger;
-import net.dpml.state.Action;
-import net.dpml.state.impl.StateDecoder;
-
-import net.dpml.metro.runtime.DefaultStateMachine;
-
-import net.dpml.util.EventQueue;
-import net.dpml.util.Logger;
-import net.dpml.util.DefaultLogger;
-
-/**
- * Default state machine test-case.
- *
- * @author <a href="http://www.dpml.net">The Digital Product Meta Library</a>
- */
-public class DefaultStateMachineTestCase extends AbstractEncodingTestCase
-{
- private State m_state;
- private EventQueue m_queue;
- private DefaultStateMachine m_machine;
- private Logger m_logger;
-
- /**
- * Testcase setup.
- * @exception Exception if a setup error occurs
- */
- public void setUp() throws Exception
- {
- String testPath = System.getProperty( "project.test.dir" );
- File test = new File( testPath );
- File example = new File( test, "example.xgraph" );
- try
- {
- StateDecoder builder = new StateDecoder();
- m_state = builder.loadState( example.toURI() );
- m_logger = new DefaultLogger( "test" );
- m_queue = new EventQueue( m_logger );
- m_machine = new DefaultStateMachine( m_queue, m_logger, m_state
);
- }
- catch( Throwable e )
- {
- e.printStackTrace();
- fail( e.toString() );
- }
- }
-
- /**
- * List the state graph.
- * @exception Exception if an error occurs
- */
- public void testAudit() throws Exception
- {
- audit( m_state );
- }
-
- /**
- * Test state machine validation function.
- * @exception Exception if an error occurs
- */
- public void testValidation() throws Exception
- {
- DefaultStateMachine.validate( m_state );
- }
-
- /**
- * Test state machine initialization and termination internal state
integrity.
- * @exception Exception if an error occurs
- */
- public void testExecution() throws Exception
- {
- // check that the termination action is null
-
- Action termination = m_machine.getTerminationAction();
- assertNull( "root-termination", termination );
-
- // check that the initialization action is correct
-
- Action action = m_machine.getInitializationAction();
- if( action instanceof Transition )
- {
- Transition transition = (Transition) action;
- String name = transition.getName();
- assertEquals( "init-transition-name", "init", name );
- }
- else
- {
- fail( "Root initialization action is not a transition." );
- }
-
- // initialize the state
-
- State state = m_machine.initialize( null );
- assertEquals( "post-init-state", "started", state.getName() );
- State machineState = m_machine.getState();
- assertEquals( "machine-state", "started", machineState.getName() );
-
- if( action != m_machine.getInitializationAction() )
- {
- fail(
- "Unexpected initialization action ["
- + m_machine.getInitializationAction()
- + "] declared by statemachine." );
- }
-
- // check that the termination action has changed to the overridden
'stop' transition
-
- termination = m_machine.getTerminationAction();
- assertNotNull( "termination-in-start", termination );
- assertEquals( "action-is-stop", "stop", termination.getName() );
-
- //
- // test if the 'stop' transition is accessible
- //
-
- Transition[] transitions = m_machine.getTransitions();
- assertEquals( "started-transition-count", 1, transitions.length );
- Transition stop = transitions[0];
- assertEquals( "stop-transition-name", "stop", stop.getName() );
-
- //
- // test available operations
- //
-
- Operation[] operations = m_machine.getOperations();
- assertEquals( "started-operation-count", 1, operations.length );
- Operation audit = operations[0];
- assertEquals( "audit-operation-name", "audit", audit.getName() );
-
- //
- // apply the stop transition
- //
-
- m_machine.apply( stop.getName(), null );
- assertEquals( "stopped-state-name", "stopped",
m_machine.getState().getName() );
-
- //
- // restart
- //
-
- m_machine.apply( "start", null );
- assertEquals( "re-started-state-name", "started",
m_machine.getState().getName() );
-
- //
- // terminate
- //
-
- m_machine.terminate( null );
- assertEquals( "terminated-state-name", "terminated",
m_machine.getState().getName() );
- }
-
- /**
- * Test illegal attempt to initialize a disposed state machine.
- * @exception Exception if an error occurs
- */
- public void testInitializationInDisposed() throws Exception
- {
- m_machine.dispose();
- try
- {
- m_machine.initialize( null );
- fail( "disposed machine allowed initialization" );
- }
- catch( IllegalStateException e )
- {
- // success
- }
- }
-
- /**
- * Test illegal attempt to terminate a disposed state machine.
- * @exception Exception if an error occurs
- */
- public void testTerminationInDisposed() throws Exception
- {
- m_machine.dispose();
- try
- {
- m_machine.terminate( null );
- fail( "disposed machine allowed termination" );
- }
- catch( IllegalStateException e )
- {
- // success
- }
- }
-
- /**
- * Test encoding of a state graph.
- * @exception Exception if an error occurs
- */
- public void testEncoding() throws Exception
- {
- Object state = executeEncodingTest( m_state );
- }
-
- private void audit( State state )
- {
- ArrayList list = new ArrayList();
- audit( list, state, "" );
- System.out.println( "" + "# -------------------" );
- }
-
- private void audit( List visited, State state, String pad )
- {
- if( visited.contains( state ) )
- {
- return;
- }
- else
- {
- visited.add( state );
- }
- System.out.println( pad + "# -------------------" );
- System.out.println( pad + "# state: [" + state.getName() + "]" );
- Trigger[] triggers = state.getTriggers();
- for( int i=0; i<triggers.length; i++ )
- {
- Trigger trigger = triggers[i];
- System.out.println(
- pad + "# trigger "
- + "(" + ( i+1 ) + "): ["
- + trigger.toString()
- + "]" );
- }
- Transition[] transitions = state.getTransitions();
- for( int i=0; i<transitions.length; i++ )
- {
- Transition transition = transitions[i];
- System.out.println(
- pad + "# transition "
- + "(" + ( i+1 ) + "): ["
- + transition.getName()
- + "] --> [" + transition.getTargetName()
- + "]" );
- }
- Interface[] classes = state.getInterfaces();
- for( int i=0; i<classes.length; i++ )
- {
- Interface interfaceDef = classes[i];
- System.out.println(
- pad + "# interface "
- + "(" + ( i+1 ) + "): ["
- + interfaceDef.getClassname()
- + "]" );
- }
- Operation[] operations = state.getOperations();
- for( int i=0; i<operations.length; i++ )
- {
- Operation operation = operations[i];
- System.out.println(
- pad + "# operation "
- + "(" + ( i+1 ) + "): ["
- + operation.getName()
- + "]" );
- }
- State[] states = state.getStates();
- for( int i=0; i<states.length; i++ )
- {
- State s = states[i];
- audit( visited, s, pad + " " );
- }
- }
-}
-
-
-
Added:
trunk/main/metro/runtime/src/test/net/dpml/metro/runtime/AbstractEncodingTestCase.java
===================================================================
---
trunk/main/metro/runtime/src/test/net/dpml/metro/runtime/AbstractEncodingTestCase.java
2006-06-20 05:13:57 UTC (rev 1515)
+++
trunk/main/metro/runtime/src/test/net/dpml/metro/runtime/AbstractEncodingTestCase.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2005 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.metro.runtime;
+
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ObjectInputStream;
+
+import junit.framework.TestCase;
+
+/**
+ * AbstractEncodingTestCase.
+ *
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @version $Id: EntryDescriptorTestCase.java 2387 2005-04-23 19:12:58Z
mcconnell AT dpml.net $
+ */
+public abstract class AbstractEncodingTestCase extends TestCase
+{
+ /**
+ * Utility operation to validate encoding and decoding of a supplied
object.
+ * @param object the object to encode and decode
+ * @return the object resulting from deserialization
+ * @exception Exception if an error occurs
+ */
+ public Object executeEncodingTest( Object object ) throws Exception
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream( baos );
+ oos.writeObject( object );
+ oos.close();
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(
baos.toByteArray() );
+ ObjectInputStream ois = new ObjectInputStream( bais );
+ Object serialized = ois.readObject();
+ ois.close();
+
+ assertTrue( object != serialized ); // Ensure this is not the same
instance
+ assertEquals( object, serialized );
+ assertEquals( object.hashCode(), serialized.hashCode() );
+
+ return serialized;
+ }
+
+}
Copied:
trunk/main/metro/runtime/src/test/net/dpml/metro/runtime/DefaultStateMachineTestCase.java
(from rev 1515,
trunk/main/metro/runtime/src/test/net/dpml/metro/DefaultStateMachineTestCase.java)
===================================================================
---
trunk/main/metro/runtime/src/test/net/dpml/metro/DefaultStateMachineTestCase.java
2006-06-20 05:13:57 UTC (rev 1515)
+++
trunk/main/metro/runtime/src/test/net/dpml/metro/runtime/DefaultStateMachineTestCase.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -0,0 +1,292 @@
+/*
+ * Copyright 2005 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.metro.runtime;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.dpml.state.State;
+import net.dpml.state.Transition;
+import net.dpml.state.Operation;
+import net.dpml.state.Interface;
+import net.dpml.state.Trigger;
+import net.dpml.state.Action;
+import net.dpml.state.StateDecoder;
+
+import net.dpml.util.EventQueue;
+import net.dpml.util.Logger;
+import net.dpml.util.DefaultLogger;
+
+/**
+ * Default state machine test-case.
+ *
+ * @author <a href="http://www.dpml.net">The Digital Product Meta Library</a>
+ */
+public class DefaultStateMachineTestCase extends AbstractEncodingTestCase
+{
+ private State m_state;
+ private EventQueue m_queue;
+ private DefaultStateMachine m_machine;
+ private Logger m_logger;
+
+ /**
+ * Testcase setup.
+ * @exception Exception if a setup error occurs
+ */
+ public void setUp() throws Exception
+ {
+ String testPath = System.getProperty( "project.test.dir" );
+ File test = new File( testPath );
+ File example = new File( test, "state/example.xgraph" );
+ try
+ {
+ StateDecoder builder = new StateDecoder();
+ m_state = builder.loadState( example.toURI() );
+ m_logger = new DefaultLogger( "test" );
+ m_queue = new EventQueue( m_logger );
+ m_machine = new DefaultStateMachine( m_queue, m_logger, m_state
);
+ }
+ catch( Throwable e )
+ {
+ e.printStackTrace();
+ fail( e.toString() );
+ }
+ }
+
+ /**
+ * List the state graph.
+ * @exception Exception if an error occurs
+ */
+ public void testAudit() throws Exception
+ {
+ audit( m_state );
+ }
+
+ /**
+ * Test state machine validation function.
+ * @exception Exception if an error occurs
+ */
+ public void testValidation() throws Exception
+ {
+ DefaultStateMachine.validate( m_state );
+ }
+
+ /**
+ * Test state machine initialization and termination internal state
integrity.
+ * @exception Exception if an error occurs
+ */
+ public void testExecution() throws Exception
+ {
+ // check that the termination action is null
+
+ Action termination = m_machine.getTerminationAction();
+ assertNull( "root-termination", termination );
+
+ // check that the initialization action is correct
+
+ Action action = m_machine.getInitializationAction();
+ if( action instanceof Transition )
+ {
+ Transition transition = (Transition) action;
+ String name = transition.getName();
+ assertEquals( "init-transition-name", "init", name );
+ }
+ else
+ {
+ fail( "Root initialization action is not a transition." );
+ }
+
+ // initialize the state
+
+ State state = m_machine.initialize( null );
+ assertEquals( "post-init-state", "started", state.getName() );
+ State machineState = m_machine.getState();
+ assertEquals( "machine-state", "started", machineState.getName() );
+
+ if( action != m_machine.getInitializationAction() )
+ {
+ fail(
+ "Unexpected initialization action ["
+ + m_machine.getInitializationAction()
+ + "] declared by statemachine." );
+ }
+
+ // check that the termination action has changed to the overridden
'stop' transition
+
+ termination = m_machine.getTerminationAction();
+ assertNotNull( "termination-in-start", termination );
+ assertEquals( "action-is-stop", "stop", termination.getName() );
+
+ //
+ // test if the 'stop' transition is accessible
+ //
+
+ Transition[] transitions = m_machine.getTransitions();
+ assertEquals( "started-transition-count", 1, transitions.length );
+ Transition stop = transitions[0];
+ assertEquals( "stop-transition-name", "stop", stop.getName() );
+
+ //
+ // test available operations
+ //
+
+ Operation[] operations = m_machine.getOperations();
+ assertEquals( "started-operation-count", 1, operations.length );
+ Operation audit = operations[0];
+ assertEquals( "audit-operation-name", "audit", audit.getName() );
+
+ //
+ // apply the stop transition
+ //
+
+ m_machine.apply( stop.getName(), null );
+ assertEquals( "stopped-state-name", "stopped",
m_machine.getState().getName() );
+
+ //
+ // restart
+ //
+
+ m_machine.apply( "start", null );
+ assertEquals( "re-started-state-name", "started",
m_machine.getState().getName() );
+
+ //
+ // terminate
+ //
+
+ m_machine.terminate( null );
+ assertEquals( "terminated-state-name", "terminated",
m_machine.getState().getName() );
+ }
+
+ /**
+ * Test illegal attempt to initialize a disposed state machine.
+ * @exception Exception if an error occurs
+ */
+ public void testInitializationInDisposed() throws Exception
+ {
+ m_machine.dispose();
+ try
+ {
+ m_machine.initialize( null );
+ fail( "disposed machine allowed initialization" );
+ }
+ catch( IllegalStateException e )
+ {
+ // success
+ }
+ }
+
+ /**
+ * Test illegal attempt to terminate a disposed state machine.
+ * @exception Exception if an error occurs
+ */
+ public void testTerminationInDisposed() throws Exception
+ {
+ m_machine.dispose();
+ try
+ {
+ m_machine.terminate( null );
+ fail( "disposed machine allowed termination" );
+ }
+ catch( IllegalStateException e )
+ {
+ // success
+ }
+ }
+
+ /**
+ * Test encoding of a state graph.
+ * @exception Exception if an error occurs
+ */
+ public void testEncoding() throws Exception
+ {
+ Object state = executeEncodingTest( m_state );
+ }
+
+ private void audit( State state )
+ {
+ ArrayList list = new ArrayList();
+ audit( list, state, "" );
+ System.out.println( "" + "# -------------------" );
+ }
+
+ private void audit( List visited, State state, String pad )
+ {
+ if( visited.contains( state ) )
+ {
+ return;
+ }
+ else
+ {
+ visited.add( state );
+ }
+ System.out.println( pad + "# -------------------" );
+ System.out.println( pad + "# state: [" + state.getName() + "]" );
+ Trigger[] triggers = state.getTriggers();
+ for( int i=0; i<triggers.length; i++ )
+ {
+ Trigger trigger = triggers[i];
+ System.out.println(
+ pad + "# trigger "
+ + "(" + ( i+1 ) + "): ["
+ + trigger.toString()
+ + "]" );
+ }
+ Transition[] transitions = state.getTransitions();
+ for( int i=0; i<transitions.length; i++ )
+ {
+ Transition transition = transitions[i];
+ System.out.println(
+ pad + "# transition "
+ + "(" + ( i+1 ) + "): ["
+ + transition.getName()
+ + "] --> [" + transition.getTargetName()
+ + "]" );
+ }
+ Interface[] classes = state.getInterfaces();
+ for( int i=0; i<classes.length; i++ )
+ {
+ Interface interfaceDef = classes[i];
+ System.out.println(
+ pad + "# interface "
+ + "(" + ( i+1 ) + "): ["
+ + interfaceDef.getClassname()
+ + "]" );
+ }
+ Operation[] operations = state.getOperations();
+ for( int i=0; i<operations.length; i++ )
+ {
+ Operation operation = operations[i];
+ System.out.println(
+ pad + "# operation "
+ + "(" + ( i+1 ) + "): ["
+ + operation.getName()
+ + "]" );
+ }
+ State[] states = state.getStates();
+ for( int i=0; i<states.length; i++ )
+ {
+ State s = states[i];
+ audit( visited, s, pad + " " );
+ }
+ }
+}
+
+
+
Copied: trunk/main/metro/state/api/etc (from rev 1514,
trunk/main/metro/state/impl/etc)
Modified:
trunk/main/metro/state/api/src/main/net/dpml/state/DefaultInterface.java
===================================================================
--- trunk/main/metro/state/api/src/main/net/dpml/state/DefaultInterface.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/state/api/src/main/net/dpml/state/DefaultInterface.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package net.dpml.state.impl;
+package net.dpml.state;
import java.io.Serializable;
Modified:
trunk/main/metro/state/api/src/main/net/dpml/state/DefaultOperation.java
===================================================================
--- trunk/main/metro/state/api/src/main/net/dpml/state/DefaultOperation.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/state/api/src/main/net/dpml/state/DefaultOperation.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package net.dpml.state.impl;
+package net.dpml.state;
import java.io.Serializable;
Modified: trunk/main/metro/state/api/src/main/net/dpml/state/DefaultState.java
===================================================================
--- trunk/main/metro/state/api/src/main/net/dpml/state/DefaultState.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/state/api/src/main/net/dpml/state/DefaultState.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package net.dpml.state.impl;
+package net.dpml.state;
import java.io.Serializable;
import java.util.Arrays;
Modified:
trunk/main/metro/state/api/src/main/net/dpml/state/DefaultTransition.java
===================================================================
--- trunk/main/metro/state/api/src/main/net/dpml/state/DefaultTransition.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/state/api/src/main/net/dpml/state/DefaultTransition.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package net.dpml.state.impl;
+package net.dpml.state;
import java.io.Serializable;
Modified:
trunk/main/metro/state/api/src/main/net/dpml/state/DefaultTrigger.java
===================================================================
--- trunk/main/metro/state/api/src/main/net/dpml/state/DefaultTrigger.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/state/api/src/main/net/dpml/state/DefaultTrigger.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package net.dpml.state.impl;
+package net.dpml.state;
import java.io.Serializable;
Modified: trunk/main/metro/state/api/src/main/net/dpml/state/ExecAction.java
===================================================================
--- trunk/main/metro/state/api/src/main/net/dpml/state/ExecAction.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/state/api/src/main/net/dpml/state/ExecAction.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package net.dpml.state.impl;
+package net.dpml.state;
import java.io.Serializable;
Modified: trunk/main/metro/state/api/src/main/net/dpml/state/StateDecoder.java
===================================================================
--- trunk/main/metro/state/api/src/main/net/dpml/state/StateDecoder.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/state/api/src/main/net/dpml/state/StateDecoder.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package net.dpml.state.impl;
+package net.dpml.state;
import java.io.IOException;
import java.net.URI;
Modified: trunk/main/metro/state/api/src/main/net/dpml/state/StateEncoder.java
===================================================================
--- trunk/main/metro/state/api/src/main/net/dpml/state/StateEncoder.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/state/api/src/main/net/dpml/state/StateEncoder.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package net.dpml.state.impl;
+package net.dpml.state;
import java.io.IOException;
import java.io.OutputStream;
Modified:
trunk/main/metro/state/api/src/test/net/dpml/state/EmptyTestCase.java
===================================================================
--- trunk/main/metro/state/api/src/test/net/dpml/state/EmptyTestCase.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/state/api/src/test/net/dpml/state/EmptyTestCase.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -21,8 +21,6 @@
import java.io.File;
import java.net.URI;
-import net.dpml.state.impl.StateDecoder;
-
import junit.framework.TestCase;
/**
Modified:
trunk/main/metro/state/api/src/test/net/dpml/state/TransitionTestCase.java
===================================================================
---
trunk/main/metro/state/api/src/test/net/dpml/state/TransitionTestCase.java
2006-06-20 05:13:57 UTC (rev 1515)
+++
trunk/main/metro/state/api/src/test/net/dpml/state/TransitionTestCase.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -21,8 +21,6 @@
import java.io.File;
import java.net.URI;
-import net.dpml.state.impl.StateDecoder;
-
import junit.framework.TestCase;
/**
Copied: trunk/main/metro/state/api/src/test/net/dpml/state/test (from rev
1514, trunk/main/metro/state/impl/src/test/net/dpml/state/test)
Modified:
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultOperationTestCase.java
===================================================================
---
trunk/main/metro/state/impl/src/test/net/dpml/state/test/DefaultOperationTestCase.java
2006-06-20 05:11:03 UTC (rev 1514)
+++
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultOperationTestCase.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -19,7 +19,7 @@
package net.dpml.state.test;
import net.dpml.state.Operation;
-import net.dpml.state.impl.DefaultOperation;
+import net.dpml.state.DefaultOperation;
/**
* DefaultOperationTestCase.
Deleted:
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultStateMachineTestCase.java
===================================================================
---
trunk/main/metro/state/impl/src/test/net/dpml/state/test/DefaultStateMachineTestCase.java
2006-06-20 05:11:03 UTC (rev 1514)
+++
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultStateMachineTestCase.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -1,293 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.state.test;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import net.dpml.state.State;
-import net.dpml.state.Transition;
-import net.dpml.state.Operation;
-import net.dpml.state.Interface;
-import net.dpml.state.Trigger;
-import net.dpml.state.Action;
-import net.dpml.state.impl.DefaultStateMachine;
-import net.dpml.state.impl.StateDecoder;
-
-import net.dpml.util.EventQueue;
-import net.dpml.util.Logger;
-import net.dpml.util.DefaultLogger;
-
-/**
- * Default state machine test-case.
- *
- * @author <a href="http://www.dpml.net">The Digital Product Meta Library</a>
- */
-public class DefaultStateMachineTestCase extends AbstractEncodingTestCase
-{
- private State m_state;
- private EventQueue m_queue;
- private DefaultStateMachine m_machine;
- private Logger m_logger;
-
- /**
- * Testcase setup.
- * @exception Exception if a setup error occurs
- */
- public void setUp() throws Exception
- {
- String testPath = System.getProperty( "project.test.dir" );
- File test = new File( testPath );
- File example = new File( test, "example.xgraph" );
- try
- {
- StateDecoder builder = new StateDecoder();
- m_state = builder.loadState( example.toURI() );
- m_logger = new DefaultLogger( "test" );
- m_queue = new EventQueue( m_logger );
- m_machine = new DefaultStateMachine( m_queue, m_logger, m_state
);
- }
- catch( Throwable e )
- {
- e.printStackTrace();
- fail( e.toString() );
- }
- }
-
- /**
- * List the state graph.
- * @exception Exception if an error occurs
- */
- public void testAudit() throws Exception
- {
- audit( m_state );
- }
-
- /**
- * Test state machine validation function.
- * @exception Exception if an error occurs
- */
- public void testValidation() throws Exception
- {
- DefaultStateMachine.validate( m_state );
- }
-
- /**
- * Test state machine initialization and termination internal state
integrity.
- * @exception Exception if an error occurs
- */
- public void testExecution() throws Exception
- {
- // check that the termination action is null
-
- Action termination = m_machine.getTerminationAction();
- assertNull( "root-termination", termination );
-
- // check that the initialization action is correct
-
- Action action = m_machine.getInitializationAction();
- if( action instanceof Transition )
- {
- Transition transition = (Transition) action;
- String name = transition.getName();
- assertEquals( "init-transition-name", "init", name );
- }
- else
- {
- fail( "Root initialization action is not a transition." );
- }
-
- // initialize the state
-
- State state = m_machine.initialize( null );
- assertEquals( "post-init-state", "started", state.getName() );
- State machineState = m_machine.getState();
- assertEquals( "machine-state", "started", machineState.getName() );
-
- if( action != m_machine.getInitializationAction() )
- {
- fail(
- "Unexpected initialization action ["
- + m_machine.getInitializationAction()
- + "] declared by statemachine." );
- }
-
- // check that the termination action has changed to the overridden
'stop' transition
-
- termination = m_machine.getTerminationAction();
- assertNotNull( "termination-in-start", termination );
- assertEquals( "action-is-stop", "stop", termination.getName() );
-
- //
- // test if the 'stop' transition is accessible
- //
-
- Transition[] transitions = m_machine.getTransitions();
- assertEquals( "started-transition-count", 1, transitions.length );
- Transition stop = transitions[0];
- assertEquals( "stop-transition-name", "stop", stop.getName() );
-
- //
- // test available operations
- //
-
- Operation[] operations = m_machine.getOperations();
- assertEquals( "started-operation-count", 1, operations.length );
- Operation audit = operations[0];
- assertEquals( "audit-operation-name", "audit", audit.getName() );
-
- //
- // apply the stop transition
- //
-
- m_machine.apply( stop.getName(), null );
- assertEquals( "stopped-state-name", "stopped",
m_machine.getState().getName() );
-
- //
- // restart
- //
-
- m_machine.apply( "start", null );
- assertEquals( "re-started-state-name", "started",
m_machine.getState().getName() );
-
- //
- // terminate
- //
-
- m_machine.terminate( null );
- assertEquals( "terminated-state-name", "terminated",
m_machine.getState().getName() );
- }
-
- /**
- * Test illegal attempt to initialize a disposed state machine.
- * @exception Exception if an error occurs
- */
- public void testInitializationInDisposed() throws Exception
- {
- m_machine.dispose();
- try
- {
- m_machine.initialize( null );
- fail( "disposed machine allowed initialization" );
- }
- catch( IllegalStateException e )
- {
- // success
- }
- }
-
- /**
- * Test illegal attempt to terminate a disposed state machine.
- * @exception Exception if an error occurs
- */
- public void testTerminationInDisposed() throws Exception
- {
- m_machine.dispose();
- try
- {
- m_machine.terminate( null );
- fail( "disposed machine allowed termination" );
- }
- catch( IllegalStateException e )
- {
- // success
- }
- }
-
- /**
- * Test encoding of a state graph.
- * @exception Exception if an error occurs
- */
- public void testEncoding() throws Exception
- {
- Object state = executeEncodingTest( m_state );
- }
-
- private void audit( State state )
- {
- ArrayList list = new ArrayList();
- audit( list, state, "" );
- System.out.println( "" + "# -------------------" );
- }
-
- private void audit( List visited, State state, String pad )
- {
- if( visited.contains( state ) )
- {
- return;
- }
- else
- {
- visited.add( state );
- }
- System.out.println( pad + "# -------------------" );
- System.out.println( pad + "# state: [" + state.getName() + "]" );
- Trigger[] triggers = state.getTriggers();
- for( int i=0; i<triggers.length; i++ )
- {
- Trigger trigger = triggers[i];
- System.out.println(
- pad + "# trigger "
- + "(" + ( i+1 ) + "): ["
- + trigger.toString()
- + "]" );
- }
- Transition[] transitions = state.getTransitions();
- for( int i=0; i<transitions.length; i++ )
- {
- Transition transition = transitions[i];
- System.out.println(
- pad + "# transition "
- + "(" + ( i+1 ) + "): ["
- + transition.getName()
- + "] --> [" + transition.getTargetName()
- + "]" );
- }
- Interface[] classes = state.getInterfaces();
- for( int i=0; i<classes.length; i++ )
- {
- Interface interfaceDef = classes[i];
- System.out.println(
- pad + "# interface "
- + "(" + ( i+1 ) + "): ["
- + interfaceDef.getClassname()
- + "]" );
- }
- Operation[] operations = state.getOperations();
- for( int i=0; i<operations.length; i++ )
- {
- Operation operation = operations[i];
- System.out.println(
- pad + "# operation "
- + "(" + ( i+1 ) + "): ["
- + operation.getName()
- + "]" );
- }
- State[] states = state.getStates();
- for( int i=0; i<states.length; i++ )
- {
- State s = states[i];
- audit( visited, s, pad + " " );
- }
- }
-}
-
-
-
Modified:
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultStateTestCase.java
===================================================================
---
trunk/main/metro/state/impl/src/test/net/dpml/state/test/DefaultStateTestCase.java
2006-06-20 05:11:03 UTC (rev 1514)
+++
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultStateTestCase.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -23,10 +23,10 @@
import net.dpml.state.Operation;
import net.dpml.state.Interface;
import net.dpml.state.Trigger;
-import net.dpml.state.impl.DefaultOperation;
-import net.dpml.state.impl.DefaultInterface;
-import net.dpml.state.impl.DefaultTransition;
-import net.dpml.state.impl.DefaultState;
+import net.dpml.state.DefaultOperation;
+import net.dpml.state.DefaultInterface;
+import net.dpml.state.DefaultTransition;
+import net.dpml.state.DefaultState;
/**
* Default state test-case.
Modified:
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultTransitionTestCase.java
===================================================================
---
trunk/main/metro/state/impl/src/test/net/dpml/state/test/DefaultTransitionTestCase.java
2006-06-20 05:11:03 UTC (rev 1514)
+++
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultTransitionTestCase.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -20,8 +20,8 @@
import net.dpml.state.Operation;
import net.dpml.state.Transition;
-import net.dpml.state.impl.DefaultTransition;
-import net.dpml.state.impl.DefaultOperation;
+import net.dpml.state.DefaultTransition;
+import net.dpml.state.DefaultOperation;
/**
* Default transition test-case.
Modified:
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultTriggerTestCase.java
===================================================================
---
trunk/main/metro/state/impl/src/test/net/dpml/state/test/DefaultTriggerTestCase.java
2006-06-20 05:11:03 UTC (rev 1514)
+++
trunk/main/metro/state/api/src/test/net/dpml/state/test/DefaultTriggerTestCase.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -21,8 +21,8 @@
import net.dpml.state.Action;
import net.dpml.state.Trigger;
import net.dpml.state.Trigger.TriggerEvent;
-import net.dpml.state.impl.DefaultOperation;
-import net.dpml.state.impl.DefaultTrigger;
+import net.dpml.state.DefaultOperation;
+import net.dpml.state.DefaultTrigger;
/**
* Default trigger test-case.
Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ApplyDataType.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/ApplyDataType.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/ApplyDataType.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -18,7 +18,7 @@
package net.dpml.metro.tools;
-import net.dpml.state.impl.ApplyAction;
+import net.dpml.state.ApplyAction;
/**
* Apply an identified transition.
Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ExecDataType.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/ExecDataType.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/ExecDataType.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -18,7 +18,7 @@
package net.dpml.metro.tools;
-import net.dpml.state.impl.ExecAction;
+import net.dpml.state.ExecAction;
/**
* Exec an identified operation.
Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/InterfaceDataType.java
===================================================================
---
trunk/main/metro/tools/src/main/net/dpml/metro/tools/InterfaceDataType.java
2006-06-20 05:13:57 UTC (rev 1515)
+++
trunk/main/metro/tools/src/main/net/dpml/metro/tools/InterfaceDataType.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -18,7 +18,7 @@
package net.dpml.metro.tools;
-import net.dpml.state.impl.DefaultInterface;
+import net.dpml.state.DefaultInterface;
import org.apache.tools.ant.BuildException;
Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/OperationDataType.java
===================================================================
---
trunk/main/metro/tools/src/main/net/dpml/metro/tools/OperationDataType.java
2006-06-20 05:13:57 UTC (rev 1515)
+++
trunk/main/metro/tools/src/main/net/dpml/metro/tools/OperationDataType.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -18,7 +18,7 @@
package net.dpml.metro.tools;
-import net.dpml.state.impl.DefaultOperation;
+import net.dpml.state.DefaultOperation;
import org.apache.tools.ant.BuildException;
Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateDataType.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateDataType.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateDataType.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -33,8 +33,8 @@
import net.dpml.state.Operation;
import net.dpml.state.Interface;
import net.dpml.state.Transition;
-import net.dpml.state.impl.StateDecoder;
-import net.dpml.state.impl.DefaultState;
+import net.dpml.state.StateDecoder;
+import net.dpml.state.DefaultState;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.BuildException;
Modified: trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateTask.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateTask.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/StateTask.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -25,7 +25,7 @@
import net.dpml.tools.tasks.GenericTask;
import net.dpml.state.State;
-import net.dpml.state.impl.StateEncoder;
+import net.dpml.state.StateEncoder;
import org.apache.tools.ant.BuildException;
Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/TransitionDataType.java
===================================================================
---
trunk/main/metro/tools/src/main/net/dpml/metro/tools/TransitionDataType.java
2006-06-20 05:13:57 UTC (rev 1515)
+++
trunk/main/metro/tools/src/main/net/dpml/metro/tools/TransitionDataType.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -18,8 +18,8 @@
package net.dpml.metro.tools;
-import net.dpml.state.impl.DefaultTransition;
-import net.dpml.state.impl.DefaultOperation;
+import net.dpml.state.DefaultTransition;
+import net.dpml.state.DefaultOperation;
import org.apache.tools.ant.BuildException;
Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/TriggerDataType.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/TriggerDataType.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/TriggerDataType.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -21,11 +21,11 @@
import org.apache.tools.ant.BuildException;
import net.dpml.state.Trigger.TriggerEvent;
-import net.dpml.state.impl.DefaultTrigger;
-import net.dpml.state.impl.DefaultTransition;
-import net.dpml.state.impl.DefaultOperation;
-import net.dpml.state.impl.ApplyAction;
-import net.dpml.state.impl.ExecAction;
+import net.dpml.state.DefaultTrigger;
+import net.dpml.state.DefaultTransition;
+import net.dpml.state.DefaultOperation;
+import net.dpml.state.ApplyAction;
+import net.dpml.state.ExecAction;
/**
* Utility datatype supporting a Transition instance construction.
Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/TypeBuilderTask.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/TypeBuilderTask.java
2006-06-20 05:13:57 UTC (rev 1515)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/TypeBuilderTask.java
2006-06-20 05:37:45 UTC (rev 1516)
@@ -46,8 +46,8 @@
import net.dpml.metro.info.ThreadSafePolicy;
import net.dpml.state.State;
-import net.dpml.state.impl.DefaultState;
-import net.dpml.state.impl.StateDecoder;
+import net.dpml.state.DefaultState;
+import net.dpml.state.StateDecoder;
import net.dpml.library.info.Scope;
- r1516 - in trunk/main/metro: . runtime/etc/data runtime/etc/data/state runtime/src/main/net/dpml/metro/builder runtime/src/main/net/dpml/metro/runtime runtime/src/test/net/dpml/metro runtime/src/test/net/dpml/metro/runtime state/api state/api/src/main/net/dpml/state state/api/src/test/net/dpml/state state/api/src/test/net/dpml/state/test state/impl state/impl/src/test/net/dpml/state tools/src/main/net/dpml/metro/tools, mcconnell at BerliOS, 06/20/2006
Archive powered by MHonArc 2.6.24.