]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.cms.ui/src/org/argeo/cms/maintenance/ConnectivityDeploymentUi.java
1 package org
.argeo
.cms
.maintenance
;
3 import org
.argeo
.cms
.util
.CmsUtils
;
4 import org
.eclipse
.swt
.SWT
;
5 import org
.eclipse
.swt
.layout
.GridData
;
6 import org
.eclipse
.swt
.widgets
.Composite
;
7 import org
.eclipse
.swt
.widgets
.Label
;
8 import org
.osgi
.framework
.ServiceReference
;
9 import org
.osgi
.service
.http
.HttpService
;
10 import org
.osgi
.service
.useradmin
.UserAdmin
;
12 class ConnectivityDeploymentUi
extends AbstractOsgiComposite
{
13 private static final long serialVersionUID
= 590221539553514693L;
15 public ConnectivityDeploymentUi(Composite parent
, int style
) {
20 protected void initUi(int style
) {
21 StringBuffer text
= new StringBuffer();
22 text
.append("<span style='font-variant: small-caps;'>Provided Servers</span><br/>");
24 ServiceReference
<HttpService
> userAdminRef
= bc
.getServiceReference(HttpService
.class);
25 if (userAdminRef
!= null) {
26 // FIXME use constants
27 Object httpPort
= userAdminRef
.getProperty("http.port");
28 Object httpsPort
= userAdminRef
.getProperty("https.port");
30 text
.append("<b>http</b> ").append(httpPort
).append("<br/>");
31 if (httpsPort
!= null)
32 text
.append("<b>https</b> ").append(httpsPort
).append("<br/>");
37 text
.append("<span style='font-variant: small-caps;'>Referenced Servers</span><br/>");
39 Label label
= new Label(this, SWT
.NONE
);
40 label
.setData(new GridData(SWT
.FILL
, SWT
.FILL
, false, false));
41 CmsUtils
.markup(label
);
42 label
.setText(text
.toString());
45 protected boolean isDeployed() {
46 return bc
.getServiceReference(UserAdmin
.class) != null;