public Builder(CategoryDTO categoryDTO) { this.withTypeId(categoryDTO.getTypeId()) .withId(categoryDTO.getId()) .withName(categoryDTO.getName()) .withApplications(categoryDTO.getApplications()) .withIcon(categoryDTO.getIcon()) .withType(categoryDTO.getType()); }
public Builder(RepositoryDTO repositoryDTO) { this.withName(repositoryDTO.getName()).withTypes(repositoryDTO.getTypes()) .withTranslations(repositoryDTO.getTranslations()); }
public Builder(ScriptDTO scriptDTO) { this.withTypeId(scriptDTO.getTypeId()) .withCategoryId(scriptDTO.getCategoryId()) .withApplicationId(scriptDTO.getApplicationId()) .withId(scriptDTO.getId()) .withScriptName(scriptDTO.getScriptName()) .withScript(scriptDTO.getScript()) .withCompatibleOperatingSystems(scriptDTO.getCompatibleOperatingSystems()) .withTestingOperatingSystems(scriptDTO.getTestingOperatingSystems()) .withFree(scriptDTO.isFree()) .withRequiresPatch(scriptDTO.requiresPatch) .withIcon(scriptDTO.getIcon()); }
protected ApplicationDTO mergeApplications(ApplicationDTO leftApplication, ApplicationDTO rightApplication) { final List<ScriptDTO> scripts = mergeListOfDtos(leftApplication.getScripts(), rightApplication.getScripts(), ScriptDTO::getScriptName, ScriptDTO.nameComparator()); final List<ResourceDTO> resources = mergeListOfDtos(leftApplication.getResources(), rightApplication.getResources(), ResourceDTO::getName, ResourceDTO.nameComparator()); final List<URI> mergeMiniatures = mergeMiniatures(leftApplication.getMiniatures(), rightApplication.getMiniatures()); return new ApplicationDTO.Builder() .withCategoryId(leftApplication.getCategoryId()) .withId(leftApplication.getId()) .withName(leftApplication.getName()) .withResources(resources) .withScripts(scripts) .withDescription(leftApplication.getDescription()) .withIcon(leftApplication.getIcon()) .withMiniatures(mergeMiniatures) .build(); }
public Builder(TypeDTO categoryDTO) { this.withId(categoryDTO.getId()).withName(categoryDTO.getName()) .withCategories(categoryDTO.getCategories()).withIcon(categoryDTO.getIcon()); }
private void populateView(RepositoryDTO repositoryDTO) { Platform.runLater(() -> { List<CategoryDTO> categoryDTOS = repositoryDTO.getTypes().get(0).getCategories(); this.view.populate(categoryDTOS); }); } }
public Builder(TranslationDTO repositoryDTO) { this.withLanguage(repositoryDTO.getLanguage()).withProperties(repositoryDTO.getProperties()); }
@Override public RepositoryDTO fetchInstallableApplications() { return new RepositoryDTO.Builder().build(); }
public TranslationDTO build() { return new TranslationDTO(this); } }
public CategoryDTO build() { return new CategoryDTO(this); }
public TypeDTO build() { return new TypeDTO(this); }
public ScriptDTO build() { return new ScriptDTO(this); }
public ApplicationDTO build() { return new ApplicationDTO(this); }
public RepositoryDTO build() { return new RepositoryDTO(this); }
public static Comparator<TranslationDTO> nameComparator() { return (o1, o2) -> o1.getLanguage().compareToIgnoreCase(o2.getLanguage()); }