@Test public void setupWhenEnableIncludeTest() { presenter.setup(createArchetypeItem(), tablePresenter); verify(view).enableIncludeCheckbox(true); }
@Override public ArchetypeItemPresenter setup(final ArchetypeItem archetypeItem, final AbstractArchetypeTablePresenter parentPresenter) { final Archetype archetype = archetypeItem.getArchetype(); this.archetypeItem = archetypeItem; this.parentPresenter = parentPresenter; view.init(this); view.setIncluded(archetypeItem.isSelected()); view.setGroupId(archetype.getGav().getGroupId()); view.setArtifactId(archetype.getGav().getArtifactId()); view.setVersion(archetype.getGav().getVersion()); view.setCreatedDate(DATE_FORMAT.format(archetype.getCreatedDate())); view.showInclude(parentPresenter.isShowIncludeColumn()); view.showStatus(parentPresenter.isShowStatusColumn()); view.showDeleteAction(parentPresenter.isShowDeleteAction()); view.showValidateAction(parentPresenter.isShowValidateAction()); view.showDefaultBadge(archetypeItem.isDefaultValue()); view.enableIncludeCheckbox(isValid()); view.enableSetDefault(isValid()); if (parentPresenter.isShowDeleteAction()) { view.setDeleteCommand(createDeleteCommand(archetypeItem)); } if (archetypeItem.isDefaultValue()) { view.setDefaultBadgeTooltip(ts.getTranslation(ArchetypeManagementConstants.ArchetypeManagement_DefaultMessage)); } resolveStatus(archetype); return this; }
ArchetypeItemPresenter extends ListItemPresenter<ArchetypeItem, AbstractArchetypeTablePresenter, ArchetypeItemPresenter.View> implements HasBusyIndicator { @Override public ArchetypeItemPresenter setup(final ArchetypeItem archetypeItem, final AbstractArchetypeTablePresenter parentPresenter) { final Archetype archetype = archetypeItem.getArchetype(); this.archetypeItem = archetypeItem; this.parentPresenter = parentPresenter; view.init(this); view.setIncluded(archetypeItem.isSelected()); view.setGroupId(archetype.getGav().getGroupId()); view.setArtifactId(archetype.getGav().getArtifactId()); view.setVersion(archetype.getGav().getVersion()); view.setCreatedDate(DATE_FORMAT.format(archetype.getCreatedDate())); view.showInclude(parentPresenter.isShowIncludeColumn()); view.showStatus(parentPresenter.isShowStatusColumn()); view.showDeleteAction(parentPresenter.isShowDeleteAction()); view.showValidateAction(parentPresenter.isShowValidateAction()); view.showDefaultBadge(archetypeItem.isDefaultValue()); view.enableIncludeCheckbox(isValid()); view.enableSetDefault(isValid()); if (parentPresenter.isShowDeleteAction()) { view.setDeleteCommand(createDeleteCommand(archetypeItem)); } if (archetypeItem.isDefaultValue()) { view.setDefaultBadgeTooltip(ts.getTranslation(ArchetypeManagementConstants.ArchetypeManagement_DefaultMessage)); } resolveStatus(archetype); return this; } }
ArchetypeItemPresenter extends ListItemPresenter<ArchetypeItem, AbstractArchetypeTablePresenter, ArchetypeItemPresenter.View> implements HasBusyIndicator { @Override public ArchetypeItemPresenter setup(final ArchetypeItem archetypeItem, final AbstractArchetypeTablePresenter parentPresenter) { final Archetype archetype = archetypeItem.getArchetype(); this.archetypeItem = archetypeItem; this.parentPresenter = parentPresenter; view.init(this); view.setIncluded(archetypeItem.isSelected()); view.setGroupId(archetype.getGav().getGroupId()); view.setArtifactId(archetype.getGav().getArtifactId()); view.setVersion(archetype.getGav().getVersion()); view.setCreatedDate(DATE_FORMAT.format(archetype.getCreatedDate())); view.showInclude(parentPresenter.isShowIncludeColumn()); view.showStatus(parentPresenter.isShowStatusColumn()); view.showDeleteAction(parentPresenter.isShowDeleteAction()); view.showValidateAction(parentPresenter.isShowValidateAction()); view.showDefaultBadge(archetypeItem.isDefaultValue()); view.enableIncludeCheckbox(isValid()); view.enableSetDefault(isValid()); if (parentPresenter.isShowDeleteAction()) { view.setDeleteCommand(createDeleteCommand(archetypeItem)); } if (archetypeItem.isDefaultValue()) { view.setDefaultBadgeTooltip(ts.getTranslation(ArchetypeManagementConstants.ArchetypeManagement_DefaultMessage)); } resolveStatus(archetype); return this; } @Inject  ArchetypeItemPresenter(final View view,
                                  final TranslationService ts,
                                  final Caller<ArchetypeService> archetypeService,
                                  final BusyIndicatorView busyIndicatorView); }
ArchetypeItemPresenter extends ListItemPresenter<ArchetypeItem, AbstractArchetypeTablePresenter, ArchetypeItemPresenter.View> implements HasBusyIndicator { @Override public ArchetypeItemPresenter setup(final ArchetypeItem archetypeItem, final AbstractArchetypeTablePresenter parentPresenter) { final Archetype archetype = archetypeItem.getArchetype(); this.archetypeItem = archetypeItem; this.parentPresenter = parentPresenter; view.init(this); view.setIncluded(archetypeItem.isSelected()); view.setGroupId(archetype.getGav().getGroupId()); view.setArtifactId(archetype.getGav().getArtifactId()); view.setVersion(archetype.getGav().getVersion()); view.setCreatedDate(DATE_FORMAT.format(archetype.getCreatedDate())); view.showInclude(parentPresenter.isShowIncludeColumn()); view.showStatus(parentPresenter.isShowStatusColumn()); view.showDeleteAction(parentPresenter.isShowDeleteAction()); view.showValidateAction(parentPresenter.isShowValidateAction()); view.showDefaultBadge(archetypeItem.isDefaultValue()); view.enableIncludeCheckbox(isValid()); view.enableSetDefault(isValid()); if (parentPresenter.isShowDeleteAction()) { view.setDeleteCommand(createDeleteCommand(archetypeItem)); } if (archetypeItem.isDefaultValue()) { view.setDefaultBadgeTooltip(ts.getTranslation(ArchetypeManagementConstants.ArchetypeManagement_DefaultMessage)); } resolveStatus(archetype); return this; } @Inject  ArchetypeItemPresenter(final View view,
                                  final TranslationService ts,
                                  final Caller<ArchetypeService> archetypeService,
                                  final BusyIndicatorView busyIndicatorView); @Override ArchetypeItemPresenter setup(final ArchetypeItem archetypeItem,
                                        final AbstractArchetypeTablePresenter parentPresenter); @Override ArchetypeItem getObject(); @Override void showBusyIndicator(final String message); @Override void hideBusyIndicator(); void setIncluded(final boolean isIncluded); void makeDefault(); void validate(); }
ArchetypeItemPresenter extends ListItemPresenter<ArchetypeItem, AbstractArchetypeTablePresenter, ArchetypeItemPresenter.View> implements HasBusyIndicator { @Override public ArchetypeItemPresenter setup(final ArchetypeItem archetypeItem, final AbstractArchetypeTablePresenter parentPresenter) { final Archetype archetype = archetypeItem.getArchetype(); this.archetypeItem = archetypeItem; this.parentPresenter = parentPresenter; view.init(this); view.setIncluded(archetypeItem.isSelected()); view.setGroupId(archetype.getGav().getGroupId()); view.setArtifactId(archetype.getGav().getArtifactId()); view.setVersion(archetype.getGav().getVersion()); view.setCreatedDate(DATE_FORMAT.format(archetype.getCreatedDate())); view.showInclude(parentPresenter.isShowIncludeColumn()); view.showStatus(parentPresenter.isShowStatusColumn()); view.showDeleteAction(parentPresenter.isShowDeleteAction()); view.showValidateAction(parentPresenter.isShowValidateAction()); view.showDefaultBadge(archetypeItem.isDefaultValue()); view.enableIncludeCheckbox(isValid()); view.enableSetDefault(isValid()); if (parentPresenter.isShowDeleteAction()) { view.setDeleteCommand(createDeleteCommand(archetypeItem)); } if (archetypeItem.isDefaultValue()) { view.setDefaultBadgeTooltip(ts.getTranslation(ArchetypeManagementConstants.ArchetypeManagement_DefaultMessage)); } resolveStatus(archetype); return this; } @Inject  ArchetypeItemPresenter(final View view,
                                  final TranslationService ts,
                                  final Caller<ArchetypeService> archetypeService,
                                  final BusyIndicatorView busyIndicatorView); @Override ArchetypeItemPresenter setup(final ArchetypeItem archetypeItem,
                                        final AbstractArchetypeTablePresenter parentPresenter); @Override ArchetypeItem getObject(); @Override void showBusyIndicator(final String message); @Override void hideBusyIndicator(); void setIncluded(final boolean isIncluded); void makeDefault(); void validate();  }