private List<AccessCertificationCaseType> getCertificationCampaignCasesAsBeans(String campaignName) throws SchemaException, SecurityViolationException, ConfigurationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException { Task task = taskManager.createTaskInstance(); ObjectQuery query; if (StringUtils.isEmpty(campaignName)) { //query = null; return new ArrayList<>(); } else { query = prismContext.queryFor(AccessCertificationCaseType.class) .item(PrismConstants.T_PARENT, F_NAME).eqPoly(campaignName, "").matchingOrig() // TODO first by object/target type then by name (not supported by the repository as of now) .asc(AccessCertificationCaseType.F_OBJECT_REF, PrismConstants.T_OBJECT_REFERENCE, ObjectType.F_NAME) .asc(AccessCertificationCaseType.F_TARGET_REF, PrismConstants.T_OBJECT_REFERENCE, ObjectType.F_NAME) .build(); } Collection<SelectorOptions<GetOperationOptions>> options = SelectorOptions.createCollection(GetOperationOptions.createResolveNames()); return model.searchContainers(AccessCertificationCaseType.class, query, options, task, task.getResult()); }
private List<AccessCertificationCaseType> getCertificationCampaignNotRespondedCasesAsBeans(String campaignName) throws SchemaException, SecurityViolationException, ConfigurationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException { Task task = taskManager.createTaskInstance(); ObjectQuery query; if (StringUtils.isEmpty(campaignName)) { //query = null; return new ArrayList<>(); } else { query = prismContext.queryFor(AccessCertificationCaseType.class) .item(PrismConstants.T_PARENT, F_NAME).eqPoly(campaignName, "").matchingOrig() .and().item(AccessCertificationCaseType.F_CURRENT_STAGE_OUTCOME).eq(SchemaConstants.MODEL_CERTIFICATION_OUTCOME_NO_RESPONSE) // TODO first by object/target type then by name (not supported by the repository as of now) .asc(AccessCertificationCaseType.F_OBJECT_REF, PrismConstants.T_OBJECT_REFERENCE, ObjectType.F_NAME) .asc(AccessCertificationCaseType.F_TARGET_REF, PrismConstants.T_OBJECT_REFERENCE, ObjectType.F_NAME) .build(); } Collection<SelectorOptions<GetOperationOptions>> options = SelectorOptions.createCollection(GetOperationOptions.createResolveNames()); return model.searchContainers(AccessCertificationCaseType.class, query, options, task, task.getResult()); }
.item(F_ASSIGNEE_REF).ref("oid1", "oid2") .and().item(F_CLOSE_TIMESTAMP).isNull() .asc(PrismConstants.T_PARENT, F_CURRENT_STAGE_DEADLINE).asc(T_ID) .build();
.item(F_WORK_ITEM, F_ASSIGNEE_REF).ref(assigneeRef) .and().item(AccessCertificationCaseType.F_STAGE_NUMBER).eq().item(T_PARENT, AccessCertificationCampaignType.F_STAGE_NUMBER) .asc(F_CURRENT_STAGE_DEADLINE).asc(T_ID) .build();