mcconnell 2003/01/15 01:11:33 Modified: meta/src/java/org/apache/avalon/meta/info ContextDescriptor.java InfoDescriptor.java meta/src/java/org/apache/avalon/meta/info/builder XMLTypeCreator.java meta/src/java/org/apache/avalon/meta/model Profile.java meta/src/java/org/apache/avalon/meta/model/builder XMLProfileCreator.java Log: Addition of support for legal Phoneix components. Revision Changes Path 1.5 +3 -1 avalon-sandbox/meta/src/java/org/apache/avalon/meta/info/ContextDescriptor.java Index: ContextDescriptor.java =================================================================== RCS file: /home/cvs/avalon-sandbox/meta/src/java/org/apache/avalon/meta/info/ContextDescriptor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ContextDescriptor.java 20 Dec 2002 11:56:37 -0000 1.4 +++ ContextDescriptor.java 15 Jan 2003 09:11:32 -0000 1.5 @@ -50,6 +50,8 @@ package org.apache.avalon.meta.info; +import java.util.Map; +import java.util.Hashtable; import java.util.Properties; import java.util.Arrays; import java.util.List; 1.4 +22 -2 avalon-sandbox/meta/src/java/org/apache/avalon/meta/info/InfoDescriptor.java Index: InfoDescriptor.java =================================================================== RCS file: /home/cvs/avalon-sandbox/meta/src/java/org/apache/avalon/meta/info/InfoDescriptor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- InfoDescriptor.java 27 Dec 2002 16:30:27 -0000 1.3 +++ InfoDescriptor.java 15 Jan 2003 09:11:32 -0000 1.4 @@ -114,9 +114,29 @@ throw new IllegalArgumentException( "classname: " + classname ); } - m_name = name; + if( name != null ) + { + m_name = name; + } + else + { + m_name = getClassName( classname ); + } m_classname = classname; m_version = version; + } + + private String getClassName( String classname ) + { + int i = classname.lastIndexOf("."); + if( i == -1 ) + { + return classname; + } + else + { + return classname.substring( i+1, classname.length() ); + } } /** 1.6 +8 -2 avalon-sandbox/meta/src/java/org/apache/avalon/meta/info/builder/XMLTypeCreator.java Index: XMLTypeCreator.java =================================================================== RCS file: /home/cvs/avalon-sandbox/meta/src/java/org/apache/avalon/meta/info/builder/XMLTypeCreator.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- XMLTypeCreator.java 27 Dec 2002 16:32:03 -0000 1.5 +++ XMLTypeCreator.java 15 Jan 2003 09:11:32 -0000 1.6 @@ -122,7 +122,13 @@ public Type createType( final String classname, final Configuration info, final Configuration defaults ) throws Exception { - //final String topLevelName = info.getName(); + final String topLevelName = info.getName(); + + if( topLevelName.equals( "blockinfo" ) ) + { + return new XMLLegacyCreator().createType( classname, info ); + } + //if( !topLevelName.equals( "type" ) ) //{ // final String message = 1.9 +15 -1 avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/Profile.java Index: Profile.java =================================================================== RCS file: /home/cvs/avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/Profile.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Profile.java 21 Dec 2002 03:29:33 -0000 1.8 +++ Profile.java 15 Jan 2003 09:11:32 -0000 1.9 @@ -183,6 +183,11 @@ private final Mode m_mode; /** + * The activation policy. + */ + private transient boolean m_activation = false; + + /** * Create an explicit Profile instance. * * @param name the abstract name of the profile @@ -428,4 +433,13 @@ return buffer.toString(); } + public void setActivationPolicy( boolean value ) + { + m_activation = value; + } + + public boolean getActivationPolicy() + { + return m_activation; + } } 1.6 +2 -2 avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/builder/XMLProfileCreator.java Index: XMLProfileCreator.java =================================================================== RCS file: /home/cvs/avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/builder/XMLProfileCreator.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- XMLProfileCreator.java 27 Dec 2002 16:32:59 -0000 1.5 +++ XMLProfileCreator.java 15 Jan 2003 09:11:32 -0000 1.6 @@ -104,7 +104,7 @@ * Creation of a new profile creator using the default profile class. * @see Profile */ - public XMLProfileCreator() throws Exception + public XMLProfileCreator() { this( Profile.class ); }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>