Formatted the code
This commit is contained in:
@@ -83,7 +83,7 @@ public class DistributionDetails extends AbstractNamedVersionedEntityTableDetail
|
|||||||
void onEvent(final MetadataEvent event) {
|
void onEvent(final MetadataEvent event) {
|
||||||
UI.getCurrent()
|
UI.getCurrent()
|
||||||
.access(() -> {
|
.access(() -> {
|
||||||
DistributionSetMetadata dsMetadata = event.getDistributionSetMetadata();
|
final DistributionSetMetadata dsMetadata = event.getDistributionSetMetadata();
|
||||||
if (dsMetadata != null && isDistributionSetSelected(dsMetadata.getDistributionSet())) {
|
if (dsMetadata != null && isDistributionSetSelected(dsMetadata.getDistributionSet())) {
|
||||||
if (event.getMetadataUIEvent() == MetadataEvent.MetadataUIEvent.CREATE_DISTRIBUTION_SET_METADATA) {
|
if (event.getMetadataUIEvent() == MetadataEvent.MetadataUIEvent.CREATE_DISTRIBUTION_SET_METADATA) {
|
||||||
dsMetadataTable.createMetadata(event.getDistributionSetMetadata().getKey());
|
dsMetadataTable.createMetadata(event.getDistributionSetMetadata().getKey());
|
||||||
@@ -146,7 +146,7 @@ public class DistributionDetails extends AbstractNamedVersionedEntityTableDetail
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getTabSheetId() {
|
protected String getTabSheetId() {
|
||||||
return SPUIComponentIdProvider.DISTRIBUTION_DETAILS_TABSHEET;
|
return SPUIComponentIdProvider.DISTRIBUTIONSET_DETAILS_TABSHEET_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -214,21 +214,21 @@ public class DistributionDetails extends AbstractNamedVersionedEntityTableDetail
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getShowMetadataButtonId() {
|
protected String getShowMetadataButtonId() {
|
||||||
DistributionSetIdName lastselectedDistDS = managementUIState.getLastSelectedDistribution().isPresent() ? managementUIState
|
final DistributionSetIdName lastselectedDistDS = managementUIState.getLastSelectedDistribution().isPresent() ? managementUIState
|
||||||
.getLastSelectedDistribution().get() : null;
|
.getLastSelectedDistribution().get() : null;
|
||||||
return SPUIComponentIdProvider.DS_TABLE_MANAGE_METADATA_ID + "." + lastselectedDistDS.getName() + "."
|
return SPUIComponentIdProvider.DS_TABLE_MANAGE_METADATA_ID + "." + lastselectedDistDS.getName() + "."
|
||||||
+ lastselectedDistDS.getVersion();
|
+ lastselectedDistDS.getVersion();
|
||||||
}
|
}
|
||||||
private boolean isDistributionSetSelected(DistributionSet ds) {
|
private boolean isDistributionSetSelected(final DistributionSet ds) {
|
||||||
DistributionSetIdName lastselectedManageDS = managementUIState.getLastSelectedDistribution().isPresent() ? managementUIState
|
final DistributionSetIdName lastselectedManageDS = managementUIState.getLastSelectedDistribution().isPresent() ? managementUIState
|
||||||
.getLastSelectedDistribution().get() : null;
|
.getLastSelectedDistribution().get() : null;
|
||||||
return ds!=null && lastselectedManageDS != null && lastselectedManageDS.getName().equals(ds.getName())
|
return ds!=null && lastselectedManageDS != null && lastselectedManageDS.getName().equals(ds.getName())
|
||||||
&& lastselectedManageDS.getVersion().endsWith(ds.getVersion());
|
&& lastselectedManageDS.getVersion().endsWith(ds.getVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void showMetadata(ClickEvent event) {
|
protected void showMetadata(final ClickEvent event) {
|
||||||
DistributionSet ds = distributionSetManagement.findDistributionSetByIdWithDetails(getSelectedBaseEntityId());
|
final DistributionSet ds = distributionSetManagement.findDistributionSetByIdWithDetails(getSelectedBaseEntityId());
|
||||||
UI.getCurrent().addWindow(dsMetadataPopupLayout.getWindow(ds,null));
|
UI.getCurrent().addWindow(dsMetadataPopupLayout.getWindow(ds,null));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -518,6 +518,10 @@ public final class SPUIComponentIdProvider {
|
|||||||
* Tab sheet id.
|
* Tab sheet id.
|
||||||
*/
|
*/
|
||||||
public static final String TARGET_DETAILS_TABSHEET = "target.details.tabsheet";
|
public static final String TARGET_DETAILS_TABSHEET = "target.details.tabsheet";
|
||||||
|
/**
|
||||||
|
* Tab sheet id.
|
||||||
|
*/
|
||||||
|
public static final String DISTRIBUTION_DETAILS_TABSHEET = "distribution.details.tabsheet.";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Combobox id.
|
* Combobox id.
|
||||||
|
|||||||
Reference in New Issue
Block a user