Merge branch 'Download_server_supports_download_through_HTTP_and_HTTPs' of https://github.com/bsinno/hawkbit.git into Download_server_supports_download_through_HTTP_and_HTTPs

This commit is contained in:
Michael Hirsch
2016-03-23 17:14:00 +01:00
12 changed files with 21 additions and 98 deletions

View File

@@ -30,9 +30,6 @@ import com.vaadin.ui.VerticalLayout;
/**
* View to configure the authentication mode.
*
*
*
*/
@SpringComponent
@ViewScope

View File

@@ -14,8 +14,8 @@ import java.util.List;
import com.vaadin.ui.CustomComponent;
/**
* base class for all configuration views. This class implements the logic for
* the handling of the
* Base class for all configuration views. This class implements the logic for
* the handling of the configurations in a consistent way.
*
*/
public abstract class BaseConfigurationView extends CustomComponent implements ConfigurationGroup {

View File

@@ -11,9 +11,8 @@ package org.eclipse.hawkbit.ui.tenantconfiguration;
import com.vaadin.ui.Component;
/**
*
*
*
* Interface that all system configurations have to implement to save and undo
* their customized changes.
*/
public interface ConfigurationGroup extends Component, ConfigurationItem {

View File

@@ -11,7 +11,7 @@ package org.eclipse.hawkbit.ui.tenantconfiguration;
import java.io.Serializable;
/**
* represents an configurationItem, which can be modified by the user
* Represents an configurationItem, which can be modified by the user
*/
public interface ConfigurationItem {

View File

@@ -33,9 +33,6 @@ import com.vaadin.ui.VerticalLayout;
/**
* Default DistributionSet Panel.
*
*
*
*/
@SpringComponent
@ViewScope

View File

@@ -28,10 +28,8 @@ import com.vaadin.ui.Panel;
import com.vaadin.ui.VerticalLayout;
/**
* @author Jonathan Knoblauch
*
* View to enable anonymous download.
*/
@SpringComponent
@ViewScope
public class DownloadAnonymousConfigurationView extends BaseConfigurationView
@@ -42,7 +40,7 @@ public class DownloadAnonymousConfigurationView extends BaseConfigurationView
private static final long serialVersionUID = 1L;
@Autowired
private I18N i18n; // TODO
private I18N i18n;
@Autowired
private transient TenantConfigurationManagement tenantConfigurationManagement;
@@ -52,7 +50,7 @@ public class DownloadAnonymousConfigurationView extends BaseConfigurationView
private CheckBox downloadAnonymousCheckBox;
/**
* Initialize Default Distribution Set layout.
* Initialize Default Download Anonymous layout.
*/
@PostConstruct
public void init() {
@@ -81,7 +79,6 @@ public class DownloadAnonymousConfigurationView extends BaseConfigurationView
downloadAnonymousCheckBox = SPUIComponentProvider.getCheckBox("", DIST_CHECKBOX_STYLE, null, false, "");
downloadAnonymousCheckBox.setValue(anonymousDownloadEnabled);
downloadAnonymousCheckBox.setId("TODO");
downloadAnonymousCheckBox.addValueChangeListener(event -> configurationHasChanged());
gridLayout.addComponent(downloadAnonymousCheckBox);
@@ -94,7 +91,6 @@ public class DownloadAnonymousConfigurationView extends BaseConfigurationView
rootPanel.setContent(vLayout);
setCompositionRoot(rootPanel);
}
@Override
@@ -107,15 +103,14 @@ public class DownloadAnonymousConfigurationView extends BaseConfigurationView
public void save() {
tenantConfigurationManagement.addOrUpdateConfiguration(TenantConfigurationKey.ANONYMOUS_DOWNLOAD_MODE_ENABLED,
downloadAnonymousCheckBox.getValue());
// TODO notification Download server
}
@Override
public void undo() {
anonymousDownloadEnabled = tenantConfigurationManagement
.getGlobalConfigurationValue(TenantConfigurationKey.ANONYMOUS_DOWNLOAD_MODE_ENABLED, Boolean.class);
final TenantConfigurationValue<Boolean> value = tenantConfigurationManagement
.getConfigurationValue(TenantConfigurationKey.ANONYMOUS_DOWNLOAD_MODE_ENABLED, Boolean.class);
anonymousDownloadEnabled = value.getValue();
downloadAnonymousCheckBox.setValue(anonymousDownloadEnabled);
}
}

View File

@@ -29,8 +29,6 @@ import com.vaadin.ui.VerticalLayout;
/**
* View to configure the polling interval and the overdue time.
*
*
*/
@SpringComponent
@ViewScope

View File

@@ -38,9 +38,6 @@ import com.vaadin.ui.VerticalLayout;
/**
* Main UI for the system configuration view.
*
*
*
*/
@SpringView(name = TenantConfigurationDashboardView.VIEW_NAME, ui = HawkbitUI.class)
@ViewScope
@@ -76,7 +73,7 @@ public class TenantConfigurationDashboardView extends CustomComponent implements
private final List<ConfigurationGroup> configurationViews = new ArrayList<>();
/**
* init method adds all Configuration Views to the list of Views.
* Init method adds all Configuration Views to the list of Views.
*/
@PostConstruct
public void init() {
@@ -158,13 +155,6 @@ public class TenantConfigurationDashboardView extends CustomComponent implements
undoConfigurationBtn.setEnabled(false);
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.hawkbit.server.ui.tenantconfiguration.ConfigurationGroup.
* ConfigurationGroupChangeListener #configurationChanged()
*/
@Override
public void configurationHasChanged() {
saveConfigurationBtn.setEnabled(true);

View File

@@ -21,9 +21,6 @@ import com.vaadin.server.Resource;
/**
* Menu item for system configuration view.
*
*
*
*/
@Component
@Order(700)

View File

@@ -26,16 +26,13 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.ValoTheme;
/**
*
*
* This class represents the UI item for the certificate authenticated by an
* reverse proxy in the authentication configuration view.
*/
@SpringComponent
@ViewScope
public class CertificateAuthenticationConfigurationItem extends AbstractAuthenticationTenantConfigurationItem {
/**
*
*/
private static final long serialVersionUID = 1L;
@Autowired
@@ -59,7 +56,7 @@ public class CertificateAuthenticationConfigurationItem extends AbstractAuthenti
}
/**
* init mehotd called by spring.
* Init mehotd called by spring.
*/
@PostConstruct
public void init() {
@@ -94,12 +91,6 @@ public class CertificateAuthenticationConfigurationItem extends AbstractAuthenti
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.hawkbit.server.ui.tenantconfiguration.
* TenantConfigurationItem# configEnable()
*/
@Override
public void configEnable() {
if (!configurationEnabled) {
@@ -110,12 +101,6 @@ public class CertificateAuthenticationConfigurationItem extends AbstractAuthenti
setDetailVisible(true);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.hawkbit.server.ui.tenantconfiguration.
* TenantConfigurationItem# configDisable()
*/
@Override
public void configDisable() {
if (configurationEnabled) {
@@ -125,11 +110,6 @@ public class CertificateAuthenticationConfigurationItem extends AbstractAuthenti
setDetailVisible(false);
}
/*
* (non-Javadoc)
*
* @see hawkbit.server.ui.tenantconfiguration.TenantConfigurationItem#save()
*/
@Override
public void save() {
if (configurationEnabledChange) {
@@ -142,11 +122,6 @@ public class CertificateAuthenticationConfigurationItem extends AbstractAuthenti
}
}
/*
* (non-Javadoc)
*
* @see hawkbit.server.ui.tenantconfiguration.TenantConfigurationItem#undo()
*/
@Override
public void undo() {
configurationEnabledChange = false;

View File

@@ -30,16 +30,13 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.ValoTheme;
/**
*
*
* This class represents the UI item for the gateway security token section in
* the authentication configuration view.
*/
@SpringComponent
@ViewScope
public class GatewaySecurityTokenAuthenticationConfigurationItem extends AbstractAuthenticationTenantConfigurationItem {
/**
*
*/
private static final long serialVersionUID = 1L;
@Autowired
@@ -70,7 +67,7 @@ public class GatewaySecurityTokenAuthenticationConfigurationItem extends Abstrac
}
/**
* init mehotd called by spring.
* Init mehotd called by spring.
*/
@PostConstruct
public void init() {
@@ -135,12 +132,6 @@ public class GatewaySecurityTokenAuthenticationConfigurationItem extends Abstrac
notifyConfigurationChanged();
}
/*
* (non-Javadoc)
*
* @see org.eclipse.hawkbit.server.ui.tenantconfiguration.
* TenantConfigurationItem# configEnable()
*/
@Override
public void configEnable() {
if (!configurationEnabled) {

View File

@@ -19,17 +19,13 @@ import com.vaadin.spring.annotation.SpringComponent;
import com.vaadin.spring.annotation.ViewScope;
/**
*
*
*
* This class represents the UI item for the target security token section in
* the authentication configuration view.
*/
@SpringComponent
@ViewScope
public class TargetSecurityTokenAuthenticationConfigurationItem extends AbstractAuthenticationTenantConfigurationItem {
/**
*
*/
private static final long serialVersionUID = 1L;
@Autowired
@@ -49,7 +45,7 @@ public class TargetSecurityTokenAuthenticationConfigurationItem extends Abstract
}
/**
* init mehotd called by spring.
* Init mehotd called by spring.
*/
@PostConstruct
public void init() {
@@ -57,12 +53,6 @@ public class TargetSecurityTokenAuthenticationConfigurationItem extends Abstract
configurationEnabled = isConfigEnabled();
}
/*
* (non-Javadoc)
*
* @see org.eclipse.hawkbit.server.ui.tenantconfiguration.
* TenantConfigurationItem# configEnable()
*/
@Override
public void configEnable() {
if (!configurationEnabled) {
@@ -71,12 +61,6 @@ public class TargetSecurityTokenAuthenticationConfigurationItem extends Abstract
configurationEnabled = true;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.hawkbit.server.ui.tenantconfiguration.
* TenantConfigurationItem# configDisable()
*/
@Override
public void configDisable() {
if (configurationEnabled) {