notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r1135 - in trunk/main/depot/library/common/src: main/net/dpml/library/info test/net/dpml/library/impl test/net/dpml/library/info
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r1135 - in trunk/main/depot/library/common/src: main/net/dpml/library/info test/net/dpml/library/impl test/net/dpml/library/info
- Date: Fri, 24 Feb 2006 18:23:05 +0100
Author: mcconnell
Date: 2006-02-24 18:23:03 +0100 (Fri, 24 Feb 2006)
New Revision: 1135
Removed:
trunk/main/depot/library/common/src/main/net/dpml/library/info/DependencyDirectiveBeanInfo.java
trunk/main/depot/library/common/src/main/net/dpml/library/info/ImportDirectiveBeanInfo.java
trunk/main/depot/library/common/src/main/net/dpml/library/info/IncludeDirectiveBeanInfo.java
trunk/main/depot/library/common/src/main/net/dpml/library/info/LibraryDirectiveBeanInfo.java
trunk/main/depot/library/common/src/main/net/dpml/library/info/ModuleDirectiveBeanInfo.java
trunk/main/depot/library/common/src/main/net/dpml/library/info/ResourceDirectiveBeanInfo.java
trunk/main/depot/library/common/src/main/net/dpml/library/info/ScopeBeanInfo.java
trunk/main/depot/library/common/src/main/net/dpml/library/info/TypeDirectiveBeanInfo.java
Modified:
trunk/main/depot/library/common/src/main/net/dpml/library/info/ImportDirective.java
trunk/main/depot/library/common/src/main/net/dpml/library/info/IncludeDirective.java
trunk/main/depot/library/common/src/main/net/dpml/library/info/ResourceDirective.java
trunk/main/depot/library/common/src/test/net/dpml/library/impl/AbstractTestCase.java
trunk/main/depot/library/common/src/test/net/dpml/library/info/AbstractTestCase.java
trunk/main/depot/library/common/src/test/net/dpml/library/info/DependencyDirectiveTestCase.java
trunk/main/depot/library/common/src/test/net/dpml/library/info/ImportDirectiveTestCase.java
trunk/main/depot/library/common/src/test/net/dpml/library/info/IncludeDirectiveTestCase.java
trunk/main/depot/library/common/src/test/net/dpml/library/info/LibraryDirectiveTestCase.java
trunk/main/depot/library/common/src/test/net/dpml/library/info/ModuleDirectiveTestCase.java
trunk/main/depot/library/common/src/test/net/dpml/library/info/ResourceDirectiveTestCase.java
trunk/main/depot/library/common/src/test/net/dpml/library/info/TypeDirectiveTestCase.java
Log:
remove encoding support (now handled explicitly)
Deleted:
trunk/main/depot/library/common/src/main/net/dpml/library/info/DependencyDirectiveBeanInfo.java
===================================================================
---
trunk/main/depot/library/common/src/main/net/dpml/library/info/DependencyDirectiveBeanInfo.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/main/net/dpml/library/info/DependencyDirectiveBeanInfo.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -1,50 +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.library.info;
-
-import java.beans.SimpleBeanInfo;
-import java.beans.BeanDescriptor;
-import java.beans.DefaultPersistenceDelegate;
-
-/**
- * BeanInfo for the CategoryDirective class that declares a persistence
- * delegate.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public final class DependencyDirectiveBeanInfo extends SimpleBeanInfo
-{
- private static final BeanDescriptor BEAN_DESCRIPTOR =
setupBeanDescriptor();
-
- /**
- * Creation of a bean descriptor.
- * @return the bean descriptor
- */
- public BeanDescriptor getBeanDescriptor()
- {
- return BEAN_DESCRIPTOR;
- }
-
- private static BeanDescriptor setupBeanDescriptor()
- {
- BeanDescriptor descriptor = new BeanDescriptor(
DependencyDirective.class );
- descriptor.setValue(
- "persistenceDelegate",
- new DefaultPersistenceDelegate( new String[]{"scope",
"includeDirectives", "properties"} ) );
- return descriptor;
- }
-}
Modified:
trunk/main/depot/library/common/src/main/net/dpml/library/info/ImportDirective.java
===================================================================
---
trunk/main/depot/library/common/src/main/net/dpml/library/info/ImportDirective.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/main/net/dpml/library/info/ImportDirective.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -187,48 +187,4 @@
}
}
}
-
- /**
- * Mode bean info.
- */
- public static final class ModeBeanInfo extends SimpleBeanInfo
- {
- private static final BeanDescriptor BEAN_DESCRIPTOR =
setupBeanDescriptor();
-
- /**
- * Return the bean descriptor.
- * @return the descriptor
- */
- public BeanDescriptor getBeanDescriptor()
- {
- return BEAN_DESCRIPTOR;
- }
-
- private static BeanDescriptor setupBeanDescriptor()
- {
- BeanDescriptor descriptor = new BeanDescriptor( Mode.class );
- descriptor.setValue(
- "persistenceDelegate",
- new ModePersistenceDelegate() );
- return descriptor;
- }
-
- /**
- * Persistence delegate.
- */
- private static class ModePersistenceDelegate extends
DefaultPersistenceDelegate
- {
- /**
- * Return an expression.
- * @param old the old value
- * @param encoder the encoder
- * @return an expression
- */
- public Expression instantiate( Object old, Encoder encoder )
- {
- Mode mode = (Mode) old;
- return new Expression( mode, Mode.class, "parse", new
Object[]{mode.getName()} );
- }
- }
- }
}
Deleted:
trunk/main/depot/library/common/src/main/net/dpml/library/info/ImportDirectiveBeanInfo.java
===================================================================
---
trunk/main/depot/library/common/src/main/net/dpml/library/info/ImportDirectiveBeanInfo.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/main/net/dpml/library/info/ImportDirectiveBeanInfo.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -1,50 +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.library.info;
-
-import java.beans.SimpleBeanInfo;
-import java.beans.BeanDescriptor;
-import java.beans.DefaultPersistenceDelegate;
-
-/**
- * BeanInfo for the ImportDirective class that declares a persistence
- * delegate.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public final class ImportDirectiveBeanInfo extends SimpleBeanInfo
-{
- private static final BeanDescriptor BEAN_DESCRIPTOR =
setupBeanDescriptor();
-
- /**
- * Creation of a bean descriptor.
- * @return the bean descriptor
- */
- public BeanDescriptor getBeanDescriptor()
- {
- return BEAN_DESCRIPTOR;
- }
-
- private static BeanDescriptor setupBeanDescriptor()
- {
- BeanDescriptor descriptor = new BeanDescriptor(
ImportDirective.class );
- descriptor.setValue(
- "persistenceDelegate",
- new DefaultPersistenceDelegate( new String[]{"mode", "value",
"properties"} ) );
- return descriptor;
- }
-}
Modified:
trunk/main/depot/library/common/src/main/net/dpml/library/info/IncludeDirective.java
===================================================================
---
trunk/main/depot/library/common/src/main/net/dpml/library/info/IncludeDirective.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/main/net/dpml/library/info/IncludeDirective.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -224,48 +224,4 @@
}
}
}
-
- /**
- * Mode bean info.
- */
- public static final class ModeBeanInfo extends SimpleBeanInfo
- {
- private static final BeanDescriptor BEAN_DESCRIPTOR =
setupBeanDescriptor();
-
- /**
- * Return the bean descriptor.
- * @return the descriptor
- */
- public BeanDescriptor getBeanDescriptor()
- {
- return BEAN_DESCRIPTOR;
- }
-
- private static BeanDescriptor setupBeanDescriptor()
- {
- BeanDescriptor descriptor = new BeanDescriptor( Mode.class );
- descriptor.setValue(
- "persistenceDelegate",
- new ModePersistenceDelegate() );
- return descriptor;
- }
-
- /**
- * Persistence delegate.
- */
- private static class ModePersistenceDelegate extends
DefaultPersistenceDelegate
- {
- /**
- * Return an expression.
- * @param old the old value
- * @param encoder the encoder
- * @return an expression
- */
- public Expression instantiate( Object old, Encoder encoder )
- {
- Mode mode = (Mode) old;
- return new Expression( mode, Mode.class, "parse", new
Object[]{mode.getName()} );
- }
- }
- }
}
Deleted:
trunk/main/depot/library/common/src/main/net/dpml/library/info/IncludeDirectiveBeanInfo.java
===================================================================
---
trunk/main/depot/library/common/src/main/net/dpml/library/info/IncludeDirectiveBeanInfo.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/main/net/dpml/library/info/IncludeDirectiveBeanInfo.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -1,50 +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.library.info;
-
-import java.beans.SimpleBeanInfo;
-import java.beans.BeanDescriptor;
-import java.beans.DefaultPersistenceDelegate;
-
-/**
- * BeanInfo for the CategoryDirective class that declares a persistence
- * delegate.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public final class IncludeDirectiveBeanInfo extends SimpleBeanInfo
-{
- private static final BeanDescriptor BEAN_DESCRIPTOR =
setupBeanDescriptor();
-
- /**
- * Creation of a bean descriptor.
- * @return the bean descriptor
- */
- public BeanDescriptor getBeanDescriptor()
- {
- return BEAN_DESCRIPTOR;
- }
-
- private static BeanDescriptor setupBeanDescriptor()
- {
- BeanDescriptor descriptor = new BeanDescriptor(
IncludeDirective.class );
- descriptor.setValue(
- "persistenceDelegate",
- new DefaultPersistenceDelegate( new String[]{"mode", "category",
"value", "properties"} ) );
- return descriptor;
- }
-}
Deleted:
trunk/main/depot/library/common/src/main/net/dpml/library/info/LibraryDirectiveBeanInfo.java
===================================================================
---
trunk/main/depot/library/common/src/main/net/dpml/library/info/LibraryDirectiveBeanInfo.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/main/net/dpml/library/info/LibraryDirectiveBeanInfo.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -1,52 +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.library.info;
-
-import java.beans.SimpleBeanInfo;
-import java.beans.BeanDescriptor;
-import java.beans.DefaultPersistenceDelegate;
-
-/**
- * BeanInfo for the LibraryDirective class that declares a persistence
- * delegate.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public final class LibraryDirectiveBeanInfo extends SimpleBeanInfo
-{
- private static final BeanDescriptor BEAN_DESCRIPTOR =
setupBeanDescriptor();
-
- /**
- * Creation of a bean descriptor.
- * @return the bean descriptor
- */
- public BeanDescriptor getBeanDescriptor()
- {
- return BEAN_DESCRIPTOR;
- }
-
- private static BeanDescriptor setupBeanDescriptor()
- {
- BeanDescriptor descriptor = new BeanDescriptor(
LibraryDirective.class );
- descriptor.setValue(
- "persistenceDelegate",
- new DefaultPersistenceDelegate(
- new String[]{
- "importDirectives", "moduleDirectives", "properties"} ) );
- return descriptor;
- }
-}
Deleted:
trunk/main/depot/library/common/src/main/net/dpml/library/info/ModuleDirectiveBeanInfo.java
===================================================================
---
trunk/main/depot/library/common/src/main/net/dpml/library/info/ModuleDirectiveBeanInfo.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/main/net/dpml/library/info/ModuleDirectiveBeanInfo.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -1,53 +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.library.info;
-
-import java.beans.SimpleBeanInfo;
-import java.beans.BeanDescriptor;
-import java.beans.DefaultPersistenceDelegate;
-
-/**
- * BeanInfo for the CategoryDirective class that declares a persistence
- * delegate.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public final class ModuleDirectiveBeanInfo extends SimpleBeanInfo
-{
- private static final BeanDescriptor BEAN_DESCRIPTOR =
setupBeanDescriptor();
-
- /**
- * Creation of a bean descriptor.
- * @return the bean descriptor
- */
- public BeanDescriptor getBeanDescriptor()
- {
- return BEAN_DESCRIPTOR;
- }
-
- private static BeanDescriptor setupBeanDescriptor()
- {
- BeanDescriptor descriptor = new BeanDescriptor(
ModuleDirective.class );
- descriptor.setValue(
- "persistenceDelegate",
- new DefaultPersistenceDelegate(
- new String[]{
- "name", "version", "classifier", "basedir", "typeDirectives",
"dependencyDirectives",
- "resourceDirectives", "properties"} ) );
- return descriptor;
- }
-}
Modified:
trunk/main/depot/library/common/src/main/net/dpml/library/info/ResourceDirective.java
===================================================================
---
trunk/main/depot/library/common/src/main/net/dpml/library/info/ResourceDirective.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/main/net/dpml/library/info/ResourceDirective.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -340,48 +340,4 @@
}
}
}
-
- /**
- * Classifier bean info.
- */
- public static final class ClassifierBeanInfo extends SimpleBeanInfo
- {
- private static final BeanDescriptor BEAN_DESCRIPTOR =
setupBeanDescriptor();
-
- /**
- * Bean descriptor.
- * @return the descriptor
- */
- public BeanDescriptor getBeanDescriptor()
- {
- return BEAN_DESCRIPTOR;
- }
-
- private static BeanDescriptor setupBeanDescriptor()
- {
- BeanDescriptor descriptor = new BeanDescriptor( Classifier.class
);
- descriptor.setValue(
- "persistenceDelegate",
- new ClassifierPersistenceDelegate() );
- return descriptor;
- }
-
- /**
- * Persistence delegate.
- */
- private static class ClassifierPersistenceDelegate extends
DefaultPersistenceDelegate
- {
- /**
- * Create an expression.
- * @param old the old instance
- * @param encoder the encoder
- * @return the expression
- */
- public Expression instantiate( Object old, Encoder encoder )
- {
- Classifier classifier = (Classifier) old;
- return new Expression( classifier, Classifier.class,
"parse", new Object[]{classifier.getName()} );
- }
- }
- }
}
Deleted:
trunk/main/depot/library/common/src/main/net/dpml/library/info/ResourceDirectiveBeanInfo.java
===================================================================
---
trunk/main/depot/library/common/src/main/net/dpml/library/info/ResourceDirectiveBeanInfo.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/main/net/dpml/library/info/ResourceDirectiveBeanInfo.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -1,53 +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.library.info;
-
-import java.beans.SimpleBeanInfo;
-import java.beans.BeanDescriptor;
-import java.beans.DefaultPersistenceDelegate;
-
-/**
- * BeanInfo for the CategoryDirective class that declares a persistence
- * delegate.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public final class ResourceDirectiveBeanInfo extends SimpleBeanInfo
-{
- private static final BeanDescriptor BEAN_DESCRIPTOR =
setupBeanDescriptor();
-
- /**
- * Creation of a bean descriptor.
- * @return the bean descriptor
- */
- public BeanDescriptor getBeanDescriptor()
- {
- return BEAN_DESCRIPTOR;
- }
-
- private static BeanDescriptor setupBeanDescriptor()
- {
- BeanDescriptor descriptor = new BeanDescriptor(
ResourceDirective.class );
- descriptor.setValue(
- "persistenceDelegate",
- new DefaultPersistenceDelegate(
- new String[]{
- "name", "version", "classifier", "basedir", "typeDirectives",
- "dependencyDirectives", "properties"} ) );
- return descriptor;
- }
-}
Deleted:
trunk/main/depot/library/common/src/main/net/dpml/library/info/ScopeBeanInfo.java
===================================================================
---
trunk/main/depot/library/common/src/main/net/dpml/library/info/ScopeBeanInfo.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/main/net/dpml/library/info/ScopeBeanInfo.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -1,72 +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.library.info;
-
-import java.beans.Expression;
-import java.beans.BeanDescriptor;
-import java.beans.DefaultPersistenceDelegate;
-import java.beans.SimpleBeanInfo;
-import java.beans.Encoder;
-
-/**
- * Bean info for state encoding of the Lifestyle policy enumeration.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public final class ScopeBeanInfo extends SimpleBeanInfo
-{
- private static final BeanDescriptor BEAN_DESCRIPTOR =
setupBeanDescriptor();
-
- /**
- * Creation of a bean descriptor.
- * @return the bean descriptor
- */
- public BeanDescriptor getBeanDescriptor()
- {
- return BEAN_DESCRIPTOR;
- }
-
- private static BeanDescriptor setupBeanDescriptor()
- {
- BeanDescriptor descriptor = new BeanDescriptor( Scope.class );
- descriptor.setValue(
- "persistenceDelegate",
- new ScopePersistenceDelegate() );
- return descriptor;
- }
-
- /**
- * Scope persitence delegate.
- */
- private static class ScopePersistenceDelegate extends
DefaultPersistenceDelegate
- {
- /**
- * Return an expression.
- * @param old the old value
- * @param encoder the encoder
- * @return an expression
- */
- public Expression instantiate( Object old, Encoder encoder )
- {
- Scope scope = (Scope) old;
- return new Expression( scope, Scope.class, "parse", new
Object[]{scope.getName()} );
- }
- }
-}
Deleted:
trunk/main/depot/library/common/src/main/net/dpml/library/info/TypeDirectiveBeanInfo.java
===================================================================
---
trunk/main/depot/library/common/src/main/net/dpml/library/info/TypeDirectiveBeanInfo.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/main/net/dpml/library/info/TypeDirectiveBeanInfo.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -1,50 +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.library.info;
-
-import java.beans.SimpleBeanInfo;
-import java.beans.BeanDescriptor;
-import java.beans.DefaultPersistenceDelegate;
-
-/**
- * BeanInfo for the CategoryDirective class that declares a persistence
- * delegate.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public final class TypeDirectiveBeanInfo extends SimpleBeanInfo
-{
- private static final BeanDescriptor BEAN_DESCRIPTOR =
setupBeanDescriptor();
-
- /**
- * Creation of a bean descriptor.
- * @return the bean descriptor
- */
- public BeanDescriptor getBeanDescriptor()
- {
- return BEAN_DESCRIPTOR;
- }
-
- private static BeanDescriptor setupBeanDescriptor()
- {
- BeanDescriptor descriptor = new BeanDescriptor( TypeDirective.class
);
- descriptor.setValue(
- "persistenceDelegate",
- new DefaultPersistenceDelegate( new String[]{"name", "alias",
"properties"} ) );
- return descriptor;
- }
-}
Modified:
trunk/main/depot/library/common/src/test/net/dpml/library/impl/AbstractTestCase.java
===================================================================
---
trunk/main/depot/library/common/src/test/net/dpml/library/impl/AbstractTestCase.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/test/net/dpml/library/impl/AbstractTestCase.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -105,43 +105,6 @@
assertEquals( object.hashCode(), serialized.hashCode() );
}
- /**
- * Test that the supplied object can be encoded and the decoding
- * process returns an equivalent object to the supplied object.
- * @param object the object to encode/decode
- * @exception Exception if an test exception occurs
- */
- public Object doEncodingTest( Object object, String filename ) throws
Exception
- {
- String base = System.getProperty( "project.test.dir" );
- File test = new File( base );
- File encoding = new File( test, "encoding" );
- File destination = new File( encoding, filename );
- encoding.mkdirs();
- FileOutputStream output = new FileOutputStream( destination );
- BufferedOutputStream buffer = new BufferedOutputStream( output );
- XMLEncoder encoder = new XMLEncoder( buffer );
- encoder.setExceptionListener(
- new ExceptionListener()
- {
- public void exceptionThrown( Exception e )
- {
- e.printStackTrace();
- fail( "encoding exception: " + e.toString() );
- }
- }
- );
- encoder.writeObject( object );
- encoder.close();
- FileInputStream input = new FileInputStream( destination );
- XMLDecoder decoder = new XMLDecoder( new BufferedInputStream( input
) );
- Object result = decoder.readObject();
- assertTrue( object != result ); // Ensure this is not the same
instance
- assertEquals( "encoding", object, result );
- assertEquals( object.hashCode(), result.hashCode() );
- return result;
- }
-
void doProviderTest(
String path, boolean expand, int build, int runtime, int test )
throws Exception
Modified:
trunk/main/depot/library/common/src/test/net/dpml/library/info/AbstractTestCase.java
===================================================================
---
trunk/main/depot/library/common/src/test/net/dpml/library/info/AbstractTestCase.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/test/net/dpml/library/info/AbstractTestCase.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -61,36 +61,4 @@
assertEquals( object, serialized );
assertEquals( object.hashCode(), serialized.hashCode() );
}
-
- public Object doEncodingTest( Object object, String filename ) throws
Exception
- {
- String base = System.getProperty( "project.test.dir" );
- File test = new File( base );
- File encoding = new File( test, "encoding" );
- File destination = new File( encoding, filename );
- encoding.mkdirs();
- FileOutputStream output = new FileOutputStream( destination );
- BufferedOutputStream buffer = new BufferedOutputStream( output );
- XMLEncoder encoder = new XMLEncoder( buffer );
- encoder.setExceptionListener(
- new ExceptionListener()
- {
- public void exceptionThrown( Exception e )
- {
- e.printStackTrace();
- fail( "encoding exception: " + e.toString() );
- }
- }
- );
- encoder.writeObject( object );
- encoder.close();
- FileInputStream input = new FileInputStream( destination );
- XMLDecoder decoder = new XMLDecoder( new BufferedInputStream( input
) );
- Object result = decoder.readObject();
- assertTrue( object != result ); // Ensure this is not the same
instance
- assertEquals( "encoding", object, result );
- assertEquals( object.hashCode(), result.hashCode() );
- return result;
- }
-
}
Modified:
trunk/main/depot/library/common/src/test/net/dpml/library/info/DependencyDirectiveTestCase.java
===================================================================
---
trunk/main/depot/library/common/src/test/net/dpml/library/info/DependencyDirectiveTestCase.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/test/net/dpml/library/info/DependencyDirectiveTestCase.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -107,14 +107,4 @@
DependencyDirective dep = new DependencyDirective( Scope.RUNTIME,
INCLUDES, PROPERTIES );
doSerializationTest( dep );
}
-
- /**
- * Test directive encoding and decoding.
- * @exception Exception if the test raises an error
- */
- public void testXMLEncoding() throws Exception
- {
- DependencyDirective dep = new DependencyDirective( Scope.RUNTIME,
INCLUDES, PROPERTIES );
- doEncodingTest( dep, "dependency-descriptor-encoded.xml" );
- }
}
Modified:
trunk/main/depot/library/common/src/test/net/dpml/library/info/ImportDirectiveTestCase.java
===================================================================
---
trunk/main/depot/library/common/src/test/net/dpml/library/info/ImportDirectiveTestCase.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/test/net/dpml/library/info/ImportDirectiveTestCase.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -97,14 +97,4 @@
doSerializationTest( include );
}
- /**
- * Test directive encoding/decoding.
- * @exception Exception if an error occurs
- */
- public void testXMLEncoding() throws Exception
- {
- ImportDirective include =
- new ImportDirective( ImportDirective.URI, "value", PROPERTIES );
- doEncodingTest( include, "include-encoded.xml" );
- }
}
Modified:
trunk/main/depot/library/common/src/test/net/dpml/library/info/IncludeDirectiveTestCase.java
===================================================================
---
trunk/main/depot/library/common/src/test/net/dpml/library/info/IncludeDirectiveTestCase.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/test/net/dpml/library/info/IncludeDirectiveTestCase.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -108,15 +108,4 @@
new IncludeDirective( IncludeDirective.REF, Category.PROTECTED,
"value", PROPERTIES );
doSerializationTest( include );
}
-
- /**
- * Test encoding/decoding.
- * @exception Exception if an error occurs
- */
- public void testXMLEncoding() throws Exception
- {
- IncludeDirective include =
- new IncludeDirective( IncludeDirective.REF, Category.PROTECTED,
"value", PROPERTIES );
- doEncodingTest( include, "include-encoded.xml" );
- }
}
Modified:
trunk/main/depot/library/common/src/test/net/dpml/library/info/LibraryDirectiveTestCase.java
===================================================================
---
trunk/main/depot/library/common/src/test/net/dpml/library/info/LibraryDirectiveTestCase.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/test/net/dpml/library/info/LibraryDirectiveTestCase.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -74,13 +74,4 @@
{
doSerializationTest( m_library );
}
-
- /**
- * Test encoding/decoding of the library directive.
- * @exception Exception if an error occurs
- */
- public void testXMLEncoding() throws Exception
- {
- doEncodingTest( m_library, "library-encoded.xml" );
- }
}
Modified:
trunk/main/depot/library/common/src/test/net/dpml/library/info/ModuleDirectiveTestCase.java
===================================================================
---
trunk/main/depot/library/common/src/test/net/dpml/library/info/ModuleDirectiveTestCase.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/test/net/dpml/library/info/ModuleDirectiveTestCase.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -186,13 +186,4 @@
{
doSerializationTest( m_module );
}
-
- /**
- * Test directive encoding/decoding.
- * @exception Exception if an error occurs
- */
- public void testXMLEncoding() throws Exception
- {
- doEncodingTest( m_module, "module-descriptor-encoded.xml" );
- }
}
Modified:
trunk/main/depot/library/common/src/test/net/dpml/library/info/ResourceDirectiveTestCase.java
===================================================================
---
trunk/main/depot/library/common/src/test/net/dpml/library/info/ResourceDirectiveTestCase.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/test/net/dpml/library/info/ResourceDirectiveTestCase.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -178,19 +178,4 @@
"resource", "2.7", CLASSIFIER, "test", TYPES, DEPENDENCIES,
PROPERTIES );
doSerializationTest( resource );
}
-
- /**
- * Test the directive encoding/decoding.
- * @exception Exception if an error occurs
- */
- public void testXMLEncoding() throws Exception
- {
- ResourceDirective resource =
- new ResourceDirective(
- "name", "1.1.1", CLASSIFIER, "test",
- TYPES,
- DEPENDENCIES,
- PROPERTIES );
- doEncodingTest( resource, "resource-descriptor-encoded.xml" );
- }
}
Modified:
trunk/main/depot/library/common/src/test/net/dpml/library/info/TypeDirectiveTestCase.java
===================================================================
---
trunk/main/depot/library/common/src/test/net/dpml/library/info/TypeDirectiveTestCase.java
2006-02-24 17:03:38 UTC (rev 1134)
+++
trunk/main/depot/library/common/src/test/net/dpml/library/info/TypeDirectiveTestCase.java
2006-02-24 17:23:03 UTC (rev 1135)
@@ -80,14 +80,4 @@
TypeDirective type = new TypeDirective( "abc", true, PROPERTIES );
doSerializationTest( type );
}
-
- /**
- * Test the type directive encoding/decoding.
- * @exception Exception if an error occurs
- */
- public void testXMLEncoding() throws Exception
- {
- TypeDirective type = new TypeDirective( "abc", true, PROPERTIES );
- doEncodingTest( type, "type-descriptor-encoded.xml" );
- }
}
- r1135 - in trunk/main/depot/library/common/src: main/net/dpml/library/info test/net/dpml/library/impl test/net/dpml/library/info, mcconnell at BerliOS, 02/24/2006
Archive powered by MHonArc 2.6.24.