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;
}
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;
}
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;
}
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());
}
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);
}
Aggregations