Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2044 - development/main/transit/core/tools/src/main/net/dpml/transit/tools

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2044 - development/main/transit/core/tools/src/main/net/dpml/transit/tools
  • Date: Fri, 11 Mar 2005 22:18:11 -0500

Author: mcconnell AT dpml.net
Date: Fri Mar 11 22:18:09 2005
New Revision: 2044

Added:

development/main/transit/core/tools/src/main/net/dpml/transit/tools/MapDataType.java
- copied, changed from r2021,
development/main/transit/core/tools/src/main/net/dpml/transit/tools/Map.java
Removed:

development/main/transit/core/tools/src/main/net/dpml/transit/tools/Map.java
Modified:

development/main/transit/core/tools/src/main/net/dpml/transit/tools/MainTask.java

development/main/transit/core/tools/src/main/net/dpml/transit/tools/PluginTask.java

development/main/transit/core/tools/src/main/net/dpml/transit/tools/TransitComponentHelper.java
Log:
Update transit to provide better error handling on plugins loading and
improved clas nameing.

Modified:
development/main/transit/core/tools/src/main/net/dpml/transit/tools/MainTask.java
==============================================================================
---
development/main/transit/core/tools/src/main/net/dpml/transit/tools/MainTask.java
(original)
+++
development/main/transit/core/tools/src/main/net/dpml/transit/tools/MainTask.java
Fri Mar 11 22:18:09 2005
@@ -100,9 +100,9 @@
* Create and return a new plugin definition.
* @return the plugin definition
*/
- public Map createMap()
+ public MapDataType createMap()
{
- Map map = new Map();
+ MapDataType map = new MapDataType();
m_mappings.add( map );
return map;
}
@@ -126,7 +126,7 @@
}
TransitComponentHelper.initialize( project );
ComponentHelper ch = ComponentHelper.getComponentHelper( project );
- Map[] maps = (Map[]) m_mappings.toArray( new Map[0] );
+ MapDataType[] maps = (MapDataType[]) m_mappings.toArray( new
MapDataType[0] );
TransitComponentHelper.register( maps );
}


Copied:
development/main/transit/core/tools/src/main/net/dpml/transit/tools/MapDataType.java
(from r2021,
development/main/transit/core/tools/src/main/net/dpml/transit/tools/Map.java)
==============================================================================
---
development/main/transit/core/tools/src/main/net/dpml/transit/tools/Map.java
(original)
+++
development/main/transit/core/tools/src/main/net/dpml/transit/tools/MapDataType.java
Fri Mar 11 22:18:09 2005
@@ -25,7 +25,7 @@
*
* @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
*/
-public class Map
+public class MapDataType
{
private String m_urn;
private URI m_uri;
@@ -37,6 +37,10 @@

public String getURN()
{
+ if( null == m_urn )
+ {
+ throw new IllegalStateException( "urn" );
+ }
return m_urn;
}

@@ -47,7 +51,16 @@

public URI getURI()
{
+ if( null == m_urn )
+ {
+ throw new IllegalStateException( "uri" );
+ }
return m_uri;
}
+
+ public String toString()
+ {
+ return "[map urn:" + m_urn + " uri:" + m_uri + "]";
+ }
}


Modified:
development/main/transit/core/tools/src/main/net/dpml/transit/tools/PluginTask.java
==============================================================================
---
development/main/transit/core/tools/src/main/net/dpml/transit/tools/PluginTask.java
(original)
+++
development/main/transit/core/tools/src/main/net/dpml/transit/tools/PluginTask.java
Fri Mar 11 22:18:09 2005
@@ -165,6 +165,7 @@

final Project project = getProject();
ClassLoader classloader = this.getClass().getClassLoader();
+ //ClassLoader classloader =
Thread.currentThread().getContextClassLoader();
final ComponentHelper helper =
ComponentHelper.getComponentHelper( project );


Modified:
development/main/transit/core/tools/src/main/net/dpml/transit/tools/TransitComponentHelper.java
==============================================================================
---
development/main/transit/core/tools/src/main/net/dpml/transit/tools/TransitComponentHelper.java
(original)
+++
development/main/transit/core/tools/src/main/net/dpml/transit/tools/TransitComponentHelper.java
Fri Mar 11 22:18:09 2005
@@ -124,13 +124,18 @@
* Register the mapping between a urn and a plugin uri.
* @param maps a sequence of urn to uri bindings
*/
- public static void register( Map[] maps )
+ public static void register( MapDataType[] maps )
{
+ if( null == maps )
+ {
+ throw new NullPointerException( "maps" );
+ }
+
for( int i=0; i<maps.length; i++ )
{
- Map map = maps[i];
+ MapDataType map = maps[i];
String urn = map.getURN();
- if( !m_mappings.contains( urn ) )
+ if( m_mappings.contains( urn ) == false )
{
URI uri = map.getURI();
m_mappings.put( urn, uri );



  • svn commit: r2044 - development/main/transit/core/tools/src/main/net/dpml/transit/tools, mcconnell, 03/11/2005

Archive powered by MHonArc 2.6.24.

Top of Page