use of org.uberfire.ext.widgets.core.client.wizards.WizardPageSelectedEvent in project kie-wb-common by kiegroup.
the class ProjectPage method fetchRepository.
private void fetchRepository(final ExampleRepository selectedRepository) {
examplesService.call(new RemoteCallback<Set<ExampleProject>>() {
@Override
public void callback(final Set<ExampleProject> projects) {
activeView = projectsView;
model.getProjects().clear();
model.setSourceRepository(selectedRepository);
final List<ExampleProject> sortedProjects = sort(projects);
projectsView.setProjectsInRepository(sortedProjects);
exampleProjects = sortedProjects;
pageSelectedEvent.fire(new WizardPageSelectedEvent(ProjectPage.this));
}
}, new DefaultErrorCallback() {
@Override
public boolean error(final Message message, final Throwable throwable) {
model.setSourceRepository(null);
model.getSelectedRepository().setUrlValid(false);
return super.error(message, throwable);
}
}).getProjects(selectedRepository);
}
use of org.uberfire.ext.widgets.core.client.wizards.WizardPageSelectedEvent in project kie-wb-common by kiegroup.
the class ProjectPage method updateProjectsInRepository.
private void updateProjectsInRepository(final Collection<String> tags) {
List<ExampleProject> resultList = exampleProjects.stream().filter(p -> tags.stream().allMatch(userTag -> p.getTags().stream().anyMatch(projectTag -> projectTag.toLowerCase().contains(userTag.toLowerCase())))).sorted((o1, o2) -> o1.getName().compareTo(o2.getName())).collect(Collectors.toList());
projectsView.setProjectsInRepository(resultList);
pageSelectedEvent.fire(new WizardPageSelectedEvent(ProjectPage.this));
}
use of org.uberfire.ext.widgets.core.client.wizards.WizardPageSelectedEvent in project kie-wb-common by kiegroup.
the class ProjectPage method removeAllTags.
@Override
public void removeAllTags() {
tags.clear();
projectsView.setProjectsInRepository(exampleProjects);
pageSelectedEvent.fire(new WizardPageSelectedEvent(ProjectPage.this));
}
Aggregations