use of pro.taskana.ClassificationService in project taskana by Taskana.
the class ClassificationQueryAccTest method testFindClassificationsByDomainAdmin.
@WithAccessId(userName = "admin")
@Test
public void testFindClassificationsByDomainAdmin() throws SQLException, ClassificationNotFoundException, NotAuthorizedException, InvalidArgumentException {
ClassificationService classificationService = taskanaEngine.getClassificationService();
List<ClassificationSummary> classificationSummaryList = classificationService.createClassificationQuery().domainIn("DOMAIN_A").list();
assertNotNull(classificationSummaryList);
assertEquals(17, classificationSummaryList.size());
}
use of pro.taskana.ClassificationService in project taskana by Taskana.
the class QueryClassificationAccTest method testGetClassificationsWithParentKey.
@Test
public void testGetClassificationsWithParentKey() throws SQLException, ClassificationNotFoundException, NotAuthorizedException, InvalidArgumentException {
ClassificationService classificationService = taskanaEngine.getClassificationService();
List<ClassificationSummary> classifications = classificationService.createClassificationQuery().keyIn("A12", "A13").categoryIn("EXTERNAL", "MANUAL").parentIdIn("CLI:100000000000000000000000000000000014").list();
assertNotNull(classifications);
assertEquals(1, classifications.size());
classifications = classificationService.createClassificationQuery().keyIn("A12", "A13").categoryIn("EXTERNAL", "MANUAL", "AUTOMATIC").parentIdIn("CLI:100000000000000000000000000000000014", "CLI:100000000000000000000000000000000010", "CLI:100000000000000000000000000000000011").domainIn("DOMAIN_A").list();
assertNotNull(classifications);
assertEquals(2, classifications.size());
}
use of pro.taskana.ClassificationService in project taskana by Taskana.
the class QueryClassificationAccTest method testQueryClassificationValuesForColumnName.
@Test
public void testQueryClassificationValuesForColumnName() throws SQLException, ClassificationNotFoundException, NotAuthorizedException, InvalidArgumentException {
ClassificationService classificationService = taskanaEngine.getClassificationService();
List<String> columnValueList = classificationService.createClassificationQuery().listValues("NAME", null);
assertNotNull(columnValueList);
assertEquals(15, columnValueList.size());
columnValueList = classificationService.createClassificationQuery().listValues("TYPE", null);
assertNotNull(columnValueList);
assertEquals(3, columnValueList.size());
columnValueList = classificationService.createClassificationQuery().domainIn("").listValues("TYPE", null);
assertNotNull(columnValueList);
assertEquals(2, columnValueList.size());
columnValueList = classificationService.createClassificationQuery().domainIn("").listValues("CREATED", null);
assertNotNull(columnValueList);
columnValueList = classificationService.createClassificationQuery().domainIn("").validInDomainEquals(false).listValues("VALID_IN_DOMAIN", null);
assertNotNull(columnValueList);
// all are false in ""
assertEquals(1, columnValueList.size());
}
use of pro.taskana.ClassificationService in project taskana by Taskana.
the class QueryClassificationAccTest method testFindClassificationsByCreatedTimestamp.
@Test
public void testFindClassificationsByCreatedTimestamp() throws SQLException, ClassificationNotFoundException, NotAuthorizedException, InvalidArgumentException {
ClassificationService classificationService = taskanaEngine.getClassificationService();
List<ClassificationSummary> classificationSummaryList = classificationService.createClassificationQuery().domainIn("DOMAIN_A").createdWithin(todaysInterval()).list();
assertNotNull(classificationSummaryList);
assertEquals(17, classificationSummaryList.size());
}
use of pro.taskana.ClassificationService in project taskana by Taskana.
the class QueryClassificationAccTest method testFindClassificationsByCategoryAndDomain.
@Test
public void testFindClassificationsByCategoryAndDomain() throws SQLException, ClassificationNotFoundException, NotAuthorizedException, InvalidArgumentException {
ClassificationService classificationService = taskanaEngine.getClassificationService();
List<ClassificationSummary> classificationSummaryList = classificationService.createClassificationQuery().categoryIn("MANUAL").domainIn("DOMAIN_A").list();
assertNotNull(classificationSummaryList);
assertEquals(2, classificationSummaryList.size());
}
Aggregations