Permalink
Browse files

Fix compiler warnings for most of the classes. Added serial version I…

…D and @SuppressWarnings where necessary.

git-svn-id: https://svn.apache.org/repos/asf/karaf/webconsole/trunk@1363712 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 59e3c04 commit 62959674eb2e8ae26a432d337695c5beb08759d5 @splatch splatch committed Jul 20, 2012
Showing with 423 additions and 86 deletions.
  1. +5 −0 camel/src/main/java/org/apache/karaf/webconsole/camel/internal/CamelPage.java
  2. +5 −0 camel/src/main/java/org/apache/karaf/webconsole/camel/internal/context/CamelContextModel.java
  3. +52 −0 ...l/src/main/java/org/apache/karaf/webconsole/camel/internal/context/CamelContextsDataProvider.java
  4. +8 −20 camel/src/main/java/org/apache/karaf/webconsole/camel/internal/context/CamelContextsPage.java
  5. +6 −0 camel/src/main/java/org/apache/karaf/webconsole/camel/internal/context/ContextActionsPanel.java
  6. +6 −0 camel/src/main/java/org/apache/karaf/webconsole/camel/internal/context/DumpPage.java
  7. +2 −2 camel/src/main/java/org/apache/karaf/webconsole/camel/internal/tracking/TraceProcessor.java
  8. +6 −0 camel/src/main/java/org/apache/karaf/webconsole/camel/internal/widget/CamelWidget.java
  9. +2 −0 core/src/main/java/org/apache/karaf/webconsole/core/BasePage.java
  10. +1 −4 core/src/main/java/org/apache/karaf/webconsole/core/dashboard/DashboardPage.java
  11. +4 −7 core/src/main/java/org/apache/karaf/webconsole/core/navigation/markup/ModuleTabPanel.java
  12. +2 −0 core/src/main/java/org/apache/karaf/webconsole/core/page/LoginPage.java
  13. +2 −0 core/src/main/java/org/apache/karaf/webconsole/core/page/SecuredPage.java
  14. +2 −0 core/src/main/java/org/apache/karaf/webconsole/core/page/SidebarPage.java
  15. +2 −0 core/src/main/java/org/apache/karaf/webconsole/core/page/SinglePage.java
  16. +2 −0 core/src/main/java/org/apache/karaf/webconsole/core/preferences/PreferencesPage.java
  17. +1 −0 core/src/test/java/org/apache/karaf/webconsole/core/TestTargetLocator.java
  18. +1 −0 core/src/test/java/org/apache/karaf/webconsole/core/page/SidebarPageTest.java
  19. +1 −0 core/src/test/java/org/apache/karaf/webconsole/core/page/SinglePageTest.java
  20. +1 −0 core/src/test/java/org/apache/karaf/webconsole/core/test/AlwaysAuthenticatedWebSession.java
  21. +1 −0 core/src/test/java/org/apache/karaf/webconsole/core/test/BaseLinkAnswer.java
  22. +1 −0 core/src/test/java/org/apache/karaf/webconsole/core/test/LinkAnswer.java
  23. +1 −0 core/src/test/java/org/apache/karaf/webconsole/core/test/LinksAnswer.java
  24. +3 −0 cxf/src/main/java/org/apache/karaf/webconsole/cxf/internal/navigation/CxfConsoleTabProvider.java
  25. +4 −0 cxf/src/main/java/org/apache/karaf/webconsole/cxf/internal/services/BusModel.java
  26. +6 −0 cxf/src/main/java/org/apache/karaf/webconsole/cxf/internal/services/CxfBusesActionPanel.java
  27. +6 −0 cxf/src/main/java/org/apache/karaf/webconsole/cxf/internal/services/CxfServicesPage.java
  28. +9 −3 cxf/src/main/java/org/apache/karaf/webconsole/cxf/internal/services/DetailsPage.java
  29. +9 −4 cxf/src/main/java/org/apache/karaf/webconsole/cxf/internal/services/InterceptorView.java
  30. +5 −0 cxf/src/main/java/org/apache/karaf/webconsole/cxf/internal/trace/TraceInterceptor.java
  31. +2 −0 karaf/admin/src/main/java/org/apache/karaf/webconsole/karaf/admin/AdminPage.java
  32. +3 −0 karaf/admin/src/main/java/org/apache/karaf/webconsole/karaf/admin/create/CreateInstancePage.java
  33. +2 −1 karaf/admin/src/main/java/org/apache/karaf/webconsole/karaf/admin/list/InstanceActionsPanel.java
  34. +2 −0 karaf/admin/src/main/java/org/apache/karaf/webconsole/karaf/admin/list/InstancePage.java
  35. +2 −0 karaf/core/src/main/java/org/apache/karaf/webconsole/karaf/core/KarafOverviewPage.java
  36. +2 −0 karaf/core/src/main/java/org/apache/karaf/webconsole/karaf/core/model/WicketKaraf.java
  37. +5 −0 karaf/feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/FeatureModel.java
  38. +5 −0 karaf/feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/FeaturesProvider.java
  39. +5 −0 karaf/feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/KarafFeaturesPage.java
  40. +5 −0 karaf/feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/MissingFeatureException.java
  41. +6 −1 karaf/feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/RepositoriesProvider.java
  42. +8 −2 ...feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/feature/FeaturesActionsPanel.java
  43. +4 −1 karaf/feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/feature/FeaturesPage.java
  44. +5 −0 karaf/feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/model/RepositoryModel.java
  45. +5 −0 ...re/src/main/java/org/apache/karaf/webconsole/karaf/feature/model/RepositoryNotFoundException.java
  46. +14 −9 ...feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/repository/AddRepositoryPage.java
  47. +3 −0 ...eature/src/main/java/org/apache/karaf/webconsole/karaf/feature/repository/AddRepositoryPanel.java
  48. +6 −0 ...e/src/main/java/org/apache/karaf/webconsole/karaf/feature/repository/RepositoriesActionPanel.java
  49. +6 −0 .../feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/repository/RepositoriesPage.java
  50. +5 −0 karaf/feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/widget/FeatureWidgetPanel.java
  51. +5 −0 osgi/blueprint/src/main/java/org/apache/karaf/webconsole/osgi/blueprint/BlueprintDataProvider.java
  52. +5 −0 osgi/blueprint/src/main/java/org/apache/karaf/webconsole/osgi/blueprint/BlueprintPage.java
  53. +3 −1 ...rint/src/main/java/org/apache/karaf/webconsole/osgi/blueprint/bundle/BlueprintActionProvider.java
  54. +1 −0 ...rint/src/main/java/org/apache/karaf/webconsole/osgi/blueprint/bundle/BlueprintColumnProvider.java
  55. +3 −0 osgi/blueprint/src/main/java/org/apache/karaf/webconsole/osgi/blueprint/details/DetailsPage.java
  56. +3 −0 osgi/blueprint/src/main/java/org/apache/karaf/webconsole/osgi/blueprint/details/MetadataModel.java
  57. +6 −0 ...lueprint/src/main/java/org/apache/karaf/webconsole/osgi/blueprint/view/BlueprintActionsPanel.java
  58. +7 −1 osgi/blueprint/src/main/java/org/apache/karaf/webconsole/osgi/blueprint/view/BlueprintDataTable.java
  59. +5 −0 ...n/java/org/apache/karaf/webconsole/osgi/blueprint/view/DefaultServiceReferencePropertyColumn.java
  60. +5 −0 ...src/main/java/org/apache/karaf/webconsole/osgi/blueprint/view/ServiceReferencePropertyColumn.java
  61. +6 −0 osgi/config/src/main/java/org/apache/karaf/webconsole/osgi/config/ConfigurationEditPage.java
  62. +5 −0 osgi/config/src/main/java/org/apache/karaf/webconsole/osgi/config/ConfigurationProvider.java
  63. +2 −0 osgi/config/src/main/java/org/apache/karaf/webconsole/osgi/config/ConfigurationRemovePage.java
  64. +5 −0 osgi/config/src/main/java/org/apache/karaf/webconsole/osgi/config/ConfigurationsPage.java
  65. +5 −0 osgi/config/src/main/java/org/apache/karaf/webconsole/osgi/config/model/ConfigurationModel.java
  66. +5 −0 ...g/src/main/java/org/apache/karaf/webconsole/osgi/config/model/ConfigurationNotFoundException.java
  67. +5 −0 osgi/config/src/main/java/org/apache/karaf/webconsole/osgi/config/model/ConfigurationsModel.java
  68. +2 −0 osgi/config/src/main/java/org/apache/karaf/webconsole/osgi/config/view/ConfigurationRemoveForm.java
  69. +6 −1 .../config/src/main/java/org/apache/karaf/webconsole/osgi/config/view/ConfigurationsActionPanel.java
  70. +4 −1 osgi/config/src/main/java/org/apache/karaf/webconsole/osgi/config/view/ConfigurationsDataTable.java
  71. +5 −0 osgi/config/src/main/java/org/apache/karaf/webconsole/osgi/config/view/FactoryPidItem.java
  72. +2 −0 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/FrameworkPage.java
  73. +2 −0 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/SingleBundlePage.java
  74. +2 −0 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/install/InstallBundlePage.java
  75. +5 −6 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/install/InstallBundlePanel.java
  76. +8 −8 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/BundleActionsPanel.java
  77. +2 −0 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/BundlePage.java
  78. +5 −0 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/pkg/SinglePackagePage.java
  79. +2 −2 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/pkg/column/PackagePanel.java
  80. +3 −3 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/pkg/column/ResolutionPanel.java
  81. +5 −0 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/pkg/list/PackagePage.java
  82. +1 −0 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/ExportServiceTable.java
  83. +1 −0 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/ImportServiceTable.java
  84. +2 −0 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/ServiceDetailPage.java
  85. +2 −0 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/list/ServicePage.java
  86. +2 −0 .../src/main/java/org/apache/karaf/webconsole/osgi/core/shared/MissingServiceReferenceException.java
  87. +2 −0 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/shared/OsgiPage.java
  88. +1 −3 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/spi/IColumnProvider.java
  89. +3 −1 osgi/event/src/main/java/org/apache/karaf/webconsole/osgi/event/EventsPage.java
  90. +2 −0 osgi/event/src/main/java/org/apache/karaf/webconsole/osgi/event/model/EventTopicInfo.java
  91. +2 −0 osgi/event/src/main/java/org/apache/karaf/webconsole/osgi/event/model/EventTopicsProvider.java
  92. +3 −0 osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogsPage.java
  93. +1 −0 osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/OptionsForm.java
  94. +2 −0 osgi/scr/src/main/java/org/apache/karaf/webconsole/osgi/scr/ScrColumn.java
  95. +2 −0 osgi/scr/src/main/java/org/apache/karaf/webconsole/osgi/scr/ScrColumnPanel.java
  96. +0 −2 osgi/scr/src/main/java/org/apache/karaf/webconsole/osgi/scr/ScrColumnProvider.java
  97. +3 −0 servicemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/DetailsPage.java
  98. +3 −0 servicemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/EndpointsPage.java
  99. +3 −0 servicemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/ExchangeActionsPanel.java
  100. +2 −0 servicemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/ExchangeModel.java
  101. +2 −0 servicemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/ServiceMixPage.java
  102. +3 −1 servicemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/TrackNmrPage.java
  103. +1 −2 ...cemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/TrackingExchangeListener.java
View
5 camel/src/main/java/org/apache/karaf/webconsole/camel/internal/CamelPage.java
@@ -18,6 +18,11 @@
import org.apache.karaf.webconsole.core.page.SinglePage;
+/**
+ * Base page for camel extension pages.
+ */
public class CamelPage extends SinglePage {
+ private static final long serialVersionUID = 1L;
+
}
View
5 ...l/src/main/java/org/apache/karaf/webconsole/camel/internal/context/CamelContextModel.java
@@ -21,8 +21,13 @@
import org.apache.camel.CamelContext;
import org.apache.wicket.model.LoadableDetachableModel;
+/**
+ * Camel context model.
+ */
public class CamelContextModel extends LoadableDetachableModel<CamelContext> {
+ private static final long serialVersionUID = 1L;
+
private String name;
private List<CamelContext> contexts;
View
52 ...in/java/org/apache/karaf/webconsole/camel/internal/context/CamelContextsDataProvider.java
@@ -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.karaf.webconsole.camel.internal.context;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.camel.CamelContext;
+import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.wicket.model.IModel;
+
+/**
+ * Camel context list data provider.
+ */
+public class CamelContextsDataProvider extends SortableDataProvider<CamelContext> {
+
+ private static final long serialVersionUID = 1L;
+
+ private final List<CamelContext> contexts;
+
+ public CamelContextsDataProvider(List<CamelContext> contexts) {
+ this.contexts = contexts;
+ }
+
+ public Iterator<? extends CamelContext> iterator(int first, int count) {
+ return new ArrayList<CamelContext>(contexts).subList(first, first + count).iterator();
+ }
+
+ public int size() {
+ return contexts.size();
+ }
+
+ public IModel<CamelContext> model(CamelContext object) {
+ return new CamelContextModel(contexts, object);
+ }
+}
+
View
28 ...l/src/main/java/org/apache/karaf/webconsole/camel/internal/context/CamelContextsPage.java
@@ -16,9 +16,7 @@
*/
package org.apache.karaf.webconsole.camel.internal.context;
-import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Iterator;
import java.util.List;
import org.apache.camel.CamelContext;
@@ -30,26 +28,30 @@
import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.ops4j.pax.wicket.api.PaxWicketBean;
import org.ops4j.pax.wicket.api.PaxWicketMountPoint;
+/**
+ * Camel contexts list page.
+ */
@PaxWicketMountPoint(mountPoint = "/camel/contexts")
public class CamelContextsPage extends CamelPage {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "contexts")
private List<CamelContext> contexts;
@PaxWicketBean(name = "tracer")
private TraceContainer container;
+ @SuppressWarnings("unchecked")
public CamelContextsPage() {
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("serial")
IColumn<CamelContext>[] columns = new IColumn[] {
new OrdinalColumn<CamelContext>(),
new PropertyColumnExt<CamelContext>("Name", "name"),
@@ -73,21 +75,7 @@ public void populateItem(Item<ICellPopulator<CamelContext>> cellItem, String com
}
};
- ISortableDataProvider<CamelContext> provider = new SortableDataProvider<CamelContext>() {
- public Iterator<? extends CamelContext> iterator(int first, int count) {
- return new ArrayList<CamelContext>(contexts).subList(first, first + count).iterator();
- }
-
- public int size() {
- return contexts.size();
- }
-
- public IModel<CamelContext> model(CamelContext object) {
- return new CamelContextModel(contexts, object);
- }
- };
-
- add(new DefaultDataTable<CamelContext>("contexts", Arrays.asList(columns), provider, 20));
+ add(new DefaultDataTable<CamelContext>("contexts", Arrays.asList(columns), new CamelContextsDataProvider(contexts), 20));
}
}
View
6 ...src/main/java/org/apache/karaf/webconsole/camel/internal/context/ContextActionsPanel.java
@@ -28,8 +28,13 @@
import org.apache.wicket.model.IModel;
import org.ops4j.pax.wicket.api.PaxWicketBean;
+/**
+ * Panel with actions for single camel context.
+ */
public class ContextActionsPanel extends ActionsPanel<CamelContext> {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "tracer")
private TraceContainer container;
@@ -38,6 +43,7 @@ public ContextActionsPanel(String componentId, IModel<CamelContext> model) {
}
@Override
+ @SuppressWarnings({"rawtypes", "serial"})
protected List<Link> getLinks(CamelContext object, String linkId, String labelId) {
List<Link> links = new ArrayList<Link>();
View
6 camel/src/main/java/org/apache/karaf/webconsole/camel/internal/context/DumpPage.java
@@ -31,8 +31,14 @@
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
+/**
+ * Page with trace view.
+ */
public class DumpPage extends CamelPage {
+ private static final long serialVersionUID = 1L;
+
+ @SuppressWarnings("serial")
public DumpPage(TraceContainer container, CamelContext context) {
Tracer tracer = container.getTracer(context);
List<Map<String, Serializable>> info;
View
4 camel/src/main/java/org/apache/karaf/webconsole/camel/internal/tracking/TraceProcessor.java
@@ -50,7 +50,7 @@ public boolean process(Exchange exchange, AsyncCallback callback) {
Message msg = exchange.getIn();
if (msg != null) {
properties.put("exchangeInId", msg.getMessageId());
- properties.put("exchangeInHeaders", new HashMap(msg.getHeaders()));
+ properties.put("exchangeInHeaders", new HashMap<String, Object>(msg.getHeaders()));
Object body = msg.getBody();
if (body instanceof Serializable) {
properties.put("exchangeInBody", (Serializable) body);
@@ -64,7 +64,7 @@ public boolean process(Exchange exchange, AsyncCallback callback) {
msg = exchange.getOut();
if (msg != null) {
properties.put("exchangeOutId", msg.getMessageId());
- properties.put("exchangeOutHeaders", new HashMap(msg.getHeaders()));
+ properties.put("exchangeOutHeaders", new HashMap<String, Object>(msg.getHeaders()));
Object body = msg.getBody();
if (body instanceof Serializable) {
properties.put("exchangeOutBody", (Serializable) body);
View
6 camel/src/main/java/org/apache/karaf/webconsole/camel/internal/widget/CamelWidget.java
@@ -26,8 +26,14 @@
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.markup.html.panel.Panel;
+/**
+ * Widget with list of camel contexts.
+ */
public class CamelWidget extends Panel {
+ private static final long serialVersionUID = 1L;
+
+ @SuppressWarnings("serial")
public CamelWidget(String id, List<CamelContext> contexts) {
super(id);
View
2 core/src/main/java/org/apache/karaf/webconsole/core/BasePage.java
@@ -35,6 +35,8 @@
*/
public class BasePage extends WebPage {
+ private static final long serialVersionUID = 1L;
+
/**
* Brand provider responsible for l&f customization.
*/
View
5 core/src/main/java/org/apache/karaf/webconsole/core/dashboard/DashboardPage.java
@@ -39,21 +39,18 @@
@PaxWicketBean(name = "widgets")
private List<WidgetProvider> widgets;
+ @SuppressWarnings("serial")
public DashboardPage() {
add(new CssBehavior(DashboardPage.class, "dashboard.css"));
add(new Label("noWidgets", getString("widgets.empty")) {
- private static final long serialVersionUID = 1L;
-
@Override
public boolean isVisible() {
return widgets.size() == 0;
}
});
add(new ListView<WidgetProvider>("widgets", new ListModel<WidgetProvider>(widgets)) {
- private static final long serialVersionUID = 1L;
-
@Override
protected void populateItem(ListItem<WidgetProvider> item) {
item.add(item.getModelObject().createPanel("widget"));
View
11 core/src/main/java/org/apache/karaf/webconsole/core/navigation/markup/ModuleTabPanel.java
@@ -21,8 +21,8 @@
import org.apache.karaf.webconsole.core.navigation.ConsoleTabProvider;
import org.apache.karaf.webconsole.core.util.LinkUtils;
+import org.apache.wicket.AttributeModifier;
import org.apache.wicket.Page;
-import org.apache.wicket.behavior.SimpleAttributeModifier;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
@@ -37,17 +37,16 @@
*/
public class ModuleTabPanel extends Panel {
- private static final long serialVersionUID = 1491009991152801134L;
+ private static final long serialVersionUID = 1L;
@PaxWicketBean(name = "tabs")
protected List<ConsoleTabProvider> tabs;
+ @SuppressWarnings("serial")
public ModuleTabPanel(String id) {
super(id);
IModel<List<Link<Page>>> links = new LoadableDetachableModel<List<Link<Page>>>() {
- private static final long serialVersionUID = 1L;
-
@Override
protected List<Link<Page>> load() {
if (tabs == null) {
@@ -64,14 +63,12 @@ public ModuleTabPanel(String id) {
};
add(new ListView<Link<Page>>("moduleLinks", links) {
- private static final long serialVersionUID = 1L;
-
@Override
protected void populateItem(ListItem<Link<Page>> item) {
Link<Page> link = item.getModelObject();
item.add(link);
if (LinkUtils.isActiveTrail(link)) {
- item.add(new SimpleAttributeModifier("class", "active"));
+ item.add(new AttributeModifier("class", "active"));
}
}
});
View
2 core/src/main/java/org/apache/karaf/webconsole/core/page/LoginPage.java
@@ -25,6 +25,8 @@
*/
public class LoginPage extends BasePage {
+ private static final long serialVersionUID = 1L;
+
public LoginPage() {
this(null);
}
View
2 core/src/main/java/org/apache/karaf/webconsole/core/page/SecuredPage.java
@@ -27,6 +27,8 @@
@AuthorizeInstantiation("admin")
public class SecuredPage extends BasePage {
+ private static final long serialVersionUID = 1L;
+
@Override
protected Panel createTopPanel(String id) {
return new NavigationTopPanel(id, getSupportedLocales());
View
2 core/src/main/java/org/apache/karaf/webconsole/core/page/SidebarPage.java
@@ -27,6 +27,8 @@
*/
public class SidebarPage extends SecuredPage {
+ private static final long serialVersionUID = 1L;
+
private Panel sidebar;
public SidebarPage() {
View
2 core/src/main/java/org/apache/karaf/webconsole/core/page/SinglePage.java
@@ -24,6 +24,8 @@
*/
public class SinglePage extends SecuredPage {
+ private static final long serialVersionUID = 1L;
+
public SinglePage() {
add(new ModuleTabPanel("tabs"));
View
2 core/src/main/java/org/apache/karaf/webconsole/core/preferences/PreferencesPage.java
@@ -33,6 +33,8 @@
@PaxWicketMountPoint(mountPoint = "/preferences")
public class PreferencesPage extends SinglePage {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "preferencesProviders")
private List<PanelProvider> providers;
View
1 core/src/test/java/org/apache/karaf/webconsole/core/TestTargetLocator.java
@@ -21,6 +21,7 @@
/**
* Test target locator for test injections.
*/
+@SuppressWarnings("serial")
public class TestTargetLocator implements IProxyTargetLocator {
private Object value;
View
1 core/src/test/java/org/apache/karaf/webconsole/core/page/SidebarPageTest.java
@@ -74,6 +74,7 @@ public void testNoSidebarProvider() {
return AlwaysAuthenticatedWebSession.class;
}
+ @SuppressWarnings("serial")
static class TestSidebarPage extends SidebarPage {
public TestSidebarPage(SidebarProvider provider) {
setSidebarProvider(provider);
View
1 core/src/test/java/org/apache/karaf/webconsole/core/page/SinglePageTest.java
@@ -205,5 +205,6 @@ private void assertTabLink(WicketTester tester, int position, String label, Clas
// as ConsoleTabProviders are OSGi services.
interface SerializableConsoleTabProvider extends Serializable, ConsoleTabProvider {}
+ @SuppressWarnings("serial")
public static class SinglePageExt extends SinglePage {}
}
View
1 core/src/test/java/org/apache/karaf/webconsole/core/test/AlwaysAuthenticatedWebSession.java
@@ -24,6 +24,7 @@
* Dummy session which does not handle authentication, simply returns true for
* all input values and only one role.
*/
+@SuppressWarnings("serial")
public class AlwaysAuthenticatedWebSession extends WebConsoleSession {
private Roles roles;
View
1 core/src/test/java/org/apache/karaf/webconsole/core/test/BaseLinkAnswer.java
@@ -25,6 +25,7 @@
/**
* Base class for link answers in many providers..
*/
+@SuppressWarnings("serial")
public abstract class BaseLinkAnswer<T> implements IAnswer<T>, Serializable {
public final T answer() throws Throwable {
View
1 core/src/test/java/org/apache/karaf/webconsole/core/test/LinkAnswer.java
@@ -23,6 +23,7 @@
/**
* Easy mock answer to return prepared link.
*/
+@SuppressWarnings("serial")
public class LinkAnswer extends BaseLinkAnswer<Link<Page>> {
private String label;
View
1 core/src/test/java/org/apache/karaf/webconsole/core/test/LinksAnswer.java
@@ -29,6 +29,7 @@
/**
* An easy mock answer which returns list of links.
*/
+@SuppressWarnings("serial")
public class LinksAnswer extends BaseLinkAnswer<List<Link<Page>>> {
private Map<String, Class<? extends WebPage>> links = new LinkedHashMap<String, Class<? extends WebPage>>();
View
3 .../main/java/org/apache/karaf/webconsole/cxf/internal/navigation/CxfConsoleTabProvider.java
@@ -25,6 +25,9 @@
import org.apache.wicket.Page;
import org.apache.wicket.markup.html.link.Link;
+/**
+ * Navigation provider for console, introduces CXF module.
+ */
public class CxfConsoleTabProvider implements ConsoleTabProvider {
public List<Link<Page>> getItems(String componentId, String labelId) {
View
4 cxf/src/main/java/org/apache/karaf/webconsole/cxf/internal/services/BusModel.java
@@ -21,8 +21,12 @@
import org.apache.cxf.Bus;
import org.apache.wicket.model.LoadableDetachableModel;
+/**
+ * Model of CXF bus.
+ */
public class BusModel extends LoadableDetachableModel<Bus> {
+ private static final long serialVersionUID = 1L;
private List<Bus> buses;
private String id;
View
6 cxf/src/main/java/org/apache/karaf/webconsole/cxf/internal/services/CxfBusesActionPanel.java
@@ -27,13 +27,19 @@
import org.apache.wicket.model.IModel;
import org.apache.wicket.request.mapper.parameter.PageParameters;
+/**
+ * Action panel for single CXF panel.
+ */
public class CxfBusesActionPanel extends ActionsPanel<Bus> {
+ private static final long serialVersionUID = 1L;
+
public CxfBusesActionPanel(String componentId, IModel<Bus> model) {
super(componentId, model);
}
@Override
+ @SuppressWarnings("rawtypes")
protected List<Link> getLinks(Bus object, String linkId, String labelId) {
List<Link> links = new ArrayList<Link>();
View
6 cxf/src/main/java/org/apache/karaf/webconsole/cxf/internal/services/CxfServicesPage.java
@@ -36,11 +36,17 @@
import org.apache.wicket.model.Model;
import org.ops4j.pax.wicket.api.PaxWicketBean;
+/**
+ * Page representing CXF buses list.
+ */
public class CxfServicesPage extends SinglePage {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "busList")
private List<Bus> buses;
+ @SuppressWarnings("serial")
public CxfServicesPage() {
@SuppressWarnings("unchecked")
IColumn<Bus>[] columns = new IColumn[] {
View
12 cxf/src/main/java/org/apache/karaf/webconsole/cxf/internal/services/DetailsPage.java
@@ -39,14 +39,20 @@
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.ops4j.pax.wicket.api.PaxWicketBean;
+/**
+ * Page with bus details.
+ */
public class DetailsPage extends SinglePage {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "busList")
private List<Bus> buses;
private TraceInterceptor traceIn = new TraceInterceptor(Phase.RECEIVE, "in");
private TraceInterceptor traceOut = new TraceInterceptor(Phase.PRE_STREAM, "out");
+ @SuppressWarnings({"serial", "rawtypes"})
public DetailsPage(PageParameters params) {
String busId = params.get("busId").toString();
@@ -130,9 +136,9 @@ protected void populateItem(ListItem<OperationInfo> item) {
});
Endpoint endpoint = server.getEndpoint();
- List<Interceptor> inInterceptors = (List) endpoint.getInInterceptors();
- List<Interceptor> outInterceptors = (List) endpoint.getOutInterceptors();
- List<Interceptor> faultInterceptors = (List) endpoint.getInFaultInterceptors();
+ List<Interceptor<?>> inInterceptors = (List) endpoint.getInInterceptors();
+ List<Interceptor<?>> outInterceptors = (List) endpoint.getOutInterceptors();
+ List<Interceptor<?>> faultInterceptors = (List) endpoint.getInFaultInterceptors();
item.add(new InterceptorView("in-interceptors", inInterceptors));
item.add(new InterceptorView("out-interceptors", outInterceptors));
View
13 cxf/src/main/java/org/apache/karaf/webconsole/cxf/internal/services/InterceptorView.java
@@ -25,20 +25,25 @@
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
-public class InterceptorView extends ListView<Interceptor> {
+/**
+ * List of interceptors.
+ */
+public class InterceptorView extends ListView<Interceptor<?>> {
+
+ private static final long serialVersionUID = 1L;
- public InterceptorView(String id, List<Interceptor> interceptors) {
+ public InterceptorView(String id, List<Interceptor<?>> interceptors) {
super(id, interceptors);
}
@Override
- protected void populateItem(ListItem<Interceptor> item) {
+ protected void populateItem(ListItem<Interceptor<?>> item) {
Interceptor<? extends Message> interceptor = item.getModelObject();
item.add(new Label("class", interceptor.getClass().getName()));
if (interceptor instanceof PhaseInterceptor) {
- PhaseInterceptor phaseInterceptor = (PhaseInterceptor) interceptor;
+ PhaseInterceptor<?> phaseInterceptor = (PhaseInterceptor<?>) interceptor;
item.add(new Label("phase", phaseInterceptor.getPhase()));
item.add(new Label("id", phaseInterceptor.getId()));
} else {
View
5 cxf/src/main/java/org/apache/karaf/webconsole/cxf/internal/trace/TraceInterceptor.java
@@ -22,8 +22,13 @@
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
+/**
+ * Tracing interceptor for CXF.
+ */
public class TraceInterceptor extends AbstractPhaseInterceptor<Message> implements Serializable {
+ private static final long serialVersionUID = 1L;
+
private String direction;
public TraceInterceptor(String phase, String direction) {
View
2 karaf/admin/src/main/java/org/apache/karaf/webconsole/karaf/admin/AdminPage.java
@@ -25,6 +25,8 @@
*/
public class AdminPage extends SinglePage {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "adminService")
protected AdminService admin;
View
3 ...dmin/src/main/java/org/apache/karaf/webconsole/karaf/admin/create/CreateInstancePage.java
@@ -35,6 +35,9 @@
@PaxWicketMountPoint(mountPoint = "/karaf/admin/create")
public class CreateInstancePage extends AdminPage {
+ private static final long serialVersionUID = 1L;
+
+ @SuppressWarnings("serial")
public CreateInstancePage() {
WicketInstance instance = new WicketInstance();
instance.setSettings(new WicketInstanceSettings());
View
3 ...dmin/src/main/java/org/apache/karaf/webconsole/karaf/admin/list/InstanceActionsPanel.java
@@ -31,13 +31,14 @@
*/
public class InstanceActionsPanel extends ActionsPanel<Instance> {
- private static final long serialVersionUID = 1205787953299100012L;
+ private static final long serialVersionUID = 1L;
public InstanceActionsPanel(String id, IModel<Instance> model) {
super(id, model);
}
@Override
+ @SuppressWarnings({"serial", "rawtypes"})
protected List<Link> getLinks(Instance object, String linkId, final String labelId) {
List<Link> links = new ArrayList<Link>();
View
2 karaf/admin/src/main/java/org/apache/karaf/webconsole/karaf/admin/list/InstancePage.java
@@ -39,6 +39,8 @@
@PaxWicketMountPoint(mountPoint = "/karaf/instance")
public class InstancePage extends AdminPage {
+ private static final long serialVersionUID = 1L;
+
@SuppressWarnings("unchecked")
public InstancePage() {
IColumn<Instance>[] columns = new IColumn[] {
View
2 karaf/core/src/main/java/org/apache/karaf/webconsole/karaf/core/KarafOverviewPage.java
@@ -28,6 +28,8 @@
@PaxWicketMountPoint(mountPoint = "/karaf")
public class KarafOverviewPage extends SinglePage {
+ private static final long serialVersionUID = 1L;
+
public KarafOverviewPage() {
setDefaultModel(new CompoundPropertyModel<WicketKaraf>(new WicketKaraf()));
View
2 karaf/core/src/main/java/org/apache/karaf/webconsole/karaf/core/model/WicketKaraf.java
@@ -23,6 +23,8 @@
*/
public class WicketKaraf implements Serializable {
+ private static final long serialVersionUID = 1L;
+
public String getVersion() {
return System.getProperty("karaf.version");
}
View
5 karaf/feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/FeatureModel.java
@@ -20,8 +20,13 @@
import org.apache.karaf.features.FeaturesService;
import org.apache.wicket.model.LoadableDetachableModel;
+/**
+ * Feature model.
+ */
public class FeatureModel extends LoadableDetachableModel<Feature> {
+ private static final long serialVersionUID = 1L;
+
private FeaturesService service;
private String version;
private String name;
View
5 karaf/feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/FeaturesProvider.java
@@ -29,8 +29,13 @@
import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
import org.apache.wicket.model.IModel;
+/**
+ * Feature list data provider.
+ */
public class FeaturesProvider extends SortableDataProvider<Feature> {
+ private static final long serialVersionUID = 1L;
+
private final FeaturesService service;
public FeaturesProvider(FeaturesService service) {
View
5 karaf/feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/KarafFeaturesPage.java
@@ -20,8 +20,13 @@
import org.apache.karaf.webconsole.core.page.SinglePage;
import org.ops4j.pax.wicket.api.PaxWicketBean;
+/**
+ * Base page for karaf features.
+ */
public class KarafFeaturesPage extends SinglePage {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "featuresService")
protected FeaturesService featuresService;
View
5 ...ture/src/main/java/org/apache/karaf/webconsole/karaf/feature/MissingFeatureException.java
@@ -16,8 +16,13 @@
*/
package org.apache.karaf.webconsole.karaf.feature;
+/**
+ * Exception thrown when feature is missing.
+ */
public class MissingFeatureException extends RuntimeException {
+ private static final long serialVersionUID = 1L;
+
public MissingFeatureException(String name, String version) {
super("Feature " + name + " with version " + version + " is no longer available");
}
View
7 ...feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/RepositoriesProvider.java
@@ -25,8 +25,13 @@
import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
import org.apache.wicket.model.IModel;
+/**
+ * Data provider for repository list.
+ */
public class RepositoriesProvider extends SortableDataProvider<Repository> {
+ private static final long serialVersionUID = 1L;
+
private final FeaturesService service;
public RepositoriesProvider(FeaturesService service) {
@@ -36,7 +41,7 @@ public RepositoriesProvider(FeaturesService service) {
public Iterator<Repository> iterator(int first, int count) {
return Arrays.asList(service.listRepositories())
- .subList(first, first + count).iterator();
+ .subList(first, first + count).iterator();
}
public int size() {
View
10 ...src/main/java/org/apache/karaf/webconsole/karaf/feature/feature/FeaturesActionsPanel.java
@@ -22,14 +22,19 @@
import org.apache.karaf.features.Feature;
import org.apache.karaf.features.FeaturesService;
import org.apache.karaf.webconsole.core.table.ActionsPanel;
-import org.apache.wicket.behavior.SimpleAttributeModifier;
+import org.apache.wicket.AttributeModifier;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.model.IModel;
import org.ops4j.pax.wicket.api.PaxWicketBean;
+/**
+ * Actions for single feature.
+ */
public class FeaturesActionsPanel extends ActionsPanel<Feature> {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "featuresService")
private FeaturesService featuresService;
@@ -38,6 +43,7 @@ public FeaturesActionsPanel(String componentId, IModel<Feature> model) {
}
@Override
+ @SuppressWarnings({"rawtypes", "serial"})
protected List<Link> getLinks(Feature object, String linkId, String labelId) {
Link link = new Link(linkId) {
@@ -57,7 +63,7 @@ public void onClick() {
}
};
- link.add(new SimpleAttributeModifier("class", isInstalled(object) ? "icon-eject" : "icon-play"));
+ link.add(new AttributeModifier("class", isInstalled(object) ? "icon-eject" : "icon-play"));
link.add(new Label(labelId));
// add image to the link
View
5 ...feature/src/main/java/org/apache/karaf/webconsole/karaf/feature/feature/FeaturesPage.java
@@ -45,8 +45,11 @@
@PaxWicketMountPoint(mountPoint = "/karaf/features")
public class FeaturesPage extends KarafFeaturesPage {
+ private static final long serialVersionUID = 1L;
+
private Map<String, String> feature2repo = new HashMap<String, String>();
+ @SuppressWarnings({"rawtypes", "serial"})
public FeaturesPage() throws Exception {
add(new CssBehavior(FeaturesPage.class, "features.css"));
@@ -65,7 +68,7 @@ public FeaturesPage() throws Exception {
List<IColumn<Feature>> columns = new ArrayList<IColumn<Feature>>();
columns.add(new PropertyColumn<Feature>(new StringResourceModel("table.version", this, version), "version", "version"));
- columns.add(new PropertyColumn<Feature>(new StringResourceModel("table.name", this, state), "name", "name"));
+ columns.add(new PropertyColumn<Feature>(new StringResourceModel("table.name", this, name), "name", "name"));
columns.add(new AbstractColumn<Feature>(new StringResourceModel("table.repository", this, repository), "repository") {
public void populateItem(Item<ICellPopulator<Feature>> cellItem, String componentId, IModel<Feature> rowModel) {
cellItem.add(new Label(componentId, feature2repo.get(rowModel.getObject().getId())));
View
5 ...eature/src/main/java/org/apache/karaf/webconsole/karaf/feature/model/RepositoryModel.java
@@ -22,8 +22,13 @@
import org.apache.karaf.features.Repository;
import org.apache.wicket.model.LoadableDetachableModel;
+/**
+ * Repository model.
+ */
public class RepositoryModel extends LoadableDetachableModel<Repository> {
+ private static final long serialVersionUID = 1L;
+
private final FeaturesService service;
private URI uri;
View
5 ...ain/java/org/apache/karaf/webconsole/karaf/feature/model/RepositoryNotFoundException.java
@@ -18,8 +18,13 @@
import java.net.URI;
+/**
+ * Exception thrown when repository is not found.
+ */
public class RepositoryNotFoundException extends RuntimeException {
+ private static final long serialVersionUID = 1L;
+
public RepositoryNotFoundException(URI uri) {
super(uri.toString());
}
View
23 ...src/main/java/org/apache/karaf/webconsole/karaf/feature/repository/AddRepositoryPage.java
@@ -29,29 +29,34 @@
import org.apache.wicket.model.Model;
import org.ops4j.pax.wicket.api.PaxWicketMountPoint;
+/**
+ * Repository input page.
+ */
@PaxWicketMountPoint(mountPoint = "/karaf/repositories/add")
public class AddRepositoryPage extends KarafFeaturesPage {
+ private static final long serialVersionUID = 1L;
+
+ @SuppressWarnings({"rawtypes", "unchecked", "serial"})
public AddRepositoryPage() {
final IModel<Repository> model = new Model(new WicketRepository());
final Form<Repository> form = new Form<Repository>("form", model);
form.add(new AddRepositoryPanel("repository", model));
form.add(new SubmitLink("submit") {
- private static final long serialVersionUID = 1L;
-
@Override
public void onSubmit() {
- URI uri = model.getObject().getURI();
+ URI uri = model.getObject().getURI();
try {
- featuresService.addRepository(uri);
- } catch (Exception e) {
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("uri", uri);
- form.error("Can not create repository " + e.getMessage(), map);
- }
+ featuresService.addRepository(uri);
+ } catch (Exception e) {
+ Map<String, Object> map = new HashMap<String, Object>();
+ map.put("uri", uri);
+ form.error("Can not create repository " + e.getMessage(), map);
+ }
}
});
+
add(form);
}
View
3 ...rc/main/java/org/apache/karaf/webconsole/karaf/feature/repository/AddRepositoryPanel.java
@@ -28,6 +28,9 @@
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
+/**
+ * Repository add panel.
+ */
public class AddRepositoryPanel extends Panel {
private static final long serialVersionUID = 1L;
View
6 ...in/java/org/apache/karaf/webconsole/karaf/feature/repository/RepositoriesActionPanel.java
@@ -28,8 +28,13 @@
import org.apache.wicket.model.IModel;
import org.ops4j.pax.wicket.api.PaxWicketBean;
+/**
+ * Actions for repository.
+ */
public class RepositoriesActionPanel extends ActionsPanel<Repository> {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "featuresService")
private FeaturesService featuresService;
@@ -38,6 +43,7 @@ public RepositoriesActionPanel(String componentId, IModel<Repository> model) {
}
@Override
+ @SuppressWarnings({"rawtypes", "serial"})
protected List<Link> getLinks(Repository object, String linkId, String labelId) {
List<Link> links = new ArrayList<Link>();
View
6 .../src/main/java/org/apache/karaf/webconsole/karaf/feature/repository/RepositoriesPage.java
@@ -35,9 +35,15 @@
import org.apache.wicket.request.cycle.RequestCycle;
import org.ops4j.pax.wicket.api.PaxWicketMountPoint;
+/**
+ * Page with list of repositories.
+ */
@PaxWicketMountPoint(mountPoint = "/karaf/repositories")
public class RepositoriesPage extends KarafFeaturesPage {
+ private static final long serialVersionUID = 1L;
+
+ @SuppressWarnings({"rawtypes", "serial", "unchecked"})
public RepositoriesPage() {
IColumn<Repository>[] columns = new IColumn[] {
new OrdinalColumn<Repository>(),
View
5 ...re/src/main/java/org/apache/karaf/webconsole/karaf/feature/widget/FeatureWidgetPanel.java
@@ -24,8 +24,13 @@
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.panel.Panel;
+/**
+ * Dashboard panel.
+ */
public class FeatureWidgetPanel extends Panel {
+ private static final long serialVersionUID = 1L;
+
public FeatureWidgetPanel(String id, FeaturesService service) {
super(id);
View
5 ...print/src/main/java/org/apache/karaf/webconsole/osgi/blueprint/BlueprintDataProvider.java
@@ -25,8 +25,13 @@
import org.apache.wicket.model.IModel;
import org.osgi.framework.ServiceReference;
+/**
+ * Data provider for bundle list.
+ */
public class BlueprintDataProvider extends SortableDataProvider<ServiceReference> {
+ private static final long serialVersionUID = 1L;
+
private final List<ServiceReference> containers;
public BlueprintDataProvider(List<ServiceReference> containers) {
View
5 osgi/blueprint/src/main/java/org/apache/karaf/webconsole/osgi/blueprint/BlueprintPage.java
@@ -24,9 +24,14 @@
import org.ops4j.pax.wicket.api.PaxWicketMountPoint;
import org.osgi.framework.ServiceReference;
+/**
+ * Blueprint list page.
+ */
@PaxWicketMountPoint(mountPoint = "/osgi/blueprint")
public class BlueprintPage extends SinglePage {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "containers")
private List<ServiceReference> containers;
View
4 .../main/java/org/apache/karaf/webconsole/osgi/blueprint/bundle/BlueprintActionProvider.java
@@ -25,7 +25,9 @@
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.osgi.framework.Bundle;
-
+/**
+ * Action provider for blueprint.
+ */
public class BlueprintActionProvider implements IActionProvider {
private IBlueprintBundleStateTracker tracker;
View
1 .../main/java/org/apache/karaf/webconsole/osgi/blueprint/bundle/BlueprintColumnProvider.java
@@ -39,6 +39,7 @@ public BlueprintColumnProvider(IBlueprintBundleStateTracker tracker) {
this.tracker = tracker;
}
+ @SuppressWarnings("serial")
public IColumn<Bundle> getColumn() {
return new AbstractColumn<Bundle>(Model.of("Blueprint")) {
public void populateItem(Item<ICellPopulator<Bundle>> cellItem, String componentId, IModel<Bundle> rowModel) {
View
3 ...ueprint/src/main/java/org/apache/karaf/webconsole/osgi/blueprint/details/DetailsPage.java
@@ -36,6 +36,9 @@
@PaxWicketMountPoint(mountPoint = "/osgi/blueprint/details")
public class DetailsPage extends OsgiPage {
+ private static final long serialVersionUID = 1L;
+
+ @SuppressWarnings("serial")
public DetailsPage(PageParameters params) {
add(new DraculaBehavior());
add(new JavaScriptBehavior(DetailsPage.class, "details.js"));
View
3 ...print/src/main/java/org/apache/karaf/webconsole/osgi/blueprint/details/MetadataModel.java
@@ -26,6 +26,9 @@
import org.osgi.service.blueprint.container.BlueprintContainer;
import org.osgi.service.blueprint.reflect.ComponentMetadata;
+/**
+ * Model for blueprint metadata.
+ */
class MetadataModel extends LoadableDetachableModel<List<ComponentMetadata>> {
private static final long serialVersionUID = 1L;
View
6 .../src/main/java/org/apache/karaf/webconsole/osgi/blueprint/view/BlueprintActionsPanel.java
@@ -28,13 +28,19 @@
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.osgi.framework.ServiceReference;
+/**
+ * Actions panel for blueprint.
+ */
public class BlueprintActionsPanel extends ActionsPanel<ServiceReference> {
+ private static final long serialVersionUID = 1L;
+
public BlueprintActionsPanel(String componentId, IModel<ServiceReference> model) {
super(componentId, model);
}
@Override
+ @SuppressWarnings({"rawtypes", "unchecked"})
protected List<Link> getLinks(ServiceReference object, String linkId, String labelId) {
PageParameters params = new PageParameters();
params.add("bundleId", object.getBundle().getBundleId());
View
8 ...int/src/main/java/org/apache/karaf/webconsole/osgi/blueprint/view/BlueprintDataTable.java
@@ -28,9 +28,14 @@
import org.apache.wicket.model.Model;
import org.osgi.framework.ServiceReference;
+/**
+ * Table with blueprint containers.
+ */
public class BlueprintDataTable extends DefaultDataTable<ServiceReference> {
- @SuppressWarnings({"rawtypes", "unchecked"})
+ private static final long serialVersionUID = 1L;
+
+ @SuppressWarnings({"rawtypes", "unchecked", "serial"})
private static final List COLUMNS = Arrays.asList(
new DefaultServiceReferencePropertyColumn("Id", "service.id"),
new DefaultServiceReferencePropertyColumn("Container", "osgi.blueprint.container.symbolicname"),
@@ -42,6 +47,7 @@ public void populateItem(Item<ICellPopulator<ServiceReference>> cellItem, String
}
);
+ @SuppressWarnings("unchecked")
public BlueprintDataTable(String id, ISortableDataProvider<ServiceReference> dataProvider, int rowsPerPage) {
super(id, COLUMNS, dataProvider, rowsPerPage);
}
View
5 ...rg/apache/karaf/webconsole/osgi/blueprint/view/DefaultServiceReferencePropertyColumn.java
@@ -18,8 +18,13 @@
import org.apache.wicket.markup.html.basic.Label;
+/**
+ * Column representing given property from service reference.
+ */
public class DefaultServiceReferencePropertyColumn extends ServiceReferencePropertyColumn {
+ private static final long serialVersionUID = 1L;
+
public DefaultServiceReferencePropertyColumn(String displayModel, String sortProperty) {
super(displayModel, sortProperty);
}
View
5 .../java/org/apache/karaf/webconsole/osgi/blueprint/view/ServiceReferencePropertyColumn.java
@@ -24,8 +24,13 @@
import org.apache.wicket.model.Model;
import org.osgi.framework.ServiceReference;
+/**
+ * Column representing single service reference property.
+ */
public abstract class ServiceReferencePropertyColumn extends AbstractColumn<ServiceReference> {
+ private static final long serialVersionUID = 1L;
+
public ServiceReferencePropertyColumn(String displayModel, String sortProperty) {
super(Model.of(displayModel), sortProperty);
}
View
6 osgi/config/src/main/java/org/apache/karaf/webconsole/osgi/config/ConfigurationEditPage.java
@@ -36,13 +36,19 @@
import org.osgi.service.cm.Configuration;
import org.osgi.service.cm.ConfigurationAdmin;
+/**
+ * Configuration edit page.
+ */
@PaxWicketMountPoint(mountPoint = "/osgi/configuration/edit")
public class ConfigurationEditPage extends OsgiPage {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "configurationAdmin")
private ConfigurationAdmin configurationAdmin;
private String pid;
+ @SuppressWarnings("serial")
public ConfigurationEditPage(PageParameters params) {
pid = params.get("pid").toString();
View
5 osgi/config/src/main/java/org/apache/karaf/webconsole/osgi/config/ConfigurationProvider.java
@@ -26,8 +26,13 @@
import org.osgi.service.cm.Configuration;
import org.osgi.service.cm.ConfigurationAdmin;
+/**
+ * Data provider for configuration list.
+ */
public class ConfigurationProvider extends SortableDataProvider<Configuration> {
+ private static final long serialVersionUID = 1L;
+
private Configuration[] configurations = new Configuration[0];
private ConfigurationAdmin configurationAdmin;
View
2 ...config/src/main/java/org/apache/karaf/webconsole/osgi/config/ConfigurationRemovePage.java
@@ -31,6 +31,8 @@
@PaxWicketMountPoint(mountPoint = "/osgi/configuration/remove")
public class ConfigurationRemovePage extends OsgiPage {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "configurationAdmin")
private ConfigurationAdmin configurationAdmin;
private String pid;
View
5 osgi/config/src/main/java/org/apache/karaf/webconsole/osgi/config/ConfigurationsPage.java
@@ -23,9 +23,14 @@
import org.ops4j.pax.wicket.api.PaxWicketMountPoint;
import org.osgi.service.cm.ConfigurationAdmin;
+/**
+ * Base page for configuration admin extension.
+ */
@PaxWicketMountPoint(mountPoint = "/osgi/configuration")
public class ConfigurationsPage extends OsgiPage {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "configurationAdmin")
private ConfigurationAdmin configurationAdmin;
View
5 ...onfig/src/main/java/org/apache/karaf/webconsole/osgi/config/model/ConfigurationModel.java
@@ -22,8 +22,13 @@
import org.osgi.service.cm.Configuration;
import org.osgi.service.cm.ConfigurationAdmin;
+/**
+ * Model for configuration objects.
+ */
public class ConfigurationModel extends LoadableDetachableModel<Configuration> {
+ private static final long serialVersionUID = 1L;
+
private String pid;
private ConfigurationAdmin configurationAdmin;
View
5 ...in/java/org/apache/karaf/webconsole/osgi/config/model/ConfigurationNotFoundException.java
@@ -16,8 +16,13 @@
*/
package org.apache.karaf.webconsole.osgi.config.model;
+/**
+ * Exception thrown when configuration is not found.
+ */
public class ConfigurationNotFoundException extends RuntimeException {
+ private static final long serialVersionUID = 1L;
+
public ConfigurationNotFoundException(String pid) {
super(pid);
}
View
5 ...nfig/src/main/java/org/apache/karaf/webconsole/osgi/config/model/ConfigurationsModel.java
@@ -20,8 +20,13 @@
import org.osgi.service.cm.Configuration;
import org.osgi.service.cm.ConfigurationAdmin;
+/**
+ * Model for configurations.
+ */
public class ConfigurationsModel extends LoadableDetachableModel<Configuration[]> {
+ private static final long serialVersionUID = 1L;
+
private final ConfigurationAdmin configurationAdmin;
public ConfigurationsModel(ConfigurationAdmin configurationAdmin) {
View
2 ...g/src/main/java/org/apache/karaf/webconsole/osgi/config/view/ConfigurationRemoveForm.java
@@ -31,6 +31,8 @@
*/
public class ConfigurationRemoveForm extends Form<Configuration> {
+ private static final long serialVersionUID = 1L;
+
public ConfigurationRemoveForm(String id, IModel<Configuration> model) {
super(id, model);
View
7 ...src/main/java/org/apache/karaf/webconsole/osgi/config/view/ConfigurationsActionPanel.java
@@ -30,14 +30,19 @@
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.osgi.service.cm.Configuration;
-@SuppressWarnings("rawtypes")
+/**
+ * Action panel for configuration.
+ */
class ConfigurationsActionPanel extends ActionsPanel<Configuration> {
+ private static final long serialVersionUID = 1L;
+
public ConfigurationsActionPanel(String componentId, IModel<Configuration> model) {
super(componentId, model);
}
@Override
+ @SuppressWarnings("rawtypes")
protected List<Link> getLinks(Configuration object, String linkId, String labelId) {
PageParameters params = new PageParameters();
params.add("pid", object.getPid());
View
5 ...g/src/main/java/org/apache/karaf/webconsole/osgi/config/view/ConfigurationsDataTable.java
@@ -33,9 +33,11 @@
/**
* Datatable which shows list of configurations from OSGi {@link ConfigurationAdmin}.
*/
-@SuppressWarnings({"rawtypes", "unchecked"})
public class ConfigurationsDataTable extends DefaultDataTable<Configuration> {
+ private static final long serialVersionUID = 1L;
+
+ @SuppressWarnings({"rawtypes", "serial", "unchecked"})
private static List COLUMNS = Arrays.asList(
new PropertyColumn<Configuration>(Model.of("pid"), "pid"),
new AbstractColumn<Configuration>(Model.of("operations")) {
@@ -45,6 +47,7 @@ public void populateItem(Item<ICellPopulator<Configuration>> cellItem, String co
}
);
+ @SuppressWarnings("unchecked")
public ConfigurationsDataTable(String id, ISortableDataProvider<Configuration> dataProvider, int rowsPerPage) {
super(id, COLUMNS, dataProvider, rowsPerPage);
}
View
5 osgi/config/src/main/java/org/apache/karaf/webconsole/osgi/config/view/FactoryPidItem.java
@@ -21,8 +21,13 @@
import org.apache.wicket.model.IModel;
import org.osgi.service.cm.Configuration;
+/**
+ * Item which add "factory" class to configuration produced my configuration factory.
+ */
public class FactoryPidItem extends OddEvenItem<Configuration> {
+ private static final long serialVersionUID = 1L;
+
public FactoryPidItem(String id, int index, IModel<Configuration> model) {
super(id, index, model);
}
View
2 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/FrameworkPage.java
@@ -31,6 +31,8 @@
@AuthorizeInstantiation({"admin", "osgi-user", "osgi-developer"})
public class FrameworkPage extends OsgiPage {
+ private static final long serialVersionUID = 1L;
+
public FrameworkPage() {
setDefaultModel(new CompoundPropertyModel<Bundle>(new SystemBundleModel(context)));
View
2 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/SingleBundlePage.java
@@ -35,6 +35,8 @@
@PaxWicketMountPoint(mountPoint = "/osgi/bundle/detail")
public class SingleBundlePage extends OsgiPage {
+ private static final long serialVersionUID = 1L;
+
public static String BUNDLE_ID = "bundleId";
private long bundleId;
View
2 ...src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/install/InstallBundlePage.java
@@ -31,6 +31,8 @@
@PaxWicketMountPoint(mountPoint = "/osgi/bundle/add")
public class InstallBundlePage extends OsgiPage {
+ private static final long serialVersionUID = 1L;
+
public InstallBundlePage() {
IModel<WicketInstallModel> model = of(new WicketInstallModel());
View
11 ...rc/main/java/org/apache/karaf/webconsole/osgi/core/bundle/install/InstallBundlePanel.java
@@ -18,11 +18,10 @@
import static org.apache.wicket.model.Model.of;
-import org.apache.karaf.webconsole.core.behavior.RemoveAttributeBehavior;
import org.apache.karaf.webconsole.core.form.LabelBorder;
+import org.apache.wicket.AttributeModifier;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxCheckBox;
-import org.apache.wicket.behavior.SimpleAttributeModifier;
import org.apache.wicket.markup.html.form.CheckBox;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.RequiredTextField;
@@ -62,7 +61,7 @@ protected void onUpdate(AjaxRequestTarget target) {
} else {
onUnchecked();
}
- target.addComponent(file);
+ target.add(file);
}
}
};
@@ -72,7 +71,7 @@ protected void onUpdate(AjaxRequestTarget target) {
file = new FileUploadField("file");
file.setLabel(of("Bundle file"));
- file.add(new SimpleAttributeModifier("disabled", "disabled"));
+ file.add(new AttributeModifier("disabled", "disabled"));
file.setOutputMarkupId(true);
border = new LabelBorder("fileGroup", file);
form.add(border);
@@ -81,10 +80,10 @@ protected void onUpdate(AjaxRequestTarget target) {
}
protected void onChecked() {
- file.add(new RemoveAttributeBehavior("disabled"));
+ file.add(AttributeModifier.remove("disabled"));
}
protected void onUnchecked() {
- file.add(new SimpleAttributeModifier("disabled", "disabled"));
+ file.add(new AttributeModifier("disabled", "disabled"));
}
}
View
16 ...e/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/BundleActionsPanel.java
@@ -29,7 +29,7 @@
import org.apache.karaf.webconsole.osgi.core.bundle.list.link.UpdateLink;
import org.apache.karaf.webconsole.osgi.core.shared.State;
import org.apache.karaf.webconsole.osgi.core.spi.IActionProvider;
-import org.apache.wicket.behavior.SimpleAttributeModifier;
+import org.apache.wicket.AttributeModifier;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.model.IModel;
@@ -62,7 +62,7 @@ protected void populateItem(ListItem<IActionProvider> item) {
// details link
Link link = SingleBundlePage.createLink(linkId, object);
- link.add(new Label("label", "").add(new SimpleAttributeModifier("class", "icon-info-sign")));
+ link.add(new Label("label", "").add(new AttributeModifier("class", "icon-info-sign")));
links.add(link);
@@ -87,38 +87,38 @@ protected void populateItem(ListItem<IActionProvider> item) {
private Link createUninstallLink(String linkId, String labelId) {
Link link = new UninstallLink(linkId, getModel());
- link.add(new Label(labelId, "").add(new SimpleAttributeModifier("class", "icon-eject")));
+ link.add(new Label(labelId, "").add(new AttributeModifier("class", "icon-eject")));
return link;
}
private Link createRefreshLink(String linkId, String labelId) {
Link link = new RefreshLink(linkId, getModel());
- link.add(new Label(labelId, "").add(new SimpleAttributeModifier("class", "icon-refresh")));
+ link.add(new Label(labelId, "").add(new AttributeModifier("class", "icon-refresh")));
return link;
}
private Link createUpdateLink(String linkId, String labelId) {
Link link = new UpdateLink(linkId, getModel());
//link.add(new SimpleAttributeModifier("title", getLocalizer().getString("bundle.update.link", this, getModel())));
- link.add(new Label(labelId, "").add(new SimpleAttributeModifier("class", "icon-retweet")));
+ link.add(new Label(labelId, "").add(new AttributeModifier("class", "icon-retweet")));
return link;
}
private Link createResolveLink(String linkId, String labelId) {
Link link = new ResolveLink(linkId, getModel());
- link.add(new Label(labelId, "").add(new SimpleAttributeModifier("class", "icon-step-forward")));
+ link.add(new Label(labelId, "").add(new AttributeModifier("class", "icon-step-forward")));
return link;
}
private Link createStartLink(String linkId, String labelId) {
Link link = new StartLink(linkId, getModel());
- link.add(new Label(labelId, "").add(new SimpleAttributeModifier("class", "icon-play")));
+ link.add(new Label(labelId, "").add(new AttributeModifier("class", "icon-play")));
return link;
}
private Link createStopLink(String linkId, String labelId) {
Link link = new StopLink(linkId, getModel());
- link.add(new Label(labelId, "").add(new SimpleAttributeModifier("class", "icon-pause")));
+ link.add(new Label(labelId, "").add(new AttributeModifier("class", "icon-pause")));
return link;
}
}
View
2 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/bundle/list/BundlePage.java
@@ -50,6 +50,8 @@
@PaxWicketMountPoint(mountPoint = "/osgi/bundle")
public class BundlePage extends OsgiPage {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "columnProviders")
private List<IColumnProvider> columnProviders;
View
5 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/pkg/SinglePackagePage.java
@@ -32,9 +32,14 @@
import org.osgi.service.packageadmin.ExportedPackage;
import org.osgi.service.packageadmin.PackageAdmin;
+/**
+ * Single package page.
+ */
@PaxWicketMountPoint(mountPoint = "/osgi/package/detail")
public class SinglePackagePage extends OsgiPage {
+ private static final long serialVersionUID = 1L;
+
@PaxWicketBean(name = "packageAdmin")
private PackageAdmin admin;
View
4 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/pkg/column/PackagePanel.java
@@ -18,7 +18,7 @@
import org.apache.felix.utils.manifest.Clause;
import org.apache.karaf.webconsole.osgi.core.pkg.SinglePackagePage;
-import org.apache.wicket.behavior.SimpleAttributeModifier;
+import org.apache.wicket.AttributeModifier;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.panel.Panel;
@@ -59,7 +59,7 @@ public PackagePanel(String componentId, IModel<Clause> model) {
ExportedPackage exportedPackage = admin.getExportedPackage(pkg);
if (exportedPackage == null) {
- link.add(new SimpleAttributeModifier("class", "error"));
+ link.add(new AttributeModifier("class", "error"));
}
add(link);
View
6 .../core/src/main/java/org/apache/karaf/webconsole/osgi/core/pkg/column/ResolutionPanel.java
@@ -17,7 +17,7 @@
package org.apache.karaf.webconsole.osgi.core.pkg.column;
import org.apache.felix.utils.manifest.Clause;
-import org.apache.wicket.behavior.SimpleAttributeModifier;
+import org.apache.wicket.AttributeModifier;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
@@ -46,10 +46,10 @@ public ResolutionPanel(String id, IModel<Clause> model) {
add(new Label("resolution", resolution).setRenderBodyOnly(true));
Label icon = new Label("icon", "");
- icon.add(new SimpleAttributeModifier("class", css));
+ icon.add(new AttributeModifier("class", css));
add(icon);
- add(new SimpleAttributeModifier("title", "Resolution is " + resolution));
+ add(new AttributeModifier("title", "Resolution is " + resolution));
}
}
View
5 osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/pkg/list/PackagePage.java