geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r707117 - in /geronimo/gshell/trunk: gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/ gshell-support/gshell-vfs-meta/ gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta...
Date Wed, 22 Oct 2008 16:21:49 GMT
Author: jdillon
Date: Wed Oct 22 09:21:46 2008
New Revision: 707117

URL: http://svn.apache.org/viewvc?rev=707117&view=rev
Log:
Add events when meta-data is registered/removed

Added:
    geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/ArtifactResolver.java
  (with props)
    geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRegisteredEvent.java
  (with props)
    geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRemovedEvent.java
  (with props)
Modified:
    geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/pom.xml
    geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRegistryImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/gshell/components.xml

Added: geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/ArtifactResolver.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/ArtifactResolver.java?rev=707117&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/ArtifactResolver.java
(added)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/ArtifactResolver.java
Wed Oct 22 09:21:46 2008
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.geronimo.gshell.artifact;
+
+/**
+ * ???
+ *
+ * @version $Rev$ $Date$
+ */
+public interface ArtifactResolver
+{
+    
+}
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/ArtifactResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/ArtifactResolver.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/ArtifactResolver.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/pom.xml?rev=707117&r1=707116&r2=707117&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/pom.xml Wed Oct 22 09:21:46 2008
@@ -40,6 +40,11 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.gshell.support</groupId>
+            <artifactId>gshell-event</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.gshell.support</groupId>
             <artifactId>gshell-vfs</artifactId>
         </dependency>
 

Added: geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRegisteredEvent.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRegisteredEvent.java?rev=707117&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRegisteredEvent.java
(added)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRegisteredEvent.java
Wed Oct 22 09:21:46 2008
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.geronimo.gshell.vfs.provider.meta.data;
+
+import org.apache.geronimo.gshell.event.Event;
+import org.apache.commons.vfs.FileName;
+
+/**
+ * Event fired when some {@link MetaData} has been registered.
+ *
+ * @version $Rev$ $Date$
+ */
+public class MetaDataRegisteredEvent
+    implements Event
+{
+    private final FileName name;
+
+    private final MetaData data;
+
+    public MetaDataRegisteredEvent(final FileName name, final MetaData data) {
+        assert name != null;
+        this.name = name;
+
+        assert data != null;
+        this.data = data;
+    }
+
+    public MetaData getData() {
+        return data;
+    }
+
+    public FileName getName() {
+        return name;
+    }
+}
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRegisteredEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRegisteredEvent.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRegisteredEvent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRegistryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRegistryImpl.java?rev=707117&r1=707116&r2=707117&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRegistryImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRegistryImpl.java
Wed Oct 22 09:21:46 2008
@@ -24,6 +24,7 @@
 import org.apache.commons.vfs.FileType;
 import org.apache.geronimo.gshell.vfs.provider.meta.MetaFileName;
 import org.apache.geronimo.gshell.vfs.provider.meta.MetaFileNameParser;
+import org.apache.geronimo.gshell.event.EventPublisher;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -42,8 +43,15 @@
 
     private final Map<FileName, MetaData> nodes = new HashMap<FileName, MetaData>();
 
+    private final EventPublisher eventPublisher;
+
     private String rootFileName = MetaFileName.SCHEME + ":/";
 
+    public MetaDataRegistryImpl(final EventPublisher eventPublisher) {
+        assert eventPublisher != null;
+        this.eventPublisher = eventPublisher;
+    }
+
     // @PostConstruct
     public void init() throws FileSystemException {
         // Register the root folder
@@ -75,6 +83,8 @@
         }
 
         getNodes().put(name, data);
+
+        eventPublisher.publish(new MetaDataRegisteredEvent(name, data));
     }
 
     private MetaData getParentData(final FileName name) {
@@ -110,6 +120,8 @@
             MetaData parent = lookupData(parentName);
             parent.removeChild(data);
         }
+
+        eventPublisher.publish(new MetaDataRemovedEvent(name, data));
     }
 
     public boolean containsData(final FileName name) {

Added: geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRemovedEvent.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRemovedEvent.java?rev=707117&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRemovedEvent.java
(added)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRemovedEvent.java
Wed Oct 22 09:21:46 2008
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.geronimo.gshell.vfs.provider.meta.data;
+
+import org.apache.geronimo.gshell.event.Event;
+import org.apache.commons.vfs.FileName;
+
+/**
+ * Event fired when some {@link MetaData} has been removed.
+ *
+ * @version $Rev$ $Date$
+ */
+public class MetaDataRemovedEvent
+    implements Event
+{
+    private final FileName name;
+
+    private final MetaData data;
+
+    public MetaDataRemovedEvent(final FileName name, final MetaData data) {
+        assert name != null;
+        this.name = name;
+
+        assert data != null;
+        this.data = data;
+    }
+
+    public MetaData getData() {
+        return data;
+    }
+
+    public FileName getName() {
+        return name;
+    }
+}
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRemovedEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRemovedEvent.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-support/gshell-vfs-meta/src/main/java/org/apache/geronimo/gshell/vfs/provider/meta/data/MetaDataRemovedEvent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/gshell/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/gshell/components.xml?rev=707117&r1=707116&r2=707117&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/gshell/components.xml
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/gshell/components.xml
Wed Oct 22 09:21:46 2008
@@ -145,7 +145,9 @@
         <property name="rootUri"  value="file:${gshell.home}/var/xstore"/>
     </bean>
 
-    <bean id="metaDataRegistry" class="org.apache.geronimo.gshell.vfs.provider.meta.data.MetaDataRegistryImpl"
lazy-init="true"/>
+    <bean id="metaDataRegistry" class="org.apache.geronimo.gshell.vfs.provider.meta.data.MetaDataRegistryImpl"
lazy-init="true">
+        <constructor-arg ref="eventManager"/>
+    </bean>
 
     <bean id="metaFileProviderConfigurer" class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer">
         <property name="fileSystemManager" ref="fileSystemManager"/>



Mime
View raw message