public PackageBuilder installer(TaskDefinition task) { def.setInstaller(task); return this; }
public PackageBuilder title(String title) { def.setTitle(title); return this; }
public PackageBuilder description(String description) { def.setDescription(description); return this; }
@Override public void setInstaller(TaskDefinition installer) { if (installer instanceof TaskDefinitionImpl) { this.installer = (TaskDefinitionImpl) installer; } else { this.installer = new TaskDefinitionImpl(installer.getType(), installer.getRequireRestart()); } }
public PackageBuilder type(PackageType type) { def.setType(type); return this; }
public PackageBuilder uninstaller(TaskDefinition task) { def.setUninstaller(task); return this; }
public PackageBuilder version(Version version) { def.setVersion(version); return this; }
public PackageBuilder name(String name) { def.setName(name); return this; }
public PackageBuilder validator(String validator) { def.setValidator(validator); return this; }
public PackageBuilder vendor(String vendor) { def.setVendor(vendor); return this; }
public PackageBuilder homePage(String homePage) { def.setHomePage(homePage); return this; }
public PackageBuilder classifier(String classifier) { def.setClassifier(classifier); return this; }
public PackageBuilder supported(boolean supported) { try { def.getClass().getMethod("setSupported", boolean.class); def.setSupported(supported); } catch (NoSuchMethodException e) { // Ignore setSupported with old Connect Client versions } return this; }
public PackageBuilder productionState(ProductionState productionState) { try { def.getClass().getMethod("setProductionState", ProductionState.class); def.setProductionState(productionState); } catch (NoSuchMethodException e) { // Ignore setProductionState with old Connect Client versions } return this; }
public PackageBuilder requireTermsAndConditionsAcceptance(boolean requireTermsAndConditionsAcceptance) { try { def.getClass().getMethod("setRequireTermsAndConditionsAcceptance", boolean.class); def.setRequireTermsAndConditionsAcceptance(requireTermsAndConditionsAcceptance); } catch (NoSuchMethodException e) { // Ignore setRequireTermsAndConditionsAcceptance with old Connect // Client versions } return this; }
@Override public void setUninstaller(TaskDefinition uninstaller) { if (uninstaller instanceof TaskDefinitionImpl) { this.uninstaller = (TaskDefinitionImpl) uninstaller; } else { this.uninstaller = new TaskDefinitionImpl(uninstaller.getType(), uninstaller.getRequireRestart()); } }
public PackageBuilder installer(String type, boolean restart) { def.setInstaller(new TaskDefinitionImpl(type, restart)); return this; }
public PackageBuilder type(String type) { def.setType(PackageType.getByValue(type)); return this; }
public PackageBuilder uninstaller(String type, boolean restart) { def.setUninstaller(new TaskDefinitionImpl(type, restart)); return this; }
public PackageBuilder version(String version) { def.setVersion(new Version(version)); return this; }