Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2563 - development/main/transit/core/handler/src/main/net/dpml/transit/configuration

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2563 - development/main/transit/core/handler/src/main/net/dpml/transit/configuration
  • Date: Sun, 15 May 2005 19:13:30 +0000

Author: mcconnell AT dpml.net
Date: Sun May 15 19:13:28 2005
New Revision: 2563

Added:

development/main/transit/core/handler/src/main/net/dpml/transit/configuration/ContentDirector.java

development/main/transit/core/handler/src/main/net/dpml/transit/configuration/ContentEvent.java

development/main/transit/core/handler/src/main/net/dpml/transit/configuration/ContentListener.java

development/main/transit/core/handler/src/main/net/dpml/transit/configuration/ContentPluginChangeEvent.java

development/main/transit/core/handler/src/main/net/dpml/transit/configuration/HostPluginChangeEvent.java

development/main/transit/core/handler/src/main/net/dpml/transit/configuration/RegistryDirector.java

development/main/transit/core/handler/src/main/net/dpml/transit/configuration/RegistryEvent.java

development/main/transit/core/handler/src/main/net/dpml/transit/configuration/RegistryListener.java
Modified:

development/main/transit/core/handler/src/main/net/dpml/transit/configuration/CacheDirector.java

development/main/transit/core/handler/src/main/net/dpml/transit/configuration/CacheListener.java

development/main/transit/core/handler/src/main/net/dpml/transit/configuration/TransitDirector.java
Log:
Complete the updates related to the content registry and content director.

Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/CacheDirector.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/CacheDirector.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/CacheDirector.java
Sun May 15 19:13:28 2005
@@ -19,6 +19,7 @@
package net.dpml.transit.configuration;

import java.io.File;
+import java.net.URI;

/**
* A CacheDirector maintains information about the configuration of the
Transit
@@ -27,10 +28,35 @@
*/
public interface CacheDirector
{
+ /**
+ * Return the directory to be used by the cache handler as the cache
directory.
+ * @return the cache directory.
+ */
File getCacheDirectory();

+ /**
+ * Return the uri of the host implementation plugin.
+ * @param id the immutable host id
+ * @return the plugin uri
+ */
+ URI getPluginForHost( String id );
+
+ /**
+ * Return the array of hosts configured for the cache.
+ * @return the host director array
+ */
HostDirector[] getHostDirectors();

+ /**
+ * Add a cache listener to the director.
+ * @param listener the listener to add
+ */
void addCacheListener( CacheListener listener );

+ /**
+ * Remove a cache listener from the director.
+ * @param listener the listener to remove
+ */
+ void removeCacheListener( CacheListener listener );
+
}

Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/CacheListener.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/CacheListener.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/CacheListener.java
Sun May 15 19:13:28 2005
@@ -28,4 +28,11 @@

void hostRemoved( HostRemovedEvent event );

+ /**
+ * Notify a regstry listener of the change to the plugin assigned
+ * to be the host handler.
+ * @param event the host plugin change event
+ */
+ void hostPluginChanged( HostPluginChangeEvent event );
+
}

Added:
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/ContentDirector.java
==============================================================================
--- (empty file)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/ContentDirector.java
Sun May 15 19:13:28 2005
@@ -0,0 +1,54 @@
+/*
+ * 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.configuration;
+
+import java.net.URI;
+
+/**
+ * A ContentDirector maintains information about the configuration of the
Transit
+ * content registry subsystem. Instances of ContentDirector shall be
supplied to
+ * registry implementations as constructor arguments.
+ */
+public interface ContentDirector
+{
+ /**
+ * Return the immutable content type identifier.
+ * @return the content type
+ */
+ String getContentType();
+
+ /**
+ * Returns the human readable name of the content type handler.
+ * @return the content type human readable name
+ */
+ public String getContentHandlerTitle();
+
+ /**
+ * Add a content listener to the director.
+ * @param the listener to add
+ */
+ void addContentListener( ContentListener listener );
+
+ /**
+ * Remove a content listener from the director.
+ * @param the listener to remove
+ */
+ void removeContentListener( ContentListener listener );
+
+}

Added:
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/ContentEvent.java
==============================================================================
--- (empty file)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/ContentEvent.java
Sun May 15 19:13:28 2005
@@ -0,0 +1,47 @@
+/*
+ * 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.configuration;
+
+import java.util.EventObject;
+
+public class ContentEvent extends EventObject
+{
+ private final ContentDirector m_content;
+
+ /**
+ * Creation of a new ContentEvent signalling modification of
+ * content director configuration.
+ *
+ * @param content the content director that was added or removed
+ */
+ public ContentEvent( ContentDirector content )
+ {
+ super( content );
+ m_content = content;
+ }
+
+ /**
+ * Return the content director that was modified.
+ * @return the content director
+ */
+ public ContentDirector getContentDirector()
+ {
+ return m_content;
+ }
+}

Added:
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/ContentListener.java
==============================================================================
--- (empty file)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/ContentListener.java
Sun May 15 19:13:28 2005
@@ -0,0 +1,35 @@
+/*
+ * 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.configuration;
+
+import java.util.EventListener;
+
+/**
+ * A ContentListener maintains information about the configuration of
+ * content type.
+ */
+public interface ContentListener extends EventListener
+{
+ /**
+ * Notify a regstry listener of the change to the plugin assigned
+ * to be the content handler for a content type.
+ * @param event the content plugin change event
+ */
+ void titleChanged( ContentEvent event );
+}

Added:
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/ContentPluginChangeEvent.java
==============================================================================
--- (empty file)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/ContentPluginChangeEvent.java
Sun May 15 19:13:28 2005
@@ -0,0 +1,60 @@
+/*
+ * 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.configuration;
+
+import java.net.URI;
+
+public class ContentPluginChangeEvent extends PluginChangeEvent
+{
+ private final RegistryDirector m_registry;
+ private final ContentDirector m_director;
+
+ /**
+ * Creation of a new ContentEvent signalling modification of
+ * content director configuration.
+ *
+ * @param source the registry director initiating the event
+ * @param content the content director that was added or removed
+ * @param registry the content registry director
+ */
+ public ContentPluginChangeEvent( RegistryDirector source,
ContentDirector director, URI plugin )
+ {
+ super( source, plugin );
+ m_registry = source;
+ m_director = director;
+ }
+
+ /**
+ * Return the content directory that the plugin change relates to.
+ * @return the content director
+ */
+ public RegistryDirector getRegistryDirector()
+ {
+ return m_registry;
+ }
+
+ /**
+ * Return the content directory that the plugin change relates to.
+ * @return the content director
+ */
+ public ContentDirector getContentDirector()
+ {
+ return m_director;
+ }
+}

Added:
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/HostPluginChangeEvent.java
==============================================================================
--- (empty file)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/HostPluginChangeEvent.java
Sun May 15 19:13:28 2005
@@ -0,0 +1,59 @@
+/*
+ * 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.configuration;
+
+import java.net.URI;
+
+public class HostPluginChangeEvent extends PluginChangeEvent
+{
+ private final CacheDirector m_cache;
+ private final HostDirector m_host;
+
+ /**
+ * Creation of a new ContentEvent signalling modification of
+ * content director configuration.
+ *
+ * @param content the content director that was added or removed
+ * @param registry the content registry director
+ */
+ public HostPluginChangeEvent( CacheDirector source, HostDirector host,
URI plugin )
+ {
+ super( source, plugin );
+ m_cache = source;
+ m_host = host;
+ }
+
+ /**
+ * Return the cache director initiating the event.
+ * @return the cache director
+ */
+ public CacheDirector getCacheDirector()
+ {
+ return m_cache;
+ }
+
+ /**
+ * Return the yhost director that the plugin change relates to.
+ * @return the host director
+ */
+ public HostDirector getHostDirector()
+ {
+ return m_host;
+ }
+}

Added:
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/RegistryDirector.java
==============================================================================
--- (empty file)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/RegistryDirector.java
Sun May 15 19:13:28 2005
@@ -0,0 +1,55 @@
+/*
+ * 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.configuration;
+
+import java.net.URI;
+
+/**
+ * A RegistryDirector maintains information about the configuration of the
Transit
+ * content registry subsystem. Instances of RegistryDirector shall be
supplied to
+ * registry implementations as constructor arguments.
+ */
+public interface RegistryDirector
+{
+ /**
+ * Return an array of content directors currently assigned to the
registry.
+ * @return the content director array
+ */
+ ContentDirector[] getContentDirectors();
+
+ /**
+ * Return the uri assigned for the content handler for a given content
type.
+ * @param type the content handler type
+ * @return the assigned content handler plugin URI
+ */
+ URI getPluginForContentHandler( String type );
+
+ /**
+ * Add a regstry change listener.
+ * @param the registry change listener to add
+ */
+ void addRegistryListener( RegistryListener listener );
+
+ /**
+ * Remove a regstry change listener.
+ * @param the registry change listener to remove
+ */
+ void removeRegistryListener( RegistryListener listener );
+
+}

Added:
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/RegistryEvent.java
==============================================================================
--- (empty file)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/RegistryEvent.java
Sun May 15 19:13:28 2005
@@ -0,0 +1,59 @@
+/*
+ * 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.configuration;
+
+import java.util.EventObject;
+
+public class RegistryEvent extends EventObject
+{
+ private final ContentDirector m_content;
+ private final RegistryDirector m_registry;
+
+ /**
+ * Creation of a new RegistryEvent signalling the addition
+ * or removal of a content director to or from a registry.
+ *
+ * @param registry the content registry director
+ * @param content the content director that was added or removed
+ */
+ public RegistryEvent( RegistryDirector registry, ContentDirector content
)
+ {
+ super( registry );
+ m_content = content;
+ m_registry = registry;
+ }
+
+ /**
+ * Return the registry director initiating the event.
+ * @return the registry director
+ */
+ public RegistryDirector getRegistryDirector()
+ {
+ return m_registry;
+ }
+
+ /**
+ * Return the content director that was added or removed.
+ * @return the content director
+ */
+ public ContentDirector getContentDirector()
+ {
+ return m_content;
+ }
+}

Added:
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/RegistryListener.java
==============================================================================
--- (empty file)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/RegistryListener.java
Sun May 15 19:13:28 2005
@@ -0,0 +1,48 @@
+/*
+ * 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.configuration;
+
+import java.util.EventListener;
+
+/**
+ * A RegistryListener maintains information about the configuration of a
Transit
+ * content management system. An implementation of this interface would be
supplied
+ * a ContentRegistry implementation.
+ */
+public interface RegistryListener extends EventListener
+{
+ /**
+ * Notify all listeners of the addition of a content director.
+ * @param the registry event
+ */
+ void contentAdded( RegistryEvent event );
+
+ /**
+ * Notify all listeners of the removal of a content director.
+ * @param the registry event
+ */
+ void contentRemoved( RegistryEvent event );
+
+ /**
+ * Notify a regstry listener of the change to the plugin assigned
+ * to be the content handler for a content type.
+ * @param event the content plugin change event
+ */
+ void contentPluginChanged( ContentPluginChangeEvent event );
+}

Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/TransitDirector.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/TransitDirector.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/configuration/TransitDirector.java
Sun May 15 19:13:28 2005
@@ -18,6 +18,8 @@

package net.dpml.transit.configuration;

+import java.net.URI;
+
/**
* The TransitDirector is an interface implemented by objects that
* manage the configuration of a running transit system.
@@ -25,6 +27,32 @@
public interface TransitDirector
{
/**
+ * Return the cache director.
+ * @return the cache director
+ */
+ CacheDirector getCacheDirector();
+
+ /**
+ * Return the uri of the plugin to be used for cache management.
+ * @return the cache handler plugin uri
+ */
+ URI getCachePluginURI();
+
+ /**
+ * Return the director maintiaining configuration information about
+ * the conent registry.
+ *
+ * @return the content director
+ */
+ ContentDirector getContentDirector();
+
+ /**
+ * Return the uri of the plugin to be used for content registry
management.
+ * @return the cache handler plugin uri
+ */
+ URI getContentPluginURI();
+
+ /**
* Add a listener to the director. The listener will be
* notified of changes to the cache handler plugin uri and
* content handler uri.



  • svn commit: r2563 - development/main/transit/core/handler/src/main/net/dpml/transit/configuration, mcconnell, 05/15/2005

Archive powered by MHonArc 2.6.24.

Top of Page