Search in sources :

Example 6 with ProjectExplorerContentQuery

use of org.kie.workbench.common.screens.explorer.service.ProjectExplorerContentQuery in project kie-wb-common by kiegroup.

the class ActiveContextManager method initActiveContext.

public void initActiveContext(final Repository repository, final Branch branch, final Module module) {
    view.showBusyIndicator(CommonConstants.INSTANCE.Loading());
    refresh(new ProjectExplorerContentQuery(repository, branch, module));
}
Also used : ProjectExplorerContentQuery(org.kie.workbench.common.screens.explorer.service.ProjectExplorerContentQuery)

Example 7 with ProjectExplorerContentQuery

use of org.kie.workbench.common.screens.explorer.service.ProjectExplorerContentQuery in project kie-wb-common by kiegroup.

the class ActiveContextManager method initActiveContext.

public void initActiveContext(final Repository repository, final Branch branch, final Module module, final org.guvnor.common.services.project.model.Package pkg) {
    view.showBusyIndicator(CommonConstants.INSTANCE.Loading());
    refresh(new ProjectExplorerContentQuery(repository, branch, module, pkg));
}
Also used : ProjectExplorerContentQuery(org.kie.workbench.common.screens.explorer.service.ProjectExplorerContentQuery)

Example 8 with ProjectExplorerContentQuery

use of org.kie.workbench.common.screens.explorer.service.ProjectExplorerContentQuery in project kie-wb-common by kiegroup.

the class ProjectExplorerContentResolverDefaultSelectionsTest method getContentQuery.

private ProjectExplorerContentQuery getContentQuery(final Repository repository, final String branchName, final Module module) {
    final Branch branch = new Branch(branchName, mock(Path.class));
    final ProjectExplorerContentQuery moduleExplorerContentQuery = new ProjectExplorerContentQuery(repository, branch, module);
    doReturn(new WorkspaceProject(mock(OrganizationalUnit.class), repository, branch, module)).when(projectService).resolveProject(repository.getSpace(), branch);
    final ActiveOptions options = new ActiveOptions();
    options.add(Option.TREE_NAVIGATOR);
    options.add(Option.EXCLUDE_HIDDEN_ITEMS);
    options.add(Option.BUSINESS_CONTENT);
    moduleExplorerContentQuery.setOptions(options);
    return moduleExplorerContentQuery;
}
Also used : Path(org.uberfire.backend.vfs.Path) ActiveOptions(org.kie.workbench.common.screens.explorer.service.ActiveOptions) Branch(org.guvnor.structure.repositories.Branch) WorkspaceProject(org.guvnor.common.services.project.model.WorkspaceProject) ProjectExplorerContentQuery(org.kie.workbench.common.screens.explorer.service.ProjectExplorerContentQuery)

Example 9 with ProjectExplorerContentQuery

use of org.kie.workbench.common.screens.explorer.service.ProjectExplorerContentQuery in project kie-wb-common by kiegroup.

the class ExplorerServiceImpl method getContent.

@Override
public ProjectExplorerContent getContent(final String _path, final ActiveOptions activeOptions) {
    checkNotEmpty("path", _path);
    final Path path = Paths.convert(ioService.get(URI.create(_path.trim())));
    final Module module = moduleService.resolveModule(path);
    final Path convertedPath = Paths.convert(Paths.convert(path).getRoot());
    final Repository repo = repositoryService.getRepository(convertedPath);
    final Branch branch = getBranch(repo, convertedPath);
    return getContent(new ProjectExplorerContentQuery(repo, branch, module, activeOptions));
}
Also used : Path(org.uberfire.backend.vfs.Path) Repository(org.guvnor.structure.repositories.Repository) Branch(org.guvnor.structure.repositories.Branch) ProjectExplorerContentQuery(org.kie.workbench.common.screens.explorer.service.ProjectExplorerContentQuery) Module(org.guvnor.common.services.project.model.Module)

Aggregations

ProjectExplorerContentQuery (org.kie.workbench.common.screens.explorer.service.ProjectExplorerContentQuery)9 ActiveOptions (org.kie.workbench.common.screens.explorer.service.ActiveOptions)5 Test (org.junit.Test)3 Branch (org.guvnor.structure.repositories.Branch)2 Path (org.uberfire.backend.vfs.Path)2 Module (org.guvnor.common.services.project.model.Module)1 WorkspaceProject (org.guvnor.common.services.project.model.WorkspaceProject)1 Repository (org.guvnor.structure.repositories.Repository)1 ProjectExplorerContent (org.kie.workbench.common.screens.explorer.model.ProjectExplorerContent)1