/** * Create an instance of {@link SelectorQualifiedGetOptionsType } * */ public SelectorQualifiedGetOptionsType createSelectorQualifiedGetOptionsType() { return new SelectorQualifiedGetOptionsType(); }
/** * Create an instance of {@link SelectorQualifiedGetOptionsType } * */ public SelectorQualifiedGetOptionsType createSelectorQualifiedGetOptionsType() { return new SelectorQualifiedGetOptionsType(); }
/** * Create an instance of {@link SelectorQualifiedGetOptionsType } * */ public SelectorQualifiedGetOptionsType createSelectorQualifiedGetOptionsType() { return new SelectorQualifiedGetOptionsType(); }
public SelectorQualifiedGetOptionsType beginOptions() { SelectorQualifiedGetOptionsType value = new SelectorQualifiedGetOptionsType(); options(value); return value; }
public SelectorQualifiedGetOptionsType beginOptions() { SelectorQualifiedGetOptionsType value = new SelectorQualifiedGetOptionsType(); options(value); return value; }
public SelectorQualifiedGetOptionsType beginOptions() { SelectorQualifiedGetOptionsType value = new SelectorQualifiedGetOptionsType(); options(value); return value; }
public SelectorQualifiedGetOptionsType beginOptions() { SelectorQualifiedGetOptionsType value = new SelectorQualifiedGetOptionsType(); options(value); return value; }
public static SelectorQualifiedGetOptionsType optionsToOptionsType(Collection<SelectorOptions<GetOperationOptions>> options){ SelectorQualifiedGetOptionsType optionsType = new SelectorQualifiedGetOptionsType(); List<SelectorQualifiedGetOptionType> retval = new ArrayList<>(); for (SelectorOptions<GetOperationOptions> option: options){ retval.add(selectorOptionToSelectorQualifiedGetOptionType(option)); } optionsType.getOption().addAll(retval); return optionsType; }
public static SelectorQualifiedGetOptionsType createRootGetOptions(GetOperationOptionsType opt) { SelectorQualifiedGetOptionsType rootOpts = new SelectorQualifiedGetOptionsType(); SelectorQualifiedGetOptionType selOpt = new SelectorQualifiedGetOptionType(); selOpt.setOptions(opt); rootOpts.getOption().add(selOpt); return rootOpts; }
@Test(expectedExceptions = FaultMessage.class) public void testGetEmptyOid() throws FaultMessage { try { modelService.getObject(UserType.COMPLEX_TYPE, "", new SelectorQualifiedGetOptionsType(), new Holder<>(), new Holder<>()); } catch (FaultMessage ex) { ModelTUtil.assertIllegalArgumentFault(ex); } Assert.fail("get must fail"); }
@Test(expectedExceptions = FaultMessage.class) public void testGetNullOid() throws FaultMessage { try { modelService.getObject(UserType.COMPLEX_TYPE, null, new SelectorQualifiedGetOptionsType(), new Holder<>(), new Holder<>()); } catch (FaultMessage ex) { ModelTUtil.assertIllegalArgumentFault(ex); } Assert.fail("get must fail"); }
@Test(expectedExceptions = FaultMessage.class) public void getNonexistingObject() throws FaultMessage, ObjectNotFoundException, SchemaException, IOException, JAXBException { final UserType expectedUser = (UserType) PrismTestUtil.parseObject(new File(TEST_FOLDER_CONTROLLER, "./addObject/add-user-without-name.xml")).asObjectable(); setSecurityContext(expectedUser); try { final String oid = "abababab-abab-abab-abab-000000000001"; when( repositoryService.getObject(any(Class.class), eq(oid), any(Collection.class), any(OperationResult.class))).thenThrow( new ObjectNotFoundException("Object with oid '" + oid + "' not found.")); modelService.getObject(UserType.COMPLEX_TYPE, oid, new SelectorQualifiedGetOptionsType(), new Holder<>(), new Holder<>()); } catch (FaultMessage ex) { ModelTUtil.assertObjectNotFoundFault(ex); } finally { SecurityContextHolder.getContext().setAuthentication(null); } Assert.fail("get must fail"); }
@Test public void test480ListResources() throws Exception { final String TEST_NAME = "test480ListResources"; displayTestTitle(TEST_NAME); // GIVEN OperationResultType result = new OperationResultType(); Holder<OperationResultType> resultHolder = new Holder<>(result); Holder<ObjectListType> objectListHolder = new Holder<>(); SelectorQualifiedGetOptionsType options = new SelectorQualifiedGetOptionsType(); // WHEN modelWeb.searchObjects(ObjectTypes.RESOURCE.getTypeQName(), null, options, objectListHolder, resultHolder); // THEN display("Resources", objectListHolder.value); assertEquals("Unexpected number of resources", 4, objectListHolder.value.getObject().size()); // TODO for(ObjectType object: objectListHolder.value.getObject()) { // Marshalling may fail even though the Java object is OK so test for it String xml = prismContext.serializeObjectToString(object.asPrismObject(), PrismContext.LANG_XML); } }
@Override public boolean check() throws CommonException { Holder<OperationResultType> resultHolder = new Holder<>(); Holder<ObjectType> objectHolder = new Holder<>(); OperationResult opResult = new OperationResult("import check"); assertNoRepoCache(); SelectorQualifiedGetOptionsType options = new SelectorQualifiedGetOptionsType(); try { modelWeb.getObject(ObjectTypes.TASK.getTypeQName(), taskOid, options, objectHolder, resultHolder); } catch (FaultMessage faultMessage) { throw new SystemException(faultMessage); } assertNoRepoCache(); // display("getObject result (wait loop)",resultHolder.value); TestUtil.assertSuccess("getObject has failed", resultHolder.value); Task task = taskManager.createTaskInstance((PrismObject<TaskType>) objectHolder.value.asPrismObject(), opResult); System.out.println(new Date() + ": Import task status: " + task.getExecutionStatus() + ", progress: " + task.getProgress()); if (task.getExecutionStatus() == TaskExecutionStatus.CLOSED) { // Task closed, wait finished return true; } // IntegrationTestTools.display("Task result while waiting: ", task.getResult()); return false; }
private ShadowType searchAccountByOid(final String accountOid) throws Exception { OperationResultType resultType = new OperationResultType(); Holder<OperationResultType> resultHolder = new Holder<>(resultType); Holder<ObjectType> accountHolder = new Holder<>(); SelectorQualifiedGetOptionsType options = new SelectorQualifiedGetOptionsType(); modelWeb.getObject(ObjectTypes.SHADOW.getTypeQName(), accountOid, options, accountHolder, resultHolder); ObjectType object = accountHolder.value; TestUtil.assertSuccess("searchObjects has failed", resultHolder.value); assertNotNull("Account is null", object); if (!(object instanceof ShadowType)) { fail("Object is not account."); } ShadowType account = (ShadowType) object; assertEquals(accountOid, account.getOid()); return account; }
SelectorQualifiedGetOptionsType options = new SelectorQualifiedGetOptionsType ();
SelectorQualifiedGetOptionsType options = new SelectorQualifiedGetOptionsType();
SelectorQualifiedGetOptionsType options = new SelectorQualifiedGetOptionsType(); assertNoRepoCache();
SelectorQualifiedGetOptionsType options = new SelectorQualifiedGetOptionsType();
SelectorQualifiedGetOptionsType options = new SelectorQualifiedGetOptionsType(); assertNoRepoCache();