本文整理了Java中org.uberfire.client.workbench.Workbench.getHomePerspectiveActivity()
方法的一些代码示例,展示了Workbench.getHomePerspectiveActivity()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Workbench.getHomePerspectiveActivity()
方法的具体详情如下:
包路径:org.uberfire.client.workbench.Workbench
类名称:Workbench
方法名:getHomePerspectiveActivity
[英]Get the home perspective defined at the workbench authorization policy.
If no home is defined then the perspective marked as " isDefault=true" is taken.
Notice that access permission over the selected perspective is always required.
[中]获取workbench授权策略中定义的home透视图。
如果没有定义home,则采用标记为“isDefault=true”的透视图。
请注意,始终需要对所选透视图的访问权限。
代码示例来源:origin: kiegroup/appformer
private void goToHomePerspective() {
final PerspectiveActivity homePerspectiveActivity = workbench.getHomePerspectiveActivity();
if (homePerspectiveActivity != null) {
final String homePerspectiveIdentifier = homePerspectiveActivity.getIdentifier();
if (hasAccessToPerspective(homePerspectiveIdentifier)) {
placeManager.goTo(homePerspectiveIdentifier);
}
}
}
代码示例来源:origin: kiegroup/appformer
@Test
public void setupHomeLinkWithNoDefaultPerspective() {
doReturn(null).when(workbench).getHomePerspectiveActivity();
doReturn(true).when(presenter).hasAccessToPerspective(any());
presenter.setupHomeLink();
ArgumentCaptor<Command> commandCaptor = ArgumentCaptor.forClass(Command.class);
verify(view).setHomeLinkAction(commandCaptor.capture());
verify(view).setBrandImageAction(commandCaptor.capture());
commandCaptor.getValue().execute();
verify(placeManager,
never()).goTo(anyString());
}
代码示例来源:origin: org.uberfire/uberfire-workbench-client
@Test
public void setupHomeLinkWithNoDefaultPerspective() {
doReturn(null).when(workbench).getHomePerspectiveActivity();
doReturn(true).when(presenter).hasAccessToPerspective(any());
presenter.setupHomeLink();
ArgumentCaptor<Command> commandCaptor = ArgumentCaptor.forClass(Command.class);
verify(view).setHomeLinkAction(commandCaptor.capture());
verify(view).setBrandImageAction(commandCaptor.capture());
commandCaptor.getValue().execute();
verify(placeManager,
never()).goTo(anyString());
}
代码示例来源:origin: org.uberfire/uberfire-workbench-client
@Test
public void setupHomeLinkWithNoPermissionToAccessDefaultPerspective() {
final PerspectiveActivity homePerspective = mock(PerspectiveActivity.class);
doReturn("identifier").when(homePerspective).getIdentifier();
doReturn(homePerspective).when(workbench).getHomePerspectiveActivity();
doReturn(false).when(presenter).hasAccessToPerspective(any());
presenter.setupHomeLink();
ArgumentCaptor<Command> commandCaptor = ArgumentCaptor.forClass(Command.class);
verify(view).setHomeLinkAction(commandCaptor.capture());
verify(view).setBrandImageAction(commandCaptor.capture());
commandCaptor.getValue().execute();
verify(placeManager,
never()).goTo(anyString());
}
代码示例来源:origin: kiegroup/appformer
@Test
public void setupHomeLinkWithNoPermissionToAccessDefaultPerspective() {
final PerspectiveActivity homePerspective = mock(PerspectiveActivity.class);
doReturn("identifier").when(homePerspective).getIdentifier();
doReturn(homePerspective).when(workbench).getHomePerspectiveActivity();
doReturn(false).when(presenter).hasAccessToPerspective(any());
presenter.setupHomeLink();
ArgumentCaptor<Command> commandCaptor = ArgumentCaptor.forClass(Command.class);
verify(view).setHomeLinkAction(commandCaptor.capture());
verify(view).setBrandImageAction(commandCaptor.capture());
commandCaptor.getValue().execute();
verify(placeManager,
never()).goTo(anyString());
}
代码示例来源:origin: org.uberfire/uberfire-workbench-client
@Test
public void setupHomeLinkWithPermissionToAccessDefaultPerspective() {
final PerspectiveActivity homePerspective = mock(PerspectiveActivity.class);
doReturn("identifier").when(homePerspective).getIdentifier();
doReturn(homePerspective).when(workbench).getHomePerspectiveActivity();
doReturn(true).when(presenter).hasAccessToPerspective(any());
presenter.setupHomeLink();
ArgumentCaptor<Command> commandCaptor = ArgumentCaptor.forClass(Command.class);
verify(view).setHomeLinkAction(commandCaptor.capture());
verify(view).setBrandImageAction(commandCaptor.capture());
commandCaptor.getValue().execute();
verify(placeManager).goTo("identifier");
}
代码示例来源:origin: kiegroup/appformer
@Test
public void setupHomeLinkWithPermissionToAccessDefaultPerspective() {
final PerspectiveActivity homePerspective = mock(PerspectiveActivity.class);
doReturn("identifier").when(homePerspective).getIdentifier();
doReturn(homePerspective).when(workbench).getHomePerspectiveActivity();
doReturn(true).when(presenter).hasAccessToPerspective(any());
presenter.setupHomeLink();
ArgumentCaptor<Command> commandCaptor = ArgumentCaptor.forClass(Command.class);
verify(view).setHomeLinkAction(commandCaptor.capture());
verify(view).setBrandImageAction(commandCaptor.capture());
commandCaptor.getValue().execute();
verify(placeManager).goTo("identifier");
}
代码示例来源:origin: kiegroup/appformer
final PerspectiveActivity homePerspective = getHomePerspectiveActivity();
if (homePerspective != null) {
appReady.fire(new ApplicationReadyEvent());
内容来源于网络,如有侵权,请联系作者删除!