use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class UserHomePagePerspective method buildPerspective.
@Perspective
public PerspectiveDefinition buildPerspective() {
final PerspectiveDefinition p = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
p.setName(Constants.INSTANCE.PeoplePerspective());
final PanelDefinition west = new PanelDefinitionImpl(SimpleWorkbenchPanelPresenter.class.getName());
west.setWidth(350);
west.setMinWidth(350);
west.addPart(new PartDefinitionImpl(new DefaultPlaceRequest("UserHomePageSidePresenter")));
p.getRoot().addPart(new PartDefinitionImpl(new DefaultPlaceRequest("UserHomePageMainPresenter")));
p.getRoot().insertChild(CompassPosition.WEST, west);
return p;
}
use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class DefaultAdminPageHelper method addSecurityPerspective.
private void addSecurityPerspective() {
if (hasAccessToPerspective(PerspectiveIds.SECURITY_MANAGEMENT)) {
adminPage.addTool("root", constants.Roles(), "fa-unlock-alt", "security", () -> {
final Command accessRoles = () -> {
Map<String, String> params = new HashMap<>();
params.put("activeTab", "RolesTab");
placeManager.goTo(new DefaultPlaceRequest(SECURITY_MANAGEMENT, params));
};
accessRoles.execute();
addAdminBreadcrumbs(SECURITY_MANAGEMENT, constants.SecurityManagement(), accessRoles);
}, command -> userSystemManager.roles((AbstractEntityManager.SearchResponse<Role> response) -> {
if (response != null) {
command.execute(response.getTotal());
}
}, (o, throwable) -> false).search(new SearchRequestImpl("", 1, 1, null)));
adminPage.addTool("root", constants.Groups(), "fa-users", "security", () -> {
final Command accessGroups = () -> {
Map<String, String> params = new HashMap<>();
params.put("activeTab", "GroupsTab");
placeManager.goTo(new DefaultPlaceRequest(SECURITY_MANAGEMENT, params));
};
accessGroups.execute();
addAdminBreadcrumbs(SECURITY_MANAGEMENT, constants.SecurityManagement(), accessGroups);
}, command -> userSystemManager.groups((AbstractEntityManager.SearchResponse<Group> response) -> {
if (response != null) {
command.execute(response.getTotal());
}
}, (o, throwable) -> false).search(new SearchRequestImpl("", 1, 1, null)));
adminPage.addTool("root", constants.Users(), "fa-user", "security", () -> {
final Command accessUsers = () -> {
Map<String, String> params = new HashMap<>();
params.put("activeTab", "UsersTab");
placeManager.goTo(new DefaultPlaceRequest(SECURITY_MANAGEMENT, params));
};
accessUsers.execute();
addAdminBreadcrumbs(SECURITY_MANAGEMENT, constants.SecurityManagement(), accessUsers);
}, command -> userSystemManager.users((AbstractEntityManager.SearchResponse<User> response) -> {
if (response != null) {
command.execute(response.getTotal());
}
}, (o, throwable) -> false).search(new SearchRequestImpl("", 1, 1, null)));
}
}
use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class AuthoringWorkbenchDocks method setup.
public void setup(String authoringPerspectiveIdentifier, PlaceRequest projectExplorerPlaceRequest) {
this.authoringPerspectiveIdentifier = authoringPerspectiveIdentifier;
projectExplorerDock = new UberfireDock(UberfireDockPosition.WEST, IconType.ADJUST.toString(), projectExplorerPlaceRequest, authoringPerspectiveIdentifier).withSize(400).withLabel(constants.DocksProjectExplorerTitle());
componentPaletteDock = new UberfireDock(UberfireDockPosition.WEST, IconType.CUBES.toString(), new DefaultPlaceRequest(LayoutComponentPaletteScreen.SCREEN_ID), authoringPerspectiveIdentifier).withSize(400).withLabel(constants.LayoutEditorComponentPalette());
uberfireDocks.add(projectExplorerDock);
uberfireDocks.hide(UberfireDockPosition.EAST, authoringPerspectiveIdentifier);
}
use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class AuthoringWorkbenchDocksTest method testCloseComponentPalette.
@Test
public void testCloseComponentPalette() {
authoringWorkbenchDocks.onLayoutEditorFocus(new LayoutEditorFocusEvent());
reset(uberfireDocks);
authoringWorkbenchDocks.onLayoutEditorClose(new PlaceHiddenEvent(new DefaultPlaceRequest("FormEditor")));
verify(uberfireDocks).remove(authoringWorkbenchDocks.componentPaletteDock);
assertFalse(authoringWorkbenchDocks.componentPaletteEnabled);
verify(uberfireDocks, never()).open(any());
}
use of org.uberfire.mvp.impl.DefaultPlaceRequest in project kie-wb-common by kiegroup.
the class DataSourceManagementPerspective method buildPerspective.
@Perspective
public PerspectiveDefinition buildPerspective() {
PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
perspective.setName("Data Source Authoring");
final PanelDefinition west = new PanelDefinitionImpl(MultiListWorkbenchPanelPresenter.class.getName());
west.setWidth(400);
west.setMinWidth(300);
west.addPart(new PartDefinitionImpl(new DefaultPlaceRequest(DataSourceDefExplorerScreen.SCREEN_ID)));
perspective.getRoot().insertChild(CompassPosition.WEST, west);
return perspective;
}
Aggregations