Modify scope of protected attributes to private.
Create getter/setter to access the the attribute. see clean code Protected variables should be avoided because: http://programmers.stackexchange.com/questions/162643/why-is-clean-code-suggesting-avoiding-protected-variables Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
This commit is contained in:
@@ -52,16 +52,16 @@ public class SoftwareModuleDetails extends AbstractNamedVersionedEntityTableDeta
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addTabs(final TabSheet detailsTab) {
|
protected void addTabs(final TabSheet detailsTab) {
|
||||||
detailsTab.addTab(createDetailsLayout(), i18n.get("caption.tab.details"), null);
|
detailsTab.addTab(createDetailsLayout(), getI18n().get("caption.tab.details"), null);
|
||||||
detailsTab.addTab(createDescriptionLayout(), i18n.get("caption.tab.description"), null);
|
detailsTab.addTab(createDescriptionLayout(), getI18n().get("caption.tab.description"), null);
|
||||||
detailsTab.addTab(createLogLayout(), i18n.get("caption.logs.tab"), null);
|
detailsTab.addTab(createLogLayout(), getI18n().get("caption.logs.tab"), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onEdit(final ClickEvent event) {
|
protected void onEdit(final ClickEvent event) {
|
||||||
final Window addSoftwareModule = softwareModuleAddUpdateWindow
|
final Window addSoftwareModule = softwareModuleAddUpdateWindow
|
||||||
.createUpdateSoftwareModuleWindow(getSelectedBaseEntityId());
|
.createUpdateSoftwareModuleWindow(getSelectedBaseEntityId());
|
||||||
addSoftwareModule.setCaption(i18n.get("upload.caption.update.swmodule"));
|
addSoftwareModule.setCaption(getI18n().get("upload.caption.update.swmodule"));
|
||||||
UI.getCurrent().addWindow(addSoftwareModule);
|
UI.getCurrent().addWindow(addSoftwareModule);
|
||||||
addSoftwareModule.setVisible(Boolean.TRUE);
|
addSoftwareModule.setVisible(Boolean.TRUE);
|
||||||
}
|
}
|
||||||
@@ -69,14 +69,14 @@ public class SoftwareModuleDetails extends AbstractNamedVersionedEntityTableDeta
|
|||||||
@Override
|
@Override
|
||||||
protected void populateDetailsWidget() {
|
protected void populateDetailsWidget() {
|
||||||
String maxAssign = HawkbitCommonUtil.SP_STRING_EMPTY;
|
String maxAssign = HawkbitCommonUtil.SP_STRING_EMPTY;
|
||||||
if (selectedBaseEntity != null) {
|
if (getSelectedBaseEntity() != null) {
|
||||||
if (selectedBaseEntity.getType().getMaxAssignments() == Integer.MAX_VALUE) {
|
if (getSelectedBaseEntity().getType().getMaxAssignments() == Integer.MAX_VALUE) {
|
||||||
maxAssign = i18n.get("label.multiAssign.type");
|
maxAssign = getI18n().get("label.multiAssign.type");
|
||||||
} else {
|
} else {
|
||||||
maxAssign = i18n.get("label.singleAssign.type");
|
maxAssign = getI18n().get("label.singleAssign.type");
|
||||||
}
|
}
|
||||||
updateSoftwareModuleDetailsLayout(selectedBaseEntity.getType().getName(), selectedBaseEntity.getVendor(),
|
updateSoftwareModuleDetailsLayout(getSelectedBaseEntity().getType().getName(),
|
||||||
maxAssign);
|
getSelectedBaseEntity().getVendor(), maxAssign);
|
||||||
} else {
|
} else {
|
||||||
updateSoftwareModuleDetailsLayout(HawkbitCommonUtil.SP_STRING_EMPTY, HawkbitCommonUtil.SP_STRING_EMPTY,
|
updateSoftwareModuleDetailsLayout(HawkbitCommonUtil.SP_STRING_EMPTY, HawkbitCommonUtil.SP_STRING_EMPTY,
|
||||||
maxAssign);
|
maxAssign);
|
||||||
@@ -88,19 +88,19 @@ public class SoftwareModuleDetails extends AbstractNamedVersionedEntityTableDeta
|
|||||||
|
|
||||||
detailsTabLayout.removeAllComponents();
|
detailsTabLayout.removeAllComponents();
|
||||||
|
|
||||||
final Label vendorLabel = SPUIComponentProvider.createNameValueLabel(i18n.get("label.dist.details.vendor"),
|
final Label vendorLabel = SPUIComponentProvider.createNameValueLabel(getI18n().get("label.dist.details.vendor"),
|
||||||
HawkbitCommonUtil.trimAndNullIfEmpty(vendor) == null ? "" : vendor);
|
HawkbitCommonUtil.trimAndNullIfEmpty(vendor) == null ? "" : vendor);
|
||||||
vendorLabel.setId(SPUIComponetIdProvider.DETAILS_VENDOR_LABEL_ID);
|
vendorLabel.setId(SPUIComponetIdProvider.DETAILS_VENDOR_LABEL_ID);
|
||||||
detailsTabLayout.addComponent(vendorLabel);
|
detailsTabLayout.addComponent(vendorLabel);
|
||||||
|
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
final Label typeLabel = SPUIComponentProvider.createNameValueLabel(i18n.get("label.dist.details.type"),
|
final Label typeLabel = SPUIComponentProvider.createNameValueLabel(getI18n().get("label.dist.details.type"),
|
||||||
type);
|
type);
|
||||||
typeLabel.setId(SPUIComponetIdProvider.DETAILS_TYPE_LABEL_ID);
|
typeLabel.setId(SPUIComponetIdProvider.DETAILS_TYPE_LABEL_ID);
|
||||||
detailsTabLayout.addComponent(typeLabel);
|
detailsTabLayout.addComponent(typeLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
final Label assignLabel = SPUIComponentProvider.createNameValueLabel(i18n.get("label.assigned.type"),
|
final Label assignLabel = SPUIComponentProvider.createNameValueLabel(getI18n().get("label.assigned.type"),
|
||||||
HawkbitCommonUtil.trimAndNullIfEmpty(maxAssign) == null ? "" : maxAssign);
|
HawkbitCommonUtil.trimAndNullIfEmpty(maxAssign) == null ? "" : maxAssign);
|
||||||
assignLabel.setId(SPUIComponetIdProvider.SWM_DTLS_MAX_ASSIGN);
|
assignLabel.setId(SPUIComponetIdProvider.SWM_DTLS_MAX_ASSIGN);
|
||||||
detailsTabLayout.addComponent(assignLabel);
|
detailsTabLayout.addComponent(assignLabel);
|
||||||
@@ -109,7 +109,7 @@ public class SoftwareModuleDetails extends AbstractNamedVersionedEntityTableDeta
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getDefaultCaption() {
|
protected String getDefaultCaption() {
|
||||||
return i18n.get("upload.swModuleTable.header");
|
return getI18n().get("upload.swModuleTable.header");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -129,7 +129,7 @@ public class SoftwareModuleDetails extends AbstractNamedVersionedEntityTableDeta
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Boolean hasEditPermission() {
|
protected Boolean hasEditPermission() {
|
||||||
return permissionChecker.hasUpdateDistributionPermission();
|
return getPermissionChecker().hasUpdateDistributionPermission();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ public abstract class AbstractNamedVersionedEntityTableDetailsLayout<T extends N
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getName() {
|
protected String getName() {
|
||||||
return HawkbitCommonUtil.getFormattedNameVersion(selectedBaseEntity.getName(), selectedBaseEntity.getVersion());
|
return HawkbitCommonUtil.getFormattedNameVersion(getSelectedBaseEntity().getName(),
|
||||||
|
getSelectedBaseEntity().getVersion());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,15 +49,15 @@ public abstract class AbstractTableDetailsLayout<T extends NamedEntity> extends
|
|||||||
private static final long serialVersionUID = 4862529368471627190L;
|
private static final long serialVersionUID = 4862529368471627190L;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected I18N i18n;
|
private I18N i18n;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected transient EventBus.SessionEventBus eventBus;
|
private transient EventBus.SessionEventBus eventBus;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected SpPermissionChecker permissionChecker;
|
private SpPermissionChecker permissionChecker;
|
||||||
|
|
||||||
protected T selectedBaseEntity;
|
private T selectedBaseEntity;
|
||||||
|
|
||||||
private Label caption;
|
private Label caption;
|
||||||
|
|
||||||
@@ -89,6 +89,26 @@ public abstract class AbstractTableDetailsLayout<T extends NamedEntity> extends
|
|||||||
eventBus.unsubscribe(this);
|
eventBus.unsubscribe(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected SpPermissionChecker getPermissionChecker() {
|
||||||
|
return permissionChecker;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected EventBus.SessionEventBus getEventBus() {
|
||||||
|
return eventBus;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected I18N getI18n() {
|
||||||
|
return i18n;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected T getSelectedBaseEntity() {
|
||||||
|
return selectedBaseEntity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelectedBaseEntity(final T selectedBaseEntity) {
|
||||||
|
this.selectedBaseEntity = selectedBaseEntity;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default implementation to handle a entity event.
|
* Default implementation to handle a entity event.
|
||||||
*
|
*
|
||||||
@@ -118,7 +138,7 @@ public abstract class AbstractTableDetailsLayout<T extends NamedEntity> extends
|
|||||||
editButton = SPUIComponentProvider.getButton("", "", "", null, false, FontAwesome.PENCIL_SQUARE_O,
|
editButton = SPUIComponentProvider.getButton("", "", "", null, false, FontAwesome.PENCIL_SQUARE_O,
|
||||||
SPUIButtonStyleSmallNoBorder.class);
|
SPUIButtonStyleSmallNoBorder.class);
|
||||||
editButton.setId(getEditButtonId());
|
editButton.setId(getEditButtonId());
|
||||||
editButton.addClickListener(event -> onEdit(event));
|
editButton.addClickListener(this::onEdit);
|
||||||
|
|
||||||
editButton.setEnabled(false);
|
editButton.setEnabled(false);
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
|||||||
@Override
|
@Override
|
||||||
protected void init() {
|
protected void init() {
|
||||||
softwareModuleTable = new SoftwareModuleDetailsTable();
|
softwareModuleTable = new SoftwareModuleDetailsTable();
|
||||||
softwareModuleTable.init(i18n, true, permissionChecker, distributionSetManagement, eventBus, manageDistUIState);
|
softwareModuleTable.init(getI18n(), true, getPermissionChecker(), distributionSetManagement, getEventBus(),
|
||||||
|
manageDistUIState);
|
||||||
super.init();
|
super.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,7 +110,7 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void populateModule() {
|
private void populateModule() {
|
||||||
softwareModuleTable.populateModule(selectedBaseEntity);
|
softwareModuleTable.populateModule(getSelectedBaseEntity());
|
||||||
showUnsavedAssignment();
|
showUnsavedAssignment();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,12 +158,8 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param item
|
|
||||||
* @param entry
|
|
||||||
*/
|
|
||||||
private void assignSoftModuleButton(final Item item, final Map.Entry<String, StringBuilder> entry) {
|
private void assignSoftModuleButton(final Item item, final Map.Entry<String, StringBuilder> entry) {
|
||||||
if (permissionChecker.hasUpdateDistributionPermission() && distributionSetManagement
|
if (getPermissionChecker().hasUpdateDistributionPermission() && distributionSetManagement
|
||||||
.findDistributionSetById(manageDistUIState.getLastSelectedDistribution().get().getId())
|
.findDistributionSetById(manageDistUIState.getLastSelectedDistribution().get().getId())
|
||||||
.getAssignedTargets().isEmpty()) {
|
.getAssignedTargets().isEmpty()) {
|
||||||
final Button reassignSoftModule = SPUIComponentProvider.getButton(entry.getKey(), "", "", "", true,
|
final Button reassignSoftModule = SPUIComponentProvider.getButton(entry.getKey(), "", "", "", true,
|
||||||
@@ -227,15 +224,16 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
|||||||
|
|
||||||
private void populateTags() {
|
private void populateTags() {
|
||||||
tagsLayout.removeAllComponents();
|
tagsLayout.removeAllComponents();
|
||||||
if (null != selectedBaseEntity) {
|
if (getSelectedBaseEntity() == null) {
|
||||||
tagsLayout.addComponent(distributionTagToken.getTokenField());
|
return;
|
||||||
}
|
}
|
||||||
|
tagsLayout.addComponent(distributionTagToken.getTokenField());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void populateDetails() {
|
private void populateDetails() {
|
||||||
if (selectedBaseEntity != null) {
|
if (getSelectedBaseEntity() != null) {
|
||||||
updateDistributionSetDetailsLayout(selectedBaseEntity.getType().getName(),
|
updateDistributionSetDetailsLayout(getSelectedBaseEntity().getType().getName(),
|
||||||
selectedBaseEntity.isRequiredMigrationStep());
|
getSelectedBaseEntity().isRequiredMigrationStep());
|
||||||
} else {
|
} else {
|
||||||
updateDistributionSetDetailsLayout(null, null);
|
updateDistributionSetDetailsLayout(null, null);
|
||||||
}
|
}
|
||||||
@@ -246,16 +244,16 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
|||||||
detailsTabLayout.removeAllComponents();
|
detailsTabLayout.removeAllComponents();
|
||||||
|
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
final Label typeLabel = SPUIComponentProvider.createNameValueLabel(i18n.get("label.dist.details.type"),
|
final Label typeLabel = SPUIComponentProvider.createNameValueLabel(getI18n().get("label.dist.details.type"),
|
||||||
type);
|
type);
|
||||||
typeLabel.setId(SPUIComponetIdProvider.DETAILS_TYPE_LABEL_ID);
|
typeLabel.setId(SPUIComponetIdProvider.DETAILS_TYPE_LABEL_ID);
|
||||||
detailsTabLayout.addComponent(typeLabel);
|
detailsTabLayout.addComponent(typeLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isMigrationRequired != null) {
|
if (isMigrationRequired != null) {
|
||||||
detailsTabLayout.addComponent(
|
detailsTabLayout.addComponent(SPUIComponentProvider.createNameValueLabel(
|
||||||
SPUIComponentProvider.createNameValueLabel(i18n.get("checkbox.dist.migration.required"),
|
getI18n().get("checkbox.dist.migration.required"),
|
||||||
isMigrationRequired.equals(Boolean.TRUE) ? i18n.get("label.yes") : i18n.get("label.no")));
|
isMigrationRequired.equals(Boolean.TRUE) ? getI18n().get("label.yes") : getI18n().get("label.no")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,7 +261,7 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
|||||||
protected void onEdit(final ClickEvent event) {
|
protected void onEdit(final ClickEvent event) {
|
||||||
final Window newDistWindow = distributionAddUpdateWindowLayout.getWindow();
|
final Window newDistWindow = distributionAddUpdateWindowLayout.getWindow();
|
||||||
distributionAddUpdateWindowLayout.populateValuesOfDistribution(getSelectedBaseEntityId());
|
distributionAddUpdateWindowLayout.populateValuesOfDistribution(getSelectedBaseEntityId());
|
||||||
newDistWindow.setCaption(i18n.get("caption.update.dist"));
|
newDistWindow.setCaption(getI18n().get("caption.update.dist"));
|
||||||
UI.getCurrent().addWindow(newDistWindow);
|
UI.getCurrent().addWindow(newDistWindow);
|
||||||
newDistWindow.setVisible(Boolean.TRUE);
|
newDistWindow.setVisible(Boolean.TRUE);
|
||||||
}
|
}
|
||||||
@@ -286,21 +284,21 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getDefaultCaption() {
|
protected String getDefaultCaption() {
|
||||||
return i18n.get("distribution.details.header");
|
return getI18n().get("distribution.details.header");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addTabs(final TabSheet detailsTab) {
|
protected void addTabs(final TabSheet detailsTab) {
|
||||||
detailsTab.addTab(createDetailsLayout(), i18n.get("caption.tab.details"), null);
|
detailsTab.addTab(createDetailsLayout(), getI18n().get("caption.tab.details"), null);
|
||||||
detailsTab.addTab(createDescriptionLayout(), i18n.get("caption.tab.description"), null);
|
detailsTab.addTab(createDescriptionLayout(), getI18n().get("caption.tab.description"), null);
|
||||||
detailsTab.addTab(createSoftwareModuleTab(), i18n.get("caption.softwares.distdetail.tab"), null);
|
detailsTab.addTab(createSoftwareModuleTab(), getI18n().get("caption.softwares.distdetail.tab"), null);
|
||||||
detailsTab.addTab(createTagsLayout(), i18n.get("caption.tags.tab"), null);
|
detailsTab.addTab(createTagsLayout(), getI18n().get("caption.tags.tab"), null);
|
||||||
detailsTab.addTab(createLogLayout(), i18n.get("caption.logs.tab"), null);
|
detailsTab.addTab(createLogLayout(), getI18n().get("caption.logs.tab"), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Boolean hasEditPermission() {
|
protected Boolean hasEditPermission() {
|
||||||
return permissionChecker.hasUpdateDistributionPermission();
|
return getPermissionChecker().hasUpdateDistributionPermission();
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||||
@@ -322,9 +320,9 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
|||||||
final DistributionSetIdName distIdName = softwareModuleAssignmentDiscardEvent
|
final DistributionSetIdName distIdName = softwareModuleAssignmentDiscardEvent
|
||||||
.getDistributionSetIdName();
|
.getDistributionSetIdName();
|
||||||
if (distIdName.getId().equals(getSelectedBaseEntityId())
|
if (distIdName.getId().equals(getSelectedBaseEntityId())
|
||||||
&& distIdName.getName().equals(selectedBaseEntity.getName())) {
|
&& distIdName.getName().equals(getSelectedBaseEntity().getName())) {
|
||||||
selectedBaseEntity = distributionSetManagement
|
setSelectedBaseEntity(
|
||||||
.findDistributionSetByIdWithDetails(getSelectedBaseEntityId());
|
distributionSetManagement.findDistributionSetByIdWithDetails(getSelectedBaseEntityId()));
|
||||||
populateModule();
|
populateModule();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -335,10 +333,10 @@ public class DistributionSetDetails extends AbstractNamedVersionedEntityTableDet
|
|||||||
void onEvent(final SaveActionWindowEvent saveActionWindowEvent) {
|
void onEvent(final SaveActionWindowEvent saveActionWindowEvent) {
|
||||||
if ((saveActionWindowEvent == SaveActionWindowEvent.SAVED_ASSIGNMENTS
|
if ((saveActionWindowEvent == SaveActionWindowEvent.SAVED_ASSIGNMENTS
|
||||||
|| saveActionWindowEvent == SaveActionWindowEvent.DISCARD_ALL_ASSIGNMENTS)
|
|| saveActionWindowEvent == SaveActionWindowEvent.DISCARD_ALL_ASSIGNMENTS)
|
||||||
&& selectedBaseEntity != null) {
|
&& getSelectedBaseEntity() != null) {
|
||||||
assignedSWModule.clear();
|
assignedSWModule.clear();
|
||||||
selectedBaseEntity = distributionSetManagement
|
setSelectedBaseEntity(
|
||||||
.findDistributionSetByIdWithDetails(getSelectedBaseEntityId());
|
distributionSetManagement.findDistributionSetByIdWithDetails(getSelectedBaseEntityId()));
|
||||||
UI.getCurrent().access(() -> populateModule());
|
UI.getCurrent().access(() -> populateModule());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class SwModuleDetails extends AbstractNamedVersionedEntityTableDetailsLay
|
|||||||
protected void onEdit(final ClickEvent event) {
|
protected void onEdit(final ClickEvent event) {
|
||||||
final Window addSoftwareModule = softwareModuleAddUpdateWindow
|
final Window addSoftwareModule = softwareModuleAddUpdateWindow
|
||||||
.createUpdateSoftwareModuleWindow(getSelectedBaseEntityId());
|
.createUpdateSoftwareModuleWindow(getSelectedBaseEntityId());
|
||||||
addSoftwareModule.setCaption(i18n.get("upload.caption.update.swmodule"));
|
addSoftwareModule.setCaption(getI18n().get("upload.caption.update.swmodule"));
|
||||||
UI.getCurrent().addWindow(addSoftwareModule);
|
UI.getCurrent().addWindow(addSoftwareModule);
|
||||||
addSoftwareModule.setVisible(Boolean.TRUE);
|
addSoftwareModule.setVisible(Boolean.TRUE);
|
||||||
}
|
}
|
||||||
@@ -66,14 +66,14 @@ public class SwModuleDetails extends AbstractNamedVersionedEntityTableDetailsLay
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addTabs(final TabSheet detailsTab) {
|
protected void addTabs(final TabSheet detailsTab) {
|
||||||
detailsTab.addTab(createDetailsLayout(), i18n.get("caption.tab.details"), null);
|
detailsTab.addTab(createDetailsLayout(), getI18n().get("caption.tab.details"), null);
|
||||||
detailsTab.addTab(createDescriptionLayout(), i18n.get("caption.tab.description"), null);
|
detailsTab.addTab(createDescriptionLayout(), getI18n().get("caption.tab.description"), null);
|
||||||
detailsTab.addTab(createLogLayout(), i18n.get("caption.logs.tab"), null);
|
detailsTab.addTab(createLogLayout(), getI18n().get("caption.logs.tab"), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getDefaultCaption() {
|
protected String getDefaultCaption() {
|
||||||
return i18n.get("upload.swModuleTable.header");
|
return getI18n().get("upload.swModuleTable.header");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -88,7 +88,7 @@ public class SwModuleDetails extends AbstractNamedVersionedEntityTableDetailsLay
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Boolean hasEditPermission() {
|
protected Boolean hasEditPermission() {
|
||||||
return permissionChecker.hasUpdateDistributionPermission();
|
return getPermissionChecker().hasUpdateDistributionPermission();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -98,14 +98,14 @@ public class SwModuleDetails extends AbstractNamedVersionedEntityTableDetailsLay
|
|||||||
|
|
||||||
private void populateDetails() {
|
private void populateDetails() {
|
||||||
String maxAssign = HawkbitCommonUtil.SP_STRING_EMPTY;
|
String maxAssign = HawkbitCommonUtil.SP_STRING_EMPTY;
|
||||||
if (selectedBaseEntity != null) {
|
if (getSelectedBaseEntity() != null) {
|
||||||
if (selectedBaseEntity.getType().getMaxAssignments() == Integer.MAX_VALUE) {
|
if (getSelectedBaseEntity().getType().getMaxAssignments() == Integer.MAX_VALUE) {
|
||||||
maxAssign = i18n.get("label.multiAssign.type");
|
maxAssign = getI18n().get("label.multiAssign.type");
|
||||||
} else {
|
} else {
|
||||||
maxAssign = i18n.get("label.singleAssign.type");
|
maxAssign = getI18n().get("label.singleAssign.type");
|
||||||
}
|
}
|
||||||
updateSwModuleDetailsLayout(selectedBaseEntity.getType().getName(), selectedBaseEntity.getVendor(),
|
updateSwModuleDetailsLayout(getSelectedBaseEntity().getType().getName(),
|
||||||
maxAssign);
|
getSelectedBaseEntity().getVendor(), maxAssign);
|
||||||
} else {
|
} else {
|
||||||
updateSwModuleDetailsLayout(HawkbitCommonUtil.SP_STRING_EMPTY, HawkbitCommonUtil.SP_STRING_EMPTY,
|
updateSwModuleDetailsLayout(HawkbitCommonUtil.SP_STRING_EMPTY, HawkbitCommonUtil.SP_STRING_EMPTY,
|
||||||
maxAssign);
|
maxAssign);
|
||||||
@@ -117,19 +117,19 @@ public class SwModuleDetails extends AbstractNamedVersionedEntityTableDetailsLay
|
|||||||
final VerticalLayout detailsTabLayout = getDetailsLayout();
|
final VerticalLayout detailsTabLayout = getDetailsLayout();
|
||||||
detailsTabLayout.removeAllComponents();
|
detailsTabLayout.removeAllComponents();
|
||||||
|
|
||||||
final Label vendorLabel = SPUIComponentProvider.createNameValueLabel(i18n.get("label.dist.details.vendor"),
|
final Label vendorLabel = SPUIComponentProvider.createNameValueLabel(getI18n().get("label.dist.details.vendor"),
|
||||||
HawkbitCommonUtil.trimAndNullIfEmpty(vendor) == null ? "" : vendor);
|
HawkbitCommonUtil.trimAndNullIfEmpty(vendor) == null ? "" : vendor);
|
||||||
vendorLabel.setId(SPUIComponetIdProvider.DETAILS_VENDOR_LABEL_ID);
|
vendorLabel.setId(SPUIComponetIdProvider.DETAILS_VENDOR_LABEL_ID);
|
||||||
detailsTabLayout.addComponent(vendorLabel);
|
detailsTabLayout.addComponent(vendorLabel);
|
||||||
|
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
final Label typeLabel = SPUIComponentProvider.createNameValueLabel(i18n.get("label.dist.details.type"),
|
final Label typeLabel = SPUIComponentProvider.createNameValueLabel(getI18n().get("label.dist.details.type"),
|
||||||
type);
|
type);
|
||||||
typeLabel.setId(SPUIComponetIdProvider.DETAILS_TYPE_LABEL_ID);
|
typeLabel.setId(SPUIComponetIdProvider.DETAILS_TYPE_LABEL_ID);
|
||||||
detailsTabLayout.addComponent(typeLabel);
|
detailsTabLayout.addComponent(typeLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
final Label assignLabel = SPUIComponentProvider.createNameValueLabel(i18n.get("label.assigned.type"),
|
final Label assignLabel = SPUIComponentProvider.createNameValueLabel(getI18n().get("label.assigned.type"),
|
||||||
HawkbitCommonUtil.trimAndNullIfEmpty(maxAssign) == null ? "" : maxAssign);
|
HawkbitCommonUtil.trimAndNullIfEmpty(maxAssign) == null ? "" : maxAssign);
|
||||||
assignLabel.setId(SPUIComponetIdProvider.SWM_DTLS_MAX_ASSIGN);
|
assignLabel.setId(SPUIComponetIdProvider.SWM_DTLS_MAX_ASSIGN);
|
||||||
detailsTabLayout.addComponent(assignLabel);
|
detailsTabLayout.addComponent(assignLabel);
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class DistributionDetails extends AbstractNamedVersionedEntityTableDetail
|
|||||||
@Override
|
@Override
|
||||||
protected void init() {
|
protected void init() {
|
||||||
softwareModuleTable = new SoftwareModuleDetailsTable();
|
softwareModuleTable = new SoftwareModuleDetailsTable();
|
||||||
softwareModuleTable.init(i18n, false, permissionChecker, null, null, null);
|
softwareModuleTable.init(getI18n(), false, getPermissionChecker(), null, null, null);
|
||||||
super.init();
|
super.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,23 +63,23 @@ public class DistributionDetails extends AbstractNamedVersionedEntityTableDetail
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getDefaultCaption() {
|
protected String getDefaultCaption() {
|
||||||
return i18n.get("distribution.details.header");
|
return getI18n().get("distribution.details.header");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addTabs(final TabSheet detailsTab) {
|
protected void addTabs(final TabSheet detailsTab) {
|
||||||
detailsTab.addTab(createDetailsLayout(), i18n.get("caption.tab.details"), null);
|
detailsTab.addTab(createDetailsLayout(), getI18n().get("caption.tab.details"), null);
|
||||||
detailsTab.addTab(createDescriptionLayout(), i18n.get("caption.tab.description"), null);
|
detailsTab.addTab(createDescriptionLayout(), getI18n().get("caption.tab.description"), null);
|
||||||
detailsTab.addTab(createSoftwareModuleTab(), i18n.get("caption.softwares.distdetail.tab"), null);
|
detailsTab.addTab(createSoftwareModuleTab(), getI18n().get("caption.softwares.distdetail.tab"), null);
|
||||||
detailsTab.addTab(createTagsLayout(), i18n.get("caption.tags.tab"), null);
|
detailsTab.addTab(createTagsLayout(), getI18n().get("caption.tags.tab"), null);
|
||||||
detailsTab.addTab(createLogLayout(), i18n.get("caption.logs.tab"), null);
|
detailsTab.addTab(createLogLayout(), getI18n().get("caption.logs.tab"), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onEdit(final ClickEvent event) {
|
protected void onEdit(final ClickEvent event) {
|
||||||
final Window newDistWindow = distributionAddUpdateWindowLayout.getWindow();
|
final Window newDistWindow = distributionAddUpdateWindowLayout.getWindow();
|
||||||
distributionAddUpdateWindowLayout.populateValuesOfDistribution(getSelectedBaseEntityId());
|
distributionAddUpdateWindowLayout.populateValuesOfDistribution(getSelectedBaseEntityId());
|
||||||
newDistWindow.setCaption(i18n.get("caption.update.dist"));
|
newDistWindow.setCaption(getI18n().get("caption.update.dist"));
|
||||||
UI.getCurrent().addWindow(newDistWindow);
|
UI.getCurrent().addWindow(newDistWindow);
|
||||||
newDistWindow.setVisible(Boolean.TRUE);
|
newDistWindow.setVisible(Boolean.TRUE);
|
||||||
}
|
}
|
||||||
@@ -102,7 +102,7 @@ public class DistributionDetails extends AbstractNamedVersionedEntityTableDetail
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Boolean hasEditPermission() {
|
protected Boolean hasEditPermission() {
|
||||||
return permissionChecker.hasUpdateDistributionPermission();
|
return getPermissionChecker().hasUpdateDistributionPermission();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -112,8 +112,8 @@ public class DistributionDetails extends AbstractNamedVersionedEntityTableDetail
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void populateDetailsWidget() {
|
protected void populateDetailsWidget() {
|
||||||
softwareModuleTable.populateModule(selectedBaseEntity);
|
softwareModuleTable.populateModule(getSelectedBaseEntity());
|
||||||
populateDetails(selectedBaseEntity);
|
populateDetails(getSelectedBaseEntity());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,16 +130,16 @@ public class DistributionDetails extends AbstractNamedVersionedEntityTableDetail
|
|||||||
detailsTabLayout.removeAllComponents();
|
detailsTabLayout.removeAllComponents();
|
||||||
|
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
final Label typeLabel = SPUIComponentProvider.createNameValueLabel(i18n.get("label.dist.details.type"),
|
final Label typeLabel = SPUIComponentProvider.createNameValueLabel(getI18n().get("label.dist.details.type"),
|
||||||
type);
|
type);
|
||||||
typeLabel.setId(SPUIComponetIdProvider.DETAILS_TYPE_LABEL_ID);
|
typeLabel.setId(SPUIComponetIdProvider.DETAILS_TYPE_LABEL_ID);
|
||||||
detailsTabLayout.addComponent(typeLabel);
|
detailsTabLayout.addComponent(typeLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isMigrationRequired != null) {
|
if (isMigrationRequired != null) {
|
||||||
detailsTabLayout.addComponent(
|
detailsTabLayout.addComponent(SPUIComponentProvider.createNameValueLabel(
|
||||||
SPUIComponentProvider.createNameValueLabel(i18n.get("checkbox.dist.migration.required"),
|
getI18n().get("checkbox.dist.migration.required"),
|
||||||
isMigrationRequired.equals(Boolean.TRUE) ? i18n.get("label.yes") : i18n.get("label.no")));
|
isMigrationRequired.equals(Boolean.TRUE) ? getI18n().get("label.yes") : getI18n().get("label.no")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,6 @@ import com.vaadin.ui.themes.ValoTheme;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Target details layout.
|
* Target details layout.
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@SpringComponent
|
@SpringComponent
|
||||||
@ViewScope
|
@ViewScope
|
||||||
@@ -65,9 +62,6 @@ public class TargetDetails extends AbstractTableDetailsLayout<Target> {
|
|||||||
private VerticalLayout assignedDistLayout;
|
private VerticalLayout assignedDistLayout;
|
||||||
private VerticalLayout installedDistLayout;
|
private VerticalLayout installedDistLayout;
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize the Target details.
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
super.init();
|
super.init();
|
||||||
@@ -76,18 +70,18 @@ public class TargetDetails extends AbstractTableDetailsLayout<Target> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getDefaultCaption() {
|
protected String getDefaultCaption() {
|
||||||
return i18n.get("target.details.header");
|
return getI18n().get("target.details.header");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addTabs(final TabSheet detailsTab) {
|
protected void addTabs(final TabSheet detailsTab) {
|
||||||
detailsTab.addTab(createDetailsLayout(), i18n.get("caption.tab.details"), null);
|
detailsTab.addTab(createDetailsLayout(), getI18n().get("caption.tab.details"), null);
|
||||||
detailsTab.addTab(createDescriptionLayout(), i18n.get("caption.tab.description"), null);
|
detailsTab.addTab(createDescriptionLayout(), getI18n().get("caption.tab.description"), null);
|
||||||
detailsTab.addTab(createAttributesLayout(), i18n.get("caption.attributes.tab"), null);
|
detailsTab.addTab(createAttributesLayout(), getI18n().get("caption.attributes.tab"), null);
|
||||||
detailsTab.addTab(createAssignedDistLayout(), i18n.get("header.target.assigned"), null);
|
detailsTab.addTab(createAssignedDistLayout(), getI18n().get("header.target.assigned"), null);
|
||||||
detailsTab.addTab(createInstalledDistLayout(), i18n.get("header.target.installed"), null);
|
detailsTab.addTab(createInstalledDistLayout(), getI18n().get("header.target.installed"), null);
|
||||||
detailsTab.addTab(createTagsLayout(), i18n.get("caption.tags.tab"), null);
|
detailsTab.addTab(createTagsLayout(), getI18n().get("caption.tags.tab"), null);
|
||||||
detailsTab.addTab(createLogLayout(), i18n.get("caption.logs.tab"), null);
|
detailsTab.addTab(createLogLayout(), getI18n().get("caption.logs.tab"), null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,12 +103,12 @@ public class TargetDetails extends AbstractTableDetailsLayout<Target> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onEdit(final ClickEvent event) {
|
protected void onEdit(final ClickEvent event) {
|
||||||
if (selectedBaseEntity == null) {
|
if (getSelectedBaseEntity() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Window newDistWindow = targetAddUpdateWindowLayout.getWindow();
|
final Window newDistWindow = targetAddUpdateWindowLayout.getWindow();
|
||||||
targetAddUpdateWindowLayout.populateValuesOfTarget(selectedBaseEntity.getControllerId());
|
targetAddUpdateWindowLayout.populateValuesOfTarget(getSelectedBaseEntity().getControllerId());
|
||||||
newDistWindow.setCaption(i18n.get("caption.update.dist"));
|
newDistWindow.setCaption(getI18n().get("caption.update.dist"));
|
||||||
UI.getCurrent().addWindow(newDistWindow);
|
UI.getCurrent().addWindow(newDistWindow);
|
||||||
newDistWindow.setVisible(Boolean.TRUE);
|
newDistWindow.setVisible(Boolean.TRUE);
|
||||||
}
|
}
|
||||||
@@ -136,24 +130,24 @@ public class TargetDetails extends AbstractTableDetailsLayout<Target> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void populateDetailsWidget() {
|
protected void populateDetailsWidget() {
|
||||||
if (selectedBaseEntity != null) {
|
if (getSelectedBaseEntity() != null) {
|
||||||
updateDetailsLayout(selectedBaseEntity.getControllerId(), selectedBaseEntity.getTargetInfo().getAddress(),
|
updateDetailsLayout(getSelectedBaseEntity().getControllerId(),
|
||||||
selectedBaseEntity.getSecurityToken(),
|
getSelectedBaseEntity().getTargetInfo().getAddress(), getSelectedBaseEntity().getSecurityToken(),
|
||||||
SPDateTimeUtil.getFormattedDate(selectedBaseEntity.getTargetInfo().getLastTargetQuery()));
|
SPDateTimeUtil.getFormattedDate(getSelectedBaseEntity().getTargetInfo().getLastTargetQuery()));
|
||||||
populateDistributionDtls(installedDistLayout,
|
populateDistributionDtls(installedDistLayout,
|
||||||
selectedBaseEntity.getTargetInfo().getInstalledDistributionSet());
|
getSelectedBaseEntity().getTargetInfo().getInstalledDistributionSet());
|
||||||
populateDistributionDtls(assignedDistLayout, selectedBaseEntity.getAssignedDistributionSet());
|
populateDistributionDtls(assignedDistLayout, getSelectedBaseEntity().getAssignedDistributionSet());
|
||||||
} else {
|
} else {
|
||||||
updateDetailsLayout(null, null, null, null);
|
updateDetailsLayout(null, null, null, null);
|
||||||
populateDistributionDtls(installedDistLayout, null);
|
populateDistributionDtls(installedDistLayout, null);
|
||||||
populateDistributionDtls(assignedDistLayout, null);
|
populateDistributionDtls(assignedDistLayout, null);
|
||||||
}
|
}
|
||||||
updateAttributesLayout(selectedBaseEntity);
|
updateAttributesLayout(getSelectedBaseEntity());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getName() {
|
protected String getName() {
|
||||||
return selectedBaseEntity.getName();
|
return getSelectedBaseEntity().getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateDetailsLayout(final String controllerId, final URI address, final String securityToken,
|
private void updateDetailsLayout(final String controllerId, final URI address, final String securityToken,
|
||||||
@@ -161,17 +155,18 @@ public class TargetDetails extends AbstractTableDetailsLayout<Target> {
|
|||||||
final VerticalLayout detailsTabLayout = getDetailsLayout();
|
final VerticalLayout detailsTabLayout = getDetailsLayout();
|
||||||
detailsTabLayout.removeAllComponents();
|
detailsTabLayout.removeAllComponents();
|
||||||
|
|
||||||
final Label controllerLabel = SPUIComponentProvider.createNameValueLabel(i18n.get("label.target.id"),
|
final Label controllerLabel = SPUIComponentProvider.createNameValueLabel(getI18n().get("label.target.id"),
|
||||||
HawkbitCommonUtil.trimAndNullIfEmpty(controllerId) == null ? "" : controllerId);
|
HawkbitCommonUtil.trimAndNullIfEmpty(controllerId) == null ? "" : controllerId);
|
||||||
controllerLabel.setId(SPUIComponetIdProvider.TARGET_CONTROLLER_ID);
|
controllerLabel.setId(SPUIComponetIdProvider.TARGET_CONTROLLER_ID);
|
||||||
detailsTabLayout.addComponent(controllerLabel);
|
detailsTabLayout.addComponent(controllerLabel);
|
||||||
|
|
||||||
final Label lastPollDtLabel = SPUIComponentProvider.createNameValueLabel(i18n.get("label.target.lastpolldate"),
|
final Label lastPollDtLabel = SPUIComponentProvider.createNameValueLabel(
|
||||||
|
getI18n().get("label.target.lastpolldate"),
|
||||||
HawkbitCommonUtil.trimAndNullIfEmpty(lastQueryDate) == null ? "" : lastQueryDate);
|
HawkbitCommonUtil.trimAndNullIfEmpty(lastQueryDate) == null ? "" : lastQueryDate);
|
||||||
lastPollDtLabel.setId(SPUIComponetIdProvider.TARGET_LAST_QUERY_DT);
|
lastPollDtLabel.setId(SPUIComponetIdProvider.TARGET_LAST_QUERY_DT);
|
||||||
detailsTabLayout.addComponent(lastPollDtLabel);
|
detailsTabLayout.addComponent(lastPollDtLabel);
|
||||||
|
|
||||||
final Label typeLabel = SPUIComponentProvider.createNameValueLabel(i18n.get("label.ip"),
|
final Label typeLabel = SPUIComponentProvider.createNameValueLabel(getI18n().get("label.ip"),
|
||||||
address == null ? StringUtils.EMPTY : address.toString());
|
address == null ? StringUtils.EMPTY : address.toString());
|
||||||
typeLabel.setId(SPUIComponetIdProvider.TARGET_IP_ADDRESS);
|
typeLabel.setId(SPUIComponetIdProvider.TARGET_IP_ADDRESS);
|
||||||
detailsTabLayout.addComponent(typeLabel);
|
detailsTabLayout.addComponent(typeLabel);
|
||||||
@@ -187,7 +182,7 @@ public class TargetDetails extends AbstractTableDetailsLayout<Target> {
|
|||||||
final HorizontalLayout securityTokenLayout = new HorizontalLayout();
|
final HorizontalLayout securityTokenLayout = new HorizontalLayout();
|
||||||
|
|
||||||
final Label securityTableLbl = new Label(
|
final Label securityTableLbl = new Label(
|
||||||
SPUIComponentProvider.getBoldHTMLText(i18n.get("label.target.security.token")), ContentMode.HTML);
|
SPUIComponentProvider.getBoldHTMLText(getI18n().get("label.target.security.token")), ContentMode.HTML);
|
||||||
securityTableLbl.addStyleName(SPUIDefinitions.TEXT_STYLE);
|
securityTableLbl.addStyleName(SPUIDefinitions.TEXT_STYLE);
|
||||||
securityTableLbl.addStyleName("label-style");
|
securityTableLbl.addStyleName("label-style");
|
||||||
|
|
||||||
@@ -207,18 +202,17 @@ public class TargetDetails extends AbstractTableDetailsLayout<Target> {
|
|||||||
|
|
||||||
private void populateDistributionDtls(final VerticalLayout layout, final DistributionSet distributionSet) {
|
private void populateDistributionDtls(final VerticalLayout layout, final DistributionSet distributionSet) {
|
||||||
layout.removeAllComponents();
|
layout.removeAllComponents();
|
||||||
if (distributionSet != null) {
|
if (distributionSet == null) {
|
||||||
// Display distribution set name
|
return;
|
||||||
layout.addComponent(SPUIComponentProvider.createNameValueLabel(i18n.get("label.dist.details.name"),
|
|
||||||
distributionSet.getName()));
|
|
||||||
|
|
||||||
layout.addComponent(SPUIComponentProvider.createNameValueLabel(i18n.get("label.dist.details.version"),
|
|
||||||
distributionSet.getVersion()));
|
|
||||||
|
|
||||||
/* Module info */
|
|
||||||
distributionSet.getModules()
|
|
||||||
.forEach(module -> layout.addComponent(getSWModlabel(module.getType().getName(), module)));
|
|
||||||
}
|
}
|
||||||
|
layout.addComponent(SPUIComponentProvider.createNameValueLabel(getI18n().get("label.dist.details.name"),
|
||||||
|
distributionSet.getName()));
|
||||||
|
|
||||||
|
layout.addComponent(SPUIComponentProvider.createNameValueLabel(getI18n().get("label.dist.details.version"),
|
||||||
|
distributionSet.getVersion()));
|
||||||
|
|
||||||
|
distributionSet.getModules()
|
||||||
|
.forEach(module -> layout.addComponent(getSWModlabel(module.getType().getName(), module)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -236,7 +230,7 @@ public class TargetDetails extends AbstractTableDetailsLayout<Target> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Boolean hasEditPermission() {
|
protected Boolean hasEditPermission() {
|
||||||
return permissionChecker.hasUpdateTargetPermission();
|
return getPermissionChecker().hasUpdateTargetPermission();
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||||
|
|||||||
Reference in New Issue
Block a user