@Test(expectedExceptions = FaultMessage.class) public void emptyAccountOidListAccountShadowOwner() throws FaultMessage { try { modelService.findShadowOwner("", new Holder<UserType>(), new Holder<OperationResultType>()); } catch (FaultMessage ex) { ModelTUtil.assertIllegalArgumentFault(ex); } Assert.fail("Illegal argument exception must be thrown"); }
@Override public void findShadowOwner(String accountOid, Holder<UserType> userHolder, Holder<OperationResultType> result) throws FaultMessage { notEmptyArgument(accountOid, "Account oid must not be null or empty."); Task task = createTaskInstance(LIST_ACCOUNT_SHADOW_OWNER); auditLogin(task); OperationResult operationResult = task.getResult(); try { PrismObject<UserType> user = model.findShadowOwner(accountOid, task, operationResult); handleOperationResult(operationResult, result); if (user != null) { userHolder.value = user.asObjectable(); } return; } catch (Exception ex) { LoggingUtils.logException(LOGGER, "# MODEL findShadowOwner() failed", ex); throwFault(ex, operationResult); } finally { auditLogout(task); } }
ModelWebService extends AbstractModelWebService implements ModelPortType, ModelPort { @Override public void findShadowOwner(String accountOid, Holder<UserType> userHolder, Holder<OperationResultType> result) throws FaultMessage { notEmptyArgument(accountOid, "Account oid must not be null or empty."); Task task = createTaskInstance(LIST_ACCOUNT_SHADOW_OWNER); auditLogin(task); OperationResult operationResult = task.getResult(); try { PrismObject<UserType> user = model.findShadowOwner(accountOid, task, operationResult); handleOperationResult(operationResult, result); if (user != null) { userHolder.value = user.asObjectable(); } return; } catch (Exception ex) { LoggingUtils.logException(LOGGER, "# MODEL findShadowOwner() failed", ex); throwFault(ex, operationResult); } finally { auditLogout(task); } } }
ModelWebService extends AbstractModelWebService implements ModelPortType, ModelPort { @Override public void findShadowOwner(String accountOid, Holder<UserType> userHolder, Holder<OperationResultType> result) throws FaultMessage { notEmptyArgument(accountOid, "Account oid must not be null or empty."); Task task = createTaskInstance(LIST_ACCOUNT_SHADOW_OWNER); auditLogin(task); OperationResult operationResult = task.getResult(); try { PrismObject<UserType> user = model.findShadowOwner(accountOid, task, operationResult); handleOperationResult(operationResult, result); if (user != null) { userHolder.value = user.asObjectable(); } return; } catch (Exception ex) { LoggingUtils.logException(LOGGER, "# MODEL findShadowOwner() failed", ex); throwFault(ex, operationResult); } finally { auditLogout(task); } }  }
ModelWebService extends AbstractModelWebService implements ModelPortType, ModelPort { @Override public void findShadowOwner(String accountOid, Holder<UserType> userHolder, Holder<OperationResultType> result) throws FaultMessage { notEmptyArgument(accountOid, "Account oid must not be null or empty."); Task task = createTaskInstance(LIST_ACCOUNT_SHADOW_OWNER); auditLogin(task); OperationResult operationResult = task.getResult(); try { PrismObject<UserType> user = model.findShadowOwner(accountOid, task, operationResult); handleOperationResult(operationResult, result); if (user != null) { userHolder.value = user.asObjectable(); } return; } catch (Exception ex) { LoggingUtils.logException(LOGGER, "# MODEL findShadowOwner() failed", ex); throwFault(ex, operationResult); } finally { auditLogout(task); } }  @Override void getObject(QName objectType, String oid, SelectorQualifiedGetOptionsType optionsType,
			Holder<ObjectType> objectHolder, Holder<OperationResultType> resultHolder); @Override void searchObjects(QName objectType, QueryType query, SelectorQualifiedGetOptionsType optionsType,
                  Holder<ObjectListType> objectListHolder, Holder<OperationResultType> result); @Override ObjectDeltaOperationListType executeChanges(ObjectDeltaListType deltaList, ModelExecuteOptionsType optionsType); @Override void findShadowOwner(String accountOid, Holder<UserType> userHolder, Holder<OperationResultType> result); @Override OperationResultType testResource(String resourceOid); @Override ExecuteScriptsResponseType executeScripts(ExecuteScriptsType parameters); static PipelineDataType prepareXmlData(List<PipelineItem> output,
			ScriptingExpressionEvaluationOptionsType options); FaultMessage createIllegalArgumentFault(String message); void throwFault(Throwable ex, OperationResult result); @Override TaskType importFromResource(String resourceOid, QName objectClass); @Override TaskType notifyChange(ResourceObjectShadowChangeDescriptionType changeDescription); }
ModelWebService extends AbstractModelWebService implements ModelPortType, ModelPort { @Override public void findShadowOwner(String accountOid, Holder<UserType> userHolder, Holder<OperationResultType> result) throws FaultMessage { notEmptyArgument(accountOid, "Account oid must not be null or empty."); Task task = createTaskInstance(LIST_ACCOUNT_SHADOW_OWNER); auditLogin(task); OperationResult operationResult = task.getResult(); try { PrismObject<UserType> user = model.findShadowOwner(accountOid, task, operationResult); handleOperationResult(operationResult, result); if (user != null) { userHolder.value = user.asObjectable(); } return; } catch (Exception ex) { LoggingUtils.logException(LOGGER, "# MODEL findShadowOwner() failed", ex); throwFault(ex, operationResult); } finally { auditLogout(task); } }  @Override void getObject(QName objectType, String oid, SelectorQualifiedGetOptionsType optionsType,
			Holder<ObjectType> objectHolder, Holder<OperationResultType> resultHolder); @Override void searchObjects(QName objectType, QueryType query, SelectorQualifiedGetOptionsType optionsType,
                  Holder<ObjectListType> objectListHolder, Holder<OperationResultType> result); @Override ObjectDeltaOperationListType executeChanges(ObjectDeltaListType deltaList, ModelExecuteOptionsType optionsType); @Override void findShadowOwner(String accountOid, Holder<UserType> userHolder, Holder<OperationResultType> result); @Override OperationResultType testResource(String resourceOid); @Override ExecuteScriptsResponseType executeScripts(ExecuteScriptsType parameters); static PipelineDataType prepareXmlData(List<PipelineItem> output,
			ScriptingExpressionEvaluationOptionsType options); FaultMessage createIllegalArgumentFault(String message); void throwFault(Throwable ex, OperationResult result); @Override TaskType importFromResource(String resourceOid, QName objectClass); @Override TaskType notifyChange(ResourceObjectShadowChangeDescriptionType changeDescription);  }