clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [3/4] git commit: CLEREZZA-858: moved interfaces to own package. Cleaned up dashboard.core dependencies
Date Sat, 04 Jan 2014 19:17:16 GMT
CLEREZZA-858: moved interfaces to own package. Cleaned up dashboard.core dependencies


Project: http://git-wip-us.apache.org/repos/asf/clerezza/repo
Commit: http://git-wip-us.apache.org/repos/asf/clerezza/commit/9e342669
Tree: http://git-wip-us.apache.org/repos/asf/clerezza/tree/9e342669
Diff: http://git-wip-us.apache.org/repos/asf/clerezza/diff/9e342669

Branch: refs/heads/master
Commit: 9e3426691f925c98ea1f8e4046f87c10cfe1188f
Parents: 8c8b4fa
Author: retobg <reto@apache.org>
Authored: Sat Jan 4 19:14:40 2014 +0100
Committer: retobg <reto@apache.org>
Committed: Sat Jan 4 19:14:40 2014 +0100

----------------------------------------------------------------------
 .../webfragements/WebFragmentRunner.scala       |   4 +-
 .../platform.accountcontrolpanel.core/pom.xml   |   5 +
 .../accountcontrolpanel/MenuItemProvider.scala  |   4 +-
 .../core/SimpleConceptProviderManager.java      |   4 +-
 platform.config.gui/pom.xml                     |   5 +
 .../platform/config/gui/PlatformConfigGui.java  |   4 +-
 .../dashboard/webinterface/DashBoard.java       |   4 +-
 .../platform.dashboard.core/pom.xml             |  34 ++--
 .../dashboard/ContextualMenuGenerator.java      |   2 +
 .../platform/dashboard/GlobalMenuItem.java      | 187 -------------------
 .../dashboard/GlobalMenuItemsProvider.java      |  39 ----
 .../platform/globalmenu/GlobalMenuItem.java     | 187 +++++++++++++++++++
 .../globalmenu/GlobalMenuItemsProvider.java     |  39 ++++
 .../platform/logging/LoggingManager.java        |   4 +-
 .../scripting/scriptmanager/ScriptManager.java  |   4 +-
 .../src/main/scala/Activator.scala              |   4 +-
 .../webinterface/UserManagerWeb.java            |   4 +-
 .../clerezza/rdf/locking/LockOverview.java      |   4 +-
 .../rdf/scala/utils/CollectedIter.scala         |   2 +-
 .../apache/clerezza/rdf/web/core/Backup.java    |   4 +-
 .../clerezza/rdf/web/core/GraphManagement.java  |   4 +-
 21 files changed, 278 insertions(+), 270 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/jaxrs.stanbol.fragments/src/main/scala/org/apache/clerezza/jaxrs/stanbol/webfragements/WebFragmentRunner.scala
----------------------------------------------------------------------
diff --git a/jaxrs.stanbol.fragments/src/main/scala/org/apache/clerezza/jaxrs/stanbol/webfragements/WebFragmentRunner.scala
b/jaxrs.stanbol.fragments/src/main/scala/org/apache/clerezza/jaxrs/stanbol/webfragements/WebFragmentRunner.scala
index ab23e75..2cae248 100644
--- a/jaxrs.stanbol.fragments/src/main/scala/org/apache/clerezza/jaxrs/stanbol/webfragements/WebFragmentRunner.scala
+++ b/jaxrs.stanbol.fragments/src/main/scala/org/apache/clerezza/jaxrs/stanbol/webfragements/WebFragmentRunner.scala
@@ -29,8 +29,8 @@ import javax.servlet.http.HttpServlet
 import javax.ws.rs.ext.ContextResolver
 import javax.ws.rs.ext.Provider
 import org.apache.clerezza.osgi.services.ActivationHelper
-import org.apache.clerezza.platform.dashboard.GlobalMenuItem
-import org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider
 import org.apache.felix.scr.annotations._
 import org.apache.stanbol.commons.web.base.LinkResource
 import org.apache.stanbol.commons.web.base.NavigationLink

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml
----------------------------------------------------------------------
diff --git a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml b/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml
index 90e8d8e..b5203a6 100644
--- a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml
+++ b/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml
@@ -127,6 +127,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scalaserverpages</artifactId>
+            <version>0.4-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.users.core</artifactId>
             <version>0.2-SNAPSHOT</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala
----------------------------------------------------------------------
diff --git a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala
b/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala
index 7ab15dd..ce09780 100644
--- a/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala
+++ b/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/MenuItemProvider.scala
@@ -32,8 +32,8 @@ import java.util.Set
 import javax.security.auth.Subject
 import org.apache.felix.scr.annotations.Component
 import org.apache.felix.scr.annotations.Service
-import org.apache.clerezza.platform.dashboard.GlobalMenuItem
-import org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider
 import org.apache.stanbol.commons.security.UserUtil
 
 /**

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/SimpleConceptProviderManager.java
----------------------------------------------------------------------
diff --git a/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/SimpleConceptProviderManager.java
b/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/SimpleConceptProviderManager.java
index e61a522..98ee7cc 100644
--- a/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/SimpleConceptProviderManager.java
+++ b/platform.concepts/platform.concepts.core/src/main/java/org/apache/clerezza/platform/concepts/core/SimpleConceptProviderManager.java
@@ -39,8 +39,8 @@ import javax.ws.rs.core.Response.Status;
 import javax.ws.rs.core.UriInfo;
 import org.apache.clerezza.jaxrs.utils.TrailingSlash;
 import org.apache.clerezza.platform.concepts.ontologies.CONCEPTS;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItem;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Reference;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.config.gui/pom.xml
----------------------------------------------------------------------
diff --git a/platform.config.gui/pom.xml b/platform.config.gui/pom.xml
index 17a3f9d..1ef5e61 100644
--- a/platform.config.gui/pom.xml
+++ b/platform.config.gui/pom.xml
@@ -83,5 +83,10 @@
             <artifactId>platform.config</artifactId>
             <version>0.4-SNAPSHOT</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.scalaserverpages</artifactId>
+            <version>0.4-SNAPSHOT</version>
+        </dependency>
     </dependencies>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.config.gui/src/main/java/org/apache/clerezza/platform/config/gui/PlatformConfigGui.java
----------------------------------------------------------------------
diff --git a/platform.config.gui/src/main/java/org/apache/clerezza/platform/config/gui/PlatformConfigGui.java
b/platform.config.gui/src/main/java/org/apache/clerezza/platform/config/gui/PlatformConfigGui.java
index c010e4d..647a0e6 100644
--- a/platform.config.gui/src/main/java/org/apache/clerezza/platform/config/gui/PlatformConfigGui.java
+++ b/platform.config.gui/src/main/java/org/apache/clerezza/platform/config/gui/PlatformConfigGui.java
@@ -44,12 +44,12 @@ import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.felix.scr.annotations.Services;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
 import org.osgi.framework.Bundle;
 import org.osgi.service.component.ComponentContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
 import org.apache.clerezza.rdf.core.UriRef;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.dashboard.webinterface/src/main/java/org/apache/clerezza/platform/dashboard/webinterface/DashBoard.java
----------------------------------------------------------------------
diff --git a/platform.dashboard.webinterface/src/main/java/org/apache/clerezza/platform/dashboard/webinterface/DashBoard.java
b/platform.dashboard.webinterface/src/main/java/org/apache/clerezza/platform/dashboard/webinterface/DashBoard.java
index 526d6b2..ccdb0ff 100644
--- a/platform.dashboard.webinterface/src/main/java/org/apache/clerezza/platform/dashboard/webinterface/DashBoard.java
+++ b/platform.dashboard.webinterface/src/main/java/org/apache/clerezza/platform/dashboard/webinterface/DashBoard.java
@@ -38,8 +38,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.clerezza.jaxrs.utils.RedirectUtil;
 import org.apache.clerezza.jaxrs.utils.TrailingSlash;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItem;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.platform.dashboard.ontologies.DASHBOARD;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.dashboard/platform.dashboard.core/pom.xml
----------------------------------------------------------------------
diff --git a/platform.dashboard/platform.dashboard.core/pom.xml b/platform.dashboard/platform.dashboard.core/pom.xml
index 879f2f1..f5bfcfb 100644
--- a/platform.dashboard/platform.dashboard.core/pom.xml
+++ b/platform.dashboard/platform.dashboard.core/pom.xml
@@ -41,10 +41,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>javax.ws.rs</groupId>
-            <artifactId>jsr311-api</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.clerezza</groupId>
             <artifactId>rdf.core</artifactId>
             <version>0.14-SNAPSHOT</version>
@@ -61,21 +57,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
-            <artifactId>platform.typerendering.scalaserverpages</artifactId>
-            <version>0.4-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>jaxrs.utils</artifactId>
-            <version>0.9-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
-            <artifactId>jaxrs.extensions</artifactId>
-            <version>0.6-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.clerezza</groupId>
             <artifactId>platform.dashboard.ontologies</artifactId>
             <version>0.3-SNAPSHOT</version>
         </dependency>
@@ -88,6 +69,21 @@
             <artifactId>org.apache.stanbol.commons.security.core</artifactId>
             <version>0.12.0-SNAPSHOT</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.users.core</artifactId>
+            <version>0.2-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.usermanager</artifactId>
+            <version>0.14-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.clerezza</groupId>
+            <artifactId>platform.typerendering.core</artifactId>
+            <version>0.3-SNAPSHOT</version>
+        </dependency>
     </dependencies>
     <build>
         <plugins>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/ContextualMenuGenerator.java
----------------------------------------------------------------------
diff --git a/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/ContextualMenuGenerator.java
b/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/ContextualMenuGenerator.java
index ab7cedf..968692a 100644
--- a/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/ContextualMenuGenerator.java
+++ b/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/ContextualMenuGenerator.java
@@ -33,6 +33,8 @@ import org.apache.felix.scr.annotations.Service;
 import org.apache.clerezza.platform.typerendering.UserContextProvider;
 import org.apache.clerezza.rdf.utils.GraphNode;
 import org.apache.clerezza.platform.dashboard.ontologies.*;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.rdf.core.BNode;
 import org.apache.clerezza.rdf.core.Literal;
 import org.apache.clerezza.rdf.core.LiteralFactory;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/GlobalMenuItem.java
----------------------------------------------------------------------
diff --git a/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/GlobalMenuItem.java
b/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/GlobalMenuItem.java
deleted file mode 100644
index 28fc7e2..0000000
--- a/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/GlobalMenuItem.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * 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.clerezza.platform.dashboard;
-
-/**
- * This class keeps information about an item for the global menu.
- *
- * @author mir
- */
-public class GlobalMenuItem implements Comparable<GlobalMenuItem> {
-
-    private String path;
-    private String label;
-    private String description;
-    private String identifier;
-    private int priority;
-    private String groupIdentifier;
-
-    /**
-     * Creates a new <code>GlobalMenuItem</code>.
-     *
-     * @param relativeUri of the resource to be shown in the menu.
-     * @param identifier The identifier of the menu item.
-     * @param label Specifies the label of the menu entry.
-     * @param priority the priority, higher numbers appear first in the menu
-     * @param groupIdentifier Specifies the the identifier of the group of which
-     *        the menu item is part.
-     */
-    public GlobalMenuItem(String path, String identifier, String label,
-            int priority, String groupIdentifier) {
-        if (label == null) {
-            throw new IllegalArgumentException("label may not be null");
-        }
-        this.path = path;
-        this.label = label;
-        this.identifier = identifier;
-        this.priority = priority;
-        this.groupIdentifier = groupIdentifier;
-    }
-
-    /**
-     * Creates a new <code>GlobalMenuItem</code>.
-     *
-     * @param relativeUri of the resource to be shown in the menu.
-     * @param identifier The identifier of the menu item.
-     * @param label Specifies the label of the menu entry.
-     * @param description The description of the menu item.
-     * @param priority the priority, higher numbers appear first in the menu
-     * @param groupIdentifier Specifies the the identifier of the group of which
-     *        the menu item is part.
-     */
-    public GlobalMenuItem(String path, String identifier, String label, String description,
-            int priority, String groupIdentifier) {
-        if (label == null) {
-            throw new IllegalArgumentException("label may not be null");
-        }
-        this.path = path;
-        this.label = label;
-        this.description = description;
-        this.identifier = identifier;
-        this.priority = priority;
-        this.groupIdentifier = groupIdentifier;
-    }
-
-    /**
-     * Returns the path of the resource to be shown in the menu. The
-     * path is additional to the bundle prefix and if existing to the
-     * <code>javax.ws.rs.Path</code> annotation of the
-     * <code>GlobalMenuItemsProvider</code> that returned this
-     * <code>GlobalMenuItem</code>.
-     * @return the path
-     */
-    public String getPath() {
-        return path;
-    }
-
-    /**
-     * Returns the label of the menu entry
-     * @return the label
-     */
-    public String getLabel() {
-        return label;
-    }
-
-    /**
-     * Returns the description of the menu entry.
-     * @return the groupIdentifier
-     */
-    public String getDescription() {
-        return description;
-    }
-
-    /**
-     * Return the identifier of the menu entry.
-     *
-     * @return
-     */
-    public String getIdentifier() {
-        return identifier;
-    }
-
-    /**
-     * Returns the the priority within the group, which is used for sorting
-     * the menu Items, higher numbers appear first in the menu
-     * @return the priority
-     */
-    public int getPriority() {
-        return priority;
-    }
-
-    /**
-     * Returns the the identifier of the group of which this menu item is part,
-     * null if this is a top-level item.
-     * @return the groupIdentifier
-     */
-    public String getGroupIdentifier() {
-        return groupIdentifier;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        final GlobalMenuItem other = (GlobalMenuItem) obj;
-        if ((this.path == null) ? (other.path != null) : !this.path.equals(other.path)) {
-            return false;
-        }
-        if (!this.label.equals(other.label)) {
-            return false;
-        }
-        if ((this.description == null) ? (other.description != null) : !this.description.equals(other.description))
{
-            return false;
-        }
-        if (this.priority != other.priority) {
-            return false;
-        }
-        if ((this.groupIdentifier == null) ? (other.groupIdentifier != null) : !this.groupIdentifier.equals(other.groupIdentifier))
{
-            return false;
-        }
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        int hash = 5;
-        hash = 53 * hash + (this.path != null ? this.path.hashCode() : 0);
-        hash = 53 * hash + this.label.hashCode();
-        hash = 53 * hash + (this.description != null ? this.description.hashCode() : 0);
-        hash = 53 * hash + this.priority;
-        hash = 53 * hash + (this.groupIdentifier != null ? this.groupIdentifier.hashCode()
: 0);
-        return hash;
-    }
-
-    
-
-    @Override
-    public int compareTo(GlobalMenuItem o) {
-        if (getPriority() == o.getPriority()) {
-            if (this.equals(o)) {
-                return 0;
-            } else {
-                return getLabel().compareTo(o.getLabel());
-            }
-        }
-        return o.getPriority() - getPriority();
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/GlobalMenuItemsProvider.java
----------------------------------------------------------------------
diff --git a/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/GlobalMenuItemsProvider.java
b/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/GlobalMenuItemsProvider.java
deleted file mode 100644
index 2fa047d..0000000
--- a/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/dashboard/GlobalMenuItemsProvider.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.clerezza.platform.dashboard;
-
-import java.util.Set;
-
-/**
- * An implementation of this interface provides a set of
- * <code>GlobalMenuItem</code>S. A <code>GlobalMenuItem</code> represents
an
- * item in the global menu of the Clerezza Platform.
- *
- * @author mir
- */
-public interface  GlobalMenuItemsProvider {
-
-    /**
-     * Returns a <code>Set</code> of <code>GlobalMenuItem</code>S.
If there is
-     * no <code>GlobalMenuItem</code> available (e.g. the current user has not
-     * the needed permissions) then the returned set is empty.
-     * @return
-     */
-    public Set<GlobalMenuItem> getMenuItems();
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItem.java
----------------------------------------------------------------------
diff --git a/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItem.java
b/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItem.java
new file mode 100644
index 0000000..e552bad
--- /dev/null
+++ b/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItem.java
@@ -0,0 +1,187 @@
+/*
+ * 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.clerezza.platform.globalmenu;
+
+/**
+ * This class keeps information about an item for the global menu.
+ *
+ * @author mir
+ */
+public class GlobalMenuItem implements Comparable<GlobalMenuItem> {
+
+    private String path;
+    private String label;
+    private String description;
+    private String identifier;
+    private int priority;
+    private String groupIdentifier;
+
+    /**
+     * Creates a new <code>GlobalMenuItem</code>.
+     *
+     * @param relativeUri of the resource to be shown in the menu.
+     * @param identifier The identifier of the menu item.
+     * @param label Specifies the label of the menu entry.
+     * @param priority the priority, higher numbers appear first in the menu
+     * @param groupIdentifier Specifies the the identifier of the group of which
+     *        the menu item is part.
+     */
+    public GlobalMenuItem(String path, String identifier, String label,
+            int priority, String groupIdentifier) {
+        if (label == null) {
+            throw new IllegalArgumentException("label may not be null");
+        }
+        this.path = path;
+        this.label = label;
+        this.identifier = identifier;
+        this.priority = priority;
+        this.groupIdentifier = groupIdentifier;
+    }
+
+    /**
+     * Creates a new <code>GlobalMenuItem</code>.
+     *
+     * @param relativeUri of the resource to be shown in the menu.
+     * @param identifier The identifier of the menu item.
+     * @param label Specifies the label of the menu entry.
+     * @param description The description of the menu item.
+     * @param priority the priority, higher numbers appear first in the menu
+     * @param groupIdentifier Specifies the the identifier of the group of which
+     *        the menu item is part.
+     */
+    public GlobalMenuItem(String path, String identifier, String label, String description,
+            int priority, String groupIdentifier) {
+        if (label == null) {
+            throw new IllegalArgumentException("label may not be null");
+        }
+        this.path = path;
+        this.label = label;
+        this.description = description;
+        this.identifier = identifier;
+        this.priority = priority;
+        this.groupIdentifier = groupIdentifier;
+    }
+
+    /**
+     * Returns the path of the resource to be shown in the menu. The
+     * path is additional to the bundle prefix and if existing to the
+     * <code>javax.ws.rs.Path</code> annotation of the
+     * <code>GlobalMenuItemsProvider</code> that returned this
+     * <code>GlobalMenuItem</code>.
+     * @return the path
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * Returns the label of the menu entry
+     * @return the label
+     */
+    public String getLabel() {
+        return label;
+    }
+
+    /**
+     * Returns the description of the menu entry.
+     * @return the groupIdentifier
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Return the identifier of the menu entry.
+     *
+     * @return
+     */
+    public String getIdentifier() {
+        return identifier;
+    }
+
+    /**
+     * Returns the the priority within the group, which is used for sorting
+     * the menu Items, higher numbers appear first in the menu
+     * @return the priority
+     */
+    public int getPriority() {
+        return priority;
+    }
+
+    /**
+     * Returns the the identifier of the group of which this menu item is part,
+     * null if this is a top-level item.
+     * @return the groupIdentifier
+     */
+    public String getGroupIdentifier() {
+        return groupIdentifier;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        final GlobalMenuItem other = (GlobalMenuItem) obj;
+        if ((this.path == null) ? (other.path != null) : !this.path.equals(other.path)) {
+            return false;
+        }
+        if (!this.label.equals(other.label)) {
+            return false;
+        }
+        if ((this.description == null) ? (other.description != null) : !this.description.equals(other.description))
{
+            return false;
+        }
+        if (this.priority != other.priority) {
+            return false;
+        }
+        if ((this.groupIdentifier == null) ? (other.groupIdentifier != null) : !this.groupIdentifier.equals(other.groupIdentifier))
{
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 5;
+        hash = 53 * hash + (this.path != null ? this.path.hashCode() : 0);
+        hash = 53 * hash + this.label.hashCode();
+        hash = 53 * hash + (this.description != null ? this.description.hashCode() : 0);
+        hash = 53 * hash + this.priority;
+        hash = 53 * hash + (this.groupIdentifier != null ? this.groupIdentifier.hashCode()
: 0);
+        return hash;
+    }
+
+    
+
+    @Override
+    public int compareTo(GlobalMenuItem o) {
+        if (getPriority() == o.getPriority()) {
+            if (this.equals(o)) {
+                return 0;
+            } else {
+                return getLabel().compareTo(o.getLabel());
+            }
+        }
+        return o.getPriority() - getPriority();
+    }
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItemsProvider.java
----------------------------------------------------------------------
diff --git a/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItemsProvider.java
b/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItemsProvider.java
new file mode 100644
index 0000000..f4ff7ce
--- /dev/null
+++ b/platform.dashboard/platform.dashboard.core/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItemsProvider.java
@@ -0,0 +1,39 @@
+/*
+ * 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.clerezza.platform.globalmenu;
+
+import java.util.Set;
+
+/**
+ * An implementation of this interface provides a set of
+ * <code>GlobalMenuItem</code>S. A <code>GlobalMenuItem</code> represents
an
+ * item in the global menu of the Clerezza Platform.
+ *
+ * @author mir
+ */
+public interface  GlobalMenuItemsProvider {
+
+    /**
+     * Returns a <code>Set</code> of <code>GlobalMenuItem</code>S.
If there is
+     * no <code>GlobalMenuItem</code> available (e.g. the current user has not
+     * the needed permissions) then the returned set is empty.
+     * @return
+     */
+    public Set<GlobalMenuItem> getMenuItems();
+}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
----------------------------------------------------------------------
diff --git a/platform.logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
b/platform.logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
index 253b9f2..ec342d3 100644
--- a/platform.logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
+++ b/platform.logging/core/src/main/java/org/apache/clerezza/platform/logging/LoggingManager.java
@@ -39,8 +39,8 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 import org.apache.clerezza.jaxrs.utils.RedirectUtil;
 import org.apache.clerezza.jaxrs.utils.TrailingSlash;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItem;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.platform.logging.ontologies.LOGGING;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ScriptManager.java
----------------------------------------------------------------------
diff --git a/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ScriptManager.java
b/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ScriptManager.java
index 05fb3c3..5b13c6c 100644
--- a/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ScriptManager.java
+++ b/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ScriptManager.java
@@ -54,8 +54,8 @@ import org.apache.clerezza.jaxrs.utils.TrailingSlash;
 import org.apache.clerezza.jaxrs.utils.form.FormFile;
 import org.apache.clerezza.jaxrs.utils.form.MultiPartBody;
 import org.apache.clerezza.platform.content.DiscobitsHandler;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItem;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
 import org.apache.clerezza.platform.scripting.NoEngineException;
 import org.apache.clerezza.platform.scripting.ScriptExecution;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.typerendering.gui/src/main/scala/Activator.scala
----------------------------------------------------------------------
diff --git a/platform.typerendering.gui/src/main/scala/Activator.scala b/platform.typerendering.gui/src/main/scala/Activator.scala
index 5e88a85..23b7402 100644
--- a/platform.typerendering.gui/src/main/scala/Activator.scala
+++ b/platform.typerendering.gui/src/main/scala/Activator.scala
@@ -25,8 +25,8 @@ import org.apache.clerezza.rdf.core.BNode
 import org.apache.clerezza.rdf.core.impl.SimpleMGraph
 import org.osgi.framework.{BundleActivator, BundleContext, ServiceRegistration}
 import scala.collection.JavaConversions._
-import org.apache.clerezza.platform.dashboard.GlobalMenuItem
-import org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider
 import org.apache.clerezza.platform.typerendering.{TypeRenderlet, RenderletManager}
 import java.util.HashSet
 import javax.ws.rs._

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/platform.usermanager.webinterface/src/main/java/org/apache/clerezza/platform/usermanager/webinterface/UserManagerWeb.java
----------------------------------------------------------------------
diff --git a/platform.usermanager.webinterface/src/main/java/org/apache/clerezza/platform/usermanager/webinterface/UserManagerWeb.java
b/platform.usermanager.webinterface/src/main/java/org/apache/clerezza/platform/usermanager/webinterface/UserManagerWeb.java
index 9b08f29..3f23de3 100644
--- a/platform.usermanager.webinterface/src/main/java/org/apache/clerezza/platform/usermanager/webinterface/UserManagerWeb.java
+++ b/platform.usermanager.webinterface/src/main/java/org/apache/clerezza/platform/usermanager/webinterface/UserManagerWeb.java
@@ -62,8 +62,8 @@ import org.apache.clerezza.jaxrs.utils.form.MultiPartBody;
 import org.apache.clerezza.permissiondescriptions.PermissionDescripton;
 import org.apache.clerezza.permissiondescriptions.PermissionGatherer;
 import org.apache.clerezza.platform.config.SystemConfig;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItem;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/rdf.locking/src/main/java/org/apache/clerezza/rdf/locking/LockOverview.java
----------------------------------------------------------------------
diff --git a/rdf.locking/src/main/java/org/apache/clerezza/rdf/locking/LockOverview.java b/rdf.locking/src/main/java/org/apache/clerezza/rdf/locking/LockOverview.java
index 2addbea..4ef3429 100644
--- a/rdf.locking/src/main/java/org/apache/clerezza/rdf/locking/LockOverview.java
+++ b/rdf.locking/src/main/java/org/apache/clerezza/rdf/locking/LockOverview.java
@@ -28,8 +28,8 @@ import java.util.Set;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItem;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.rdf.core.UriRef;
 import org.apache.clerezza.rdf.core.access.TcManager;
 import org.apache.clerezza.rdf.core.access.debug.ReadLockDebug;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/CollectedIter.scala
----------------------------------------------------------------------
diff --git a/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/CollectedIter.scala
b/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/CollectedIter.scala
index b0ae23a..ec36962 100644
--- a/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/CollectedIter.scala
+++ b/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/CollectedIter.scala
@@ -100,7 +100,7 @@ class CollectedIter[T](iterCreator: () => Iterator[T], readLock: Lock)
extends i
             readLock.unlock()
           }
       }
-      case e => throw e
+      case e: Exception => throw e
     }
     }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
index 36b0c58..cfb0a64 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/Backup.java
@@ -19,8 +19,8 @@
 package org.apache.clerezza.rdf.web.core;
 
 import org.apache.clerezza.platform.Constants;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItem;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesService;
 import org.apache.clerezza.rdf.core.BNode;
 import org.apache.clerezza.rdf.core.MGraph;

http://git-wip-us.apache.org/repos/asf/clerezza/blob/9e342669/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
----------------------------------------------------------------------
diff --git a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
index 9ded021..118c6f1 100644
--- a/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
+++ b/rdf.web/rdf.web.core/src/main/java/org/apache/clerezza/rdf/web/core/GraphManagement.java
@@ -29,8 +29,8 @@ import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.UriInfo;
 import org.apache.clerezza.jaxrs.utils.TrailingSlash;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItem;
-import org.apache.clerezza.platform.dashboard.GlobalMenuItemsProvider;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
+import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
 import org.apache.clerezza.platform.typerendering.RenderletManager;
 import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
 import org.apache.clerezza.rdf.core.BNode;


Mime
View raw message