first version of restructured ui (with bootstrap)
Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/7f6c383e Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/7f6c383e Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/7f6c383e Branch: refs/heads/MARMOTTA-228 Commit: 7f6c383e1c5775999bdfd5d41d876a3f197f6ef9 Parents: 8034519 Author: tkurz <[email protected]> Authored: Fri May 10 15:42:31 2013 +0200 Committer: tkurz <[email protected]> Committed: Fri May 10 15:42:31 2013 +0200 ---------------------------------------------------------------------- .../platform/core/model/template/MenuItemType.java | 9 ++ .../platform/core/services/modules/AdminPage.java | 101 --------------- .../core/services/modules/AdminPageContainer.java | 56 -------- 3 files changed, 9 insertions(+), 157 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7f6c383e/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItemType.java ---------------------------------------------------------------------- diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItemType.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItemType.java new file mode 100644 index 0000000..ce212f6 --- /dev/null +++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/model/template/MenuItemType.java @@ -0,0 +1,9 @@ +package org.apache.marmotta.platform.core.model.template; + +/** + * ... + * <p/> + * Author: Thomas Kurz ([email protected]) + */ +public enum MenuItemType { +} http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7f6c383e/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPage.java ---------------------------------------------------------------------- diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPage.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPage.java deleted file mode 100644 index 4ab3295..0000000 --- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPage.java +++ /dev/null @@ -1,101 +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.marmotta.platform.core.services.modules; - -import org.apache.marmotta.platform.core.exception.MarmottaException; -import org.apache.marmotta.platform.core.exception.TemplatingException; - -import java.util.List; - -/** - * This class is used for more complex AdminPage information (e.g. for Templating). - * <p/> - * Author: Thomas Kurz ([email protected]) - */ -public class AdminPage implements Comparable<AdminPage> { - - private String name; - private String path; - private boolean important = false; - private int number = 0; - - /** - * create AdminPage object - * @param number for sorting - * @param path path to page - * @param name name (e.g. in the menu display) - * @param important if true, the page can appear in a 'special link' section - * @throws MarmottaException - */ - AdminPage(int number, String path, String name, boolean important) throws MarmottaException { - if(path==null) throw new MarmottaException("path for admin page must be defined"); - this.path = path; - - if(name != null) this.name = name; - else this.name = getNameFromPath(path); - - this.important = important; - } - - /** - * Creates and AdminPage just from path - * @param path - */ - AdminPage(String path) { - this.path= path; - this.name = getNameFromPath(path); - } - - /** - * returns a 'useful' name from path - * @param path - * @return - */ - private String getNameFromPath(String path) { - return path.substring(path.lastIndexOf("/")).replaceAll("/"," ").replaceAll("_"," ").replaceAll(".html","").replaceAll(".jsp",""); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - /** - * if numbers are used, the sorting is based on numbers, otherwise on alphabetical order of names - * @param adminPage - * @return - */ - @Override - public int compareTo(AdminPage adminPage) { - if(number != adminPage.number) { - return name.compareTo(adminPage.name); - } else return ((Integer)number).compareTo(adminPage.number); - } -} http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7f6c383e/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPageContainer.java ---------------------------------------------------------------------- diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPageContainer.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPageContainer.java deleted file mode 100644 index 438707b..0000000 --- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/modules/AdminPageContainer.java +++ /dev/null @@ -1,56 +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.marmotta.platform.core.services.modules; - -import java.util.List; - -/** - * ... - * <p/> - * Author: Thomas Kurz ([email protected]) - */ -public class AdminPageContainer implements Comparable<AdminPageContainer> { - - private int number = 0; - private String name; - private List<String> modules; - - public AdminPageContainer(String name) { - this.name = name; - } - - @Override - public int compareTo(AdminPageContainer adminPageContainer) { - if(number != adminPageContainer.number) return ((Integer)number).compareTo(adminPageContainer.number); - return name.compareTo(adminPageContainer.name); - } - - public boolean equals(String s) { - return name.equals(s); - } - - public void addModule(String module) { - modules.add(module); - } - - public void setNumber(int number) { - this.number = number; - } - -}
