Added javadoc and refactored existing one.

Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com>
This commit is contained in:
Jonathan Philip Knoblauch
2016-03-23 12:14:44 +01:00
parent a3295b518d
commit 74782527fe
12 changed files with 18 additions and 95 deletions

View File

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

View File

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

View File

@@ -11,7 +11,7 @@ package org.eclipse.hawkbit.ui.tenantconfiguration;
import java.io.Serializable; 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 { public interface ConfigurationItem {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -26,16 +26,13 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.ValoTheme; 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 @SpringComponent
@ViewScope @ViewScope
public class CertificateAuthenticationConfigurationItem extends AbstractAuthenticationTenantConfigurationItem { public class CertificateAuthenticationConfigurationItem extends AbstractAuthenticationTenantConfigurationItem {
/**
*
*/
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Autowired @Autowired
@@ -59,7 +56,7 @@ public class CertificateAuthenticationConfigurationItem extends AbstractAuthenti
} }
/** /**
* init mehotd called by spring. * Init mehotd called by spring.
*/ */
@PostConstruct @PostConstruct
public void init() { public void init() {
@@ -94,12 +91,6 @@ public class CertificateAuthenticationConfigurationItem extends AbstractAuthenti
} }
} }
/*
* (non-Javadoc)
*
* @see org.eclipse.hawkbit.server.ui.tenantconfiguration.
* TenantConfigurationItem# configEnable()
*/
@Override @Override
public void configEnable() { public void configEnable() {
if (!configurationEnabled) { if (!configurationEnabled) {
@@ -110,12 +101,6 @@ public class CertificateAuthenticationConfigurationItem extends AbstractAuthenti
setDetailVisible(true); setDetailVisible(true);
} }
/*
* (non-Javadoc)
*
* @see org.eclipse.hawkbit.server.ui.tenantconfiguration.
* TenantConfigurationItem# configDisable()
*/
@Override @Override
public void configDisable() { public void configDisable() {
if (configurationEnabled) { if (configurationEnabled) {
@@ -125,11 +110,6 @@ public class CertificateAuthenticationConfigurationItem extends AbstractAuthenti
setDetailVisible(false); setDetailVisible(false);
} }
/*
* (non-Javadoc)
*
* @see hawkbit.server.ui.tenantconfiguration.TenantConfigurationItem#save()
*/
@Override @Override
public void save() { public void save() {
if (configurationEnabledChange) { if (configurationEnabledChange) {
@@ -142,11 +122,6 @@ public class CertificateAuthenticationConfigurationItem extends AbstractAuthenti
} }
} }
/*
* (non-Javadoc)
*
* @see hawkbit.server.ui.tenantconfiguration.TenantConfigurationItem#undo()
*/
@Override @Override
public void undo() { public void undo() {
configurationEnabledChange = false; configurationEnabledChange = false;

View File

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

View File

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