Search in sources :

Example 1 with AdminGuiConfigurationType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType in project midpoint by Evolveum.

the class AbstractModelIntegrationTest method assertAdminGuiConfigurations.

protected AdminGuiConfigurationType assertAdminGuiConfigurations(MidPointPrincipal principal, int expectedMenuLinks, int expectedDashboardLinks, int expectedObjectLists, int expectedObjectForms, int expecteduserDashboardWidgets) {
    AdminGuiConfigurationType adminGuiConfiguration = principal.getAdminGuiConfiguration();
    display("Admin GUI config for " + principal.getUsername(), adminGuiConfiguration);
    assertAdminGuiConfigurations(adminGuiConfiguration, expectedMenuLinks, expectedDashboardLinks, expectedObjectLists, expectedObjectForms, expecteduserDashboardWidgets);
    return adminGuiConfiguration;
}
Also used : AdminGuiConfigurationType(com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType)

Example 2 with AdminGuiConfigurationType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType in project midpoint by Evolveum.

the class UserDashboardLinkCounter method count.

@Override
public int count(AssignmentHolderDetailsModel<SystemConfigurationType> model, PageBase pageBase) {
    SystemConfigurationType object = model.getObjectType();
    AdminGuiConfigurationType agc = object.getAdminGuiConfiguration();
    return agc != null ? agc.getUserDashboardLink().size() : 0;
}
Also used : AdminGuiConfigurationType(com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType) SystemConfigurationType(com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType)

Example 3 with AdminGuiConfigurationType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType in project midpoint by Evolveum.

the class ConfigurableUserDashboardCounter method count.

@Override
public int count(AssignmentHolderDetailsModel<SystemConfigurationType> model, PageBase pageBase) {
    SystemConfigurationType object = model.getObjectType();
    AdminGuiConfigurationType adminGui = object.getAdminGuiConfiguration();
    return adminGui != null ? adminGui.getConfigurableUserDashboard().size() : 0;
}
Also used : AdminGuiConfigurationType(com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType) SystemConfigurationType(com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType)

Example 4 with AdminGuiConfigurationType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType in project midpoint by Evolveum.

the class TestPreviewChanges method test130GetAdminGuiConfig.

@Test
public void test130GetAdminGuiConfig() throws Exception {
    final String TEST_NAME = "test130GetAdminGuiConfig";
    TestUtil.displayTestTile(this, TEST_NAME);
    // GIVEN
    Task task = taskManager.createTaskInstance(TestPreviewChanges.class.getName() + "." + TEST_NAME);
    OperationResult result = task.getResult();
    // WHEN
    AdminGuiConfigurationType adminGuiConfiguration = modelInteractionService.getAdminGuiConfiguration(task, result);
    // THEN
    result.computeStatus();
    TestUtil.assertSuccess(result);
    assertAdminGuiConfigurations(adminGuiConfiguration, 0, 1, 3, 1, 0);
    RichHyperlinkType link = adminGuiConfiguration.getUserDashboardLink().get(0);
    assertEquals("Bad link label", "Foo", link.getLabel());
    assertEquals("Bad link targetUrl", "/foo", link.getTargetUrl());
    assertEquals("Bad timezone targetUrl", "Jamaica", adminGuiConfiguration.getDefaultTimezone());
}
Also used : Task(com.evolveum.midpoint.task.api.Task) AdminGuiConfigurationType(com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType) RichHyperlinkType(com.evolveum.midpoint.xml.ns._public.common.common_3.RichHyperlinkType) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) Test(org.testng.annotations.Test)

Example 5 with AdminGuiConfigurationType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType in project midpoint by Evolveum.

the class TestJavaSerialization method testSerializeRole.

@Test
public void testSerializeRole() throws Exception {
    PrismContext prismContext = getPrismContext();
    PrismObject<RoleType> parsedObject = prismContext.parseObject(TestConstants.ROLE_FILE);
    System.out.println("Parsed object:");
    System.out.println(parsedObject.debugDump(1));
    RoleType parsedRoleType = parsedObject.asObjectable();
    AdminGuiConfigurationType adminGuiConfiguration = parsedRoleType.getAdminGuiConfiguration();
    String defaultTimezone = adminGuiConfiguration.getDefaultTimezone();
    assertEquals("Wrong defaultTimezone", "Europe/Bratislava", defaultTimezone);
    // WHEN
    serializationRoundTripPrismObject(parsedObject);
    serializationRoundTripObjectType(parsedRoleType);
}
Also used : AdminGuiConfigurationType(com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType) PrismTestUtil.getPrismContext(com.evolveum.midpoint.prism.util.PrismTestUtil.getPrismContext) PrismContext(com.evolveum.midpoint.prism.PrismContext) RoleType(com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType) Test(org.testng.annotations.Test)

Aggregations

AdminGuiConfigurationType (com.evolveum.midpoint.xml.ns._public.common.common_3.AdminGuiConfigurationType)8 SystemConfigurationType (com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType)5 Test (org.testng.annotations.Test)2 PrismContext (com.evolveum.midpoint.prism.PrismContext)1 PrismTestUtil.getPrismContext (com.evolveum.midpoint.prism.util.PrismTestUtil.getPrismContext)1 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 Task (com.evolveum.midpoint.task.api.Task)1 GuiObjectDetailsSetType (com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectDetailsSetType)1 GuiObjectListViewsType (com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectListViewsType)1 RichHyperlinkType (com.evolveum.midpoint.xml.ns._public.common.common_3.RichHyperlinkType)1 RoleType (com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType)1