You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2023/08/21 13:51:45 UTC
[felix-dev] 01/03: No need to branch depback plugin
This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch jakarta-servlet-6
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
commit 60fbd5ea7050abc5940b73148ebbf5fb5a4ddd31
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Aug 21 14:43:11 2023 +0200
No need to branch depback plugin
---
webconsole-plugins/deppack/changelog.txt | 6 -
webconsole-plugins/deppack/pom.xml | 154 ------------
.../plugins/deppack/internal/Activator.java | 98 --------
.../plugins/deppack/internal/WebConsolePlugin.java | 260 ---------------------
.../main/resources/OSGI-INF/l10n/bundle.properties | 40 ----
.../resources/OSGI-INF/l10n/bundle_bg.properties | 40 ----
.../resources/OSGI-INF/l10n/bundle_de.properties | 40 ----
.../resources/OSGI-INF/l10n/bundle_ru.properties | 40 ----
.../deppack/src/main/resources/res/plugin.css | 19 --
.../deppack/src/main/resources/res/plugin.html | 55 -----
.../deppack/src/main/resources/res/plugin.js | 172 --------------
11 files changed, 924 deletions(-)
diff --git a/webconsole-plugins/deppack/changelog.txt b/webconsole-plugins/deppack/changelog.txt
deleted file mode 100755
index b1b34642b2..0000000000
--- a/webconsole-plugins/deppack/changelog.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Initial Release 1.0.0
----------------------
-
-** Improvement
- * [FELIX-3861] - Set felix.webconsole.category on Web Console plugins
- * [FELIX-5510] - Remove usage of org.json form web console plugins
\ No newline at end of file
diff --git a/webconsole-plugins/deppack/pom.xml b/webconsole-plugins/deppack/pom.xml
deleted file mode 100644
index 424dd9f343..0000000000
--- a/webconsole-plugins/deppack/pom.xml
+++ /dev/null
@@ -1,154 +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. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.felix</groupId>
- <artifactId>felix-parent</artifactId>
- <version>8-SNAPSHOT</version>
- <relativePath>../../../pom/pom.xml</relativePath>
- </parent>
-
- <artifactId>org.apache.felix.webconsole.plugins.deppack</artifactId>
- <packaging>bundle</packaging>
- <version>3.0.0-SNAPSHOT</version>
-
- <name>Apache Felix Web Console Deployment Packages Plugin</name>
- <description>
- This is a plugin for the Apache Felix OSGi web console for displaying Deployment Packages.
- </description>
-
- <scm>
- <connection>scm:git:https://github.com/apache/felix-dev.git</connection>
- <developerConnection>scm:git:https://github.com/apache/felix-dev.git</developerConnection>
- <url>https://gitbox.apache.org/repos/asf?p=felix-dev.git</url>
- </scm>
-
- <properties>
- <felix.java.version>17</felix.java.version>
- </properties>
-
- <build>
- <!-- add UTF-8-to-ISO translated resources -->
- <resources>
- <resource>
- <directory>${basedir}/src/main/resources</directory>
- </resource>
- <resource>
- <directory>target/classes</directory>
- <includes>
- <include>OSGI-INF/**</include>
- </includes>
- <filtering>false</filtering>
- </resource>
- </resources>
-
- <plugins>
- <!-- translate UTF-8 encoded properties files to ISO-8859-1 -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>native2ascii-maven-plugin</artifactId>
- <version>1.0-beta-1</version>
- <executions>
- <execution>
- <goals>
- <goal>native2ascii</goal>
- </goals>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <configuration>
- <includes>
- <include>src/**</include>
- </includes>
- <excludes>
- <exclude>src/main/resources/res/*.html</exclude>
- </excludes>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>5.1.8</version>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>
- ${artifactId}
- </Bundle-SymbolicName>
- <Bundle-Activator>
- org.apache.felix.webconsole.plugins.deppack.internal.Activator
- </Bundle-Activator>
- <Embed-Dependency>
- org.apache.felix.utils;inline=org/apache/felix/utils/json/JSONWriter**
- </Embed-Dependency>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>jakarta.servlet</groupId>
- <artifactId>jakarta.servlet-api</artifactId>
- <version>6.0.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-fileupload2-core</artifactId>
- <version>2.0.0-M3-SNAPSHOT</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-fileupload2-jakarta-servlet6</artifactId>
- <version>2.0.0-M3-SNAPSHOT</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>osgi.core</artifactId>
- <version>8.0.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.service.deploymentadmin</artifactId>
- <version>1.1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.webconsole</artifactId>
- <version>6.0.0-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.utils</artifactId>
- <version>1.11.8</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/Activator.java b/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/Activator.java
deleted file mode 100644
index 5bf71d4359..0000000000
--- a/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/Activator.java
+++ /dev/null
@@ -1,98 +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.felix.webconsole.plugins.deppack.internal;
-
-import org.apache.felix.webconsole.SimpleWebConsolePlugin;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.deploymentadmin.DeploymentAdmin;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
-
-/**
- * Activator is the main starting class.
- */
-public class Activator implements BundleActivator, ServiceTrackerCustomizer
-{
-
- private ServiceTracker tracker;
- private BundleContext context;
-
- private SimpleWebConsolePlugin plugin;
-
- /**
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public final void start(BundleContext context) throws Exception
- {
- this.context = context;
- this.tracker = new ServiceTracker(context, DeploymentAdmin.class.getName(), this);
- this.tracker.open();
- }
-
- /**
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public final void stop(BundleContext context) throws Exception
- {
- if (tracker != null)
- {
- tracker.close();
- tracker = null;
- }
- }
-
- // - begin tracker
- /**
- * @see org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(org.osgi.framework.ServiceReference,
- * java.lang.Object)
- */
- public final void modifiedService(ServiceReference reference, Object service)
- {/* unused */
- }
-
- /**
- * @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
- */
- public final Object addingService(ServiceReference reference)
- {
- SimpleWebConsolePlugin plugin = this.plugin;
- if (plugin == null)
- {
- this.plugin = plugin = new WebConsolePlugin(tracker).register(context);
- }
-
- return context.getService(reference);
- }
-
- /**
- * @see org.osgi.util.tracker.ServiceTrackerCustomizer#removedService(org.osgi.framework.ServiceReference,
- * java.lang.Object)
- */
- public final void removedService(ServiceReference reference, Object service)
- {
- SimpleWebConsolePlugin plugin = this.plugin;
-
- if (tracker.getTrackingCount() == 0 && plugin != null)
- {
- plugin.unregister();
- this.plugin = null;
- }
-
- }
-}
diff --git a/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/WebConsolePlugin.java b/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/WebConsolePlugin.java
deleted file mode 100644
index c8fd45b45f..0000000000
--- a/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/WebConsolePlugin.java
+++ /dev/null
@@ -1,260 +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.felix.webconsole.plugins.deppack.internal;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Map;
-
-import jakarta.servlet.ServletException;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-
-import org.apache.commons.fileupload2.core.FileItem;
-import org.apache.felix.webconsole.AbstractWebConsolePlugin;
-import org.apache.felix.webconsole.DefaultVariableResolver;
-import org.apache.felix.webconsole.SimpleWebConsolePlugin;
-import org.apache.felix.webconsole.WebConsoleUtil;
-import org.apache.felix.webconsole.internal.Util;
-import org.apache.felix.utils.json.JSONWriter;
-import org.osgi.service.deploymentadmin.DeploymentAdmin;
-import org.osgi.service.deploymentadmin.DeploymentPackage;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * DepPackServlet provides a plugin for managing deployment admin packages.
- */
-class WebConsolePlugin extends SimpleWebConsolePlugin
-{
-
- private static final String LABEL = "deppack"; //$NON-NLS-1$
- private static final String TITLE = "%deppack.pluginTitle"; //$NON-NLS-1$
- private static final String CSS[] = { "/" + LABEL + "/res/plugin.css" }; //$NON-NLS-1$ //$NON-NLS-2$
- private static final String CATEGORY = "OSGi"; //$NON-NLS-1$
-
- //
- private static final String ACTION_DEPLOY = "deploydp"; //$NON-NLS-1$
- private static final String ACTION_UNINSTALL = "uninstalldp"; //$NON-NLS-1$
- private static final String PARAMETER_PCK_FILE = "pckfile"; //$NON-NLS-1$
-
- // templates
- private final String TEMPLATE;
-
- private final ServiceTracker adminTracker;
-
- /** Default constructor */
- WebConsolePlugin(ServiceTracker adminTracker)
- {
- super(LABEL, TITLE, CSS);
-
- // load templates
- TEMPLATE = readTemplateFile("/res/plugin.html"); //$NON-NLS-1$
- this.adminTracker = adminTracker;
- }
-
- public String getCategory()
- {
- return CATEGORY;
- }
-
- /**
- * @see jakarta.servlet.http.HttpServlet#doPost(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)
- */
- protected void doPost(HttpServletRequest req, HttpServletResponse resp)
- throws ServletException, IOException
- {
- // get the uploaded data
- final String action = WebConsoleUtil.getParameter(req, Util.PARAM_ACTION);
- if (ACTION_DEPLOY.equals(action))
- {
- Map params = (Map) req.getAttribute(AbstractWebConsolePlugin.ATTR_FILEUPLOAD);
- if (params != null)
- {
- final FileItem pck = getFileItem(params, PARAMETER_PCK_FILE, false);
- final DeploymentAdmin admin = (DeploymentAdmin) adminTracker.getService();
- if (admin != null)
- {
- try
- {
- admin.installDeploymentPackage(pck.getInputStream());
-
- final String uri = req.getRequestURI();
- resp.sendRedirect(uri);
- return;
- }
- catch ( /*Deployment*/Exception e)
- {
- throw new ServletException("Unable to deploy package.", e);
- }
- }
- }
- throw new ServletException("Upload file or deployment admin missing.");
- }
- else if (ACTION_UNINSTALL.equals(action))
- {
- final String pckId = req.getPathInfo().substring(
- req.getPathInfo().lastIndexOf('/') + 1);
- if (pckId != null && pckId.length() > 0)
- {
- final DeploymentAdmin admin = (DeploymentAdmin) adminTracker.getService();
- if (admin != null)
- {
- try
- {
- final DeploymentPackage pck = admin.getDeploymentPackage(pckId);
- if (pck != null)
- {
- pck.uninstall();
- }
- }
- catch ( /*Deployment*/Exception e)
- {
- throw new ServletException("Unable to undeploy package.", e);
- }
- }
-
- }
-
- final PrintWriter pw = resp.getWriter();
- pw.println("{ \"reload\":true }");
- return;
- }
- throw new ServletException("Unknown action: " + action);
- }
-
- private static final FileItem getFileItem(Map params, String name, boolean isFormField)
- {
- FileItem[] items = (FileItem[]) params.get(name);
- if (items != null)
- {
- for (int i = 0; i < items.length; i++)
- {
- if (items[i].isFormField() == isFormField)
- {
- return items[i];
- }
- }
- }
-
- // nothing found, fail
- return null;
- }
-
- /**
- * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#renderContent(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse)
- */
- protected void renderContent(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException
- {
-
- final DeploymentAdmin admin = (DeploymentAdmin) adminTracker.getService();
-
- StringWriter w = new StringWriter();
- PrintWriter w2 = new PrintWriter(w);
- JSONWriter jw = new JSONWriter(w2);
- jw.object();
- if (null == admin)
- {
- jw.key("error"); //$NON-NLS-1$
- jw.value(true);
- }
- else
- {
- final DeploymentPackage[] packages = admin.listDeploymentPackages();
- jw.key("data"); //$NON-NLS-1$
-
- jw.array();
- for (int i = 0; i < packages.length; i++)
- {
- packageInfoJson(jw, packages[i]);
- }
- jw.endArray();
-
- }
- jw.endObject();
-
-
- // prepare variables
- DefaultVariableResolver vars = ((DefaultVariableResolver) WebConsoleUtil.getVariableResolver(request));
- vars.put("__data__", w.toString()); //$NON-NLS-1$
-
- response.getWriter().print(TEMPLATE);
- }
-
- private static final void packageInfoJson(JSONWriter jw, DeploymentPackage pack)
- throws IOException
- {
- jw.object();
- jw.key("id"); //$NON-NLS-1$
- jw.value(pack.getName());
- jw.key("name"); //$NON-NLS-1$
- jw.value(pack.getName());
- jw.key("state"); //$NON-NLS-1$
- jw.value(pack.getVersion());
-
- jw.key("actions"); //$NON-NLS-1$
- jw.array();
-
- jw.object();
- jw.key("enabled"); //$NON-NLS-1$
- jw.value(true);
- jw.key("name"); //$NON-NLS-1$
- jw.value("Uninstall");
- jw.key("link"); //$NON-NLS-1$
- jw.value(ACTION_UNINSTALL);
- jw.endObject();
-
- jw.endArray();
-
- jw.key("props"); //$NON-NLS-1$
- jw.array();
- jw.object();
- jw.key("key");
- jw.value("Package Name");
- jw.key("value");
- jw.value(pack.getName());
- jw.endObject();
-
- jw.object();
- jw.key("key");
- jw.value("Version");
- jw.key("value");
- jw.value(pack.getVersion());
- jw.endObject();
-
- final StringBuilder buffer = new StringBuilder();
- for (int i = 0; i < pack.getBundleInfos().length; i++)
- {
- buffer.append(pack.getBundleInfos()[i].getSymbolicName());
- buffer.append(" - "); //$NON-NLS-1$
- buffer.append(pack.getBundleInfos()[i].getVersion());
- buffer.append("<br/>"); //$NON-NLS-1$
- }
- jw.object();
- jw.key("key");
- jw.value("Bundles");
- jw.key("value");
- jw.value(buffer.toString());
- jw.endObject();
-
- jw.endArray();
-
- jw.endObject();
- }
-
-}
diff --git a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle.properties b/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle.properties
deleted file mode 100644
index 1a0f302576..0000000000
--- a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle.properties
+++ /dev/null
@@ -1,40 +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.
-
-#
-# Web Console strings for reference all strings here are commented.
-# This file may be used to produce a translation of the strings
-#
-# Note that properties files are ISO-8859-1 encoded. To provide translations
-# for languages requiring different character encodings, you may use the
-# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
-# to translate the natively encoded files to ISO-8859-1 during bundle build
-#
-# Translations requiring non-ISO-8859-1 encoding are placed in the
-# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
-# plugin while building the bundle
-#
-
-# Deployment Admin plugin
-deppack.pluginTitle=Deployment Packages
-deppack.status.no_data=No deployment packages installed!
-deppack.status.no_service=Deployment Admin is not installed/running!
-deppack.status.ok=Deployment Admin service is running
-deppack.details=Details
-deppack.actions=Actions
-deppack.install_update=Install or Update
-deppack.package.name=Package Name
-deppack.bundles=Bundles
-deppack.uninstall=Uninstall
diff --git a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_bg.properties b/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_bg.properties
deleted file mode 100644
index 89c20a2114..0000000000
--- a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_bg.properties
+++ /dev/null
@@ -1,40 +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.
-
-#
-# Web Console strings for reference all strings here are commented.
-# This file may be used to produce a translation of the strings
-#
-# Note that properties files are ISO-8859-1 encoded. To provide translations
-# for languages requiring different character encodings, you may use the
-# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
-# to translate the natively encoded files to ISO-8859-1 during bundle build
-#
-# Translations requiring non-ISO-8859-1 encoding are placed in the
-# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
-# plugin while building the bundle
-# native2ascii -encoding utf-8 bundle_bg.raw_properties bundle_bg.properties
-
-# Deployment Admin plugin
-deppack.pluginTitle=Управление на пакети
-deppack.status.no_data=Няма инсталирани пакети!
-deppack.status.no_service=Услугата Deployment Admin не е налична в момента!
-deppack.status.ok=Deployment Admin е наличен и по-долу е показан списъка с пакет
-deppack.details=Детайли
-deppack.actions=Действия
-deppack.install_update=Инсталиране/обновяване
-deppack.package.name=Име на пакет
-deppack.bundles=Бъндъли
-deppack.uninstall=Премахване
diff --git a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_de.properties b/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_de.properties
deleted file mode 100644
index 864181f56e..0000000000
--- a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_de.properties
+++ /dev/null
@@ -1,40 +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.
-
-#
-# Web Console strings for reference all strings here are commented.
-# This file may be used to produce a translation of the strings
-#
-# Note that properties files are ISO-8859-1 encoded. To provide translations
-# for languages requiring different character encodings, you may use the
-# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
-# to translate the natively encoded files to ISO-8859-1 during bundle build
-#
-# Translations requiring non-ISO-8859-1 encoding are placed in the
-# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
-# plugin while building the bundle
-#
-
-# Deployment Admin plugin
-deppack.pluginTitle=Deployment Packages
-deppack.status.no_data=Kein Deployment Package ist installiert!
-deppack.status.no_service=Deployment Admin Dienst ist nicht instaliert/aktiv!
-deppack.status.ok=Deployment Admin Dienst ist aktiv
-deppack.details=Details
-deppack.actions=Aktionen
-deppack.install_update=Installieren oder Aktualisieren
-deppack.package.name=Package Name
-deppack.bundles=Bundles
-deppack.uninstall=Deinstallieren
diff --git a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_ru.properties b/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_ru.properties
deleted file mode 100644
index 6895031828..0000000000
--- a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle_ru.properties
+++ /dev/null
@@ -1,40 +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.
-
-#
-# Web Console strings for reference all strings here are commented.
-# This file may be used to produce a translation of the strings
-#
-# Note that properties files are ISO-8859-1 encoded. To provide translations
-# for languages requiring different character encodings, you may use the
-# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
-# to translate the natively encoded files to ISO-8859-1 during bundle build
-#
-# Translations requiring non-ISO-8859-1 encoding are placed in the
-# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
-# plugin while building the bundle
-#
-
-# Deployment Admin plugin
-deppack.pluginTitle=Управление пакетами
-deppack.status.no_data=Нет установочных пакетов!
-deppack.status.no_service=Сервис Deployment Admin не установлен или не запущен.
-deppack.status.ok=Сервис Deployment Admin работает
-deppack.details=Подробно
-deppack.actions=Действия
-deppack.install_update=Установить/обновить
-deppack.package.name=Имя пакета
-deppack.bundles=Модули
-deppack.uninstall=Удалить
diff --git a/webconsole-plugins/deppack/src/main/resources/res/plugin.css b/webconsole-plugins/deppack/src/main/resources/res/plugin.css
deleted file mode 100644
index c767846deb..0000000000
--- a/webconsole-plugins/deppack/src/main/resources/res/plugin.css
+++ /dev/null
@@ -1,19 +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.
- */
-
-.pkgname { cursor:pointer }
-.pkgname span { float:left }
diff --git a/webconsole-plugins/deppack/src/main/resources/res/plugin.html b/webconsole-plugins/deppack/src/main/resources/res/plugin.html
deleted file mode 100644
index ba16fcdb29..0000000000
--- a/webconsole-plugins/deppack/src/main/resources/res/plugin.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<script type="text/javascript" src="${pluginRoot}/res/plugin.js"></script>
-<script type="text/javascript">
-// <![CDATA[
-var i18n = {
- status_no_data : "${deppack.status.no_data}",
- status_no_serv : "${deppack.status.no_service}",
- status_ok : "${deppack.status.ok}",
- package_name : "${deppack.package.name}",
- version : "${version}",
- bundles : "${deppack.bundles}",
- uninstall : "${deppack.uninstall}"
-}
-var packageListData = ${__data__};
-// ]]>
-</script>
-
-<p class="statline"> </p>
-
-<div id="dps1"> <!-- will be hidden if no DP service available -->
-<!-- top header -->
-<form method="post" enctype="multipart/form-data" action="${pluginRoot}">
- <div class="ui-widget-header ui-corner-top buttonGroup" style="text-align: right">
- <input name="action" type="hidden" value="deploydp" />
- <input name="pckfile" type="file" size="50" />
- <input type="submit" value="${deppack.install_update}" />
- </div>
-</form>
-
-<div id="dps2"> <!-- will be hidden if no data available -->
- <table id="plugin_table" class="nicetable">
- <thead>
- <tr>
- <th>${id}</th>
- <th style="width:100%">${deppack.details}</th>
- <th>${version}</th>
- <th colspan="1">${deppack.actions}</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td colspan="5"> </td>
- </tr>
- </tbody>
- </table>
-
- <!-- bottom header -->
- <form method="post" enctype="multipart/form-data" action="${pluginRoot}">
- <div class="ui-widget-header ui-corner-bottom buttonGroup" style="text-align: right">
- <input name="action" type="hidden" value="deploydp" />
- <input name="pckfile" type="file" size="50" />
- <input type="submit" value="${deppack.install_update}" />
- </div>
- </form>
-</div><!--dps2-->
-</div><!--dps1-->
diff --git a/webconsole-plugins/deppack/src/main/resources/res/plugin.js b/webconsole-plugins/deppack/src/main/resources/res/plugin.js
deleted file mode 100644
index 149590e91e..0000000000
--- a/webconsole-plugins/deppack/src/main/resources/res/plugin.js
+++ /dev/null
@@ -1,172 +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.
- */
-
-function fixId(id) { return id.replace('.', '_'); }
-
-function data( /* Array of Object */ dataArray ) { // render components
- plugin_table.find('tbody').empty();
- if (dataArray.length == 1) {
- entry( dataArray[0], true );
- } else {
- for ( var idx in dataArray ) {
- entry( dataArray[idx] );
- }
- }
-}
-
-function entry( /* Object */ dataEntry, /* boolean */ singleEntry ) {
- var id = fixId(dataEntry.id);
- var trElement = tr( 'ui-state-active', { 'id': 'entry' + id });
-
- // entry brief
- entryInternal( trElement, dataEntry, singleEntry );
- plugin_table.append(trElement);
-
- // dataEntry detailed properties
- trElement = tr( 'ui-helper-hidden', {
- 'id' : 'entry' + id + '_details'
- });
- if (dataEntry.props) {
- getDataEntryDetails( trElement, dataEntry.props );
- }
- plugin_table.append(trElement);
-}
-
-function entryInternal( /* Element */ parent, /* Object */ dataEntry, /* boolean */ singleEntry ) {
- var id = dataEntry.id;
- var _id = fixId(id);
-
- parent.appendChild( td( null, null, [ text( id ) ] ) );
- parent.appendChild( td( null,
- {
- 'onclick': 'toggleDetails("#entry' + _id + '")',
- 'class': 'pkgname'
- },
- [
- createElement( 'span', 'ui-icon ui-icon-triangle-1-e', { id: 'entry' + _id + '_icon'} ),
- text(dataEntry.name)
- ]
- )
- );
- parent.appendChild( td( null, null, [ text( dataEntry.state ) ] ) );
-
- for ( var aidx in dataEntry.actions ) {
- var action = dataEntry.actions[aidx];
- parent.appendChild( actionButton( action.enabled, id, action.link, action.name ) );
- }
-}
-
-
-/* Element */ function actionButton( /* boolean */ enabled, /* long */ id, /* String */ op, /* String */ opLabel ) {
- var buttonTd = td( "content", { align: "right" } );
- if ( op ) {
- switch (opLabel) {
- case "Uninstall" : opLabel = i18n.uninstall; break;
- }
- var input = createElement( "input", null, {
- type: 'button',
- value: opLabel,
- onclick: 'changeDataEntryState("' + id + '", "' + op + '");'
- });
- if (!enabled) {
- input.setAttribute( "disabled", true );
- $(input).addClass('ui-state-disabled');
- }
- buttonTd.appendChild( input );
- } else {
- addText( buttonTd, "\u00a0" );
- }
- return buttonTd;
-}
-
-
-function getDataEntryDetails( /* Element */ parent, /* Array of Object */ details )
-{
- parent.appendChild( addText( td( "content"), "\u00a0" ) );
-
- var tdEl = td( null, { colspan: 4 } );
- parent.appendChild( tdEl );
-
- var tableEl = createElement( "table", null, { border: 0 } );
- tdEl.appendChild( tableEl );
-
- var tbody = createElement( "tbody" );
- tableEl.appendChild( tbody );
- for (var idx in details) {
- var prop = details[idx];
- var trEl = tr();
- var key = prop.key;
- switch (key) {
- case 'Package Name': key = i18n.package_name; break;
- case 'Version' : key = i18n.version; break;
- case 'Bundles' : key = i18n.bundles; break;
- }
- trEl.appendChild( addText( td( null, { noWrap: true } ), key ) );
-
- var proptd = td();
- trEl.appendChild( proptd );
- $(proptd).html( prop.value ? prop.value : "\u00a0");
-
- tbody.appendChild( trEl );
- }
- }
-
-
-function changeDataEntryState(/* long */ id, /* String */ action) {
- var parm = pluginRoot + "/" + id + "?action=" + action;
- $.post(parm, null, function() { // always reload
- document.location.reload();
- }, "text");
-}
-
-
-function toggleDetails(name) {
- var icon = $(name + '_icon');
- var details = $(name + '_details');
- var show = icon.attr('show');
- if (typeof show == 'undefined') show = '';
- icon.attr('show', show ? '' : 'true');
-
- if (show == 'true') {
- icon.removeClass('ui-icon-triangle-1-s').addClass('ui-icon-triangle-1-e');
- details.addClass('ui-helper-hidden');
- } else {
- icon.removeClass('ui-icon-triangle-1-e').addClass('ui-icon-triangle-1-s');
- details.removeClass('ui-helper-hidden');
- }
-}
-
-var plugin_table = false;
-$(document).ready(function() {
- plugin_table = $('#plugin_table');
- var /* Array of Data Objects */ bundleData = packageListData;
- if (bundleData.error) {
- $('.statline').text(i18n.status_no_serv);
- $('#dps1').addClass('ui-helper-hidden');
- } else if (!bundleData.data || bundleData.data.length == 0) {
- $('.statline').text(i18n.status_no_data);
- $('#dps1').removeClass('ui-helper-hidden');
- $('#dps2').addClass('ui-helper-hidden');
- } else {
- data( bundleData.data );
- $('.statline').text(i18n.status_ok);
- $('#dps1').removeClass('ui-helper-hidden');
- $('#dps2').removeClass('ui-helper-hidden');
- initStaticWidgets(plugin_table);
- }
-});
-