Author: jawi
Date: Wed Jul 19 13:07:57 2017
New Revision: 1802386
URL: http://svn.apache.org/viewvc?rev=1802386&view=rev
Log:
ACE-625 show more details in Web UI
- added extensions to show the details of artifacts (refactoring the existing
target-info extension);
- added extensions for all associations in the various columns.
Added:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/ArtifactInfoExtensionFactory.java
(with props)
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/ArtifactToFeatureAssocExtensionFactory.java
(with props)
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseAssociationExtensionFactory.java
(with props)
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseInfoExtensionFactory.java
(with props)
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseUIExtensionFactory.java
(with props)
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/DistributionToFeatureAssocExtensionFactory.java
(with props)
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/DistributionToTargetAssocExtensionFactory.java
(with props)
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/FeatureToArtifactAssocExtensionFactory.java
(with props)
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/FeatureToDistributionAssocExtensionFactory.java
(with props)
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/TargetInfoExtensionFactory.java
(with props)
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/TargetToDistributionAssocExtensionFactory.java
(with props)
Modified:
ace/trunk/org.apache.ace.webui.vaadin/bnd.bnd
ace/trunk/org.apache.ace.webui.vaadin/resources/VAADIN/themes/reindeer/styles.css
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/Activator.java
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/EditWindow.java
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/VaadinClient.java
Modified: ace/trunk/org.apache.ace.webui.vaadin/bnd.bnd
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/bnd.bnd?rev=1802386&r1=1802385&r2=1802386&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.webui.vaadin/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.webui.vaadin/bnd.bnd Wed Jul 19 13:07:57 2017
@@ -20,6 +20,7 @@ Private-Package: \
org.apache.ace.webui.domain,\
org.apache.ace.webui.vaadin,\
org.apache.ace.webui.vaadin.component,\
+ org.apache.ace.webui.vaadin.extension,\
org.apache.ace.bnd.registry,\
org.apache.ace.bnd.repository,\
org.kxml2.io,\
@@ -30,7 +31,7 @@ Private-Package: \
org.osgi.service.obr,\
org.osgi.service.repository*,\
org.xmlpull.v1
-
+
Export-Package: org.apache.ace.webui
Include-Resource: resources/
Bundle-Activator: org.apache.ace.webui.vaadin.Activator
Modified:
ace/trunk/org.apache.ace.webui.vaadin/resources/VAADIN/themes/reindeer/styles.css
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/resources/VAADIN/themes/reindeer/styles.css?rev=1802386&r1=1802385&r2=1802386&view=diff
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/resources/VAADIN/themes/reindeer/styles.css
(original)
+++
ace/trunk/org.apache.ace.webui.vaadin/resources/VAADIN/themes/reindeer/styles.css
Wed Jul 19 13:07:57 2017
@@ -51,13 +51,13 @@
padding: .2em 1em;
color: inherit;
font: inherit;
- line-height: normal;
+ line-height: normal;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
- user-select: none;
+ user-select: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
@@ -173,7 +173,7 @@
/*
* Checkbox styles
* -------------------------------------- */
-
+
.v-checkbox {
display: block;
}
@@ -299,7 +299,7 @@ div.v-app-loading {
position: relative;
}
/**
- * Try to handle printing somehow. Reasonable printing support
+ * Try to handle printing somehow. Reasonable printing support
* needs application specific planning and CSS tuning.
*/
@media print {
@@ -421,7 +421,7 @@ div.v-app-loading {
.v-label h5,
.v-label h6 {
line-height: normal;
-}
+}
/* Loading indicator states
* Note: client side expects that loading indicator has a height. It depends on
* this css property to ensure browsers have applied all required styles.
@@ -498,27 +498,27 @@ div.v-app-loading {
overflow: auto;
}
.v-ios.v-webkit & .v-scrollable {
- -webkit-overflow-scrolling: touch;
-}
-/* Disable native scrolling on iOS 5 due to #8792 */
+ -webkit-overflow-scrolling: touch;
+}
+/* Disable native scrolling on iOS 5 due to #8792 */
.v-ios5.v-webkit & .v-scrollable {
- -webkit-overflow-scrolling: none;
-}
+ -webkit-overflow-scrolling: none;
+}
.v-csslayout {
overflow: hidden;
}
.v-csslayout-margin-top {
- padding-top: 12px;
+ padding-top: 12px;
}
.v-csslayout-margin-bottom {
- padding-bottom: 12px;
+ padding-bottom: 12px;
}
.v-csslayout-margin-left {
- padding-left: 12px;
+ padding-left: 12px;
}
.v-csslayout-margin-right {
- padding-right: 12px;
+ padding-right: 12px;
}
.v-customcomponent {
@@ -554,7 +554,7 @@ div.v-app-loading {
margin: 0;
}
.v-datefield-calendarpanel:focus {
- outline:none;
+ outline:none;
}
.v-datefield-calendarpanel-header td {
text-align: center;
@@ -815,17 +815,17 @@ div.v-app-loading {
.v-formlayout-captioncell .v-caption {
overflow: visible;
}
-.v-formlayout-spacing > tbody > .v-formlayout-row > .v-formlayout-captioncell,
+.v-formlayout-spacing > tbody > .v-formlayout-row > .v-formlayout-captioncell,
.v-formlayout-spacing > tbody > .v-formlayout-row > .v-formlayout-contentcell,
.v-formlayout-spacing > tbody > .v-formlayout-row > .v-formlayout-errorcell {
padding-top: 6px;
}
-.v-formlayout-spacing > tbody > .v-formlayout-firstrow >
.v-formlayout-captioncell,
+.v-formlayout-spacing > tbody > .v-formlayout-firstrow >
.v-formlayout-captioncell,
.v-formlayout-spacing > tbody > .v-formlayout-firstrow >
.v-formlayout-contentcell,
.v-formlayout-spacing > tbody > .v-formlayout-firstrow >
.v-formlayout-errorcell {
padding-top: 0;
}
-.v-formlayout-margin-top > tbody > .v-formlayout-firstrow >
.v-formlayout-captioncell,
+.v-formlayout-margin-top > tbody > .v-formlayout-firstrow >
.v-formlayout-captioncell,
.v-formlayout-margin-top > tbody > .v-formlayout-firstrow >
.v-formlayout-contentcell,
.v-formlayout-margin-top > tbody > .v-formlayout-firstrow >
.v-formlayout-errorcell {
padding-top: 12px;
@@ -835,12 +835,12 @@ div.v-app-loading {
.v-formlayout-margin-bottom > tbody > .v-formlayout-lastrow >
.v-formlayout-errorcell {
padding-bottom: 12px;
}
-.v-ie6 .v-formlayout-spacing .v-formlayout-row .v-formlayout-captioncell,
+.v-ie6 .v-formlayout-spacing .v-formlayout-row .v-formlayout-captioncell,
.v-ie6 .v-formlayout-spacing .v-formlayout-row .v-formlayout-contentcell,
.v-ie6 .v-formlayout-spacing .v-formlayout-row .v-formlayout-errorcell {
padding-top:
expression(/v-formlayout-spacing/.test(this.parentNode.parentNode.parentNode.className)
? "6px" : "0px");
}
-.v-ie6 .v-formlayout-margin-top .v-formlayout-row .v-formlayout-captioncell,
+.v-ie6 .v-formlayout-margin-top .v-formlayout-row .v-formlayout-captioncell,
.v-ie6 .v-formlayout-margin-top .v-formlayout-row .v-formlayout-contentcell,
.v-ie6 .v-formlayout-margin-top .v-formlayout-row .v-formlayout-errorcell {
padding-top:
expression((/v-formlayout-firstrow/.test(this.parentNode.className) &&
/v-formlayout-margin-top/.test(this.parentNode.parentNode.parentNode.className))
? "12px" :
(/v-formlayout-spacing/.test(this.parentNode.parentNode.parentNode.className) ?
"6px" : "0px"));
@@ -852,7 +852,7 @@ div.v-app-loading {
}
.v-formlayout-margin-left > tbody > .v-formlayout-row >
.v-formlayout-captioncell {
padding-left: 12px;
-}
+}
.v-formlayout-margin-right > tbody > .v-formlayout-row >
.v-formlayout-contentcell {
padding-right: 12px;
}
@@ -874,7 +874,7 @@ div.v-app-loading {
}
.v-gridlayout-margin-left {
padding-left: 12px;
-}
+}
.v-gridlayout-margin-right {
padding-right: 12px;
}
@@ -898,7 +898,7 @@ div.v-app-loading {
}
.v-link {
- white-space: nowrap;
+ white-space: nowrap;
}
.v-link a {
vertical-align: middle;
@@ -949,7 +949,7 @@ div.v-app-loading {
background: #333;
color: #fff;
}
-.v-menubar-submenu .v-menubar-menuitem {
+.v-menubar-submenu .v-menubar-menuitem {
cursor: default;
display: block;
position: relative;
@@ -1006,7 +1006,7 @@ div.v-app-loading {
.v-menubar-popup:focus,
.v-menubar-popup .popupContent:focus,
.v-menubar-popup .popupContent .v-menubar-submenu:focus{
- outline: none;
+ outline: none;
}
/* Checkboxes for checkable/checked menu items */
/* Checked/unchecked requires combined style selected-(un)checked for IE6 */
@@ -1016,7 +1016,7 @@ div.v-app-loading {
.v-menubar-submenu-check-column .v-menubar-menuitem-caption {
padding-left: 18px;
}
-.v-menubar-submenu .v-menubar-menuitem-checked .v-menubar-menuitem-caption {
+.v-menubar-submenu .v-menubar-menuitem-checked .v-menubar-menuitem-caption {
background: transparent url(../base/menubar/img/check.gif) no-repeat
left;
}
@@ -1027,7 +1027,7 @@ div.v-app-loading {
overflow: hidden;
padding: 1em;
max-width:85%;
-
+
}
.v-Notification h1,
.v-Notification p,
@@ -1204,7 +1204,7 @@ div.v-progressindicator-indeterminate-di
.v-select-optiongroup .v-icon {
vertical-align: middle;
white-space: nowrap;
- margin: 0 2px;
+ margin: 0 2px;
}
.v-ie .v-select-optiongroup .v-select-option {
zoom: 1;
@@ -1344,7 +1344,7 @@ div.v-progressindicator-indeterminate-di
*/
/* Required field styles (disabled by default)
-
+
.v-filterselect-error .v-filterselect-input,
.v-select-required .v-select-option,
.v-select-required .v-select-select,
@@ -1438,7 +1438,7 @@ div.v-progressindicator-indeterminate-di
filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2)
alpha(opacity=20);
margin-top: -2px;
margin-left: -2px;
-}
+}
.v-slider {
margin: 5px 0;
@@ -1450,7 +1450,7 @@ div.v-progressindicator-indeterminate-di
background: #eee;
border-left: 1px solid #ddd;
border-right: 1px solid #eee;
-
+
}
.v-slider-handle {
background: #aaa;
@@ -1565,12 +1565,12 @@ div.v-progressindicator-indeterminate-di
}
/* Table theme building instructions
- *
- * Vaadin scroll table is very complex widget with dozens of features. These
+ *
+ * Vaadin scroll table is very complex widget with dozens of features. These
* features set some limitations for theme builder. To keep things working, it
* is safest to try to just override values used in default theme and comfort
to
* these instructions.
- *
+ *
* Borders in table header and in table body need to be same width
* - specify vertical borders on .v-table-header-wrap and .v-table-body
*
@@ -1581,7 +1581,7 @@ div.v-progressindicator-indeterminate-di
* - background is allowed for both elements
*
* Table headers:
- * - table cells in header contain .v-table-resizer and
+ * - table cells in header contain .v-table-resizer and
* .v-table-caption-container div elements, which are both floated to
right
* - to align header caption to body content resizer width +
.v-table-caption-container
* padding right should be equal to content cells padding-right and
border-right.
@@ -1644,8 +1644,8 @@ div.v-progressindicator-indeterminate-di
.v-table-footer-cell {
cursor: pointer;
}
-.v-table-footer-container {
- float:right;
+.v-table-footer-container {
+ float:right;
padding-right:6px;
overflow:hidden;
white-space:nowrap;
@@ -1654,14 +1654,14 @@ div.v-progressindicator-indeterminate-di
display: block;
height: 1.2em;
float: right;
- background: #aaa;
+ background: #aaa;
cursor: e-resize; /* Opera does not support col-resize, so use
e-resize instead */
- cursor: col-resize;
+ cursor: col-resize;
width: 1px;
overflow: hidden;
}
.v-table.v-disabled .v-table-resizer {
- cursor: default;
+ cursor: default;
}
.v-table-caption-container {
overflow: hidden;
@@ -1685,7 +1685,7 @@ div.v-progressindicator-indeterminate-di
width: 16px;
height: 1.2em;
float: right;
-}
+}
.v-table-header-cell-asc .v-table-sort-indicator {
background: transparent url(../base/common/img/sprites.png) no-repeat
right 6px;
}
@@ -1813,7 +1813,7 @@ div.v-progressindicator-indeterminate-di
}
/* row in column selector */
.v-on {
-
+
}
.v-off {
color: #ddd;
@@ -2029,18 +2029,18 @@ textarea.v-textarea-readonly:focus {
.v-textarea-error,
.v-textfield-error,
.v-richtextarea-error iframe.gwt-RichTextArea {
- background: #FFE0E0;
+ background: #FFE0E0;
}
*/
/* Disabled by default
.v-textarea-required,
.v-textfield-required,
.v-richtextarea-required iframe.gwt-RichTextArea {
- background: #FFE0E0;
+ background: #FFE0E0;
}
*/
/* Safari focus glow fix */
-.v-sa input:focus,
+.v-sa input:focus,
.v-sa textarea:focus {
outline-width: medium;
}
@@ -2093,7 +2093,7 @@ textarea.v-textarea-readonly:focus {
}
.v-richtextarea .gwt-RichTextToolbar .gwt-ToggleButton img,
.v-richtextarea .gwt-RichTextToolbar .gwt-PushButton img {
-
+
}
.v-richtextarea .gwt-RichTextToolbar .gwt-ListBox {
width: 24.5%;
@@ -2144,8 +2144,8 @@ div.v-tree-node-leaf {
.v-tree-node-children {
padding-left: 1em;
}
-/* ie6compatnode is hidden from non ie6 browsers, for ie6
- * uses weird hack to sink all events properly
+/* ie6compatnode is hidden from non ie6 browsers, for ie6
+ * uses weird hack to sink all events properly
*/
.v-tree-node-ie6compatnode {
display: none;
@@ -2291,16 +2291,16 @@ div.v-tree-node-leaf {
}
.v-ie6 .v-treetable-node-closed {
- background-image: url(../base/treetable/img/arrow-right.gif);
-}
+ background-image: url(../base/treetable/img/arrow-right.gif);
+}
.v-treetable-node-open {
background: url(../base/treetable/img/arrow-down.png) right top no-repeat;
}
.v-ie6 .v-treetable-node-open {
- background-image: url(../base/treetable/img/arrow-down.gif);
-}
+ background-image: url(../base/treetable/img/arrow-down.gif);
+}
.v-treetable .v-checkbox {
display: inline-block;
@@ -2388,7 +2388,7 @@ div table.v-treetable-animation-clone tr
width: 100%;
text-align: left;
}
-
+
.v-window {
background: #fff;
@@ -2400,7 +2400,7 @@ div table.v-treetable-animation-clone tr
.v-window-outerheader,
.v-window-draggingCurtain {
- cursor: move;
+ cursor: move;
}
.v-window-header {
@@ -2481,9 +2481,9 @@ div.v-window-header {
filter: alpha(opacity=50);
}
/* IE6 workaround for position:fixed; */
-.v-ie6 .v-window-modalitycurtain {
+.v-ie6 .v-window-modalitycurtain {
position: absolute;
- top: expression(document.documentElement.scrollTop + "px");
+ top: expression(document.documentElement.scrollTop + "px");
}
/* min-width for IE6 */
.v-ie6 .v-window {
@@ -2563,12 +2563,12 @@ div.v-window-header {
/* Automatically compiled css file from subdirectories. */
/*------------
- * General vertical and horizontal sprites
+ * General vertical and horizontal sprites
* -----------*/
/*------------
- * Buttons
+ * Buttons
* -----------*/
.v-accordion {
@@ -2700,20 +2700,20 @@ div.v-window-header {
-background-image: url(button/img/black-button-sprites-ie6.png);
background-position: left -0px;
}
-
+
.black .v-button:focus .v-button-wrap {
background-image: url(button/img/black-button-sprites.png);
-background-image: url(button/img/black-button-sprites-ie6.png);
background-position: right -26px;
}
-
+
.black .v-button:active,
.black .v-button.v-pressed {
background-image: url(button/img/black-button-sprites.png);
-background-image: url(button/img/black-button-sprites-ie6.png);
background-position: left -52px;
}
-
+
.black .v-button:active .v-button-wrap,
.black .v-button.v-pressed .v-button-wrap {
background-image: url(button/img/black-button-sprites.png);
@@ -2727,14 +2727,14 @@ div.v-window-header {
-background-image: url(button/img/black-button-sprites-ie6.png);
background-position: left -104px;
}
-
+
.black .v-button-wrap,
.black .v-disabled.v-button .v-button-wrap {
background-image: url(button/img/black-button-sprites.png);
-background-image: url(button/img/black-button-sprites-ie6.png);
background-position: right -130px;
}
-
+
.black .v-button-caption {
color: #c9ccce;
text-shadow: #121314 0 -1px 0;
@@ -2745,13 +2745,13 @@ div.v-window-header {
-background-image: url(button/img/button-sprites-ie6.png);
background-position: left -156px;
}
-
+
.v-button-primary:focus .v-button-wrap {
background-image: url(button/img/button-sprites.png);
-background-image: url(button/img/button-sprites-ie6.png);
background-position: right -182px;
}
-
+
.v-button-primary:active,
.v-button-primary.v-pressed {
background-image: url(button/img/button-sprites.png);
@@ -2772,14 +2772,14 @@ div.v-window-header {
-background-image: url(button/img/button-sprites-ie6.png);
background-position: left -260px;
}
-
+
.v-button-primary .v-button-wrap,
.v-disabled.v-button-primary .v-button-wrap {
background-image: url(button/img/button-sprites.png);
-background-image: url(button/img/button-sprites-ie6.png);
background-position: right -286px;
}
-
+
@@ -2791,21 +2791,21 @@ div.v-window-header {
-background-image: url(button/img/black-button-sprites-ie6.png);
background-position: left -156px;
}
-
+
.black .v-button-primary:focus .v-button-wrap {
background-image: url(button/img/black-button-sprites.png);
-background-image: url(button/img/black-button-sprites-ie6.png);
background-position: right -182px;
color: #eaf4fb;
}
-
+
.black .v-button-primary:active,
.black .v-button-primary.v-pressed {
background-image: url(button/img/black-button-sprites.png);
-background-image: url(button/img/black-button-sprites-ie6.png);
background-position: left -208px;
}
-
+
.black .v-button-primary:active .v-button-wrap,
.black .v-button-primary.v-pressed .v-button-wrap {
background-image: url(button/img/black-button-sprites.png);
@@ -2819,7 +2819,7 @@ div.v-window-header {
-background-image: url(button/img/black-button-sprites-ie6.png);
background-position: left -260px;
}
-
+
.black .v-button-primary .v-button-wrap,
.black .v-disabled.v-button-primary .v-button-wrap {
background-image: url(button/img/black-button-sprites.png);
@@ -2832,13 +2832,13 @@ div.v-window-header {
-background-image: url(button/img/button-sprites-ie6.png);
background-position: left -312px;
}
-
+
.v-button-small:focus .v-button-wrap {
background-image: url(button/img/button-sprites.png);
-background-image: url(button/img/button-sprites-ie6.png);
background-position: right -332px;
}
-
+
.v-button-small:active,
.v-button-small.v-pressed {
background-image: url(button/img/button-sprites.png);
@@ -2860,7 +2860,7 @@ div.v-window-header {
background-position: left -392px;
height: 20px;
}
-
+
.v-button-small .v-button-wrap,
.v-disabled.v-button-small .v-button-wrap {
background-image: url(button/img/button-sprites.png);
@@ -2873,7 +2873,7 @@ div.v-window-header {
.v-button-small .v-button-caption {
font-weight: normal;
}
-
+
@@ -2884,20 +2884,20 @@ div.v-window-header {
-background-image: url(button/img/black-button-sprites-ie6.png);
background-position: left -312px;
}
-
+
.black .v-button-small:focus .v-button-wrap {
background-image: url(button/img/black-button-sprites.png);
-background-image: url(button/img/black-button-sprites-ie6.png);
background-position: right -332px;
}
-
+
.black .v-button-small:active,
.black .v-button-small.v-pressed {
background-image: url(button/img/black-button-sprites.png);
-background-image: url(button/img/black-button-sprites-ie6.png);
background-position: left -352px;
}
-
+
.black .v-button-small:active .v-button-wrap,
.black .v-button-small.v-pressed .v-button-wrap {
background-image: url(button/img/black-button-sprites.png);
@@ -2911,7 +2911,7 @@ div.v-window-header {
-background-image: url(button/img/black-button-sprites-ie6.png);
background-position: left -392px;
}
-
+
.black .v-button-small .v-button-wrap,
.black .v-disabled.v-button-small .v-button-wrap {
background-image: url(button/img/black-button-sprites.png);
@@ -2940,7 +2940,7 @@ div.v-window-header {
.v-button.v-button-link.v-disabled .v-button-wrap {
cursor: default;
}
-
+
.v-button-link .v-button-caption,
.v-nativebutton-link .v-nativebutton-caption {
line-height: inherit;
@@ -2949,7 +2949,7 @@ div.v-window-header {
font-size: 12px;
text-shadow: none;
}
-
+
.v-button-link:focus .v-button-caption,
.v-nativebutton-link:focus .v-nativebutton-caption {
outline: 1px dotted #1b699f;
@@ -3168,7 +3168,7 @@ div.v-window-header {
}
input.v-textfield-readonly:focus{
- background-color: transparent;
+ background-color: transparent;
}
.v-datefield-calendarpanel {
border-collapse: collapse;
@@ -3618,12 +3618,12 @@ div.v-table-full-height-fields .v-datefi
text-align: right;
white-space: nowrap;
}
-.v-formlayout-spacing > tbody > .v-formlayout-row > .v-formlayout-captioncell,
+.v-formlayout-spacing > tbody > .v-formlayout-row > .v-formlayout-captioncell,
.v-formlayout-spacing > tbody > .v-formlayout-row > .v-formlayout-contentcell,
.v-formlayout-spacing > tbody > .v-formlayout-row > .v-formlayout-errorcell {
padding-top: 8px;
}
-.v-formlayout-margin-top > tbody > .v-formlayout-firstrow >
.v-formlayout-captioncell,
+.v-formlayout-margin-top > tbody > .v-formlayout-firstrow >
.v-formlayout-captioncell,
.v-formlayout-margin-top > tbody > .v-formlayout-firstrow >
.v-formlayout-contentcell,
.v-formlayout-margin-top > tbody > .v-formlayout-firstrow >
.v-formlayout-errorcell {
padding-top: 15px;
@@ -3633,12 +3633,12 @@ div.v-table-full-height-fields .v-datefi
.v-formlayout-margin-bottom > tbody > .v-formlayout-lastrow >
.v-formlayout-errorcell {
padding-bottom: 15px;
}
-.v-ie6 .v-formlayout-spacing .v-formlayout-row .v-formlayout-captioncell,
+.v-ie6 .v-formlayout-spacing .v-formlayout-row .v-formlayout-captioncell,
.v-ie6 .v-formlayout-spacing .v-formlayout-row .v-formlayout-contentcell,
.v-ie6 .v-formlayout-spacing .v-formlayout-row .v-formlayout-errorcell {
padding-top:
expression(/v-formlayout-spacing/.test(this.parentNode.parentNode.parentNode.className)
? "8px" : "0px");
}
-.v-ie6 .v-formlayout-margin-top .v-formlayout-row .v-formlayout-captioncell,
+.v-ie6 .v-formlayout-margin-top .v-formlayout-row .v-formlayout-captioncell,
.v-ie6 .v-formlayout-margin-top .v-formlayout-row .v-formlayout-contentcell,
.v-ie6 .v-formlayout-margin-top .v-formlayout-row .v-formlayout-errorcell {
padding-top:
expression((/v-formlayout-firstrow/.test(this.parentNode.className) &&
/v-formlayout-margin-top/.test(this.parentNode.parentNode.parentNode.className))
? "15px" :
(/v-formlayout-spacing/.test(this.parentNode.parentNode.parentNode.className) ?
"8px" : "0px"));
@@ -3650,7 +3650,7 @@ div.v-table-full-height-fields .v-datefi
}
.v-formlayout-margin-left > tbody > .v-formlayout-row >
.v-formlayout-captioncell {
padding-left: 18px;
-}
+}
.v-formlayout-margin-right > tbody > .v-formlayout-row >
.v-formlayout-contentcell {
padding-right: 18px;
}
@@ -3851,7 +3851,7 @@ div.v-table-full-height-fields .v-datefi
}
.v-gridlayout-margin-left {
padding-left: 24px;
-}
+}
.v-gridlayout-margin-right {
padding-right: 24px;
}
@@ -3946,7 +3946,7 @@ div.v-table-full-height-fields .v-datefi
padding: 1px 26px 1px 10px;
line-height: 16px;
}
-.v-menubar-submenu .v-menubar-menuitem-caption .v-icon {
+.v-menubar-submenu .v-menubar-menuitem-caption .v-icon {
vertical-align: middle;
}
.v-menubar .v-menubar-menuitem-selected,
@@ -3980,13 +3980,13 @@ div.v-table-full-height-fields .v-datefi
.v-menubar-submenu-check-column .v-menubar-menuitem-caption {
padding-left: 18px;
}
-.v-menubar-submenu .v-menubar-menuitem-checked .v-menubar-menuitem-caption {
+.v-menubar-submenu .v-menubar-menuitem-checked .v-menubar-menuitem-caption {
background: transparent url(menubar/img/checked.png) no-repeat left;
}
.v-menubar-submenu .v-menubar-menuitem-unchecked .v-menubar-menuitem-caption {
background: transparent url(menubar/img/unchecked.png) no-repeat left;
}
-.v-menubar-submenu .v-menubar-menuitem-selected-checked
.v-menubar-menuitem-caption {
+.v-menubar-submenu .v-menubar-menuitem-selected-checked
.v-menubar-menuitem-caption {
background: transparent url(menubar/img/checked-selected.png) no-repeat
left;
}
.v-menubar-submenu .v-menubar-menuitem-selected-unchecked
.v-menubar-menuitem-caption {
@@ -4007,7 +4007,7 @@ div.v-table-full-height-fields .v-datefi
/* Fix for #6793 */
font-weight: bold;
}
-
+
.v-Notification p {
line-height: 1.3;
}
@@ -4543,7 +4543,7 @@ div.v-table-full-height-fields .v-datefi
border-left: 1px solid #adb0b1;
border-right: none;
border-top: 1px solid #adb0b1;
- border-bottom: 1px solid #adb0b1;
+ border-bottom: 1px solid #adb0b1;
}
.v-slider-vertical .v-slider-handle {
width: 10px;
@@ -4657,17 +4657,17 @@ div.v-table-full-height-fields .v-datefi
.v-ie6 .v-table-header-wrap,
.v-ie6 .v-table-footer-wrap,
.v-ie6 .v-table-column-selector {
- /* The header will overflow the Table due to a bug in IE6 after changes
in #3003. To fix this (#7314)
- * we need to apply position:relative to the wrappers and selector to
make them appear on top of the
+ /* The header will overflow the Table due to a bug in IE6 after changes
in #3003. To fix this (#7314)
+ * we need to apply position:relative to the wrappers and selector to
make them appear on top of the
* header. We also need to apply it to the table root div to get rid of
a really weird IE6 rendering bug
- * caused by all this relativeness (see attachment in #7314).
+ * caused by all this relativeness (see attachment in #7314).
*/
position: relative;
}
.v-ie6 .v-table.v-disabled,
.v-ie7 .v-table.v-disabled {
- /* Fixes ie issue #7324 where disabled shim does not cover table body
*/
+ /* Fixes ie issue #7324 where disabled shim does not cover table body */
position: relative;
}
@@ -5723,7 +5723,7 @@ textarea.v-textarea-readonly,
padding-bottom: 0px;
}
.v-tree-node-focused span{
- border: 1px dotted black;
+ border: 1px dotted black;
}
.v-ie6 .v-tree-node-ie6compatnode.v-tree-node-focused{
padding-left: 0px;
@@ -6050,3 +6050,6 @@ textarea.v-textarea-readonly,
height: 20px;
padding: 1px 4px 0px 0px;
}
+.v-table-cell-content-pre .v-label {
+ white-space: pre;
+}
\ No newline at end of file
Modified:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/Activator.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/Activator.java?rev=1802386&r1=1802385&r2=1802386&view=diff
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/Activator.java
(original)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/Activator.java
Wed Jul 19 13:07:57 2017
@@ -18,6 +18,13 @@
*/
package org.apache.ace.webui.vaadin;
+import static org.apache.ace.webui.UIExtensionFactory.EXTENSION_POINT_KEY;
+import static
org.apache.ace.webui.UIExtensionFactory.EXTENSION_POINT_VALUE_ARTIFACT;
+import static
org.apache.ace.webui.UIExtensionFactory.EXTENSION_POINT_VALUE_DISTRIBUTION;
+import static
org.apache.ace.webui.UIExtensionFactory.EXTENSION_POINT_VALUE_FEATURE;
+import static
org.apache.ace.webui.UIExtensionFactory.EXTENSION_POINT_VALUE_TARGET;
+import static
org.apache.ace.webui.vaadin.VaadinServlet.DEFAULT_SERVLET_ENDPOINT;
+import static org.osgi.framework.Constants.SERVICE_RANKING;
import static
org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME;
import static
org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH;
import static
org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT;
@@ -25,24 +32,25 @@ import static org.osgi.service.http.whit
import static
org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PREFIX;
import static
org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN;
-import java.util.Map;
import java.util.Properties;
import javax.servlet.Servlet;
-import org.apache.ace.client.repository.stateful.StatefulTargetObject;
import org.apache.ace.webui.UIExtensionFactory;
+import org.apache.ace.webui.vaadin.extension.ArtifactInfoExtensionFactory;
+import
org.apache.ace.webui.vaadin.extension.ArtifactToFeatureAssocExtensionFactory;
+import
org.apache.ace.webui.vaadin.extension.DistributionToFeatureAssocExtensionFactory;
+import
org.apache.ace.webui.vaadin.extension.DistributionToTargetAssocExtensionFactory;
+import
org.apache.ace.webui.vaadin.extension.FeatureToArtifactAssocExtensionFactory;
+import
org.apache.ace.webui.vaadin.extension.FeatureToDistributionAssocExtensionFactory;
+import org.apache.ace.webui.vaadin.extension.TargetInfoExtensionFactory;
+import
org.apache.ace.webui.vaadin.extension.TargetToDistributionAssocExtensionFactory;
import org.apache.felix.dm.DependencyActivatorBase;
import org.apache.felix.dm.DependencyManager;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
import org.osgi.service.http.context.ServletContextHelper;
import org.osgi.service.log.LogService;
-import com.vaadin.ui.Component;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.VerticalLayout;
-
public class Activator extends DependencyActivatorBase {
private static final String PID = "org.apache.ace.webui.vaadin";
@@ -54,6 +62,7 @@ public class Activator extends Dependenc
Properties contextProps = new Properties();
contextProps.put(HTTP_WHITEBOARD_CONTEXT_NAME,
ACE_WEBUI_WHITEBOARD_CONTEXT_NAME);
contextProps.put(HTTP_WHITEBOARD_CONTEXT_PATH, "/");
+
manager.add(createComponent()
.setInterface(ServletContextHelper.class.getName(), contextProps)
.setImplementation(AceWebuiServletContextHelper.class)
@@ -64,12 +73,13 @@ public class Activator extends Dependenc
resourceRegistrationProps.put(HTTP_WHITEBOARD_RESOURCE_PREFIX,
"/VAADIN");
resourceRegistrationProps.put(HTTP_WHITEBOARD_RESOURCE_PATTERN,
"/VAADIN/*");
resourceRegistrationProps.put(HTTP_WHITEBOARD_CONTEXT_SELECT,
ACE_WEBUI_WHITEBOARD_CONTEXT_SELECT_FILTER);
+
manager.add(createComponent()
.setInterface(Object.class.getName(), resourceRegistrationProps)
.setImplementation(new Object()));
Properties props = new Properties();
- props.put(HTTP_WHITEBOARD_SERVLET_PATTERN,
VaadinServlet.DEFAULT_SERVLET_ENDPOINT.concat("/*"));
+ props.put(HTTP_WHITEBOARD_SERVLET_PATTERN,
DEFAULT_SERVLET_ENDPOINT.concat("/*"));
props.put(HTTP_WHITEBOARD_CONTEXT_SELECT,
ACE_WEBUI_WHITEBOARD_CONTEXT_SELECT_FILTER);
// register the main application for the ACE UI client
@@ -78,29 +88,87 @@ public class Activator extends Dependenc
.setImplementation(VaadinServlet.class)
.add(createConfigurationDependency().setPid(PID)));
+ addArtifactExtensions(manager);
+ addFeatureExtensions(manager);
+ addDistributionExtensions(manager);
+ addTargetExtensions(manager);
+ }
+
+ private void addArtifactExtensions(DependencyManager manager) {
+ Properties props = new Properties();
+ props.put(EXTENSION_POINT_KEY, EXTENSION_POINT_VALUE_ARTIFACT);
+ props.put(SERVICE_RANKING, Integer.valueOf(110));
+
+ manager.add(createComponent()
+ .setInterface(UIExtensionFactory.class.getName(), props)
+ .setImplementation(ArtifactInfoExtensionFactory.class));
+
+ props = new Properties();
+ props.put(EXTENSION_POINT_KEY, EXTENSION_POINT_VALUE_ARTIFACT);
+ props.put(SERVICE_RANKING, Integer.valueOf(100));
+
+ manager.add(createComponent()
+ .setInterface(UIExtensionFactory.class.getName(), props)
+ .setImplementation(ArtifactToFeatureAssocExtensionFactory.class));
+ }
+
+ private void addFeatureExtensions(DependencyManager manager) {
+ Properties props = new Properties();
+ props.put(EXTENSION_POINT_KEY, EXTENSION_POINT_VALUE_FEATURE);
+ props.put(SERVICE_RANKING, Integer.valueOf(110));
+
+ // shows off components that are contributed by extensions
+ manager.add(createComponent()
+ .setInterface(UIExtensionFactory.class.getName(), props)
+ .setImplementation(FeatureToArtifactAssocExtensionFactory.class));
+
+ props = new Properties();
+ props.put(EXTENSION_POINT_KEY, EXTENSION_POINT_VALUE_FEATURE);
+ props.put(SERVICE_RANKING, Integer.valueOf(100));
+
+ // shows off components that are contributed by extensions
+ manager.add(createComponent()
+ .setInterface(UIExtensionFactory.class.getName(), props)
+
.setImplementation(FeatureToDistributionAssocExtensionFactory.class));
+ }
+
+ private void addDistributionExtensions(DependencyManager manager) {
+ Properties props = new Properties();
+ props.put(EXTENSION_POINT_KEY, EXTENSION_POINT_VALUE_DISTRIBUTION);
+ props.put(SERVICE_RANKING, Integer.valueOf(110));
+
+ // shows off components that are contributed by extensions
+ manager.add(createComponent()
+ .setInterface(UIExtensionFactory.class.getName(), props)
+
.setImplementation(DistributionToFeatureAssocExtensionFactory.class));
+
+ props = new Properties();
+ props.put(EXTENSION_POINT_KEY, EXTENSION_POINT_VALUE_DISTRIBUTION);
+ props.put(SERVICE_RANKING, Integer.valueOf(100));
+
+ // shows off components that are contributed by extensions
+ manager.add(createComponent()
+ .setInterface(UIExtensionFactory.class.getName(), props)
+
.setImplementation(DistributionToTargetAssocExtensionFactory.class));
+ }
+
+ private void addTargetExtensions(DependencyManager manager) {
+ Properties props = new Properties();
+ props.put(EXTENSION_POINT_KEY, EXTENSION_POINT_VALUE_TARGET);
+ props.put(SERVICE_RANKING, Integer.valueOf(110));
+
+ // shows off components that are contributed by extensions
+ manager.add(createComponent()
+ .setInterface(UIExtensionFactory.class.getName(), props)
+ .setImplementation(TargetInfoExtensionFactory.class));
+
props = new Properties();
- props.put(UIExtensionFactory.EXTENSION_POINT_KEY,
UIExtensionFactory.EXTENSION_POINT_VALUE_TARGET);
- props.put(Constants.SERVICE_RANKING, Integer.valueOf(100));
+ props.put(EXTENSION_POINT_KEY, EXTENSION_POINT_VALUE_TARGET);
+ props.put(SERVICE_RANKING, Integer.valueOf(100));
// shows off components that are contributed by extensions
manager.add(createComponent()
.setInterface(UIExtensionFactory.class.getName(), props)
- .setImplementation(new UIExtensionFactory() {
- public Component create(Map<String, Object> context) {
- VerticalLayout vl = new VerticalLayout();
- vl.setCaption("Info");
- final StatefulTargetObject target = (StatefulTargetObject)
context.get("statefulTarget");
- Label info = new Label("Target ID : " +
target.getID() + "\n" +
- "Installed version : " +
(target.getLastInstallVersion() == null ? "(none)" :
target.getLastInstallVersion()) + "\n" +
- "Available version : " + target.getCurrentVersion() +
"\n" +
- "Approval state : " + target.getApprovalState() +
"\n" +
- "Store state : " + target.getStoreState() +
"\n" +
- "Provisioning state : " +
target.getProvisioningState() + "\n" +
- "Registration state : " +
target.getRegistrationState());
- info.setContentMode(Label.CONTENT_PREFORMATTED);
- vl.addComponent(info);
- return vl;
- }
- }));
+
.setImplementation(TargetToDistributionAssocExtensionFactory.class));
}
}
Modified:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/EditWindow.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/EditWindow.java?rev=1802386&r1=1802385&r2=1802386&view=diff
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/EditWindow.java
(original)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/EditWindow.java
Wed Jul 19 13:07:57 2017
@@ -29,6 +29,7 @@ import com.vaadin.event.ShortcutAction.K
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Component;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.TextField;
@@ -64,7 +65,7 @@ public abstract class EditWindow extends
/**
* Shows this dialog on screen.
- *
+ *
* @param window the parent window to show this dialog on, cannot be
<code>null</code>.
*/
public void show(Window parent) {
@@ -80,7 +81,7 @@ public abstract class EditWindow extends
/**
* Called when the {@link #onOk(String, String)} method failed with an
exception.
- *
+ *
* @param e the exception to handle, never <code>null</code>.
*/
protected abstract void handleError(Exception e);
@@ -89,7 +90,7 @@ public abstract class EditWindow extends
* @param object
* @param factories
*/
- protected void initDialog(final NamedObject object,
List<UIExtensionFactory> factories) {
+ protected void initDialog(NamedObject object, List<UIExtensionFactory>
factories) {
VerticalLayout fields = new VerticalLayout();
fields.setSpacing(true);
fields.addComponent(m_name);
@@ -101,12 +102,15 @@ public abstract class EditWindow extends
tabs.setVisible(!factories.isEmpty());
Map<String, Object> context = new HashMap<>();
- context.put("object", object);
+ context.put("object", object.getObject());
populateContext(context);
for (UIExtensionFactory factory : factories) {
try {
- tabs.addTab(factory.create(context));
+ Component tabComp = factory.create(context);
+ if (tabComp != null) {
+ tabs.addTab(tabComp);
+ }
}
catch (Throwable ex) {
// We ignore extension factories that throw exceptions
@@ -152,17 +156,17 @@ public abstract class EditWindow extends
// The components added to the window are actually added to the
window's
// layout; you can use either. Alignments are set using the layout
layout.setComponentAlignment(buttonBar, Alignment.BOTTOM_RIGHT);
-
+
m_name.focus();
}
-
+
protected Map<String, Object> populateContext(Map<String, Object> context)
{
return context;
}
/**
* Called when the user acknowledges this window by pressing Ok.
- *
+ *
* @param name the value of the name field;
* @param description the value of the description field.
* @throws Exception in case the creation failed.
Modified:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/VaadinClient.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/VaadinClient.java?rev=1802386&r1=1802385&r2=1802386&view=diff
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/VaadinClient.java
(original)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/VaadinClient.java
Wed Jul 19 13:07:57 2017
@@ -60,7 +60,6 @@ import org.apache.ace.client.repository.
import org.apache.ace.connectionfactory.ConnectionFactory;
import org.apache.ace.webui.NamedObject;
import org.apache.ace.webui.UIExtensionFactory;
-import org.apache.ace.webui.domain.NamedStatefulTargetObject;
import org.apache.ace.webui.domain.NamedTargetObject;
import org.apache.ace.webui.vaadin.LoginWindow.LoginFunction;
import org.apache.ace.webui.vaadin.UploadHelper.ArtifactDropHandler;
@@ -906,10 +905,7 @@ public class VaadinClient extends com.va
@Override
protected Map<String, Object> populateContext(Map<String,
Object> context) {
if (object instanceof NamedTargetObject) {
- context.put("statefulTarget",
m_statefulTargetRepository.get(object.getDefinition()));
- }
- else if (object instanceof NamedStatefulTargetObject) {
- context.put("statefulTarget", object.getObject());
+ context.put("object",
m_statefulTargetRepository.get(object.getDefinition()));
}
return context;
}
Added:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/ArtifactInfoExtensionFactory.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/ArtifactInfoExtensionFactory.java?rev=1802386&view=auto
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/ArtifactInfoExtensionFactory.java
(added)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/ArtifactInfoExtensionFactory.java
Wed Jul 19 13:07:57 2017
@@ -0,0 +1,38 @@
+/*
+ * 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.ace.webui.vaadin.extension;
+
+import org.apache.ace.client.repository.object.ArtifactObject;
+
+import com.vaadin.ui.Table;
+
+/**
+ * Provides a UI extension for the artifact details window showing some
details on an artifact.
+ */
+public class ArtifactInfoExtensionFactory extends
BaseInfoExtensionFactory<ArtifactObject> {
+
+ @Override
+ protected void addTableRows(Table table, ArtifactObject artifact) {
+ addItem(table, "MIME type", artifact.getMimetype());
+ addItem(table, "Processor PID", artifact.getProcessorPID());
+ addItem(table, "Resource ID", artifact.getResourceId());
+ addItem(table, "Size", artifact.getSize());
+ addItem(table, "URL", artifact.getURL());
+ }
+}
Propchange:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/ArtifactInfoExtensionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/ArtifactToFeatureAssocExtensionFactory.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/ArtifactToFeatureAssocExtensionFactory.java?rev=1802386&view=auto
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/ArtifactToFeatureAssocExtensionFactory.java
(added)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/ArtifactToFeatureAssocExtensionFactory.java
Wed Jul 19 13:07:57 2017
@@ -0,0 +1,41 @@
+/*
+ * 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.ace.webui.vaadin.extension;
+
+import java.util.stream.Stream;
+
+import org.apache.ace.client.repository.object.Artifact2FeatureAssociation;
+import org.apache.ace.client.repository.object.ArtifactObject;
+
+/**
+ * Provides a UI extension for the details window showing some details on all
associations.
+ */
+public class ArtifactToFeatureAssocExtensionFactory extends
BaseAssociationExtensionFactory<ArtifactObject, Artifact2FeatureAssociation> {
+
+ public ArtifactToFeatureAssocExtensionFactory() {
+ super("Features");
+ }
+
+ @Override
+ protected Stream<Artifact2FeatureAssociation>
getAssocations(ArtifactObject artifact) {
+ return artifact.getFeatures().stream()
+ .flatMap(f -> artifact.getAssociationsWith(f).stream());
+ }
+
+}
Propchange:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/ArtifactToFeatureAssocExtensionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseAssociationExtensionFactory.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseAssociationExtensionFactory.java?rev=1802386&view=auto
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseAssociationExtensionFactory.java
(added)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseAssociationExtensionFactory.java
Wed Jul 19 13:07:57 2017
@@ -0,0 +1,78 @@
+/*
+ * 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.ace.webui.vaadin.extension;
+
+import static org.apache.ace.client.repository.Association.LEFT_CARDINALITY;
+import static org.apache.ace.client.repository.Association.LEFT_ENDPOINT;
+import static org.apache.ace.client.repository.Association.RIGHT_CARDINALITY;
+import static org.apache.ace.client.repository.Association.RIGHT_ENDPOINT;
+
+import java.util.stream.Stream;
+
+import org.apache.ace.client.repository.Association;
+import org.apache.ace.client.repository.RepositoryObject;
+
+import com.vaadin.ui.Component;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Table;
+
+/**
+ * Provides a UI extension for the target details window showing some details
on a (stateful) target.
+ */
+abstract class BaseAssociationExtensionFactory<OBJ extends RepositoryObject,
ASSOC extends Association<?, ?>> extends BaseUIExtensionFactory<OBJ> {
+
+ protected BaseAssociationExtensionFactory(String caption) {
+ super(caption);
+ }
+
+ @Override
+ public final Component create(OBJ obj) {
+ Table table = new Table();
+ table.setEditable(false);
+ table.setWidth("100%");
+
+ table.addContainerProperty("Left endpoint", Label.class, null);
+ table.addContainerProperty("Left cardinality", Label.class, null);
+ table.addContainerProperty("Right endpoint", Label.class, null);
+ table.addContainerProperty("Right cardinality", Label.class, null);
+
+ table.setColumnExpandRatio("Left endpoint", 1.0f);
+ table.setColumnExpandRatio("Left cardinality", 0.12f);
+ table.setColumnExpandRatio("Right endpoint", 1.0f);
+ table.setColumnExpandRatio("Right cardinality", 0.12f);
+
+ getAssocations(obj)
+ .forEach(assoc -> table.addItem(new Object[] {
+ assoc.getAttribute(LEFT_ENDPOINT),
+ getCardinality(assoc.getAttribute(LEFT_CARDINALITY)),
+ assoc.getAttribute(RIGHT_ENDPOINT),
+ getCardinality(assoc.getAttribute(RIGHT_CARDINALITY)) },
null));
+
+ return table;
+ }
+
+ protected abstract Stream<ASSOC> getAssocations(OBJ obj);
+
+ private String getCardinality(String cardinality) {
+ if (cardinality.equals(Integer.toString(Integer.MAX_VALUE))) {
+ cardinality = "*";
+ }
+ return cardinality;
+ }
+}
Propchange:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseAssociationExtensionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseInfoExtensionFactory.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseInfoExtensionFactory.java?rev=1802386&view=auto
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseInfoExtensionFactory.java
(added)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseInfoExtensionFactory.java
Wed Jul 19 13:07:57 2017
@@ -0,0 +1,72 @@
+/*
+ * 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.ace.webui.vaadin.extension;
+
+import org.apache.ace.client.repository.RepositoryObject;
+
+import com.vaadin.ui.Component;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Table;
+
+/**
+ * Provides a UI extension for the target details window showing some details
on a (stateful) target.
+ */
+abstract class BaseInfoExtensionFactory<OBJ extends RepositoryObject> extends
BaseUIExtensionFactory<OBJ> {
+
+ protected BaseInfoExtensionFactory() {
+ super("Info");
+ }
+
+ @Override
+ public final Component create(OBJ obj) {
+ Table table = new Table();
+ table.setEditable(false);
+ table.setWidth("100%");
+
+ table.addContainerProperty("Name", Label.class, null);
+ table.addContainerProperty("Value", Label.class, null);
+
+ table.setColumnExpandRatio("Name", 0.22f);
+ table.setColumnExpandRatio("Value", 1.0f);
+
+ addTableRows(table, obj);
+
+ return table;
+ }
+
+ protected final void addItem(Table table, String label, Enum<?> value) {
+ if (value != null) {
+ table.addItem(new Object[] { label, value.name() }, null);
+ }
+ }
+
+ protected final void addItem(Table table, String label, Long value) {
+ if (value != null && value.longValue() >= 0) {
+ table.addItem(new Object[] { label, value }, null);
+ }
+ }
+
+ protected final void addItem(Table table, String label, String value) {
+ if (value != null && !"".equals(value)) {
+ table.addItem(new Object[] { label, value }, null);
+ }
+ }
+
+ protected abstract void addTableRows(Table table, OBJ obj);
+}
Propchange:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseInfoExtensionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseUIExtensionFactory.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseUIExtensionFactory.java?rev=1802386&view=auto
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseUIExtensionFactory.java
(added)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseUIExtensionFactory.java
Wed Jul 19 13:07:57 2017
@@ -0,0 +1,60 @@
+/*
+ * 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.ace.webui.vaadin.extension;
+
+import java.util.Map;
+
+import org.apache.ace.client.repository.RepositoryObject;
+import org.apache.ace.webui.UIExtensionFactory;
+
+import com.vaadin.ui.Component;
+import com.vaadin.ui.VerticalLayout;
+
+abstract class BaseUIExtensionFactory<OBJ extends RepositoryObject> implements
UIExtensionFactory {
+ private final String m_caption;
+
+ protected BaseUIExtensionFactory(String caption) {
+ m_caption = caption;
+ }
+
+ @Override
+ public final Component create(Map<String, Object> context) {
+ VerticalLayout vl = new VerticalLayout();
+ vl.setCaption(m_caption);
+ vl.setSpacing(false);
+ vl.setSizeFull();
+
+ OBJ obj = getObjectFromContext(context);
+ if (obj == null) {
+ return null;
+ }
+
+ vl.addComponent(create(obj));
+
+ return vl;
+ }
+
+ abstract Component create(OBJ obj);
+
+ @SuppressWarnings("unchecked")
+ private OBJ getObjectFromContext(Map<String, Object> context) {
+ return (OBJ) context.get("object");
+ }
+
+}
Propchange:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/BaseUIExtensionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/DistributionToFeatureAssocExtensionFactory.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/DistributionToFeatureAssocExtensionFactory.java?rev=1802386&view=auto
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/DistributionToFeatureAssocExtensionFactory.java
(added)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/DistributionToFeatureAssocExtensionFactory.java
Wed Jul 19 13:07:57 2017
@@ -0,0 +1,40 @@
+/*
+ * 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.ace.webui.vaadin.extension;
+
+import java.util.stream.Stream;
+
+import org.apache.ace.client.repository.object.DistributionObject;
+import org.apache.ace.client.repository.object.Feature2DistributionAssociation;
+
+/**
+ * Provides a UI extension for the details window showing some details on all
associations.
+ */
+public class DistributionToFeatureAssocExtensionFactory extends
BaseAssociationExtensionFactory<DistributionObject,
Feature2DistributionAssociation> {
+
+ public DistributionToFeatureAssocExtensionFactory() {
+ super("Features");
+ }
+
+ @Override
+ protected Stream<Feature2DistributionAssociation>
getAssocations(DistributionObject dist) {
+ return dist.getFeatures().stream()
+ .flatMap(d -> dist.getAssociationsWith(d).stream());
+ }
+}
Propchange:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/DistributionToFeatureAssocExtensionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/DistributionToTargetAssocExtensionFactory.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/DistributionToTargetAssocExtensionFactory.java?rev=1802386&view=auto
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/DistributionToTargetAssocExtensionFactory.java
(added)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/DistributionToTargetAssocExtensionFactory.java
Wed Jul 19 13:07:57 2017
@@ -0,0 +1,40 @@
+/*
+ * 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.ace.webui.vaadin.extension;
+
+import java.util.stream.Stream;
+
+import org.apache.ace.client.repository.object.Distribution2TargetAssociation;
+import org.apache.ace.client.repository.object.DistributionObject;
+
+/**
+ * Provides a UI extension for the details window showing some details on all
associations.
+ */
+public class DistributionToTargetAssocExtensionFactory extends
BaseAssociationExtensionFactory<DistributionObject,
Distribution2TargetAssociation> {
+
+ public DistributionToTargetAssocExtensionFactory() {
+ super("Targets");
+ }
+
+ @Override
+ protected Stream<Distribution2TargetAssociation>
getAssocations(DistributionObject dist) {
+ return dist.getTargets().stream()
+ .flatMap(d -> dist.getAssociationsWith(d).stream());
+ }
+}
Propchange:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/DistributionToTargetAssocExtensionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/FeatureToArtifactAssocExtensionFactory.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/FeatureToArtifactAssocExtensionFactory.java?rev=1802386&view=auto
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/FeatureToArtifactAssocExtensionFactory.java
(added)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/FeatureToArtifactAssocExtensionFactory.java
Wed Jul 19 13:07:57 2017
@@ -0,0 +1,40 @@
+/*
+ * 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.ace.webui.vaadin.extension;
+
+import java.util.stream.Stream;
+
+import org.apache.ace.client.repository.object.Artifact2FeatureAssociation;
+import org.apache.ace.client.repository.object.FeatureObject;
+
+/**
+ * Provides a UI extension for the details window showing some details on all
associations.
+ */
+public class FeatureToArtifactAssocExtensionFactory extends
BaseAssociationExtensionFactory<FeatureObject, Artifact2FeatureAssociation> {
+
+ public FeatureToArtifactAssocExtensionFactory() {
+ super("Artifacts");
+ }
+
+ @Override
+ protected Stream<Artifact2FeatureAssociation> getAssocations(FeatureObject
feature) {
+ return feature.getArtifacts().stream()
+ .flatMap(a -> feature.getAssociationsWith(a).stream());
+ }
+}
Propchange:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/FeatureToArtifactAssocExtensionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/FeatureToDistributionAssocExtensionFactory.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/FeatureToDistributionAssocExtensionFactory.java?rev=1802386&view=auto
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/FeatureToDistributionAssocExtensionFactory.java
(added)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/FeatureToDistributionAssocExtensionFactory.java
Wed Jul 19 13:07:57 2017
@@ -0,0 +1,40 @@
+/*
+ * 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.ace.webui.vaadin.extension;
+
+import java.util.stream.Stream;
+
+import org.apache.ace.client.repository.object.Feature2DistributionAssociation;
+import org.apache.ace.client.repository.object.FeatureObject;
+
+/**
+ * Provides a UI extension for the details window showing some details on all
associations.
+ */
+public class FeatureToDistributionAssocExtensionFactory extends
BaseAssociationExtensionFactory<FeatureObject, Feature2DistributionAssociation>
{
+
+ public FeatureToDistributionAssocExtensionFactory() {
+ super("Distributions");
+ }
+
+ @Override
+ protected Stream<Feature2DistributionAssociation>
getAssocations(FeatureObject feature) {
+ return feature.getDistributions().stream()
+ .flatMap(d -> feature.getAssociationsWith(d).stream());
+ }
+}
Propchange:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/FeatureToDistributionAssocExtensionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/TargetInfoExtensionFactory.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/TargetInfoExtensionFactory.java?rev=1802386&view=auto
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/TargetInfoExtensionFactory.java
(added)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/TargetInfoExtensionFactory.java
Wed Jul 19 13:07:57 2017
@@ -0,0 +1,40 @@
+/*
+ * 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.ace.webui.vaadin.extension;
+
+import org.apache.ace.client.repository.stateful.StatefulTargetObject;
+
+import com.vaadin.ui.Table;
+
+/**
+ * Provides a UI extension for the target details window showing some details
on a (stateful) target.
+ */
+public class TargetInfoExtensionFactory extends
BaseInfoExtensionFactory<StatefulTargetObject> {
+
+ @Override
+ protected void addTableRows(Table table, StatefulTargetObject target) {
+ addItem(table, "Target ID", target.getID());
+ addItem(table, "Available version", target.getCurrentVersion());
+ addItem(table, "Installed version", (target.getLastInstallVersion() ==
null ? "(none)" : target.getLastInstallVersion()));
+ addItem(table, "Registration state", target.getRegistrationState());
+ addItem(table, "Approval state", target.getApprovalState());
+ addItem(table, "Provisioning state", target.getProvisioningState());
+ addItem(table, "Store state", target.getStoreState());
+ }
+}
Propchange:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/TargetInfoExtensionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/TargetToDistributionAssocExtensionFactory.java
URL:
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/TargetToDistributionAssocExtensionFactory.java?rev=1802386&view=auto
==============================================================================
---
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/TargetToDistributionAssocExtensionFactory.java
(added)
+++
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/TargetToDistributionAssocExtensionFactory.java
Wed Jul 19 13:07:57 2017
@@ -0,0 +1,40 @@
+/*
+ * 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.ace.webui.vaadin.extension;
+
+import java.util.stream.Stream;
+
+import org.apache.ace.client.repository.object.Distribution2TargetAssociation;
+import org.apache.ace.client.repository.stateful.StatefulTargetObject;
+
+/**
+ * Provides a UI extension for the details window showing some details on all
associations.
+ */
+public class TargetToDistributionAssocExtensionFactory extends
BaseAssociationExtensionFactory<StatefulTargetObject,
Distribution2TargetAssociation> {
+
+ public TargetToDistributionAssocExtensionFactory() {
+ super("Distributions");
+ }
+
+ @Override
+ protected Stream<Distribution2TargetAssociation>
getAssocations(StatefulTargetObject target) {
+ return target.getDistributions().stream()
+ .flatMap(d -> target.getAssociationsWith(d).stream());
+ }
+}
Propchange:
ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/extension/TargetToDistributionAssocExtensionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native