notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2822 - in development/main: depot depot/console depot/console/src/main/net/dpml/depot depot/console/src/main/net/dpml/depot/profile depot/prefs depot/prefs/src/main/net/dpml/depot/prefs depot/station/src/main/net/dpml/depot/station metro/composition/content/src/main/net/dpml/composition/content test/plugins/layout/src/main/net/dpml/test/layout test/unit/plus/src/test/net/dpml/test/acme/plus transit/core/handler/src/main/net/dpml/transit transit/core/handler/src/main/net/dpml/transit/builder transit/core/handler/src/main/net/dpml/transit/home transit/core/handler/src/main/net/dpml/transit/management transit/core/handler/src/main/net/dpml/transit/manager transit/core/handler/src/main/net/dpml/transit/model transit/core/handler/src/test/net/dpml/transit/manager transit/core/handler/src/test/net/dpml/transit/test transit/core/tools/src/main/net/dpml/transit/tools
- From: mcconnell AT dpml.net
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2822 - in development/main: depot depot/console depot/console/src/main/net/dpml/depot depot/console/src/main/net/dpml/depot/profile depot/prefs depot/prefs/src/main/net/dpml/depot/prefs depot/station/src/main/net/dpml/depot/station metro/composition/content/src/main/net/dpml/composition/content test/plugins/layout/src/main/net/dpml/test/layout test/unit/plus/src/test/net/dpml/test/acme/plus transit/core/handler/src/main/net/dpml/transit transit/core/handler/src/main/net/dpml/transit/builder transit/core/handler/src/main/net/dpml/transit/home transit/core/handler/src/main/net/dpml/transit/management transit/core/handler/src/main/net/dpml/transit/manager transit/core/handler/src/main/net/dpml/transit/model transit/core/handler/src/test/net/dpml/transit/manager transit/core/handler/src/test/net/dpml/transit/test transit/core/tools/src/main/net/dpml/transit/tools
- Date: Fri, 10 Jun 2005 22:55:11 -0400
Author: mcconnell AT dpml.net
Date: Fri Jun 10 22:55:10 2005
New Revision: 2822
Added:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheModelPanel.java
- copied, changed from r2740,
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheManagerPanel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ContentRegistryModelPanel.java
- copied, changed from r2740,
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ContentRegistryManagerPanel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/HostModelPanel.java
- copied, changed from r2785,
development/main/depot/prefs/src/main/net/dpml/depot/prefs/HostManagerPanel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutRegistryModelPanel.java
- copied, changed from r2740,
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutRegistryManagerPanel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/PluginModelPanel.java
- copied, changed from r2740,
development/main/depot/prefs/src/main/net/dpml/depot/prefs/PluginManagerPanel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ProxyModelPanel.java
- copied, changed from r2740,
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ProxyManagerPanel.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/
- copied from r2740,
development/main/transit/core/handler/src/main/net/dpml/transit/management/
development/main/transit/core/handler/src/main/net/dpml/transit/home/CacheHome.java
- copied, changed from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/CacheHome.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/ContentHome.java
- copied, changed from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/ContentHome.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/ContentRegistryHome.java
- copied, changed from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/ContentRegistryHome.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/Home.java
- copied, changed from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/Home.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/HostHome.java
- copied, changed from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/HostHome.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/LayoutHome.java
- copied, changed from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/LayoutHome.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/LayoutRegistryHome.java
- copied, changed from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/LayoutRegistryHome.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/PluginHome.java
- copied, changed from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/PluginHome.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/ProxyHome.java
- copied, changed from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/ProxyHome.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/RepositoryHome.java
- copied, changed from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/RepositoryHome.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/TransitHome.java
- copied, changed from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/TransitHome.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/package.html
- copied unchanged from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/package.html
development/main/transit/core/handler/src/main/net/dpml/transit/model/BootstrapException.java
- copied, changed from r2740,
development/main/transit/core/handler/src/main/net/dpml/transit/management/BootstrapException.java
development/main/transit/core/handler/src/main/net/dpml/transit/model/ModelReferenceException.java
development/main/transit/core/handler/src/main/net/dpml/transit/model/ModificationEvent.java
development/main/transit/core/handler/src/main/net/dpml/transit/model/ModificationListener.java
Removed:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheManagerPanel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ContentRegistryManagerPanel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/HostManagerPanel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutRegistryManagerPanel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/PluginManagerPanel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ProxyManagerPanel.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/BootstrapException.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/CacheManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/ContentManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/ContentRegistryManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/HostManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/LayoutManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/LayoutRegistryManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/Manager.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/ModelReferenceException.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/ModificationEvent.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/ModificationListener.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/PluginManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/ProxyManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/RepositoryManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/home/TransitManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/management/
Modified:
development/main/depot/console/build.xml
development/main/depot/console/src/main/net/dpml/depot/Main.java
development/main/depot/console/src/main/net/dpml/depot/profile/AbstractPluginProfileStorage.java
development/main/depot/console/src/main/net/dpml/depot/profile/ApplicationProfile.java
development/main/depot/console/src/main/net/dpml/depot/profile/ApplicationProfileStorage.java
development/main/depot/console/src/main/net/dpml/depot/profile/BootstrapProfile.java
development/main/depot/console/src/main/net/dpml/depot/profile/BootstrapProfileStorage.java
development/main/depot/console/src/main/net/dpml/depot/profile/DepotManager.java
development/main/depot/console/src/main/net/dpml/depot/profile/DepotStorage.java
development/main/depot/console/src/main/net/dpml/depot/profile/PluginProfile.java
development/main/depot/console/src/main/net/dpml/depot/profile/PluginProfileStorage.java
development/main/depot/console/src/main/net/dpml/depot/profile/Profile.java
development/main/depot/console/src/main/net/dpml/depot/profile/ProfileStorage.java
development/main/depot/index.xml
development/main/depot/prefs/build.xml
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheDirectoryPanel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheTableModel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ContentRegistryTableModel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/DepotPreferencesFrame.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/DepotPreferencesPanel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutComboBoxModel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutRegistryTableModel.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/Main.java
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ProxyFeaturesPanel.java
development/main/depot/station/src/main/net/dpml/depot/station/ActivationGroupProfile.java
development/main/depot/station/src/main/net/dpml/depot/station/ActivationGroupStorage.java
development/main/depot/station/src/main/net/dpml/depot/station/ActivationProfile.java
development/main/depot/station/src/main/net/dpml/depot/station/ActivationStorage.java
development/main/depot/station/src/main/net/dpml/depot/station/CodeBaseProfile.java
development/main/depot/station/src/main/net/dpml/depot/station/CodeBaseStorage.java
development/main/depot/station/src/main/net/dpml/depot/station/StationProfile.java
development/main/depot/station/src/main/net/dpml/depot/station/StationStorage.java
development/main/metro/composition/content/src/main/net/dpml/composition/content/CompositionContentHandlerRegistry.java
development/main/test/plugins/layout/src/main/net/dpml/test/layout/DemoLayoutControlPanel.java
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/URLTestCase.java
development/main/transit/core/handler/src/main/net/dpml/transit/Transit.java
development/main/transit/core/handler/src/main/net/dpml/transit/builder/AbstractStorageUnit.java
development/main/transit/core/handler/src/main/net/dpml/transit/builder/CacheStorageUnit.java
development/main/transit/core/handler/src/main/net/dpml/transit/builder/ContentRegistryStorageUnit.java
development/main/transit/core/handler/src/main/net/dpml/transit/builder/ContentStorageUnit.java
development/main/transit/core/handler/src/main/net/dpml/transit/builder/HostStorageUnit.java
development/main/transit/core/handler/src/main/net/dpml/transit/builder/LayoutRegistryStorageUnit.java
development/main/transit/core/handler/src/main/net/dpml/transit/builder/LayoutStorageUnit.java
development/main/transit/core/handler/src/main/net/dpml/transit/builder/ProxyStorageUnit.java
development/main/transit/core/handler/src/main/net/dpml/transit/builder/RepositoryStorageUnit.java
development/main/transit/core/handler/src/main/net/dpml/transit/builder/TransitStorageUnit.java
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultCacheManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultContentManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultContentRegistryManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultHostManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultLayoutManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultLayoutRegistryManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultPluginManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultProxyManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultRepositoryManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultTransitManager.java
development/main/transit/core/handler/src/main/net/dpml/transit/model/CacheModel.java
development/main/transit/core/handler/src/main/net/dpml/transit/model/ContentModel.java
development/main/transit/core/handler/src/main/net/dpml/transit/model/ContentRegistryModel.java
development/main/transit/core/handler/src/main/net/dpml/transit/model/HostModel.java
development/main/transit/core/handler/src/main/net/dpml/transit/model/LayoutModel.java
development/main/transit/core/handler/src/main/net/dpml/transit/model/LayoutRegistryModel.java
development/main/transit/core/handler/src/main/net/dpml/transit/model/Model.java
development/main/transit/core/handler/src/main/net/dpml/transit/model/PluginModel.java
development/main/transit/core/handler/src/main/net/dpml/transit/model/ProxyModel.java
development/main/transit/core/handler/src/test/net/dpml/transit/manager/ProxyManagerTestCase.java
development/main/transit/core/handler/src/test/net/dpml/transit/manager/TransitManagerTestCase.java
development/main/transit/core/handler/src/test/net/dpml/transit/test/LinkTestCase.java
development/main/transit/core/handler/src/test/net/dpml/transit/test/OfflineTestCase.java
development/main/transit/core/handler/src/test/net/dpml/transit/test/OnlineTestCase.java
development/main/transit/core/tools/src/main/net/dpml/transit/tools/ImportArtifactTask.java
Log:
Improving to the Transit APIs including simplification of the management
model.
Modified: development/main/depot/console/build.xml
==============================================================================
--- development/main/depot/console/build.xml (original)
+++ development/main/depot/console/build.xml Fri Jun 10 22:55:10 2005
@@ -20,6 +20,10 @@
<filter token="STATION-PLUGIN-URI" value="${station.plugin}" />
<x:property name="test.plugin" key="dpml-depot-test" feature="uri"
type="plugin"/>
<filter token="TEST-PLUGIN-URI" value="${test.plugin}" />
+ <x:property name="console.plugin" feature="uri" type="jar"/>
+ <filter token="DEPOT-CONSOLE-URI" value="${console.plugin}" />
+ <x:property name="prefs.plugin" key="dpml-depot-prefs" feature="uri"
type="jar"/>
+ <filter token="DEPOT-PREFS-URI" value="${prefs.plugin}" />
</target>
<target name="install" depends="standard.install">
Modified: development/main/depot/console/src/main/net/dpml/depot/Main.java
==============================================================================
--- development/main/depot/console/src/main/net/dpml/depot/Main.java
(original)
+++ development/main/depot/console/src/main/net/dpml/depot/Main.java Fri
Jun 10 22:55:10 2005
@@ -38,11 +38,11 @@
import net.dpml.transit.TransitError;
import net.dpml.transit.TransitException;
import net.dpml.transit.adapter.LoggingAdapter;
+import net.dpml.transit.builder.TransitStorageUnit;
+import net.dpml.transit.home.TransitHome;
import net.dpml.transit.model.Logger;
import net.dpml.transit.model.UnknownKeyException;
-import net.dpml.transit.builder.TransitStorageUnit;
-import net.dpml.transit.management.TransitHome;
-import net.dpml.transit.management.TransitManager;
+import net.dpml.transit.model.TransitModel;
import net.dpml.transit.repository.Repository;
import net.dpml.depot.lang.DPML;
@@ -67,7 +67,7 @@
public static void start( final String[] args )
throws Exception
{
- Main.main( new String[]{ "-profile", "station" } );
+ Main.main( new String[]{ "-station" } );
}
public static void stop( final String[] args )
@@ -99,7 +99,6 @@
LOGGER = new LoggingAdapter( java.util.logging.Logger.getLogger(
"depot" ) );
Logger logger = getLogger();
- logger.info( "Depot (Build ID: " + DPML.BUILD_ID + ")." );
//
// check if a preferences reset has been requested
@@ -115,7 +114,92 @@
return;
}
}
-
+
+ //
+ // check if help has been requested
+ //
+
+ for( int i=0; i < args.length; i++ )
+ {
+ String arg = args[i];
+ if( arg.equals( "-help" ) )
+ {
+ handleHelp( logger );
+ return;
+ }
+ }
+
+ //
+ // check if version info has been requested
+ //
+
+ for( int i=0; i < args.length; i++ )
+ {
+ String arg = args[i];
+ if( arg.equals( "-version" ) )
+ {
+ handleVersion( logger );
+ return;
+ }
+ }
+
+ //
+ // establish the target application profile to run
+ //
+
+ String target = null;
+ for( int i=0; i < args.length; i++ )
+ {
+ String arg = args[i];
+ if( arg.equals( "-prefs" ) )
+ {
+ if( null == target )
+ {
+ target = "prefs";
+ }
+ else
+ {
+ final String message =
+ "Invalid command combination."
+ + "Selected option '-" + target
+ + " cannot be executed in conjunction with the -prefs
option.";
+ logger.error( message );
+ System.exit( -1 );
+ }
+ }
+ else if( arg.equals( "-station" ) )
+ {
+ if( null == target )
+ {
+ target = "station";
+ }
+ else
+ {
+ final String message =
+ "Invalid command combination."
+ + "Selected option '-" + target
+ + " cannot be executed in conjunction with the
-station option.";
+ logger.error( message );
+ System.exit( -1 );
+ }
+ }
+ }
+
+ if( null == target )
+ {
+ target = getTargetProfile( args );
+ }
+
+ //
+ // if we don't have a target declared we print out help and exit
+ //
+
+ if( null == target )
+ {
+ handleHelp( logger );
+ return;
+ }
+
try
{
//
@@ -127,7 +211,6 @@
Preferences prefs = getRootPreferences();
DepotStorage store = new DepotStorage( prefs, logger, creation,
false );
DepotManager manager = store.getDepotManager();
- String target = getTargetProfile( args );
ApplicationProfile profile = getApplicationProfile( manager,
target );
termination = profile.getCommandPolicy();
for( int i=0; i < args.length; i++ )
@@ -152,7 +235,7 @@
try
{
TransitHome home = new TransitStorageUnit();
- TransitManager model = home.create();
+ TransitModel model = home.create();
Transit transit = Transit.getInstance( model );
Logger log = logger.getChildLogger( target );
Repository loader = transit.getRepository();
@@ -429,7 +512,7 @@
}
}
}
- return "prefs";
+ return null;
}
/**
@@ -489,6 +572,32 @@
return LOGGER;
}
+ private static void handleHelp( Logger logger )
+ {
+ final String message =
+ "Depot application deployment."
+ + "\n\nUsage: depot [option] [args]"
+ + "\n\nAvailable command line options:"
+ + "\n\n -debug Enable debug level logging."
+ + "\n -help List command line help."
+ + "\n -prefs Start the Depot preferences editor."
+ + "\n -profile [name] Launch a named application."
+ + "\n -station Start the Depot Station Server activation
system."
+ + "\n -reset Clear Depot and Transit prefences."
+ + "\n -version List Depot version information.";
+ logger.info( message );
+ }
+
+ private static void handleVersion( Logger logger )
+ {
+ final String message =
+ "Depot Version.\n"
+ + "\nConsole: \t@DEPOT-CONSOLE-URI@"
+ + "\nPreferences: \t@DEPOT-PREFS-URI@"
+ + "\nStation: \t@STATION-PLUGIN-URI@";
+ logger.info( message );
+ }
+
//--------------------------------------------------------------------------
// static utilities for setup of logging manager and root prefs
//--------------------------------------------------------------------------
Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/AbstractPluginProfileStorage.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/AbstractPluginProfileStorage.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/AbstractPluginProfileStorage.java
Fri Jun 10 22:55:10 2005
@@ -25,9 +25,9 @@
import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;
+import net.dpml.transit.home.Home;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.Home;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.builder.AbstractStorageUnit;
/**
@@ -60,7 +60,7 @@
{
try
{
- PluginProfile manager = (PluginProfile) event.getManager();
+ PluginProfile manager = (PluginProfile) event.getModel();
Date date = new Date();
store( manager );
manager.setCreationDate( date );
Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/ApplicationProfile.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/ApplicationProfile.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/ApplicationProfile.java
Fri Jun 10 22:55:10 2005
@@ -24,7 +24,7 @@
import net.dpml.transit.model.Logger;
import net.dpml.transit.manager.DefaultManager;
-import net.dpml.transit.management.Home;
+import net.dpml.transit.home.Home;
/**
* A ProfileModel maintains information about the configuration
Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/ApplicationProfileStorage.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/ApplicationProfileStorage.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/ApplicationProfileStorage.java
Fri Jun 10 22:55:10 2005
@@ -25,9 +25,9 @@
import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;
+import net.dpml.transit.home.Home;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.Home;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.builder.AbstractStorageUnit;
import net.dpml.depot.profile.ApplicationProfile.Connection;
Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/BootstrapProfile.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/BootstrapProfile.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/BootstrapProfile.java
Fri Jun 10 22:55:10 2005
@@ -24,7 +24,7 @@
import net.dpml.transit.model.Logger;
import net.dpml.transit.manager.DefaultManager;
-import net.dpml.transit.management.Home;
+import net.dpml.transit.home.Home;
/**
* A ProfileModel maintains information about the configuration
Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/BootstrapProfileStorage.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/BootstrapProfileStorage.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/BootstrapProfileStorage.java
Fri Jun 10 22:55:10 2005
@@ -25,9 +25,9 @@
import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;
+import net.dpml.transit.home.Home;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.Home;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.builder.AbstractStorageUnit;
import net.dpml.depot.profile.ApplicationProfile.Connection;
@@ -91,7 +91,7 @@
{
try
{
- BootstrapProfile manager = (BootstrapProfile)
event.getManager();
+ BootstrapProfile manager = (BootstrapProfile)
event.getModel();
Date date = new Date();
store( manager );
manager.setCreationDate( date );
Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/DepotManager.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/DepotManager.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/DepotManager.java
Fri Jun 10 22:55:10 2005
@@ -22,10 +22,11 @@
import java.util.Properties;
import java.util.Date;
+import net.dpml.transit.home.Home;
import net.dpml.transit.model.Logger;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.model.UnknownKeyException;
import net.dpml.transit.manager.DefaultManager;
-import net.dpml.transit.management.Home;
/**
* A ProfileModel maintains information about the configuration
Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/DepotStorage.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/DepotStorage.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/DepotStorage.java
Fri Jun 10 22:55:10 2005
@@ -25,9 +25,9 @@
import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;
+import net.dpml.transit.home.Home;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.Home;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.builder.AbstractStorageUnit;
/**
@@ -69,7 +69,7 @@
{
try
{
- DepotManager manager = (DepotManager) event.getManager();
+ DepotManager manager = (DepotManager) event.getModel();
Date date = new Date();
store( manager );
manager.setCreationDate( date );
Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/PluginProfile.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/PluginProfile.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/PluginProfile.java
Fri Jun 10 22:55:10 2005
@@ -22,8 +22,8 @@
import java.util.Date;
import java.util.Properties;
+import net.dpml.transit.home.Home;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.Home;
/**
* A ProfileModel maintains information about the configuration
Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/PluginProfileStorage.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/PluginProfileStorage.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/PluginProfileStorage.java
Fri Jun 10 22:55:10 2005
@@ -25,9 +25,9 @@
import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;
+import net.dpml.transit.home.Home;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.Home;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.builder.AbstractStorageUnit;
import net.dpml.depot.profile.ApplicationProfile.Connection;
@@ -78,7 +78,7 @@
{
try
{
- PluginProfile manager = (PluginProfile) event.getManager();
+ PluginProfile manager = (PluginProfile) event.getModel();
Date date = new Date();
store( manager );
manager.setCreationDate( date );
Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/Profile.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/Profile.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/Profile.java
Fri Jun 10 22:55:10 2005
@@ -22,9 +22,10 @@
import java.util.Properties;
import java.util.Date;
+import net.dpml.transit.home.Home;
import net.dpml.transit.model.Logger;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.manager.DefaultManager;
-import net.dpml.transit.management.Home;
/**
* A ProfileModel maintains information about the configuration
Modified:
development/main/depot/console/src/main/net/dpml/depot/profile/ProfileStorage.java
==============================================================================
---
development/main/depot/console/src/main/net/dpml/depot/profile/ProfileStorage.java
(original)
+++
development/main/depot/console/src/main/net/dpml/depot/profile/ProfileStorage.java
Fri Jun 10 22:55:10 2005
@@ -25,9 +25,9 @@
import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;
+import net.dpml.transit.home.Home;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.Home;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.builder.AbstractStorageUnit;
/**
@@ -60,7 +60,7 @@
{
try
{
- Profile manager = (Profile) event.getManager();
+ Profile manager = (Profile) event.getModel();
Date date = new Date();
store( manager );
manager.setCreationDate( date );
Modified: development/main/depot/index.xml
==============================================================================
--- development/main/depot/index.xml (original)
+++ development/main/depot/index.xml Fri Jun 10 22:55:10 2005
@@ -42,6 +42,7 @@
<name>dpml-depot-prefs</name>
<types>
<type>jar</type>
+ <type>plugin</type>
</types>
</info>
<dependencies>
Modified: development/main/depot/prefs/build.xml
==============================================================================
--- development/main/depot/prefs/build.xml (original)
+++ development/main/depot/prefs/build.xml Fri Jun 10 22:55:10 2005
@@ -6,6 +6,10 @@
<transit:import uri="artifact:template:dpml/magic/standard"/>
+ <target name="package" depends="standard.package">
+ <x:export class="net.dpml.depot.prefs.DepotPreferencesFrame"/>
+ </target>
+
<target name="install" depends="standard.install">
<echo>
#----------------------------------------------------------------------------------
Modified:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheDirectoryPanel.java
==============================================================================
---
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheDirectoryPanel.java
(original)
+++
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheDirectoryPanel.java
Fri Jun 10 22:55:10 2005
@@ -37,7 +37,7 @@
import net.dpml.depot.lang.DPML;
import net.dpml.transit.Transit;
-import net.dpml.transit.management.CacheManager;
+import net.dpml.transit.model.CacheModel;
import net.dpml.transit.model.CacheListener;
import net.dpml.transit.model.FileChangeEvent;
import net.dpml.transit.model.HostNodeEvent;
@@ -66,7 +66,7 @@
private File m_target;
- private CacheManager m_manager;
+ private CacheModel m_manager;
private PropertyChangeSupport m_propertyChangeSupport;
@@ -74,7 +74,7 @@
// constructor
//--------------------------------------------------------------
- public CacheDirectoryPanel( JDialog parent, CacheManager manager )
throws Exception
+ public CacheDirectoryPanel( JDialog parent, CacheModel manager ) throws
Exception
{
m_parent = parent;
m_manager = manager;
Copied:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheModelPanel.java
(from r2740,
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheManagerPanel.java)
==============================================================================
---
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheManagerPanel.java
(original)
+++
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheModelPanel.java
Fri Jun 10 22:55:10 2005
@@ -49,9 +49,8 @@
import net.dpml.transit.Transit;
import net.dpml.transit.util.ExceptionHelper;
-import net.dpml.transit.management.CacheManager;
-import net.dpml.transit.management.HostManager;
-import net.dpml.transit.management.LayoutRegistryManager;
+import net.dpml.transit.model.CacheModel;
+import net.dpml.transit.model.LayoutRegistryModel;
import net.dpml.transit.model.HostModel;
import net.dpml.transit.model.UnknownKeyException;
import net.dpml.transit.cache.CacheHandler;
@@ -61,7 +60,7 @@
*
* @author <a href="mailto:mcconnell AT osm.net";>OSM</a>
*/
-class CacheManagerPanel extends ClassicPanel implements
PropertyChangeListener
+class CacheModelPanel extends ClassicPanel implements PropertyChangeListener
{
//--------------------------------------------------------------
// static
@@ -79,8 +78,8 @@
private final EditAction m_editAction;
private final JButton m_edit;
private final JButton m_delete;
- private final CacheManager m_manager;
- private final LayoutRegistryManager m_layouts;
+ private final CacheModel m_manager;
+ private final LayoutRegistryModel m_layouts;
private final CacheAction m_cache;
private final CacheTableModel m_tableModel;
@@ -90,8 +89,8 @@
// constructor
//--------------------------------------------------------------
- public CacheManagerPanel(
- Window parent, CacheManager manager, LayoutRegistryManager layouts )
+ public CacheModelPanel(
+ Window parent, CacheModel manager, LayoutRegistryModel layouts )
{
Transit.getInstance();
@@ -153,7 +152,7 @@
{
try
{
- HostManager model = m_manager.getHostManager(
m_selection );
+ HostModel model = m_manager.getHostModel( m_selection );
m_edit.setEnabled( true );
m_delete.setEnabled( false == model.isBootstrap() );
getRootPane().setDefaultButton( m_edit );
@@ -222,8 +221,8 @@
final String title = "Cache Controller";
final Dimension size = new Dimension( 400, 240 );
ClassicDialog dialog = ClassicDialog.createDialog( m_parent,
title, size );
- PluginManagerPanel panel =
- new PluginManagerPanel( dialog, m_manager, m_cache,
CacheHandler.class );
+ PluginModelPanel panel =
+ new PluginModelPanel( dialog, m_manager, m_cache,
CacheHandler.class );
dialog.getBody().add( panel );
dialog.setLocationRelativeTo( (Component) event.getSource()
);
dialog.setResizable( false );
@@ -307,7 +306,7 @@
}
try
{
- m_manager.addHostManager( name );
+ m_manager.addHostModel( name );
}
catch( Throwable e )
{
@@ -341,8 +340,8 @@
final String title = "Resource Host: " + m_selection;
final Dimension size = new Dimension( 400, 360 );
ClassicDialog dialog = ClassicDialog.createDialog( m_parent,
title, size );
- HostManager manager = m_manager.getHostManager( m_selection
);
- HostManagerPanel panel = new HostManagerPanel( dialog,
manager, m_layouts );
+ HostModel manager = m_manager.getHostModel( m_selection );
+ HostModelPanel panel = new HostModelPanel( dialog, manager,
m_layouts );
dialog.getBody().add( panel );
dialog.setLocationRelativeTo( source );
dialog.setResizable( false );
@@ -377,15 +376,15 @@
try
{
- HostManager host = m_manager.getHostManager( m_selection );
- m_manager.removeHostManager( host );
+ HostModel host = m_manager.getHostModel( m_selection );
+ m_manager.removeHostModel( host );
}
catch( Throwable e )
{
final String error =
"Unexpected error while attempting to delete a host
preferences node."
+ "\nCODEBASE: "
- +
CacheManagerPanel.class.getProtectionDomain().getCodeSource().getLocation().toString();
+ +
CacheModelPanel.class.getProtectionDomain().getCodeSource().getLocation().toString();
Logger logger = Logger.getLogger( "depot.prefs" );
logger.log( Level.SEVERE, error, e );
}
Modified:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheTableModel.java
==============================================================================
---
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheTableModel.java
(original)
+++
development/main/depot/prefs/src/main/net/dpml/depot/prefs/CacheTableModel.java
Fri Jun 10 22:55:10 2005
@@ -26,7 +26,7 @@
import net.dpml.transit.model.HostModel;
import net.dpml.transit.model.HostNodeEvent;
import net.dpml.transit.model.CacheListener;
-import net.dpml.transit.management.CacheManager;
+import net.dpml.transit.model.CacheModel;
/**
* Table model that maps table rows to child nodes of a supplied preferences
node.
@@ -64,7 +64,7 @@
IconHelper.createImageIcon(
CacheTableModel.class.getClassLoader(), ICON_PATH, "Features" );
- private final CacheManager m_manager;
+ private final CacheModel m_manager;
//--------------------------------------------------------------------------
// constructor
@@ -76,7 +76,7 @@
*
* @param manager the cache configuration manager
*/
- public CacheTableModel( CacheManager manager )
+ public CacheTableModel( CacheModel manager )
{
super();
m_manager = manager;
Copied:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ContentRegistryModelPanel.java
(from r2740,
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ContentRegistryManagerPanel.java)
==============================================================================
---
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ContentRegistryManagerPanel.java
(original)
+++
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ContentRegistryModelPanel.java
Fri Jun 10 22:55:10 2005
@@ -51,8 +51,8 @@
import net.dpml.transit.Transit;
import net.dpml.transit.util.ExceptionHelper;
import net.dpml.transit.content.ContentRegistry;
-import net.dpml.transit.management.ContentRegistryManager;
-import net.dpml.transit.management.ContentManager;
+import net.dpml.transit.model.ContentRegistryModel;
+import net.dpml.transit.model.ContentModel;
import net.dpml.transit.model.UnknownKeyException;
import net.dpml.transit.model.DuplicateKeyException;
@@ -61,7 +61,7 @@
*
* @author <a href="mailto:mcconnell AT osm.net";>OSM</a>
*/
-class ContentRegistryManagerPanel extends ClassicPanel implements
PropertyChangeListener
+class ContentRegistryModelPanel extends ClassicPanel implements
PropertyChangeListener
{
//--------------------------------------------------------------
// state
@@ -75,18 +75,18 @@
private JButton m_delete;
private String m_selection;
- private ContentRegistryManager m_manager;
+ private ContentRegistryModel m_model;
private ContentRegistryTableModel m_tableModel;
//--------------------------------------------------------------
// constructor
//--------------------------------------------------------------
- public ContentRegistryManagerPanel( Window parent,
ContentRegistryManager manager )
+ public ContentRegistryModelPanel( Window parent, ContentRegistryModel
model )
{
super();
- m_manager = manager;
+ m_model = model;
m_parent = parent;
m_editAction = new EditAction( "Edit" );
@@ -111,7 +111,7 @@
getBody().add( panel );
TableColumnModel columns = createContentHandlerColumnModel();
- m_tableModel = new ContentRegistryTableModel( manager );
+ m_tableModel = new ContentRegistryTableModel( model );
m_table = new ClassicTable( m_tableModel, columns );
m_table.addPropertyChangeListener( this );
m_table.setShowVerticalLines( false );
@@ -178,8 +178,8 @@
final String title = "Content Handler Controller";
final Dimension size = new Dimension( 400, 240 );
ClassicDialog dialog = ClassicDialog.createDialog( m_parent,
title, size );
- PluginManagerPanel panel =
- new PluginManagerPanel( dialog, m_manager,
ContentRegistry.class );
+ PluginModelPanel panel =
+ new PluginModelPanel( dialog, m_model,
ContentRegistry.class );
dialog.getBody().add( panel );
dialog.setLocationRelativeTo( (Component) event.getSource()
);
dialog.setResizable( false );
@@ -249,7 +249,7 @@
}
try
{
- m_manager.addContentManager( type );
+ m_model.addContentModel( type );
}
catch( DuplicateKeyException e )
{
@@ -283,11 +283,11 @@
final String title = "Content Handler";
final Dimension size = new Dimension( 400, 240 );
ClassicDialog dialog = ClassicDialog.createDialog( m_parent,
title, size );
- ContentManager manager = m_manager.getContentManager(
m_selection );
- if( null != manager )
+ ContentModel model = m_model.getContentModel( m_selection );
+ if( null != model )
{
- PluginManagerPanel panel =
- new PluginManagerPanel( dialog, manager,
ContentHandler.class );
+ PluginModelPanel panel =
+ new PluginModelPanel( dialog, model,
ContentHandler.class );
dialog.getBody().add( panel );
dialog.setLocationRelativeTo( source );
dialog.setResizable( false );
@@ -322,8 +322,8 @@
}
try
{
- ContentManager m = m_manager.getContentManager( m_selection
);
- m_manager.removeContentManager( m );
+ ContentModel m = m_model.getContentModel( m_selection );
+ m_model.removeContentModel( m );
}
catch( Throwable e )
{
Modified:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ContentRegistryTableModel.java
==============================================================================
---
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ContentRegistryTableModel.java
(original)
+++
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ContentRegistryTableModel.java
Fri Jun 10 22:55:10 2005
@@ -22,7 +22,7 @@
import net.dpml.transit.Transit;
import net.dpml.transit.model.ContentRegistryEvent;
import net.dpml.transit.model.ContentRegistryListener;
-import net.dpml.transit.management.ContentRegistryManager;
+import net.dpml.transit.model.ContentRegistryModel;
/**
* Table model that maps table rows to child nodes of a supplied preferences
node.
@@ -60,7 +60,7 @@
IconHelper.createImageIcon(
ContentRegistryTableModel.class.getClassLoader(), ICON_PATH,
"Features" );
- private final ContentRegistryManager m_manager;
+ private final ContentRegistryModel m_manager;
//--------------------------------------------------------------------------
// constructor
@@ -72,7 +72,7 @@
*
* @param manager the registry configuration manager
*/
- public ContentRegistryTableModel( ContentRegistryManager manager )
+ public ContentRegistryTableModel( ContentRegistryModel manager )
{
super();
m_manager = manager;
Modified:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/DepotPreferencesFrame.java
==============================================================================
---
development/main/depot/prefs/src/main/net/dpml/depot/prefs/DepotPreferencesFrame.java
(original)
+++
development/main/depot/prefs/src/main/net/dpml/depot/prefs/DepotPreferencesFrame.java
Fri Jun 10 22:55:10 2005
@@ -40,7 +40,6 @@
import net.dpml.transit.Transit;
import net.dpml.transit.model.TransitModel;
-import net.dpml.transit.management.TransitManager;
/**
* Dialog that presents the default preferences for DPML applications
including
@@ -74,7 +73,7 @@
*/
private static final int ZERO = 0;
- public DepotPreferencesFrame( TransitManager manager ) throws Exception
+ public DepotPreferencesFrame( TransitModel model ) throws Exception
{
super();
@@ -84,7 +83,7 @@
setTitle( "DPML Depot" );
Dimension size = new Dimension( DEFAULT_DIALOG_WIDTH,
DEFAULT_DIALOG_HEIGHT );
setSize( size );
- DepotPreferencesPanel panel = new DepotPreferencesPanel( this,
manager );
+ DepotPreferencesPanel panel = new DepotPreferencesPanel( this, model
);
setContentPane( panel );
getRootPane().setDefaultButton( panel.getDefaultButton() );
addWindowListener(
Modified:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/DepotPreferencesPanel.java
==============================================================================
---
development/main/depot/prefs/src/main/net/dpml/depot/prefs/DepotPreferencesPanel.java
(original)
+++
development/main/depot/prefs/src/main/net/dpml/depot/prefs/DepotPreferencesPanel.java
Fri Jun 10 22:55:10 2005
@@ -41,11 +41,10 @@
import net.dpml.transit.Transit;
import net.dpml.transit.model.TransitModel;
-import net.dpml.transit.management.TransitManager;
-import net.dpml.transit.management.LayoutRegistryManager;
-import net.dpml.transit.management.CacheManager;
-import net.dpml.transit.management.ContentRegistryManager;
-import net.dpml.transit.management.ProxyManager;
+import net.dpml.transit.model.LayoutRegistryModel;
+import net.dpml.transit.model.CacheModel;
+import net.dpml.transit.model.ContentRegistryModel;
+import net.dpml.transit.model.ProxyModel;
/**
* Panel that presents the default preferences for DPML applications
including
@@ -76,20 +75,20 @@
private ButtonPanel m_buttons;
- private TransitManager m_manager;
- private LayoutRegistryManagerPanel m_layoutPanel;
- private CacheManagerPanel m_cachePanel;
- private ContentRegistryManagerPanel m_registryPanel;
- private ProxyManagerPanel m_proxyPanel;
+ private TransitModel m_model;
+ private LayoutRegistryModelPanel m_layoutPanel;
+ private CacheModelPanel m_cachePanel;
+ private ContentRegistryModelPanel m_registryPanel;
+ private ProxyModelPanel m_proxyPanel;
private final Window m_window;
- public DepotPreferencesPanel( Window window, final TransitManager
manager ) throws Exception
+ public DepotPreferencesPanel( Window window, final TransitModel model )
throws Exception
{
super( new BorderLayout() );
m_window = window;
- m_manager = manager;
+ m_model = model;
JLabel label =
IconHelper.createImageIconJLabel(
@@ -109,10 +108,10 @@
new Runnable() {
public void run()
{
- final CacheManager cache = m_manager.getCacheManager();
- final LayoutRegistryManager layouts =
cache.getLayoutRegistryManager();
- m_layoutPanel = new LayoutRegistryManagerPanel( m_window,
layouts );
- m_cachePanel = new CacheManagerPanel( m_window, cache,
layouts );
+ final CacheModel cache = m_model.getCacheModel();
+ final LayoutRegistryModel layouts =
cache.getLayoutRegistryModel();
+ m_layoutPanel = new LayoutRegistryModelPanel( m_window,
layouts );
+ m_cachePanel = new CacheModelPanel( m_window, cache, layouts
);
tabbedPane.addTab( "Cache", m_cachePanel );
tabbedPane.addTab( "Layout", m_layoutPanel );
tabbedPane.revalidate();
@@ -124,8 +123,8 @@
new Runnable() {
public void run()
{
- final ContentRegistryManager content =
m_manager.getContentRegistryManager();
- m_registryPanel = new ContentRegistryManagerPanel( m_window,
content );
+ final ContentRegistryModel content =
m_model.getContentRegistryModel();
+ m_registryPanel = new ContentRegistryModelPanel( m_window,
content );
tabbedPane.addTab( "Content", m_registryPanel );
}
}
@@ -135,8 +134,8 @@
new Runnable() {
public void run()
{
- final ProxyManager proxy = m_manager.getProxyManager();
- m_proxyPanel = new ProxyManagerPanel( m_window, proxy );
+ final ProxyModel proxy = m_model.getProxyModel();
+ m_proxyPanel = new ProxyModelPanel( m_window, proxy );
tabbedPane.addTab( "Proxy", m_proxyPanel );
}
}
Copied:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/HostModelPanel.java
(from r2785,
development/main/depot/prefs/src/main/net/dpml/depot/prefs/HostManagerPanel.java)
==============================================================================
---
development/main/depot/prefs/src/main/net/dpml/depot/prefs/HostManagerPanel.java
(original)
+++
development/main/depot/prefs/src/main/net/dpml/depot/prefs/HostModelPanel.java
Fri Jun 10 22:55:10 2005
@@ -51,8 +51,8 @@
import javax.swing.event.ListDataListener;
import javax.swing.event.ListDataEvent;
-import net.dpml.transit.management.HostManager;
-import net.dpml.transit.management.LayoutRegistryManager;
+import net.dpml.transit.model.HostModel;
+import net.dpml.transit.model.LayoutRegistryModel;
import net.dpml.transit.model.HostListener;
import net.dpml.transit.model.LayoutModel;
import net.dpml.transit.model.HostChangeEvent;
@@ -65,7 +65,7 @@
*
* @author <a href="mailto:mcconnell AT osm.net";>OSM</a>
*/
-class HostManagerPanel extends ClassicPanel
+class HostModelPanel extends ClassicPanel
implements HostListener, PropertyChangeListener, DocumentListener,
ListDataListener
{
//--------------------------------------------------------------
@@ -79,8 +79,8 @@
//--------------------------------------------------------------
private final JDialog m_parent;
- private final HostManager m_manager;
- private final LayoutRegistryManager m_layouts;
+ private final HostModel m_manager;
+ private final LayoutRegistryModel m_layouts;
private JLabel m_label;
private JCheckBox m_enabled;
@@ -98,7 +98,7 @@
// constructor
//--------------------------------------------------------------
- public HostManagerPanel( JDialog parent, HostManager manager,
LayoutRegistryManager layouts ) throws Exception
+ public HostModelPanel( JDialog parent, HostModel manager,
LayoutRegistryModel layouts ) throws Exception
{
super();
Modified:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutComboBoxModel.java
==============================================================================
---
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutComboBoxModel.java
(original)
+++
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutComboBoxModel.java
Fri Jun 10 22:55:10 2005
@@ -21,8 +21,8 @@
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
-import net.dpml.transit.management.HostManager;
-import net.dpml.transit.management.LayoutRegistryManager;
+import net.dpml.transit.model.HostModel;
+import net.dpml.transit.model.LayoutRegistryModel;
import net.dpml.transit.model.HostListener;
import net.dpml.transit.model.HostChangeEvent;
import net.dpml.transit.model.HostPriorityEvent;
@@ -38,8 +38,8 @@
// state
//--------------------------------------------------------------------------
- private final LayoutRegistryManager m_manager;
- private final HostManager m_host;
+ private final LayoutRegistryModel m_manager;
+ private final HostModel m_host;
//--------------------------------------------------------------------------
// constructor
@@ -53,7 +53,7 @@
* @param locations the layout manager
* @param host the host manager
*/
- public LayoutComboBoxModel( LayoutRegistryManager manager, HostManager
host )
+ public LayoutComboBoxModel( LayoutRegistryModel manager, HostModel host )
{
super( manager.getLayoutModels() );
Copied:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutRegistryModelPanel.java
(from r2740,
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutRegistryManagerPanel.java)
==============================================================================
---
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutRegistryManagerPanel.java
(original)
+++
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutRegistryModelPanel.java
Fri Jun 10 22:55:10 2005
@@ -46,21 +46,21 @@
import javax.swing.table.TableColumnModel;
import net.dpml.transit.Transit;
-import net.dpml.transit.util.ExceptionHelper;
import net.dpml.transit.layout.LayoutRegistry;
import net.dpml.transit.layout.Layout;
-import net.dpml.transit.management.LayoutRegistryManager;
-import net.dpml.transit.management.LayoutManager;
+import net.dpml.transit.model.LayoutRegistryModel;
+import net.dpml.transit.model.LayoutModel;
import net.dpml.transit.model.LayoutModel;
import net.dpml.transit.model.DuplicateKeyException;
import net.dpml.transit.model.UnknownKeyException;
+import net.dpml.transit.util.ExceptionHelper;
/**
* Runnable plugin that handles DPML environment setup.
*
* @author <a href="mailto:mcconnell AT osm.net";>OSM</a>
*/
-class LayoutRegistryManagerPanel extends ClassicPanel implements
PropertyChangeListener
+class LayoutRegistryModelPanel extends ClassicPanel implements
PropertyChangeListener
{
//--------------------------------------------------------------
// state
@@ -74,14 +74,14 @@
private JButton m_delete;
private String m_selection;
- private LayoutRegistryManager m_manager;
+ private LayoutRegistryModel m_manager;
private LayoutRegistryTableModel m_tableModel;
//--------------------------------------------------------------
// constructor
//--------------------------------------------------------------
- public LayoutRegistryManagerPanel( Window parent, LayoutRegistryManager
manager )
+ public LayoutRegistryModelPanel( Window parent, LayoutRegistryModel
manager )
{
super();
@@ -189,8 +189,8 @@
final String title = "Layout Registry Controller";
final Dimension size = new Dimension( 400, 240 );
ClassicDialog dialog = ClassicDialog.createDialog( m_parent,
title, size );
- PluginManagerPanel panel =
- new PluginManagerPanel( dialog, m_manager,
LayoutRegistry.class );
+ PluginModelPanel panel =
+ new PluginModelPanel( dialog, m_manager,
LayoutRegistry.class );
dialog.getBody().add( panel );
dialog.setLocationRelativeTo( (Component) event.getSource()
);
dialog.setResizable( false );
@@ -259,7 +259,7 @@
}
try
{
- m_manager.addLayoutManager( id );
+ m_manager.addLayoutModel( id );
}
catch( DuplicateKeyException e )
{
@@ -292,11 +292,11 @@
final String title = "Location Resolver";
final Dimension size = new Dimension( 400, 240 );
ClassicDialog dialog = ClassicDialog.createDialog( m_parent,
title, size );
- LayoutManager manager = m_manager.getLayoutManager(
m_selection );
+ LayoutModel manager = m_manager.getLayoutModel( m_selection
);
if( null != manager )
{
- PluginManagerPanel panel =
- new PluginManagerPanel( dialog, manager, Layout.class
);
+ PluginModelPanel panel =
+ new PluginModelPanel( dialog, manager, Layout.class );
dialog.getBody().add( panel );
dialog.setLocationRelativeTo( source );
dialog.setResizable( false );
@@ -330,8 +330,8 @@
}
try
{
- LayoutManager layout = m_manager.getLayoutManager(
m_selection );
- m_manager.removeLayoutManager( layout );
+ LayoutModel layout = m_manager.getLayoutModel( m_selection );
+ m_manager.removeLayoutModel( layout );
}
catch( Throwable e )
{
Modified:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutRegistryTableModel.java
==============================================================================
---
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutRegistryTableModel.java
(original)
+++
development/main/depot/prefs/src/main/net/dpml/depot/prefs/LayoutRegistryTableModel.java
Fri Jun 10 22:55:10 2005
@@ -22,7 +22,7 @@
import net.dpml.transit.Transit;
import net.dpml.transit.model.LayoutRegistryEvent;
import net.dpml.transit.model.LayoutRegistryListener;
-import net.dpml.transit.management.LayoutRegistryManager;
+import net.dpml.transit.model.LayoutRegistryModel;
/**
* Table model that maps table rows to child nodes of a supplied preferences
node.
@@ -60,7 +60,7 @@
IconHelper.createImageIcon(
LayoutRegistryTableModel.class.getClassLoader(), ICON_PATH,
"Features" );
- private final LayoutRegistryManager m_manager;
+ private final LayoutRegistryModel m_manager;
//--------------------------------------------------------------------------
// constructor
@@ -72,7 +72,7 @@
*
* @param manager the registry configuration manager
*/
- public LayoutRegistryTableModel( LayoutRegistryManager manager )
+ public LayoutRegistryTableModel( LayoutRegistryModel manager )
{
super();
m_manager = manager;
Modified: development/main/depot/prefs/src/main/net/dpml/depot/prefs/Main.java
==============================================================================
--- development/main/depot/prefs/src/main/net/dpml/depot/prefs/Main.java
(original)
+++ development/main/depot/prefs/src/main/net/dpml/depot/prefs/Main.java
Fri Jun 10 22:55:10 2005
@@ -26,8 +26,8 @@
import net.dpml.transit.Transit;
import net.dpml.transit.adapter.LoggingAdapter;
-import net.dpml.transit.management.TransitManager;
-import net.dpml.transit.management.TransitHome;
+import net.dpml.transit.home.TransitHome;
+import net.dpml.transit.model.TransitModel;
import net.dpml.transit.builder.TransitStorageUnit;
import net.dpml.transit.model.Logger;
@@ -72,9 +72,9 @@
TransitHome home = new TransitStorageUnit();
home.setPersistOnModification( true );
home.setLogger( logger );
- TransitManager manager = home.create();
- Transit.getInstance( manager );
- new DepotPreferencesFrame( manager );
+ TransitModel model = home.create();
+ Transit.getInstance( model );
+ new DepotPreferencesFrame( model );
}
catch( Exception e )
{
Copied:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/PluginModelPanel.java
(from r2740,
development/main/depot/prefs/src/main/net/dpml/depot/prefs/PluginManagerPanel.java)
==============================================================================
---
development/main/depot/prefs/src/main/net/dpml/depot/prefs/PluginManagerPanel.java
(original)
+++
development/main/depot/prefs/src/main/net/dpml/depot/prefs/PluginModelPanel.java
Fri Jun 10 22:55:10 2005
@@ -51,18 +51,18 @@
import net.dpml.transit.Transit;
import net.dpml.transit.TransitException;
-import net.dpml.transit.repository.Plugin;
-import net.dpml.transit.repository.Repository;
-import net.dpml.transit.management.PluginManager;
+import net.dpml.transit.model.PluginModel;
import net.dpml.transit.model.PluginListener;
import net.dpml.transit.model.PluginChangeEvent;
+import net.dpml.transit.repository.Plugin;
+import net.dpml.transit.repository.Repository;
/**
* Control panel for editing the cache preferences.
*
* @author <a href="mailto:mcconnell AT osm.net";>OSM</a>
*/
-class PluginManagerPanel extends ClassicPanel
+class PluginModelPanel extends ClassicPanel
implements PluginListener, PropertyChangeListener, DocumentListener
{
//--------------------------------------------------------------
@@ -74,7 +74,7 @@
private JButton m_ok;
private JButton m_revert;
private SettingsAction m_settings;
- private PluginManager m_manager;
+ private PluginModel m_manager;
private PropertyChangeSupport m_propertyChangeSupport;
private Action m_action;
@@ -96,8 +96,8 @@
* @param manager the plugin manager
* @param service the class that a plugin controller must implement
*/
- public PluginManagerPanel(
- JDialog parent, PluginManager manager, Class service ) throws
Exception
+ public PluginModelPanel(
+ JDialog parent, PluginModel manager, Class service ) throws Exception
{
this( parent, manager, null, service );
}
@@ -118,8 +118,8 @@
* when not plugin uri is specificed
* @param service the class that a plugin controller must implement
*/
- public PluginManagerPanel(
- JDialog parent, PluginManager manager, Action action, Class service )
throws Exception
+ public PluginModelPanel(
+ JDialog parent, PluginModel manager, Action action, Class service )
throws Exception
{
super();
Modified:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ProxyFeaturesPanel.java
==============================================================================
---
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ProxyFeaturesPanel.java
(original)
+++
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ProxyFeaturesPanel.java
Fri Jun 10 22:55:10 2005
@@ -53,7 +53,7 @@
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
-import net.dpml.transit.management.ProxyManager;
+import net.dpml.transit.model.ProxyModel;
/**
* Control panel for editing the cache preferences.
@@ -71,7 +71,7 @@
private JButton m_ok;
private JButton m_revert;
private PropertyChangeSupport m_propertyChangeSupport;
- private ProxyManager m_manager;
+ private ProxyModel m_manager;
private String m_host;
private CredentialsAction m_credentials;
private JButton m_close;
@@ -86,7 +86,7 @@
*
* @param parent the parent dialog
*/
- public ProxyFeaturesPanel( JDialog parent, ProxyManager manager ) throws
Exception
+ public ProxyFeaturesPanel( JDialog parent, ProxyModel manager ) throws
Exception
{
m_parent = parent;
m_manager = manager;
Copied:
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ProxyModelPanel.java
(from r2740,
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ProxyManagerPanel.java)
==============================================================================
---
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ProxyManagerPanel.java
(original)
+++
development/main/depot/prefs/src/main/net/dpml/depot/prefs/ProxyModelPanel.java
Fri Jun 10 22:55:10 2005
@@ -52,15 +52,13 @@
import net.dpml.transit.Transit;
import net.dpml.transit.model.ProxyModel;
import net.dpml.transit.model.ProxyListener;
-import net.dpml.transit.management.ProxyManager;
-import net.dpml.transit.util.ExceptionHelper;
/**
* Runnable plugin that handles DPML environment setup.
*
* @author <a href="mailto:mcconnell AT osm.net";>OSM</a>
*/
-class ProxyManagerPanel extends ClassicPanel implements
PropertyChangeListener
+class ProxyModelPanel extends ClassicPanel implements PropertyChangeListener
{
//--------------------------------------------------------------
// static
@@ -74,7 +72,7 @@
private final Window m_parent;
- private ProxyManager m_manager;
+ private ProxyModel m_model;
private AddAction m_add;
private EditAction m_edit;
private JButton m_editButton;
@@ -88,12 +86,12 @@
// constructor
//--------------------------------------------------------------
- public ProxyManagerPanel( Window parent, ProxyManager manager )
+ public ProxyModelPanel( Window parent, ProxyModel model )
{
super();
m_parent = parent;
- m_manager = manager;
+ m_model = model;
//
// setup info about the proxy host, scheme and prompt
@@ -116,7 +114,7 @@
TableColumnModel columns = new DefaultTableColumnModel();
columns.addColumn( new TableColumn( 0, 100, new
ClassicCellRenderer(), null ) );
- m_tableModel = new ProxyExcludesTableModel( manager );
+ m_tableModel = new ProxyExcludesTableModel( model );
m_table = new ClassicTable( m_tableModel, columns );
m_table.addPropertyChangeListener( this );
@@ -180,7 +178,7 @@
return;
}
ArrayList list = new ArrayList();
- String[] excludes = m_manager.getExcludes();
+ String[] excludes = m_model.getExcludes();
for( int i=0; i<excludes.length; i++ )
{
String s = excludes[i];
@@ -190,7 +188,7 @@
}
}
String[] values = (String[]) list.toArray( new String[0] );
- m_manager.setExcludes( values );
+ m_model.setExcludes( values );
}
private void changeExclude( String exclude, String value )
@@ -204,7 +202,7 @@
return;
}
ArrayList list = new ArrayList();
- String[] excludes = m_manager.getExcludes();
+ String[] excludes = m_model.getExcludes();
for( int i=0; i<excludes.length; i++ )
{
String s = excludes[i];
@@ -218,13 +216,13 @@
}
}
String[] values = (String[]) list.toArray( new String[0] );
- m_manager.setExcludes( values );
+ m_model.setExcludes( values );
}
private void addExclude( String exclude )
{
ArrayList list = new ArrayList();
- String[] excludes = m_manager.getExcludes();
+ String[] excludes = m_model.getExcludes();
for( int i=0; i<excludes.length; i++ )
{
String s = excludes[i];
@@ -232,7 +230,7 @@
}
list.add( exclude );
String[] values = (String[]) list.toArray( new String[0] );
- m_manager.setExcludes( values );
+ m_model.setExcludes( values );
}
//--------------------------------------------------------------
@@ -320,7 +318,7 @@
final String title = "Proxy Host Settings";
final Dimension size = new Dimension( 400, 280 );
ClassicDialog dialog = ClassicDialog.createDialog( m_parent,
title, size );
- ProxyFeaturesPanel panel = new ProxyFeaturesPanel( dialog,
m_manager );
+ ProxyFeaturesPanel panel = new ProxyFeaturesPanel( dialog,
m_model );
dialog.getBody().add( panel );
dialog.setLocationRelativeTo( (Component) event.getSource()
);
dialog.getRootPane().setDefaultButton(
panel.getDefaultButton() );
Modified:
development/main/depot/station/src/main/net/dpml/depot/station/ActivationGroupProfile.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/station/ActivationGroupProfile.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/station/ActivationGroupProfile.java
Fri Jun 10 22:55:10 2005
@@ -27,7 +27,7 @@
import java.rmi.activation.ActivationGroupDesc;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.Home;
+import net.dpml.transit.home.Home;
import net.dpml.depot.profile.ProfileException;
Modified:
development/main/depot/station/src/main/net/dpml/depot/station/ActivationGroupStorage.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/station/ActivationGroupStorage.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/station/ActivationGroupStorage.java
Fri Jun 10 22:55:10 2005
@@ -27,8 +27,8 @@
import java.rmi.activation.ActivationGroupID;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.Home;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.home.Home;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.builder.AbstractStorageUnit;
import net.dpml.depot.profile.ProfileException;
@@ -127,7 +127,7 @@
{
try
{
- ActivationGroupProfile manager = (ActivationGroupProfile)
event.getManager();
+ ActivationGroupProfile manager = (ActivationGroupProfile)
event.getModel();
Date date = new Date();
store( manager );
manager.setCreationDate( date );
Modified:
development/main/depot/station/src/main/net/dpml/depot/station/ActivationProfile.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/station/ActivationProfile.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/station/ActivationProfile.java
Fri Jun 10 22:55:10 2005
@@ -26,7 +26,7 @@
import java.rmi.activation.ActivationException;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.Home;
+import net.dpml.transit.home.Home;
import net.dpml.depot.profile.ProfileException;
import net.dpml.depot.profile.PluginProfile;
Modified:
development/main/depot/station/src/main/net/dpml/depot/station/ActivationStorage.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/station/ActivationStorage.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/station/ActivationStorage.java
Fri Jun 10 22:55:10 2005
@@ -27,8 +27,8 @@
import java.rmi.activation.ActivationGroupID;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.Home;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.home.Home;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.builder.AbstractStorageUnit;
import net.dpml.depot.profile.PluginProfile;
@@ -94,7 +94,7 @@
{
try
{
- ActivationProfile manager = (ActivationProfile)
event.getManager();
+ ActivationProfile manager = (ActivationProfile)
event.getModel();
Date date = new Date();
store( manager );
manager.setCreationDate( date );
Modified:
development/main/depot/station/src/main/net/dpml/depot/station/CodeBaseProfile.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/station/CodeBaseProfile.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/station/CodeBaseProfile.java
Fri Jun 10 22:55:10 2005
@@ -26,8 +26,8 @@
import java.rmi.activation.ActivationException;
import java.rmi.activation.ActivationGroupDesc;
+import net.dpml.transit.home.Home;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.Home;
import net.dpml.depot.profile.Profile;
import net.dpml.depot.profile.ProfileException;
Modified:
development/main/depot/station/src/main/net/dpml/depot/station/CodeBaseStorage.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/station/CodeBaseStorage.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/station/CodeBaseStorage.java
Fri Jun 10 22:55:10 2005
@@ -26,9 +26,9 @@
import java.util.prefs.Preferences;
import java.rmi.activation.ActivationGroupID;
+import net.dpml.transit.home.Home;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.Home;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.builder.AbstractStorageUnit;
import net.dpml.depot.profile.PluginProfile;
Modified:
development/main/depot/station/src/main/net/dpml/depot/station/StationProfile.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/station/StationProfile.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/station/StationProfile.java
Fri Jun 10 22:55:10 2005
@@ -25,7 +25,7 @@
import net.dpml.transit.model.Logger;
import net.dpml.transit.model.UnknownKeyException;
import net.dpml.transit.manager.DefaultManager;
-import net.dpml.transit.management.Home;
+import net.dpml.transit.home.Home;
import net.dpml.depot.profile.ProfileException;
Modified:
development/main/depot/station/src/main/net/dpml/depot/station/StationStorage.java
==============================================================================
---
development/main/depot/station/src/main/net/dpml/depot/station/StationStorage.java
(original)
+++
development/main/depot/station/src/main/net/dpml/depot/station/StationStorage.java
Fri Jun 10 22:55:10 2005
@@ -27,8 +27,8 @@
import java.rmi.activation.ActivationGroupID;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.Home;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.home.Home;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.builder.AbstractStorageUnit;
import net.dpml.depot.profile.ProfileException;
@@ -109,7 +109,7 @@
{
try
{
- StationProfile manager = (StationProfile) event.getManager();
+ StationProfile manager = (StationProfile) event.getModel();
Date date = new Date();
store( manager );
manager.setCreationDate( date );
Modified:
development/main/metro/composition/content/src/main/net/dpml/composition/content/CompositionContentHandlerRegistry.java
==============================================================================
---
development/main/metro/composition/content/src/main/net/dpml/composition/content/CompositionContentHandlerRegistry.java
(original)
+++
development/main/metro/composition/content/src/main/net/dpml/composition/content/CompositionContentHandlerRegistry.java
Fri Jun 10 22:55:10 2005
@@ -25,8 +25,7 @@
import net.dpml.transit.TransitException;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.ContentRegistryManager;
-import net.dpml.transit.management.ContentManager;
+import net.dpml.transit.model.ContentRegistryModel;
import net.dpml.transit.model.ContentModel;
import net.dpml.transit.model.DuplicateKeyException;
import net.dpml.transit.model.UnknownKeyException;
@@ -44,7 +43,7 @@
//
------------------------------------------------------------------------
private final Logger m_logger;
- private final ContentRegistryManager m_manager;
+ private final ContentRegistryModel m_model;
//
------------------------------------------------------------------------
// constructor
@@ -57,15 +56,15 @@
*
* @param model the registry model
*/
- public CompositionContentHandlerRegistry( ContentRegistryManager manager
) throws Exception
+ public CompositionContentHandlerRegistry( ContentRegistryModel manager )
throws Exception
{
super( manager );
m_logger = manager.getLogger();
- m_manager = manager;
+ m_model = manager;
try
{
- ContentManager m = manager.getContentManager( PART );
+ ContentModel m = manager.getContentModel( PART );
// TODO:
// part handler already registered - but as soon as we have
@@ -79,7 +78,7 @@
Date creation = new Date();
Logger logger = manager.getLogger().getChildLogger( PART );
URI uri = new URI( PART_HANDLER_PLUGIN_PATH );
- manager.addContentManager( PART, TITLE, uri );
+ manager.addContentModel( PART, TITLE, uri );
}
catch( Throwable e )
{
Modified:
development/main/test/plugins/layout/src/main/net/dpml/test/layout/DemoLayoutControlPanel.java
==============================================================================
---
development/main/test/plugins/layout/src/main/net/dpml/test/layout/DemoLayoutControlPanel.java
(original)
+++
development/main/test/plugins/layout/src/main/net/dpml/test/layout/DemoLayoutControlPanel.java
Fri Jun 10 22:55:10 2005
@@ -42,7 +42,7 @@
import javax.swing.ImageIcon;
import javax.swing.JTextField;
-import net.dpml.transit.management.LayoutManager;
+import net.dpml.transit.model.LayoutModel;
import net.dpml.depot.prefs.IconHelper;
@@ -58,13 +58,13 @@
private PropertyChangeSupport m_propertyChangeSupport;
- private LayoutManager m_manager;
+ private LayoutModel m_manager;
//--------------------------------------------------------------------------
// constructor
//--------------------------------------------------------------------------
- public DemoLayoutControlPanel( Dialog parent, LayoutManager manager )
+ public DemoLayoutControlPanel( Dialog parent, LayoutModel manager )
{
super( parent );
Modified:
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/URLTestCase.java
==============================================================================
---
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/URLTestCase.java
(original)
+++
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/URLTestCase.java
Fri Jun 10 22:55:10 2005
@@ -33,8 +33,8 @@
import net.dpml.transit.Transit;
import net.dpml.transit.builder.TransitStorageUnit;
-import net.dpml.transit.management.TransitHome;
-import net.dpml.transit.management.TransitManager;
+import net.dpml.transit.home.TransitHome;
+import net.dpml.transit.model.TransitModel;
/**
* Test URL content handling.
@@ -116,7 +116,7 @@
private final static String PLUS_TEST_PART = "@PLUS-TEST-PART@";
private final static String CONTENT_MANAGER_PLUGIN =
"@CONTENT-MANAGER-PLUGIN@";
- private static TransitManager MANAGER = null;
+ private static TransitModel MODEL = null;
private static Transit TRANSIT = null;
static
@@ -129,9 +129,9 @@
Preferences prefs = Preferences.userNodeForPackage(
Transit.class ).node( "test" ).node( "urls" );
TransitHome home = new TransitStorageUnit( prefs );
home.clearBeforeInitialization( true );
- TransitManager MANAGER = home.create();
- MANAGER.getContentRegistryManager().setPluginURI( uri );
- TRANSIT = Transit.getInstance( MANAGER );
+ TransitModel MODEL = home.create();
+ MODEL.getContentRegistryModel().setPluginURI( uri );
+ TRANSIT = Transit.getInstance( MODEL );
}
catch( Throwable e )
{
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/Transit.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/Transit.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/Transit.java
Fri Jun 10 22:55:10 2005
@@ -42,8 +42,7 @@
import net.dpml.transit.model.Logger;
import net.dpml.transit.model.TransitModel;
-import net.dpml.transit.management.TransitHome;
-import net.dpml.transit.management.TransitManager;
+import net.dpml.transit.home.TransitHome;
import net.dpml.transit.manager.DefaultTransitManager;
import net.dpml.transit.adapter.LoggingAdapter;
import net.dpml.transit.builder.TransitStorageUnit;
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/builder/AbstractStorageUnit.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/builder/AbstractStorageUnit.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/builder/AbstractStorageUnit.java
Fri Jun 10 22:55:10 2005
@@ -25,9 +25,8 @@
import java.util.prefs.Preferences;
import java.util.prefs.BackingStoreException;
-import net.dpml.transit.management.Manager;
-import net.dpml.transit.management.ModificationEvent;
-import net.dpml.transit.management.ModificationListener;
+import net.dpml.transit.model.ModificationEvent;
+import net.dpml.transit.model.ModificationListener;
import net.dpml.transit.model.DisposalEvent;
import net.dpml.transit.model.DisposalListener;
import net.dpml.transit.model.Logger;
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/builder/CacheStorageUnit.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/builder/CacheStorageUnit.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/builder/CacheStorageUnit.java
Fri Jun 10 22:55:10 2005
@@ -25,14 +25,14 @@
import java.util.prefs.Preferences;
import java.util.prefs.BackingStoreException;
-import net.dpml.transit.management.CacheHome;
-import net.dpml.transit.management.CacheManager;
-import net.dpml.transit.management.ContentRegistryManager;
-import net.dpml.transit.management.LayoutManager;
-import net.dpml.transit.management.HostManager;
-import net.dpml.transit.management.ModificationEvent;
-import net.dpml.transit.management.LayoutRegistryManager;
+import net.dpml.transit.home.CacheHome;
import net.dpml.transit.manager.DefaultCacheManager;
+import net.dpml.transit.model.CacheModel;
+import net.dpml.transit.model.ContentRegistryModel;
+import net.dpml.transit.model.LayoutModel;
+import net.dpml.transit.model.HostModel;
+import net.dpml.transit.model.ModificationEvent;
+import net.dpml.transit.model.LayoutRegistryModel;
import net.dpml.transit.model.Logger;
import net.dpml.transit.model.UnknownKeyException;
import net.dpml.transit.model.DuplicateKeyException;
@@ -42,7 +42,7 @@
/**
* The LayoutRegistryHelper class provides support for the crreating of a
- * ContentRegistryManager based on a supplied preferences node.
+ * ContentRegistryModel based on a supplied preferences node.
*/
class CacheStorageUnit extends AbstractStorageUnit implements CacheHome
{
@@ -50,8 +50,8 @@
// constructor
//
------------------------------------------------------------------------
- private CacheManager m_manager;
- private LayoutRegistryManager m_registry;
+ private CacheModel m_manager;
+ private LayoutRegistryModel m_registry;
//
------------------------------------------------------------------------
// constructor
@@ -61,12 +61,12 @@
{
super( prefs, logger, creation, policy );
- m_registry = createLayoutRegistryManager();
+ m_registry = createLayoutRegistryModel();
String key = prefs.get( "layout", "classic" );
LayoutModel layout = getLayoutModel( m_registry, key );
File cache = getCacheDirectory();
- HostManager[] hosts = createHostManagers();
+ HostModel[] hosts = createHostModels();
URI uri = getURI( "uri" );
try
@@ -86,7 +86,7 @@
// CacheHome
//
------------------------------------------------------------------------
- public HostManager createHostManager( String id ) throws BuilderException
+ public HostModel createHostModel( String id ) throws BuilderException
{
if( null == m_registry )
{
@@ -98,7 +98,7 @@
Date creation = getCreationDate();
boolean policy = getStoragePolicy();
HostStorageUnit unit = new HostStorageUnit( prefs, logger, creation,
policy );
- return unit.createHostManager( m_registry );
+ return unit.createHostModel( m_registry );
}
//
------------------------------------------------------------------------
@@ -115,7 +115,7 @@
{
try
{
- CacheManager manager = (CacheManager) event.getManager();
+ CacheModel manager = (CacheModel) event.getModel();
Date date = new Date();
store( manager );
manager.setCreationDate( date );
@@ -132,12 +132,12 @@
// impl
//
------------------------------------------------------------------------
- CacheManager getCacheManager()
+ CacheModel getCacheModel()
{
return m_manager;
}
- private LayoutRegistryManager createLayoutRegistryManager()
+ private LayoutRegistryModel createLayoutRegistryModel()
{
Preferences prefs = getPreferences().node( "layout" );
Logger logger = getLogger().getChildLogger( "layout" );
@@ -148,7 +148,7 @@
{
LayoutRegistryStorageUnit unit =
new LayoutRegistryStorageUnit( prefs, logger, creation, policy
);
- return unit.getLayoutRegistryManager();
+ return unit.getLayoutRegistryModel();
}
catch( DuplicateKeyException e )
{
@@ -172,7 +172,7 @@
}
}
- private HostManager[] createHostManagers()
+ private HostModel[] createHostModels()
{
Preferences prefs = getHostsNodePreferences();
try
@@ -182,10 +182,10 @@
for( int i=0; i<names.length; i++ )
{
String name = names[i];
- HostManager host = createHostManager( name );
+ HostModel host = createHostModel( name );
list.add( host );
}
- return (HostManager[]) list.toArray( new HostManager[0] );
+ return (HostModel[]) list.toArray( new HostModel[0] );
}
catch( Exception e )
{
@@ -208,7 +208,7 @@
return new File( cache );
}
- private void store( CacheManager manager )
+ private void store( CacheModel manager )
{
Preferences prefs = getPreferences();
Logger logger = getLogger();
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/builder/ContentRegistryStorageUnit.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/builder/ContentRegistryStorageUnit.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/builder/ContentRegistryStorageUnit.java
Fri Jun 10 22:55:10 2005
@@ -23,17 +23,17 @@
import java.util.prefs.Preferences;
import java.util.prefs.BackingStoreException;
-import net.dpml.transit.management.ContentRegistryHome;
-import net.dpml.transit.management.ContentRegistryManager;
-import net.dpml.transit.management.ContentManager;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.home.ContentRegistryHome;
import net.dpml.transit.manager.DefaultContentRegistryManager;
+import net.dpml.transit.model.ContentRegistryModel;
+import net.dpml.transit.model.ContentModel;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.model.DuplicateKeyException;
import net.dpml.transit.model.Logger;
/**
* The LayoutRegistryHelper class provides support for the crreating of a
- * ContentRegistryManager based on a supplied preferences node.
+ * ContentRegistryModel based on a supplied preferences node.
*/
class ContentRegistryStorageUnit extends AbstractStorageUnit implements
ContentRegistryHome
{
@@ -50,7 +50,7 @@
// ContentRegistryHome
//
------------------------------------------------------------------------
- public ContentManager createContentManager( String id ) throws
BuilderException
+ public ContentModel createContentModel( String id ) throws
BuilderException
{
Preferences prefs = getPreferences();
Preferences p = prefs.node( id );
@@ -58,10 +58,10 @@
Date creation = getCreationDate();
boolean policy = getStoragePolicy();
ContentStorageUnit home = new ContentStorageUnit( p, logger,
creation, policy );
- return home.createContentManager();
+ return home.createContentModel();
}
- public ContentManager createContentManager( String id, String title, URI
uri )
+ public ContentModel createContentModel( String id, String title, URI uri
)
{
Preferences prefs = getPreferences();
Preferences p = prefs.node( id );
@@ -71,7 +71,7 @@
p.put( "title", title );
p.put( "uri", uri.toASCIIString() );
ContentStorageUnit home = new ContentStorageUnit( p, logger,
creation, policy );
- return home.createContentManager();
+ return home.createContentModel();
}
//
------------------------------------------------------------------------
@@ -88,7 +88,7 @@
{
try
{
- ContentRegistryManager manager = (ContentRegistryManager)
event.getManager();
+ ContentRegistryModel manager = (ContentRegistryModel)
event.getModel();
store( manager );
Date date = new Date();
manager.setCreationDate( date );
@@ -104,7 +104,7 @@
// impl
//
------------------------------------------------------------------------
- ContentRegistryManager createContentRegistryManager()
+ ContentRegistryModel createContentRegistryModel()
{
Preferences prefs = getPreferences();
Logger logger = getLogger();
@@ -118,10 +118,10 @@
for( int i=0; i<names.length; i++ )
{
String name = names[i];
- ContentManager manager = createContentManager( name );
+ ContentModel manager = createContentModel( name );
list.add( manager );
}
- ContentManager[] managers = (ContentManager[]) list.toArray( new
ContentManager[0] );
+ ContentModel[] managers = (ContentModel[]) list.toArray( new
ContentModel[0] );
URI uri = getURI( "uri" );
return new DefaultContentRegistryManager( logger, creation,
this, uri, managers );
}
@@ -133,16 +133,15 @@
}
}
- private void store( ContentRegistryManager manager )
+ private void store( ContentRegistryModel model )
throws BuilderException
{
Preferences prefs = getPreferences();
- URI uri = manager.getPluginURI();
+ URI uri = model.getPluginURI();
synchronized( prefs )
{
setURI( "uri", uri );
getLogger().warn( "TODO implementation pending!! " );
}
}
-
}
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/builder/ContentStorageUnit.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/builder/ContentStorageUnit.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/builder/ContentStorageUnit.java
Fri Jun 10 22:55:10 2005
@@ -22,11 +22,11 @@
import java.util.prefs.Preferences;
import java.util.prefs.BackingStoreException;
-import net.dpml.transit.management.ContentHome;
-import net.dpml.transit.management.ContentManager;
-import net.dpml.transit.management.ModificationEvent;
-import net.dpml.transit.management.LayoutManager;
+import net.dpml.transit.home.ContentHome;
import net.dpml.transit.manager.DefaultContentManager;
+import net.dpml.transit.model.ContentModel;
+import net.dpml.transit.model.ModificationEvent;
+import net.dpml.transit.model.LayoutModel;
import net.dpml.transit.model.DisposalEvent;
import net.dpml.transit.model.Logger;
@@ -50,7 +50,7 @@
//
------------------------------------------------------------------------
/**
- * Notify a listener of a change to the manager modification date.
+ * Notify a listener of a change to the model modification date.
* @param event the modification event
*/
public void modified( ModificationEvent event )
@@ -59,10 +59,10 @@
{
try
{
- ContentManager manager = (ContentManager) event.getManager();
- store( manager );
+ ContentModel model = (ContentModel) event.getModel();
+ store( model );
Date date = new Date();
- manager.setCreationDate( date );
+ model.setCreationDate( date );
}
catch( Throwable e )
{
@@ -76,7 +76,7 @@
//
------------------------------------------------------------------------
/**
- * Notify the listener of the disposal of a manager.
+ * Notify the listener of the disposal of a model.
*/
public void disposed( DisposalEvent event )
{
@@ -94,7 +94,7 @@
// impl
//
------------------------------------------------------------------------
- ContentManager createContentManager()
+ ContentModel createContentModel()
{
Preferences prefs = getPreferences();
Logger logger = getLogger();
@@ -105,12 +105,12 @@
return new DefaultContentManager( logger, creation, this, uri, type,
title );
}
- private void store( ContentManager manager )
+ private void store( ContentModel model )
throws BuilderException
{
Preferences prefs = getPreferences();
- URI uri = manager.getPluginURI();
- String title = manager.getTitle();
+ URI uri = model.getPluginURI();
+ String title = model.getTitle();
synchronized( prefs )
{
setURI( "uri", uri );
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/builder/HostStorageUnit.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/builder/HostStorageUnit.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/builder/HostStorageUnit.java
Fri Jun 10 22:55:10 2005
@@ -24,19 +24,19 @@
import java.util.prefs.BackingStoreException;
import java.net.PasswordAuthentication;
-import net.dpml.transit.management.HostHome;
-import net.dpml.transit.management.HostManager;
-import net.dpml.transit.management.ModificationEvent;
-import net.dpml.transit.management.Manager;
import net.dpml.transit.manager.DefaultManager.Local;
import net.dpml.transit.manager.DefaultManager.Plugin;
import net.dpml.transit.manager.DefaultHostManager;
+import net.dpml.transit.home.HostHome;
+import net.dpml.transit.model.HostModel;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.model.Logger;
import net.dpml.transit.model.LayoutModel;
import net.dpml.transit.model.LayoutRegistryModel;
import net.dpml.transit.model.Model;
import net.dpml.transit.model.UnknownKeyException;
import net.dpml.transit.model.DisposalEvent;
+import net.dpml.transit.model.Model;
/**
* The LayoutHelper class is responsible for the setup of initial factory
@@ -67,7 +67,7 @@
//
------------------------------------------------------------------------
/**
- * Notify a listener of a change to the manager modification date.
+ * Notify a listener of a change to the model modification date.
* @param event the modification event
*/
public void modified( ModificationEvent event )
@@ -76,10 +76,10 @@
{
try
{
- HostManager manager = (HostManager) event.getManager();
- store( manager );
+ HostModel model = (HostModel) event.getModel();
+ store( model );
Date date = new Date();
- manager.setCreationDate( date );
+ model.setCreationDate( date );
}
catch( Throwable e )
{
@@ -93,7 +93,7 @@
//
------------------------------------------------------------------------
/**
- * Notify the listener of the disposal of a manager.
+ * Notify the listener of the disposal of a model.
*/
public void disposed( DisposalEvent event )
{
@@ -111,7 +111,7 @@
// impl
//
------------------------------------------------------------------------
- HostManager createHostManager( LayoutRegistryModel registry )
+ HostModel createHostModel( LayoutRegistryModel registry )
{
Preferences prefs = getPreferences();
Logger logger = getLogger();
@@ -234,18 +234,18 @@
}
}
- private void store( HostManager manager )
+ private void store( HostModel model )
throws BuilderException
{
Preferences prefs = getPreferences();
synchronized( prefs )
{
- URL base = manager.getBaseURL();
- URL index = manager.getIndexURL();
- boolean trusted = manager.getTrusted();
- boolean enabled = manager.getEnabled();
- LayoutModel layout = manager.getLayoutModel();
- PasswordAuthentication auth = manager.getAuthentication();
+ URL base = model.getBaseURL();
+ URL index = model.getIndexURL();
+ boolean trusted = model.getTrusted();
+ boolean enabled = model.getEnabled();
+ LayoutModel layout = model.getLayoutModel();
+ PasswordAuthentication auth = model.getAuthentication();
setURL( "base", base );
setURL( "index", index );
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/builder/LayoutRegistryStorageUnit.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/builder/LayoutRegistryStorageUnit.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/builder/LayoutRegistryStorageUnit.java
Fri Jun 10 22:55:10 2005
@@ -24,15 +24,14 @@
import java.util.prefs.BackingStoreException;
import java.util.Date;
+import net.dpml.transit.home.LayoutHome;
+import net.dpml.transit.home.LayoutRegistryHome;
+import net.dpml.transit.manager.DefaultLayoutRegistryManager;
import net.dpml.transit.model.Logger;
+import net.dpml.transit.model.LayoutModel;
+import net.dpml.transit.model.LayoutRegistryModel;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.model.DuplicateKeyException;
-import net.dpml.transit.manager.DefaultLayoutRegistryManager;
-import net.dpml.transit.management.LayoutRegistryHome;
-import net.dpml.transit.management.LayoutRegistryManager;
-import net.dpml.transit.management.LayoutRegistryHome;
-import net.dpml.transit.management.LayoutHome;
-import net.dpml.transit.management.LayoutManager;
-import net.dpml.transit.management.ModificationEvent;
/**
* The LayoutHelper class is responsible for the setup of initial factory
@@ -44,7 +43,7 @@
// state
//
------------------------------------------------------------------------
- private final LayoutRegistryManager m_manager;
+ private final LayoutRegistryModel m_manager;
//
------------------------------------------------------------------------
// constructor
@@ -56,7 +55,7 @@
super( prefs, logger, creation, policy );
URI uri = getURI( "uri" );
- LayoutManager[] layouts = createLayoutManagers();
+ LayoutModel[] layouts = createLayoutModels();
m_manager = new DefaultLayoutRegistryManager( logger, creation,
this, uri, layouts );
}
@@ -64,7 +63,7 @@
// LayoutRegistryHome
//
------------------------------------------------------------------------
- public LayoutManager createLayoutManager( String id ) throws
BuilderException
+ public LayoutModel createLayoutModel( String id ) throws BuilderException
{
Preferences prefs = getPreferences();
Preferences p = prefs.node( id );
@@ -72,7 +71,7 @@
Date creation = getCreationDate();
boolean policy = getStoragePolicy();
LayoutStorageUnit unit = new LayoutStorageUnit( p, logger, creation,
policy );
- return unit.createLayoutManager();
+ return unit.createLayoutModel();
}
//
------------------------------------------------------------------------
@@ -89,7 +88,7 @@
{
try
{
- LayoutRegistryManager manager = (LayoutRegistryManager)
event.getManager();
+ LayoutRegistryModel manager = (LayoutRegistryModel)
event.getModel();
store( manager );
Date date = new Date();
manager.setCreationDate( date );
@@ -105,12 +104,12 @@
// impl
//
------------------------------------------------------------------------
- LayoutRegistryManager getLayoutRegistryManager()
+ LayoutRegistryModel getLayoutRegistryModel()
{
return m_manager;
}
- private LayoutManager[] createLayoutManagers()
+ private LayoutModel[] createLayoutModels()
{
Preferences prefs = getPreferences();
try
@@ -120,10 +119,10 @@
for( int i=0; i<names.length; i++ )
{
String name = names[i];
- LayoutManager layout = createLayoutManager( name );
+ LayoutModel layout = createLayoutModel( name );
list.add( layout );
}
- return (LayoutManager[]) list.toArray( new LayoutManager[0] );
+ return (LayoutModel[]) list.toArray( new LayoutModel[0] );
}
catch( Exception e )
{
@@ -133,7 +132,7 @@
}
}
- private void store( LayoutRegistryManager manager )
+ private void store( LayoutRegistryModel manager )
throws BuilderException
{
Preferences prefs = getPreferences();
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/builder/LayoutStorageUnit.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/builder/LayoutStorageUnit.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/builder/LayoutStorageUnit.java
Fri Jun 10 22:55:10 2005
@@ -22,12 +22,12 @@
import java.util.prefs.Preferences;
import java.util.prefs.BackingStoreException;
+import net.dpml.transit.home.LayoutHome;
import net.dpml.transit.manager.DefaultManager.Plugin;
import net.dpml.transit.manager.DefaultManager.Local;
import net.dpml.transit.manager.DefaultLayoutManager;
-import net.dpml.transit.management.LayoutManager;
-import net.dpml.transit.management.LayoutHome;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.model.LayoutModel;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.model.DisposalEvent;
import net.dpml.transit.model.LayoutModel;
import net.dpml.transit.model.Logger;
@@ -61,7 +61,7 @@
{
try
{
- LayoutManager manager = (LayoutManager) event.getManager();
+ LayoutModel manager = (LayoutModel) event.getModel();
store( manager );
Date date = new Date();
manager.setCreationDate( date );
@@ -100,7 +100,7 @@
// impl
//
------------------------------------------------------------------------
- LayoutManager createLayoutManager()
+ LayoutModel createLayoutModel()
throws BuilderException
{
Preferences prefs = getPreferences();
@@ -131,7 +131,7 @@
}
}
- private void store( LayoutManager manager )
+ private void store( LayoutModel manager )
throws BuilderException
{
Preferences prefs = getPreferences();
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/builder/ProxyStorageUnit.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/builder/ProxyStorageUnit.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/builder/ProxyStorageUnit.java
Fri Jun 10 22:55:10 2005
@@ -23,12 +23,12 @@
import java.util.prefs.BackingStoreException;
import java.util.Date;
-import net.dpml.transit.management.ProxyManager;
-import net.dpml.transit.management.ProxyHome;
-import net.dpml.transit.management.ModificationListener;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.home.ProxyHome;
import net.dpml.transit.manager.DefaultProxyManager;
import net.dpml.transit.model.Logger;
+import net.dpml.transit.model.ProxyModel;
+import net.dpml.transit.model.ModificationListener;
+import net.dpml.transit.model.ModificationEvent;
/**
* The LayoutHelper class is responsible for the setup of initial factory
@@ -59,7 +59,7 @@
{
try
{
- ProxyManager manager = (ProxyManager) event.getManager();
+ ProxyModel manager = (ProxyModel) event.getModel();
Date date = new Date();
store( manager );
manager.setCreationDate( date );
@@ -76,7 +76,7 @@
// impl
//
------------------------------------------------------------------------
- ProxyManager createProxyManager()
+ ProxyModel createProxyModel()
throws BuilderException
{
Preferences prefs = getPreferences();
@@ -119,7 +119,7 @@
}
}
- private void store( ProxyManager manager )
+ private void store( ProxyModel manager )
{
Preferences prefs = getPreferences();
URL url = manager.getHost();
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/builder/RepositoryStorageUnit.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/builder/RepositoryStorageUnit.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/builder/RepositoryStorageUnit.java
Fri Jun 10 22:55:10 2005
@@ -23,10 +23,10 @@
import java.util.prefs.BackingStoreException;
import java.util.Date;
-import net.dpml.transit.management.RepositoryHome;
-import net.dpml.transit.management.RepositoryManager;
-import net.dpml.transit.management.ModificationListener;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.home.RepositoryHome;
+import net.dpml.transit.model.RepositoryModel;
+import net.dpml.transit.model.ModificationListener;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.manager.DefaultRepositoryManager;
import net.dpml.transit.model.Logger;
@@ -59,7 +59,7 @@
{
try
{
- RepositoryManager manager = (RepositoryManager)
event.getManager();
+ RepositoryModel manager = (RepositoryModel) event.getModel();
Date date = new Date();
store( manager );
manager.setCreationDate( date );
@@ -76,7 +76,7 @@
// impl
//
------------------------------------------------------------------------
- RepositoryManager createRepositoryManager()
+ RepositoryModel createRepositoryModel()
throws BuilderException
{
Preferences prefs = getPreferences();
@@ -86,7 +86,7 @@
return new DefaultRepositoryManager( logger, creation, this, uri );
}
- public void store( RepositoryManager manager )
+ public void store( RepositoryModel manager )
throws BuilderException
{
Preferences prefs = getPreferences();
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/builder/TransitStorageUnit.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/builder/TransitStorageUnit.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/builder/TransitStorageUnit.java
Fri Jun 10 22:55:10 2005
@@ -27,25 +27,24 @@
import net.dpml.transit.model.Logger;
import net.dpml.transit.adapter.LoggingAdapter;
-import net.dpml.transit.management.CacheManager;
-import net.dpml.transit.management.ContentRegistryManager;
-import net.dpml.transit.management.LayoutRegistryManager;
-import net.dpml.transit.management.ProxyManager;
-import net.dpml.transit.management.RepositoryManager;
-import net.dpml.transit.management.TransitManager;
-import net.dpml.transit.management.ModificationListener;
-import net.dpml.transit.management.ModificationEvent;
-import net.dpml.transit.management.TransitHome;
+import net.dpml.transit.home.TransitHome;
+import net.dpml.transit.model.ModificationListener;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.model.VetoDisposalException;
import net.dpml.transit.model.DisposalListener;
import net.dpml.transit.model.DisposalEvent;
+import net.dpml.transit.model.CacheModel;
+import net.dpml.transit.model.ContentRegistryModel;
+import net.dpml.transit.model.LayoutRegistryModel;
+import net.dpml.transit.model.ProxyModel;
+import net.dpml.transit.model.RepositoryModel;
+import net.dpml.transit.model.TransitModel;
import net.dpml.transit.manager.DefaultTransitManager;
/**
- * The LayoutRegistryHelper class provides support for the crreating of a
- * ContentRegistryManager based on a supplied preferences node.
+ *
*/
public class TransitStorageUnit implements TransitHome
{
@@ -165,7 +164,7 @@
m_profile = profile;
}
- public TransitManager create()
+ public TransitModel create()
throws BuilderException
{
Date creation = new Date();
@@ -214,10 +213,10 @@
}
init( creation );
- ProxyManager proxy = m_proxyUnit.createProxyManager();
- RepositoryManager repository =
m_repositoryUnit.createRepositoryManager();
- CacheManager cache = m_cacheUnit.getCacheManager();
- ContentRegistryManager content =
m_contentUnit.createContentRegistryManager();
+ ProxyModel proxy = m_proxyUnit.createProxyModel();
+ RepositoryModel repository =
m_repositoryUnit.createRepositoryModel();
+ CacheModel cache = m_cacheUnit.getCacheModel();
+ ContentRegistryModel content =
m_contentUnit.createContentRegistryModel();
try
{
Copied:
development/main/transit/core/handler/src/main/net/dpml/transit/home/CacheHome.java
(from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/CacheHome.java)
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/management/CacheHome.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/home/CacheHome.java
Fri Jun 10 22:55:10 2005
@@ -16,7 +16,9 @@
* limitations under the License.
*/
-package net.dpml.transit.management;
+package net.dpml.transit.home;
+
+import net.dpml.transit.model.HostModel;
/**
* The ProxyManager is an interface implemented by proxy managers.
@@ -25,5 +27,5 @@
*/
public interface CacheHome extends PluginHome
{
- HostManager createHostManager( String id );
+ HostModel createHostModel( String id );
}
Copied:
development/main/transit/core/handler/src/main/net/dpml/transit/home/ContentHome.java
(from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/ContentHome.java)
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/management/ContentHome.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/home/ContentHome.java
Fri Jun 10 22:55:10 2005
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package net.dpml.transit.management;
+package net.dpml.transit.home;
/**
* The ProxyManager is an interface implemented by proxy managers.
Copied:
development/main/transit/core/handler/src/main/net/dpml/transit/home/ContentRegistryHome.java
(from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/ContentRegistryHome.java)
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/management/ContentRegistryHome.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/home/ContentRegistryHome.java
Fri Jun 10 22:55:10 2005
@@ -16,7 +16,9 @@
* limitations under the License.
*/
-package net.dpml.transit.management;
+package net.dpml.transit.home;
+
+import net.dpml.transit.model.ContentModel;
import java.net.URI;
@@ -27,7 +29,7 @@
*/
public interface ContentRegistryHome extends PluginHome
{
- ContentManager createContentManager( String type );
+ ContentModel createContentModel( String type );
- ContentManager createContentManager( String type, String title, URI uri
);
+ ContentModel createContentModel( String type, String title, URI uri );
}
Copied:
development/main/transit/core/handler/src/main/net/dpml/transit/home/Home.java
(from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/Home.java)
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/management/Home.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/home/Home.java
Fri Jun 10 22:55:10 2005
@@ -16,9 +16,10 @@
* limitations under the License.
*/
-package net.dpml.transit.management;
+package net.dpml.transit.home;
import net.dpml.transit.model.DisposalListener;
+import net.dpml.transit.model.ModificationListener;
/**
* The ProxyManager is an interface implemented by proxy managers.
Copied:
development/main/transit/core/handler/src/main/net/dpml/transit/home/HostHome.java
(from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/HostHome.java)
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/management/HostHome.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/home/HostHome.java
Fri Jun 10 22:55:10 2005
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package net.dpml.transit.management;
+package net.dpml.transit.home;
/**
* The ProxyManager is an interface implemented by proxy managers.
Copied:
development/main/transit/core/handler/src/main/net/dpml/transit/home/LayoutHome.java
(from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/LayoutHome.java)
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/management/LayoutHome.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/home/LayoutHome.java
Fri Jun 10 22:55:10 2005
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package net.dpml.transit.management;
+package net.dpml.transit.home;
/**
* The ProxyManager is an interface implemented by proxy managers.
Copied:
development/main/transit/core/handler/src/main/net/dpml/transit/home/LayoutRegistryHome.java
(from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/LayoutRegistryHome.java)
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/management/LayoutRegistryHome.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/home/LayoutRegistryHome.java
Fri Jun 10 22:55:10 2005
@@ -16,7 +16,9 @@
* limitations under the License.
*/
-package net.dpml.transit.management;
+package net.dpml.transit.home;
+
+import net.dpml.transit.model.LayoutModel;
/**
* The ProxyManager is an interface implemented by proxy managers.
@@ -25,5 +27,5 @@
*/
public interface LayoutRegistryHome extends PluginHome
{
- LayoutManager createLayoutManager( String id );
+ LayoutModel createLayoutModel( String id );
}
Copied:
development/main/transit/core/handler/src/main/net/dpml/transit/home/PluginHome.java
(from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/PluginHome.java)
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/management/PluginHome.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/home/PluginHome.java
Fri Jun 10 22:55:10 2005
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package net.dpml.transit.management;
+package net.dpml.transit.home;
/**
* The ProxyManager is an interface implemented by proxy managers.
Copied:
development/main/transit/core/handler/src/main/net/dpml/transit/home/ProxyHome.java
(from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/ProxyHome.java)
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/management/ProxyHome.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/home/ProxyHome.java
Fri Jun 10 22:55:10 2005
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package net.dpml.transit.management;
+package net.dpml.transit.home;
/**
* The ProxyManager is an interface implemented by proxy managers.
Copied:
development/main/transit/core/handler/src/main/net/dpml/transit/home/RepositoryHome.java
(from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/RepositoryHome.java)
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/management/RepositoryHome.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/home/RepositoryHome.java
Fri Jun 10 22:55:10 2005
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package net.dpml.transit.management;
+package net.dpml.transit.home;
/**
* The ProxyManager is an interface implemented by proxy managers.
Copied:
development/main/transit/core/handler/src/main/net/dpml/transit/home/TransitHome.java
(from r2821,
development/main/transit/core/handler/src/main/net/dpml/transit/management/TransitHome.java)
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/management/TransitHome.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/home/TransitHome.java
Fri Jun 10 22:55:10 2005
@@ -16,12 +16,14 @@
* limitations under the License.
*/
-package net.dpml.transit.management;
+package net.dpml.transit.home;
+
import java.net.URL;
import java.util.prefs.Preferences;
import net.dpml.transit.model.Logger;
+import net.dpml.transit.model.TransitModel;
/**
* The Home defines the persistent storage home for transit management
configurations.
@@ -42,6 +44,6 @@
void clearBeforeInitialization( boolean policy );
- TransitManager create();
+ TransitModel create();
}
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultCacheManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultCacheManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultCacheManager.java
Fri Jun 10 22:55:10 2005
@@ -43,6 +43,7 @@
import net.dpml.transit.Transit;
import net.dpml.transit.TransitError;
+import net.dpml.transit.home.CacheHome;
import net.dpml.transit.model.CacheModel;
import net.dpml.transit.model.LayoutModel;
import net.dpml.transit.model.HostModel;
@@ -60,17 +61,12 @@
import net.dpml.transit.model.Logger;
import net.dpml.transit.model.UnknownKeyException;
import net.dpml.transit.model.DuplicateKeyException;
-
import net.dpml.transit.model.LayoutRegistryModel;
import net.dpml.transit.model.DisposalListener;
import net.dpml.transit.model.DisposalEvent;
import net.dpml.transit.model.VetoDisposalException;
-import net.dpml.transit.management.CacheHome;
-import net.dpml.transit.management.CacheManager;
-import net.dpml.transit.management.LayoutManager;
-import net.dpml.transit.management.LayoutRegistryManager;
-import net.dpml.transit.management.HostManager;
-import net.dpml.transit.management.ModelReferenceException;
+import net.dpml.transit.model.LayoutRegistryModel;
+import net.dpml.transit.model.ModelReferenceException;
import net.dpml.transit.util.PropertyResolver;
@@ -82,7 +78,7 @@
* @version $Id: StandardTransitDirector.java 2480 2005-05-10 04:44:32Z
mcconnell AT dpml.net $
*/
public class DefaultCacheManager extends DefaultPluginManager
- implements CacheManager, DisposalListener
+ implements CacheModel, DisposalListener
{
//
------------------------------------------------------------------------
// state
@@ -96,7 +92,7 @@
private LayoutModel m_layout;
- private LayoutRegistryManager m_registry;
+ private LayoutRegistryModel m_registry;
//
------------------------------------------------------------------------
// constructor
@@ -104,7 +100,7 @@
public DefaultCacheManager(
Logger logger, Date creation, CacheHome home,
- URI uri, File cache, HostManager[] hosts, LayoutModel layout,
LayoutRegistryManager registry )
+ URI uri, File cache, HostModel[] hosts, LayoutModel layout,
LayoutRegistryModel registry )
throws DuplicateKeyException
{
super( logger, creation, home, uri );
@@ -123,8 +119,8 @@
m_layout.addDisposalListener( this );
for( int i=0; i<hosts.length; i++ )
{
- HostManager host = hosts[i];
- addHostManager( host, false );
+ HostModel host = hosts[i];
+ addHostModel( host, false );
}
}
@@ -152,7 +148,7 @@
}
//
------------------------------------------------------------------------
- // CacheManager
+ // CacheModel
//
------------------------------------------------------------------------
/**
@@ -212,7 +208,7 @@
}
}
- public LayoutRegistryManager getLayoutRegistryManager()
+ public LayoutRegistryModel getLayoutRegistryModel()
{
return m_registry;
}
@@ -222,22 +218,22 @@
*
* @return the host manager array
*/
- public HostManager[] getHostManagers()
+ public HostModel[] getHostModels()
{
synchronized( m_lock )
{
- return (HostManager[]) m_list.toArray( new HostManager[0] );
+ return (HostModel[]) m_list.toArray( new HostModel[0] );
}
}
- public HostManager getHostManager( String id ) throws UnknownKeyException
+ public HostModel getHostModel( String id ) throws UnknownKeyException
{
synchronized( m_lock )
{
- HostManager[] managers = getHostManagers();
+ HostModel[] managers = getHostModels();
for( int i=0; i<managers.length; i++ )
{
- HostManager manager = managers[i];
+ HostModel manager = managers[i];
if( id.equals( manager.getID() ) )
{
return manager;
@@ -247,25 +243,25 @@
}
}
- public void addHostManager( String id ) throws DuplicateKeyException
+ public void addHostModel( String id ) throws DuplicateKeyException
{
- HostManager manager = m_home.createHostManager( id );
- addHostManager( manager );
+ HostModel manager = m_home.createHostModel( id );
+ addHostModel( manager );
}
- public void addHostManager( HostManager manager ) throws
DuplicateKeyException
+ public void addHostModel( HostModel manager ) throws
DuplicateKeyException
{
- addHostManager( manager, true );
+ addHostModel( manager, true );
}
- public void addHostManager( HostManager manager, boolean notify ) throws
DuplicateKeyException
+ public void addHostModel( HostModel manager, boolean notify ) throws
DuplicateKeyException
{
synchronized( m_lock )
{
String id = manager.getID();
try
{
- HostManager m = getHostManager( id );
+ HostModel m = getHostModel( id );
throw new DuplicateKeyException( id );
}
catch( UnknownKeyException e )
@@ -281,7 +277,7 @@
}
}
- public void removeHostManager( HostManager manager )
+ public void removeHostModel( HostModel manager )
{
synchronized( m_lock )
{
@@ -292,10 +288,6 @@
}
}
- //
------------------------------------------------------------------------
- // CacheModel
- //
------------------------------------------------------------------------
-
/**
* Return the directory to be used by the cache handler as the cache
directory.
* @return the cache directory.
@@ -306,20 +298,6 @@
}
/**
- * Return an array of hosts currently assigned to the cache.
- * @return the host model array
- */
- public HostModel[] getHostModels()
- {
- return getHostManagers();
- }
-
- public LayoutRegistryModel getLayoutRegistryModel()
- {
- return getLayoutRegistryManager();
- }
-
- /**
* Add a cache change listener.
* @param listener the listener to add
*/
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultContentManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultContentManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultContentManager.java
Fri Jun 10 22:55:10 2005
@@ -23,24 +23,22 @@
import java.util.EventListener;
import java.util.Date;
+import net.dpml.transit.home.ContentHome;
import net.dpml.transit.model.ContentModel;
import net.dpml.transit.model.PluginModel;
import net.dpml.transit.model.PluginChangeEvent;
import net.dpml.transit.model.ContentEvent;
import net.dpml.transit.model.ContentListener;
+import net.dpml.transit.model.ModificationListener;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.ContentHome;
-import net.dpml.transit.management.ContentManager;
-import net.dpml.transit.management.ModificationListener;
-
/**
* Default implementation of a content manager that maintains an active
* configuration model of a pluggable content handler.
*
* @author <a href="http://www.dpml.net">The Digital Product Meta Library</a>
*/
-public class DefaultContentManager extends DefaultPluginManager implements
ContentManager
+public class DefaultContentManager extends DefaultPluginManager implements
ContentModel
{
//----------------------------------------------------------------------
// state
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultContentRegistryManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultContentRegistryManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultContentRegistryManager.java
Fri Jun 10 22:55:10 2005
@@ -38,12 +38,12 @@
import net.dpml.transit.model.DuplicateKeyException;
import net.dpml.transit.model.UnknownKeyException;
-import net.dpml.transit.management.ContentRegistryHome;
-import net.dpml.transit.management.ContentRegistryManager;
-import net.dpml.transit.management.ContentManager;
-import net.dpml.transit.management.ModelReferenceException;
-import net.dpml.transit.management.ModificationListener;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.home.ContentRegistryHome;
+import net.dpml.transit.model.ContentRegistryModel;
+import net.dpml.transit.model.ContentModel;
+import net.dpml.transit.model.ModelReferenceException;
+import net.dpml.transit.model.ModificationListener;
+import net.dpml.transit.model.ModificationEvent;
/**
* Default implementation of a content handler registry manager that
maitains
@@ -53,7 +53,7 @@
* @version $Id: StandardTransitDirector.java 2480 2005-05-10 04:44:32Z
mcconnell AT dpml.net $
*/
public class DefaultContentRegistryManager extends DefaultPluginManager
- implements ContentRegistryManager, ModificationListener
+ implements ContentRegistryModel, ModificationListener
{
//
------------------------------------------------------------------------
// state
@@ -69,14 +69,14 @@
public DefaultContentRegistryManager(
Logger logger, Date creation, ContentRegistryHome home,
- URI uri, ContentManager[] managers ) throws DuplicateKeyException
+ URI uri, ContentModel[] managers ) throws DuplicateKeyException
{
super( logger, creation, home, uri );
m_home = home;
for( int i=0; i<managers.length; i++ )
{
- ContentManager manager = managers[i];
- addContentManager( manager, false );
+ ContentModel manager = managers[i];
+ addContentModel( manager, false );
}
}
@@ -95,29 +95,29 @@
}
//
------------------------------------------------------------------------
- // ContentRegistryManager
+ // ContentRegistryModel
//
------------------------------------------------------------------------
/**
* Return an array of content managers currently assigned to the registry.
* @return the content manager array
*/
- public ContentManager[] getContentManagers()
+ public ContentModel[] getContentModels()
{
synchronized( m_lock )
{
- return (ContentManager[]) m_list.toArray( new ContentManager[0]
);
+ return (ContentModel[]) m_list.toArray( new ContentModel[0] );
}
}
- public ContentManager getContentManager( String type ) throws
UnknownKeyException
+ public ContentModel getContentModel( String type ) throws
UnknownKeyException
{
synchronized( m_lock )
{
- ContentManager[] managers = getContentManagers();
+ ContentModel[] managers = getContentModels();
for( int i=0; i<managers.length; i++ )
{
- ContentManager manager = managers[i];
+ ContentModel manager = managers[i];
if( type.equals( manager.getContentType() ) )
{
return manager;
@@ -127,31 +127,31 @@
}
}
- public void addContentManager( String type ) throws DuplicateKeyException
+ public void addContentModel( String type ) throws DuplicateKeyException
{
- ContentManager manager = m_home.createContentManager( type );
- addContentManager( manager );
+ ContentModel manager = m_home.createContentModel( type );
+ addContentModel( manager );
}
- public void addContentManager( String type, String title, URI uri )
throws DuplicateKeyException
+ public void addContentModel( String type, String title, URI uri ) throws
DuplicateKeyException
{
- ContentManager manager = m_home.createContentManager( type, title,
uri );
- addContentManager( manager );
+ ContentModel manager = m_home.createContentModel( type, title, uri );
+ addContentModel( manager );
}
- public void addContentManager( ContentManager manager ) throws
DuplicateKeyException
+ public void addContentModel( ContentModel manager ) throws
DuplicateKeyException
{
- addContentManager( manager, true );
+ addContentModel( manager, true );
}
- private void addContentManager( ContentManager manager, boolean notify )
throws DuplicateKeyException
+ private void addContentModel( ContentModel manager, boolean notify )
throws DuplicateKeyException
{
synchronized( m_lock )
{
String id = manager.getContentType();
try
{
- ContentManager m = getContentManager( id );
+ ContentModel m = getContentModel( id );
throw new DuplicateKeyException( id );
}
catch( UnknownKeyException e )
@@ -168,7 +168,7 @@
}
}
- public void removeContentManager( ContentManager manager )
+ public void removeContentModel( ContentModel manager )
{
synchronized( m_lock )
{
@@ -180,24 +180,6 @@
}
}
- //
------------------------------------------------------------------------
- // ContentRegistryModel
- //
------------------------------------------------------------------------
-
- public ContentModel getContentModel( String type ) throws
UnknownKeyException
- {
- return getContentManager( type );
- }
-
- /**
- * Return an array of content models currently assigned to the registry.
- * @return the content model array
- */
- public ContentModel[] getContentModels()
- {
- return (ContentModel[]) m_list.toArray( new ContentModel[0] );
- }
-
/**
* Add a regstry change listener.
* @param listener the registry change listener to add
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultHostManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultHostManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultHostManager.java
Fri Jun 10 22:55:10 2005
@@ -30,6 +30,7 @@
import java.net.UnknownHostException;
import java.net.PasswordAuthentication;
+import net.dpml.transit.home.HostHome;
import net.dpml.transit.model.UnknownKeyException;
import net.dpml.transit.model.DuplicateKeyException;
import net.dpml.transit.model.HostChangeEvent;
@@ -45,10 +46,7 @@
import net.dpml.transit.model.ModelException;
import net.dpml.transit.model.PluginModel;
import net.dpml.transit.model.PluginChangeEvent;
-
-import net.dpml.transit.management.HostHome;
-import net.dpml.transit.management.HostManager;
-import net.dpml.transit.management.BootstrapException;
+import net.dpml.transit.model.BootstrapException;
import net.dpml.transit.model.DisposalEvent;
import net.dpml.transit.model.DisposalListener;
import net.dpml.transit.model.VetoDisposalException;
@@ -65,7 +63,7 @@
* @author <a href="http://www.dpml.net">The Digital Product Meta Library</a>
*/
public class DefaultHostManager extends DefaultPluginManager
- implements HostManager, DisposalListener
+ implements HostModel, DisposalListener
{
private final String m_id;
@@ -149,7 +147,7 @@
}
//----------------------------------------------------------------------
- // HostManager
+ // HostModel
//----------------------------------------------------------------------
public void update(
@@ -234,23 +232,19 @@
{
return -1;
}
- else if( false == other instanceof HostManager )
+ else if( false == other instanceof HostModel )
{
return -1;
}
else
{
- HostManager host = (HostManager) other;
+ HostModel host = (HostModel) other;
Integer i = new Integer( getPriority() );
Integer j = new Integer( host.getPriority() );
return i.compareTo( j );
}
}
- //----------------------------------------------------------------------
- // HostModel
- //----------------------------------------------------------------------
-
/**
* Return an immutable host identifier. The host identifier shall be
* guranteed to be unique and constant for the life of the model.
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultLayoutManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultLayoutManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultLayoutManager.java
Fri Jun 10 22:55:10 2005
@@ -23,18 +23,15 @@
import java.util.EventListener;
import java.util.Date;
+import net.dpml.transit.home.LayoutHome;
import net.dpml.transit.model.LayoutModel;
import net.dpml.transit.model.PluginModel;
import net.dpml.transit.model.PluginChangeEvent;
import net.dpml.transit.model.LayoutEvent;
import net.dpml.transit.model.LayoutListener;
import net.dpml.transit.model.Logger;
-
-import net.dpml.transit.management.LayoutHome;
-import net.dpml.transit.management.LayoutManager;
-import net.dpml.transit.management.ModificationListener;
-import net.dpml.transit.management.ModificationEvent;
-import net.dpml.transit.management.LayoutHome;
+import net.dpml.transit.model.ModificationListener;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.manager.DefaultManager.Strategy;
import net.dpml.transit.manager.DefaultManager.Plugin;
import net.dpml.transit.manager.DefaultManager.Local;
@@ -46,7 +43,7 @@
* @author <a href="http://www.dpml.net">The Digital Product Meta Library</a>
* @version $Id: HostManager.java 2480 2005-05-10 04:44:32Z
mcconnell AT dpml.net $
*/
-public class DefaultLayoutManager extends DefaultPluginManager implements
LayoutManager
+public class DefaultLayoutManager extends DefaultPluginManager implements
LayoutModel
{
//----------------------------------------------------------------------
// state
@@ -87,7 +84,7 @@
}
//----------------------------------------------------------------------
- // LayoutManager
+ // LayoutModel
//----------------------------------------------------------------------
public void setTitle( String title )
@@ -101,10 +98,6 @@
}
}
- //----------------------------------------------------------------------
- // LayoutModel
- //----------------------------------------------------------------------
-
/**
* Return the immutable resolver identifier.
* @return the resolver identifier
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultLayoutRegistryManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultLayoutRegistryManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultLayoutRegistryManager.java
Fri Jun 10 22:55:10 2005
@@ -31,6 +31,7 @@
import java.util.prefs.BackingStoreException;
import java.net.URI;
+import net.dpml.transit.home.LayoutRegistryHome;
import net.dpml.transit.model.UnknownKeyException;
import net.dpml.transit.model.DuplicateKeyException;
import net.dpml.transit.model.LayoutRegistryModel;
@@ -41,13 +42,9 @@
import net.dpml.transit.model.PluginListener;
import net.dpml.transit.model.ModelException;
import net.dpml.transit.model.Logger;
-
-import net.dpml.transit.management.LayoutManager;
-import net.dpml.transit.management.LayoutRegistryHome;
-import net.dpml.transit.management.LayoutRegistryManager;
-import net.dpml.transit.management.ModelReferenceException;
-import net.dpml.transit.management.ModificationListener;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.model.ModelReferenceException;
+import net.dpml.transit.model.ModificationListener;
+import net.dpml.transit.model.ModificationEvent;
import net.dpml.transit.model.VetoDisposalException;
/**
@@ -58,7 +55,7 @@
* @version $Id: StandardTransitDirector.java 2480 2005-05-10 04:44:32Z
mcconnell AT dpml.net $
*/
public class DefaultLayoutRegistryManager extends DefaultPluginManager
- implements LayoutRegistryManager
+ implements LayoutRegistryModel
{
//
------------------------------------------------------------------------
// state
@@ -73,7 +70,7 @@
//
------------------------------------------------------------------------
public DefaultLayoutRegistryManager(
- Logger logger, Date creation, LayoutRegistryHome home, URI uri,
LayoutManager[] managers )
+ Logger logger, Date creation, LayoutRegistryHome home, URI uri,
LayoutModel[] managers )
throws DuplicateKeyException
{
super( logger, creation, home, uri );
@@ -81,8 +78,8 @@
m_home = home;
for( int i=0; i<managers.length; i++ )
{
- LayoutManager manager = managers[i];
- addLayoutManager( manager, false );
+ LayoutModel manager = managers[i];
+ addLayoutModel( manager, false );
}
}
@@ -90,20 +87,6 @@
// LayoutRegistryModel
//
------------------------------------------------------------------------
- public LayoutModel getLayoutModel( String id ) throws UnknownKeyException
- {
- return getLayoutManager( id );
- }
-
- /**
- * Return an array of content models currently assigned to the registry.
- * @return the content model array
- */
- public LayoutModel[] getLayoutModels()
- {
- return getLayoutManagers();
- }
-
/**
* Add a regstry change listener.
* @param listener the registry change listener to add
@@ -122,29 +105,25 @@
super.removeListener( listener );
}
- //
------------------------------------------------------------------------
- // LayoutRegistryManager
- //
------------------------------------------------------------------------
-
- public void addLayoutManager( String id ) throws DuplicateKeyException
+ public void addLayoutModel( String id ) throws DuplicateKeyException
{
- LayoutManager manager = m_home.createLayoutManager( id );
- addLayoutManager( manager );
+ LayoutModel manager = m_home.createLayoutModel( id );
+ addLayoutModel( manager );
}
- public void addLayoutManager( LayoutManager manager ) throws
DuplicateKeyException
+ public void addLayoutModel( LayoutModel manager ) throws
DuplicateKeyException
{
- addLayoutManager( manager, true );
+ addLayoutModel( manager, true );
}
- private void addLayoutManager( LayoutManager manager, boolean notify )
throws DuplicateKeyException
+ private void addLayoutModel( LayoutModel manager, boolean notify )
throws DuplicateKeyException
{
synchronized( m_lock )
{
String id = manager.getID();
try
{
- LayoutManager m = getLayoutManager( id );
+ LayoutModel m = getLayoutModel( id );
throw new DuplicateKeyException( id );
}
catch( UnknownKeyException e )
@@ -164,15 +143,15 @@
* Return an array of content managers currently assigned to the registry.
* @return the content manager array
*/
- public LayoutManager[] getLayoutManagers()
+ public LayoutModel[] getLayoutModels()
{
synchronized( m_lock )
{
- return (LayoutManager[]) m_list.toArray( new LayoutManager[0] );
+ return (LayoutModel[]) m_list.toArray( new LayoutModel[0] );
}
}
- public LayoutManager getLayoutManager( String id ) throws
UnknownKeyException
+ public LayoutModel getLayoutModel( String id ) throws UnknownKeyException
{
synchronized( m_lock )
{
@@ -180,10 +159,10 @@
{
throw new NullPointerException( "id" );
}
- LayoutManager[] managers = getLayoutManagers();
+ LayoutModel[] managers = getLayoutModels();
for( int i=0; i<managers.length; i++ )
{
- LayoutManager manager = managers[i];
+ LayoutModel manager = managers[i];
if( id.equals( manager.getID() ) )
{
return manager;
@@ -193,7 +172,7 @@
}
}
- public void removeLayoutManager( LayoutManager manager ) throws
ModelReferenceException
+ public void removeLayoutModel( LayoutModel manager ) throws
ModelReferenceException
{
synchronized( m_lock )
{
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultManager.java
Fri Jun 10 22:55:10 2005
@@ -27,10 +27,10 @@
import java.util.Map;
import java.util.WeakHashMap;
-import net.dpml.transit.management.Home;
-import net.dpml.transit.management.Manager;
-import net.dpml.transit.management.ModificationEvent;
-import net.dpml.transit.management.ModificationListener;
+import net.dpml.transit.home.Home;
+import net.dpml.transit.model.Model;
+import net.dpml.transit.model.ModificationEvent;
+import net.dpml.transit.model.ModificationListener;
import net.dpml.transit.model.Logger;
import net.dpml.transit.model.Model;
import net.dpml.transit.model.DisposalEvent;
@@ -41,7 +41,7 @@
* A abstract base class that established an event queue and handles event
dispatch
* operations for listeners declared in a class extending this base class.
*/
-public abstract class DefaultManager implements Manager, Model
+public abstract class DefaultManager implements Model
{
//
------------------------------------------------------------------------
// state
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultPluginManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultPluginManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultPluginManager.java
Fri Jun 10 22:55:10 2005
@@ -31,9 +31,9 @@
import net.dpml.transit.model.PluginChangeEvent;
import net.dpml.transit.model.PluginListener;
import net.dpml.transit.model.Logger;
+import net.dpml.transit.model.PluginModel;
-import net.dpml.transit.management.PluginHome;
-import net.dpml.transit.management.PluginManager;
+import net.dpml.transit.home.PluginHome;
/**
* An abstract plugin manager is an implementation that monitors
configuration changes
@@ -44,7 +44,7 @@
* @author <a href="http://www.dpml.net">The Digital Product Meta Library</a>
* @version $Id: StandardTransitDirector.java 2480 2005-05-10 04:44:32Z
mcconnell AT dpml.net $
*/
-public abstract class DefaultPluginManager extends DefaultManager implements
PluginManager
+public abstract class DefaultPluginManager extends DefaultManager implements
PluginModel
{
//
------------------------------------------------------------------------
// state
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultProxyManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultProxyManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultProxyManager.java
Fri Jun 10 22:55:10 2005
@@ -31,10 +31,9 @@
import net.dpml.transit.model.ProxyEvent;
import net.dpml.transit.model.ModelException;
import net.dpml.transit.model.Logger;
+import net.dpml.transit.model.ModificationListener;
-import net.dpml.transit.management.ProxyHome;
-import net.dpml.transit.management.ProxyManager;
-import net.dpml.transit.management.ModificationListener;
+import net.dpml.transit.home.ProxyHome;
import net.dpml.transit.network.RequestIdentifier;
@@ -45,7 +44,7 @@
* @author <a href="http://www.dpml.net">The Digital Product Meta Library</a>
* @version $Id: StandardTransitDirector.java 2480 2005-05-10 04:44:32Z
mcconnell AT dpml.net $
*/
-public class DefaultProxyManager extends DefaultManager implements
ProxyManager
+public class DefaultProxyManager extends DefaultManager implements ProxyModel
{
//
------------------------------------------------------------------------
// state
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultRepositoryManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultRepositoryManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultRepositoryManager.java
Fri Jun 10 22:55:10 2005
@@ -22,9 +22,8 @@
import java.util.EventObject;
import java.util.Date;
-import net.dpml.transit.management.RepositoryHome;
-import net.dpml.transit.management.RepositoryManager;
-import net.dpml.transit.model.PluginChangeEvent;
+import net.dpml.transit.home.RepositoryHome;
+import net.dpml.transit.model.RepositoryModel;
import net.dpml.transit.model.Logger;
/**
@@ -32,7 +31,7 @@
*
* @author <a href="http://www.dpml.net">The Digital Product Meta Library</a>
*/
-public class DefaultRepositoryManager extends DefaultPluginManager
implements RepositoryManager
+public class DefaultRepositoryManager extends DefaultPluginManager
implements RepositoryModel
{
public DefaultRepositoryManager( Logger logger, Date creation,
RepositoryHome home, URI uri )
{
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultTransitManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultTransitManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/manager/DefaultTransitManager.java
Fri Jun 10 22:55:10 2005
@@ -21,6 +21,7 @@
import java.util.Date;
import java.util.EventObject;
+import net.dpml.transit.home.TransitHome;
import net.dpml.transit.model.Logger;
import net.dpml.transit.model.TransitModel;
import net.dpml.transit.model.CacheModel;
@@ -28,16 +29,8 @@
import net.dpml.transit.model.RepositoryModel;
import net.dpml.transit.model.ProxyModel;
import net.dpml.transit.model.LayoutRegistryModel;
-
-import net.dpml.transit.management.TransitHome;
-import net.dpml.transit.management.TransitManager;
-import net.dpml.transit.management.CacheManager;
-import net.dpml.transit.management.ContentRegistryManager;
-import net.dpml.transit.management.RepositoryManager;
-import net.dpml.transit.management.ProxyManager;
-import net.dpml.transit.management.LayoutRegistryManager;
-import net.dpml.transit.management.ModificationListener;
-import net.dpml.transit.management.ModificationEvent;
+import net.dpml.transit.model.ModificationListener;
+import net.dpml.transit.model.ModificationEvent;
/**
* The DefaultTransitManager class maintains an active configuration of the
@@ -45,25 +38,25 @@
*
* @author <a href="http://www.dpml.net">The Digital Product Meta Library</a>
*/
-public class DefaultTransitManager extends DefaultManager implements
TransitManager, ModificationListener
+public class DefaultTransitManager extends DefaultManager implements
TransitModel
{
//
------------------------------------------------------------------------
// state
//
------------------------------------------------------------------------
- private final CacheManager m_cache;
- private final ContentRegistryManager m_registry;
- private final RepositoryManager m_repository;
- private final ProxyManager m_proxy;
+ private final CacheModel m_cache;
+ private final ContentRegistryModel m_registry;
+ private final RepositoryModel m_repository;
+ private final ProxyModel m_proxy;
//
------------------------------------------------------------------------
// constructor
//
------------------------------------------------------------------------
public DefaultTransitManager(
- Logger logger, Date creation, TransitHome home, CacheManager cache,
- ContentRegistryManager content, RepositoryManager repository,
- ProxyManager proxy )
+ Logger logger, Date creation, TransitHome home, CacheModel cache,
+ ContentRegistryModel content, RepositoryModel repository,
+ ProxyModel proxy )
{
super( logger, creation, home );
@@ -88,25 +81,6 @@
m_registry = content;
m_repository = repository;
m_proxy = proxy;
-
- m_cache.addModificationListener( this );
- m_registry.addModificationListener( this );
- m_repository.addModificationListener( this );
- m_proxy.addModificationListener( this );
- }
-
- //
------------------------------------------------------------------------
- // ModificationListener (listen to modification to hosts)
- //
------------------------------------------------------------------------
-
- /**
- * Notify a listener of a change to the manager modification date.
- * @param event the modification event
- */
- public void modified( ModificationEvent event )
- {
- //ModificationEvent e = new ModificationEvent( this, event );
- //enqueueEvent( e );
}
//
------------------------------------------------------------------------
@@ -117,51 +91,9 @@
* Return the proxy model.
* @return the proxy configuration model.
*/
- public ProxyManager getProxyManager()
- {
- return m_proxy;
- }
-
- /**
- * Return the cache model.
- * @return the cache model
- */
- public CacheManager getCacheManager()
- {
- return m_cache;
- }
-
- /**
- * Return the content registry manager.
- *
- * @return the content manager
- */
- public ContentRegistryManager getContentRegistryManager()
- {
- return m_registry;
- }
-
- /**
- * Return the repository manager.
- *
- * @return the repository director
- */
- public RepositoryManager getRepositoryManager()
- {
- return m_repository;
- }
-
- //
------------------------------------------------------------------------
- // TransitModel
- //
------------------------------------------------------------------------
-
- /**
- * Return the proxy model.
- * @return the proxy configuration model.
- */
public ProxyModel getProxyModel()
{
- return getProxyManager();
+ return m_proxy;
}
/**
@@ -170,29 +102,27 @@
*/
public CacheModel getCacheModel()
{
- return getCacheManager();
+ return m_cache;
}
/**
- * Return the model maintiaining configuration information about
- * the conent registry.
+ * Return the content registry model.
*
- * @return the content director
+ * @return the content Model
*/
public ContentRegistryModel getContentRegistryModel()
{
- return getContentRegistryManager();
+ return m_registry;
}
/**
- * Return the model maintaining configuration information about
- * the repository service.
+ * Return the repository model.
*
* @return the repository director
*/
public RepositoryModel getRepositoryModel()
{
- return getRepositoryManager();
+ return m_repository;
}
}
Copied:
development/main/transit/core/handler/src/main/net/dpml/transit/model/BootstrapException.java
(from r2740,
development/main/transit/core/handler/src/main/net/dpml/transit/management/BootstrapException.java)
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/management/BootstrapException.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/model/BootstrapException.java
Fri Jun 10 22:55:10 2005
@@ -16,10 +16,7 @@
* limitations under the License.
*/
-package net.dpml.transit.management;
-
-import net.dpml.transit.model.Model;
-import net.dpml.transit.model.ModelException;
+package net.dpml.transit.model;
/**
* Exception raised when an attempt is made to associate a plugin based model
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/model/CacheModel.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/model/CacheModel.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/model/CacheModel.java
Fri Jun 10 22:55:10 2005
@@ -39,12 +39,27 @@
File getCacheDirectory();
/**
+ * Update the value the local cache directory.
+ *
+ * @param file the cache directory
+ */
+ void setCacheDirectory( final File file );
+
+ /**
* Return the array of hosts configured for the cache.
* @return the host director array
*/
HostModel[] getHostModels();
/**
+ * Return an identified host model.
+ * @param id the host identifier
+ * @return the host model
+ * @exception UnknownKeyException if the requested host id is unknown
+ */
+ HostModel getHostModel( String id ) throws UnknownKeyException;
+
+ /**
* Add a cache listener to the director.
* @param listener the listener to add
*/
@@ -68,5 +83,24 @@
*/
LayoutRegistryModel getLayoutRegistryModel();
+ /**
+ * Add a new host model to the cache model.
+ * @param id the host identifier
+ * @exception DuplicateKeyException if a host of the same identifier
already exists
+ */
+ void addHostModel( String id ) throws DuplicateKeyException;
+
+ /**
+ * Add a new host model to the cache model.
+ * @param model the host model to add to the cache model
+ * @exception DuplicateKeyException if a host of the same identifier
already exists
+ */
+ void addHostModel( HostModel model ) throws DuplicateKeyException;
+
+ /**
+ * Remove a host from the cache model.
+ * @param the host model to remove
+ */
+ void removeHostModel( HostModel model );
}
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/model/ContentModel.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/model/ContentModel.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/model/ContentModel.java
Fri Jun 10 22:55:10 2005
@@ -40,6 +40,12 @@
public String getTitle();
/**
+ * Set the layout title.
+ * @param title the layout title to assign
+ */
+ void setTitle( String title );
+
+ /**
* Add a content listener to the director.
* @param listener the listener to add
*/
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/model/ContentRegistryModel.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/model/ContentRegistryModel.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/model/ContentRegistryModel.java
Fri Jun 10 22:55:10 2005
@@ -18,6 +18,9 @@
package net.dpml.transit.model;
+import java.net.URI;
+
+
/**
* A RegistryModel maintains information about the configuration of the
Transit
* content registry subsystem. Instances of RegistryModel shall be supplied
to
@@ -26,6 +29,12 @@
public interface ContentRegistryModel extends PluginModel
{
/**
+ * Return an array of content directors currently assigned to the
registry.
+ * @return the content director array
+ */
+ ContentModel[] getContentModels();
+
+ /**
* Return a content model matching the supplied type. If the type is
unknown
* an implementation shall return a null value.
*
@@ -33,11 +42,13 @@
*/
ContentModel getContentModel( String type ) throws UnknownKeyException;
- /**
- * Return an array of content directors currently assigned to the
registry.
- * @return the content director array
- */
- ContentModel[] getContentModels();
+ void addContentModel( String type ) throws DuplicateKeyException;
+
+ void addContentModel( String type, String title, URI uri ) throws
DuplicateKeyException;
+
+ void addContentModel( ContentModel model ) throws DuplicateKeyException;
+
+ void removeContentModel( ContentModel model );
/**
* Add a regstry change listener.
@@ -51,4 +62,5 @@
*/
void removeRegistryListener( ContentRegistryListener listener );
+
}
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/model/HostModel.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/model/HostModel.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/model/HostModel.java
Fri Jun 10 22:55:10 2005
@@ -103,6 +103,31 @@
LayoutModel getLayoutModel();
/**
+ * HTTP port number.
+ */
+ static final int HTTP_PORT = 80;
+
+ /**
+ * FTP port number.
+ */
+ static final int FTP_PORT = 21;
+
+ /**
+ * HTTPS port number.
+ */
+ static final int HTTPS_PORT = 443;
+
+ void setName( String name );
+
+ void setPriority( int priority );
+
+ void setLayoutModel( LayoutModel layout ) throws BootstrapException;
+
+ void update(
+ URL base, URL index, boolean enabled, boolean trusted, LayoutModel
layout,
+ PasswordAuthentication auth, String scheme, String prompt ) throws
BootstrapException;
+
+ /**
* Add a host change listener to the director.
* @param listener the host change listener to add
*/
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/model/LayoutModel.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/model/LayoutModel.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/model/LayoutModel.java
Fri Jun 10 22:55:10 2005
@@ -54,6 +54,8 @@
*/
public String getTitle();
+ void setTitle( String title );
+
/**
* Add a resolver model listener.
* @param listener the listener to add
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/model/LayoutRegistryModel.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/model/LayoutRegistryModel.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/model/LayoutRegistryModel.java
Fri Jun 10 22:55:10 2005
@@ -52,5 +52,26 @@
*/
void removeLayoutRegistryListener( LayoutRegistryListener listener );
+ /**
+ * Add a new layout model to the registry.
+ * @param the layout model identity
+ * @exception DuplicateKeyException if a layout model of the same id
already exists
+ */
+ void addLayoutModel( String id ) throws DuplicateKeyException;
+
+ /**
+ * Add a new layout model to the registry.
+ * @param the layout model
+ * @exception DuplicateKeyException if a layout model of the same id
already exists
+ */
+ void addLayoutModel( LayoutModel model ) throws DuplicateKeyException;
+
+ /**
+ * Remove a layout model from the registry.
+ * @param the layout model to be removed
+ * @exception ModelReferenceException if the layout is in use
+ */
+ void removeLayoutModel( LayoutModel model ) throws
ModelReferenceException;
+
}
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/model/Model.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/model/Model.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/model/Model.java
Fri Jun 10 22:55:10 2005
@@ -18,6 +18,8 @@
package net.dpml.transit.model;
+import java.util.Date;
+
/**
* The abstract model interface.
*/
@@ -34,4 +36,17 @@
void removeDisposalListener( DisposalListener listener );
void dispose();
+
+ Date getCreationDate();
+
+ Date getModificationDate();
+
+ void setCreationDate( Date date );
+
+ boolean isModified();
+
+ void addModificationListener( ModificationListener listener );
+
+ void removeModificationListener( ModificationListener listener );
+
}
Added:
development/main/transit/core/handler/src/main/net/dpml/transit/model/ModelReferenceException.java
==============================================================================
--- (empty file)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/model/ModelReferenceException.java
Fri Jun 10 22:55:10 2005
@@ -0,0 +1,55 @@
+/*
+ * 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.transit.model;
+
+/**
+ * Exception raised when an attempt is made to remove a model
+ * that is referenced by another model.
+ *
+ * @author <a href="http://www.dpml.net">The Digital Product Meta Library</a>
+ */
+public class ModelReferenceException extends ModelException
+{
+ private final Model m_source;
+ private final LayoutModel m_layout;
+
+ /**
+ * Construct a new <code>ModelReferenceException</code> instance.
+ *
+ * @param target the target model
+ * @param consumers the consumer models
+ */
+ public ModelReferenceException( final Model source, final LayoutModel
layout )
+ {
+ super( "Referential integrity error." );
+ m_source = source;
+ m_layout = layout;
+ }
+
+ public Model getModel()
+ {
+ return m_source;
+ }
+
+ public LayoutModel getLayoutModel()
+ {
+ return m_layout;
+ }
+}
+
Added:
development/main/transit/core/handler/src/main/net/dpml/transit/model/ModificationEvent.java
==============================================================================
--- (empty file)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/model/ModificationEvent.java
Fri Jun 10 22:55:10 2005
@@ -0,0 +1,55 @@
+/*
+ * 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.transit.model;
+
+import java.util.Date;
+import java.util.EventObject;
+
+/**
+ * An event signalling a model modification.
+ */
+public class ModificationEvent extends EventObject
+{
+ private final Date m_date;
+ private final Model m_model;
+
+ public ModificationEvent( Model model, ModificationEvent source )
+ {
+ super( model );
+ m_model = source.getModel();
+ m_date = source.getModificationDate();
+ }
+
+ public ModificationEvent( Model source, Date date )
+ {
+ super( source );
+ m_date = date;
+ m_model = source;
+ }
+
+ public Model getModel()
+ {
+ return m_model;
+ }
+
+ public Date getModificationDate()
+ {
+ return m_date;
+ }
+}
Added:
development/main/transit/core/handler/src/main/net/dpml/transit/model/ModificationListener.java
==============================================================================
--- (empty file)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/model/ModificationListener.java
Fri Jun 10 22:55:10 2005
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2005 Stephen 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.transit.model;
+
+import java.util.EventListener;
+
+/**
+ * A ProxyListener maintains information about the configuration of
+ * tranist proxy settings.
+ */
+public interface ModificationListener extends EventListener
+{
+ /**
+ * Notify a listener of a change to the manager modification date.
+ * @param event the modification event
+ */
+ void modified( ModificationEvent event );
+}
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/model/PluginModel.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/model/PluginModel.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/model/PluginModel.java
Fri Jun 10 22:55:10 2005
@@ -33,6 +33,12 @@
URI getPluginURI();
/**
+ * Set the plugin uri value.
+ * @param uri the plugin uri
+ */
+ void setPluginURI( URI uri );
+
+ /**
* Add a plugin listener to the director.
* @param listener the listener to add
*/
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/model/ProxyModel.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/model/ProxyModel.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/model/ProxyModel.java
Fri Jun 10 22:55:10 2005
@@ -54,6 +54,14 @@
*/
String[] getExcludes();
+ void update( URL host, PasswordAuthentication auth, String[] excludes );
+
+ void setHost( URL host );
+
+ void setExcludes( String[] excludes );
+
+ void setAuthentication( PasswordAuthentication auth );
+
/**
* Add a proxy listener to the model.
* @param listener the listener to add
Modified:
development/main/transit/core/handler/src/test/net/dpml/transit/manager/ProxyManagerTestCase.java
==============================================================================
---
development/main/transit/core/handler/src/test/net/dpml/transit/manager/ProxyManagerTestCase.java
(original)
+++
development/main/transit/core/handler/src/test/net/dpml/transit/manager/ProxyManagerTestCase.java
Fri Jun 10 22:55:10 2005
@@ -30,13 +30,13 @@
import net.dpml.transit.Transit;
import net.dpml.transit.adapter.LoggingAdapter;
+import net.dpml.transit.home.TransitHome;
import net.dpml.transit.model.ProxyEvent;
import net.dpml.transit.model.ProxyListener;
import net.dpml.transit.model.Logger;
import net.dpml.transit.manager.DefaultProxyManager;
-import net.dpml.transit.management.ProxyManager;
-import net.dpml.transit.management.TransitManager;
-import net.dpml.transit.management.TransitHome;
+import net.dpml.transit.model.ProxyModel;
+import net.dpml.transit.model.TransitModel;
import net.dpml.transit.builder.TransitStorageUnit;
/**
@@ -44,7 +44,7 @@
*/
public class ProxyManagerTestCase extends TestCase
{
- private TransitManager m_manager;
+ private TransitModel m_model;
private File m_data;
public void setUp() throws Exception
@@ -56,7 +56,7 @@
Preferences.userNodeForPackage( Transit.class ).node( "test"
).node( "proxy-manager-test" );
TransitHome home = new TransitStorageUnit( prefs );
home.clearBeforeInitialization( true );
- m_manager = home.create();
+ m_model = home.create();
}
public void testProxyAuthenticationListener() throws Exception
@@ -67,16 +67,16 @@
new PasswordAuthentication( username, password.toCharArray() );
TestProxyAuthListener listener = new TestProxyAuthListener( auth );
- m_manager.getProxyManager().addProxyListener( listener );
- m_manager.getProxyManager().update( null, auth, null );
+ m_model.getProxyModel().addProxyListener( listener );
+ m_model.getProxyModel().update( null, auth, null );
}
public void testProxyExcludes() throws Exception
{
TestProxyExcludesListener listener = new TestProxyExcludesListener();
- m_manager.getProxyManager().addProxyListener( listener );
+ m_model.getProxyModel().addProxyListener( listener );
String[] excludes = new String[]{ "http://www.osm.net",
"http://repository.dpml.net" };
- m_manager.getProxyManager().update( null, null, excludes );
+ m_model.getProxyModel().update( null, null, excludes );
}
public class TestProxyExcludesListener implements ProxyListener
Modified:
development/main/transit/core/handler/src/test/net/dpml/transit/manager/TransitManagerTestCase.java
==============================================================================
---
development/main/transit/core/handler/src/test/net/dpml/transit/manager/TransitManagerTestCase.java
(original)
+++
development/main/transit/core/handler/src/test/net/dpml/transit/manager/TransitManagerTestCase.java
Fri Jun 10 22:55:10 2005
@@ -28,17 +28,17 @@
import net.dpml.transit.Transit;
import net.dpml.transit.adapter.LoggingAdapter;
+import net.dpml.transit.home.TransitHome;
import net.dpml.transit.builder.TransitStorageUnit;
import net.dpml.transit.model.Logger;
-import net.dpml.transit.management.TransitHome;
-import net.dpml.transit.management.TransitManager;
+import net.dpml.transit.model.TransitModel;
/**
* @author <a href="http://www.dpml.net">The Digital Product Meta Library</a>
*/
public class TransitManagerTestCase extends TestCase
{
- private TransitManager m_manager;
+ private TransitModel m_model;
private File m_data;
public void setUp() throws Exception
@@ -49,14 +49,14 @@
Preferences prefs = Preferences.userNodeForPackage( Transit.class
).node( "test" );
TransitHome home = new TransitStorageUnit( prefs );
home.clearBeforeInitialization( true );
- m_manager = home.create();
+ m_model = home.create();
}
public void testCacheDirectory() throws Exception
{
File dir = new File( m_data, "cache" ).getAbsoluteFile();
- m_manager.getCacheManager().setCacheDirectory( dir );
- File cache = m_manager.getCacheModel().getCacheDirectory();
+ m_model.getCacheModel().setCacheDirectory( dir );
+ File cache = m_model.getCacheModel().getCacheDirectory();
assertEquals( "cache", dir, cache );
}
}
Modified:
development/main/transit/core/handler/src/test/net/dpml/transit/test/LinkTestCase.java
==============================================================================
---
development/main/transit/core/handler/src/test/net/dpml/transit/test/LinkTestCase.java
(original)
+++
development/main/transit/core/handler/src/test/net/dpml/transit/test/LinkTestCase.java
Fri Jun 10 22:55:10 2005
@@ -34,8 +34,8 @@
import net.dpml.transit.adapter.LoggingAdapter;
import net.dpml.transit.Transit;
import net.dpml.transit.builder.TransitStorageUnit;
-import net.dpml.transit.management.TransitHome;
-import net.dpml.transit.management.TransitManager;
+import net.dpml.transit.home.TransitHome;
+import net.dpml.transit.model.TransitModel;
/**
*
@@ -63,8 +63,8 @@
TransitHome home = new TransitStorageUnit( prefs );
home.clearBeforeInitialization( true );
home.setAuthority( authority );
- TransitManager manager = home.create();
- TRANSIT = Transit.getInstance( manager );
+ TransitModel model = home.create();
+ TRANSIT = Transit.getInstance( model );
}
}
Modified:
development/main/transit/core/handler/src/test/net/dpml/transit/test/OfflineTestCase.java
==============================================================================
---
development/main/transit/core/handler/src/test/net/dpml/transit/test/OfflineTestCase.java
(original)
+++
development/main/transit/core/handler/src/test/net/dpml/transit/test/OfflineTestCase.java
Fri Jun 10 22:55:10 2005
@@ -34,8 +34,8 @@
import junit.framework.TestCase;
import net.dpml.transit.builder.TransitStorageUnit;
-import net.dpml.transit.management.TransitHome;
-import net.dpml.transit.management.TransitManager;
+import net.dpml.transit.home.TransitHome;
+import net.dpml.transit.model.TransitModel;
import net.dpml.transit.adapter.LoggingAdapter;
import net.dpml.transit.Transit;
@@ -68,8 +68,8 @@
home.clearBeforeInitialization( true );
home.setAuthority( authority );
home.setLogger( adapter );
- TransitManager manager = home.create();
- TRANSIT = Transit.getInstance( manager );
+ TransitModel model = home.create();
+ TRANSIT = Transit.getInstance( model );
}
}
Modified:
development/main/transit/core/handler/src/test/net/dpml/transit/test/OnlineTestCase.java
==============================================================================
---
development/main/transit/core/handler/src/test/net/dpml/transit/test/OnlineTestCase.java
(original)
+++
development/main/transit/core/handler/src/test/net/dpml/transit/test/OnlineTestCase.java
Fri Jun 10 22:55:10 2005
@@ -32,8 +32,8 @@
import junit.framework.TestCase;
import net.dpml.transit.Transit;
-import net.dpml.transit.management.TransitManager;
-import net.dpml.transit.management.TransitHome;
+import net.dpml.transit.model.TransitModel;
+import net.dpml.transit.home.TransitHome;
import net.dpml.transit.builder.TransitStorageUnit;
/**
@@ -54,8 +54,8 @@
Preferences.userNodeForPackage( Transit.class
).node("test").node( "online-test" );
TransitHome home = new TransitStorageUnit( prefs );
home.clearBeforeInitialization( true );
- TransitManager manager = home.create();
- TRANSIT = Transit.getInstance( manager );
+ TransitModel model = home.create();
+ TRANSIT = Transit.getInstance( model );
}
}
Modified:
development/main/transit/core/tools/src/main/net/dpml/transit/tools/ImportArtifactTask.java
==============================================================================
---
development/main/transit/core/tools/src/main/net/dpml/transit/tools/ImportArtifactTask.java
(original)
+++
development/main/transit/core/tools/src/main/net/dpml/transit/tools/ImportArtifactTask.java
Fri Jun 10 22:55:10 2005
@@ -32,8 +32,7 @@
import net.dpml.transit.monitors.Monitor;
import net.dpml.transit.model.Logger;
import net.dpml.transit.model.TransitModel;
-import net.dpml.transit.management.TransitManager;
-import net.dpml.transit.management.TransitHome;
+import net.dpml.transit.home.TransitHome;
/**
* Ant task that provides support for the import of build file templates
@@ -57,8 +56,8 @@
TransitHome home = new TransitStorageUnit();
Logger logger = new AntAdapter( this );
home.setLogger( logger );
- TransitManager manager = home.create();
- Transit.getInstance( manager );
+ TransitModel model = home.create();
+ Transit.getInstance( model );
}
catch( TransitAlreadyInitializedException e )
{
- svn commit: r2822 - in development/main: depot depot/console depot/console/src/main/net/dpml/depot depot/console/src/main/net/dpml/depot/profile depot/prefs depot/prefs/src/main/net/dpml/depot/prefs depot/station/src/main/net/dpml/depot/station metro/composition/content/src/main/net/dpml/composition/content test/plugins/layout/src/main/net/dpml/test/layout test/unit/plus/src/test/net/dpml/test/acme/plus transit/core/handler/src/main/net/dpml/transit transit/core/handler/src/main/net/dpml/transit/builder transit/core/handler/src/main/net/dpml/transit/home transit/core/handler/src/main/net/dpml/transit/management transit/core/handler/src/main/net/dpml/transit/manager transit/core/handler/src/main/net/dpml/transit/model transit/core/handler/src/test/net/dpml/transit/manager transit/core/handler/src/test/net/dpml/transit/test transit/core/tools/src/main/net/dpml/transit/tools, mcconnell, 06/10/2005
Archive powered by MHonArc 2.6.24.