Tabnine Logo
DeploymentQuery.count
Code IndexAdd Tabnine to your IDE (free)

How to use
count
method
in
org.camunda.bpm.engine.repository.DeploymentQuery

Best Java code snippets using org.camunda.bpm.engine.repository.DeploymentQuery.count (Showing top 20 results out of 315)

origin: camunda/camunda-bpm-platform

private DeploymentQuery setUpMockDeploymentQuery(List<Deployment> mockedDeployments) {
 DeploymentQuery sampleDeploymentQuery = mock(DeploymentQuery.class);
 when(sampleDeploymentQuery.list()).thenReturn(mockedDeployments);
 when(sampleDeploymentQuery.count()).thenReturn((long) mockedDeployments.size());
 when(processEngine.getRepositoryService().createDeploymentQuery()).thenReturn(sampleDeploymentQuery);
 return sampleDeploymentQuery;
}
origin: camunda/camunda-bpm-platform

public CountResultDto getDeploymentsCount(UriInfo uriInfo) {
 DeploymentQueryDto queryDto = new DeploymentQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
 ProcessEngine engine = getProcessEngine();
 DeploymentQuery query = queryDto.toQuery(engine);
 long count = query.count();
 CountResultDto result = new CountResultDto();
 result.setCount(count);
 return result;
}
origin: camunda/camunda-bpm-platform

public void testQueryAuthenticatedTenants() {
 identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE, TENANT_TWO));
 DeploymentQuery query = repositoryService.createDeploymentQuery();
 assertThat(query.count(), is(3L));
 assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
 assertThat(query.tenantIdIn(TENANT_TWO).count(), is(1L));
 assertThat(query.withoutTenantId().count(), is(1L));
}
origin: camunda/camunda-bpm-platform

public void testQueryAuthenticatedTenant() {
 identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE));
 DeploymentQuery query = repositoryService.createDeploymentQuery();
 assertThat(query.count(), is(2L));
 assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
 assertThat(query.tenantIdIn(TENANT_TWO).count(), is(0L));
 assertThat(query.tenantIdIn(TENANT_ONE, TENANT_TWO).includeDeploymentsWithoutTenantId().count(), is(2L));
}
origin: camunda/camunda-bpm-platform

public void testQueryByTenantId() {
 DeploymentQuery query = repositoryService
   .createDeploymentQuery()
   .tenantIdIn(TENANT_ONE);
 assertThat(query.count(), is(1L));
 query = repositoryService
   .createDeploymentQuery()
   .tenantIdIn(TENANT_TWO);
 assertThat(query.count(), is(1L));
}
origin: camunda/camunda-bpm-platform

public void testQueryWithoutTenantId() {
 DeploymentQuery query = repositoryService
   .createDeploymentQuery()
   .withoutTenantId();
 assertThat(query.count(), is(1L));
}
origin: camunda/camunda-bpm-platform

public void testQueryByTenantIds() {
 DeploymentQuery query = repositoryService
   .createDeploymentQuery()
   .tenantIdIn(TENANT_ONE, TENANT_TWO);
 assertThat(query.count(), is(2L));
}
origin: camunda/camunda-bpm-platform

public void testQueryNoAuthenticatedTenants() {
 identityService.setAuthentication("user", null, null);
 DeploymentQuery query = repositoryService.createDeploymentQuery();
 assertThat(query.count(), is(1L));
}
origin: camunda/camunda-bpm-platform

public void testQueryDisabledTenantCheck() {
 processEngineConfiguration.setTenantCheckEnabled(false);
 identityService.setAuthentication("user", null, null);
 DeploymentQuery query = repositoryService.createDeploymentQuery();
 assertThat(query.count(), is(3L));
}
origin: camunda/camunda-bpm-platform

@Test
public void testQueryCount() {
 expect().statusCode(Status.OK.getStatusCode())
  .body("count", equalTo(1))
  .when().get(DEPLOYMENT_COUNT_QUERY_URL);
 verify(mockedQuery).count();
}
origin: camunda/camunda-bpm-platform

@Test
public void createDeploymentWithAuthenticatedTenant() {
 identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE));
 repositoryService.createDeployment().addModelInstance("emptyProcess.bpmn", emptyProcess)
  .tenantId(TENANT_ONE).deploy();
 identityService.clearAuthentication();
 DeploymentQuery query = repositoryService.createDeploymentQuery();
 assertThat(query.count(), is(1L));
 assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
}
origin: camunda/camunda-bpm-platform

public void testQueryBySource() {
 DeploymentQuery query = repositoryService
   .createDeploymentQuery()
   .deploymentSource(ProcessApplicationDeployment.PROCESS_APPLICATION_DEPLOYMENT_SOURCE);
 assertEquals(1, query.list().size());
 assertEquals(1, query.count());
}
origin: camunda/camunda-bpm-platform

public void testQueryByNullSource() {
 DeploymentQuery query = repositoryService
   .createDeploymentQuery()
   .deploymentSource(null);
 assertEquals(1, query.list().size());
 assertEquals(1, query.count());
}
origin: camunda/camunda-bpm-platform

@Test
public void createDeploymentForAnotherTenant() {
 identityService.setAuthentication("user", null, null);
 repositoryService.createDeployment().addModelInstance("emptyProcess.bpmn", emptyProcess)
  .tenantId(TENANT_ONE).deploy();
 identityService.clearAuthentication();
 DeploymentQuery query = repositoryService.createDeploymentQuery();
 assertThat(query.count(), is(1L));
 assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
}
origin: camunda/camunda-bpm-platform

@Test
public void createDeploymentDisabledTenantCheck() {
 processEngineConfiguration.setTenantCheckEnabled(false);
 identityService.setAuthentication("user", null, null);
 repositoryService.createDeployment().addModelInstance("emptyProcessOne", emptyProcess).tenantId(TENANT_ONE).deploy();
 repositoryService.createDeployment().addModelInstance("emptyProcessTwo", startEndProcess).tenantId(TENANT_TWO).deploy();
 DeploymentQuery query = repositoryService.createDeploymentQuery();
 assertThat(query.count(), is(2L));
 assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
 assertThat(query.tenantIdIn(TENANT_TWO).count(), is(1L));
}
origin: camunda/camunda-bpm-platform

public void testQueryByName() {
 DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentName("org/camunda/bpm/engine/test/repository/two_.bpmn20.xml");
 assertNotNull(query.singleResult());
 assertEquals(1, query.list().size());
 assertEquals(1, query.count());
}
origin: camunda/camunda-bpm-platform

public void testQueryByDeploymentId() {
 DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentId(deploymentOneId);
 assertNotNull(query.singleResult());
 assertEquals(1, query.list().size());
 assertEquals(1, query.count());
}
origin: camunda/camunda-bpm-platform

@Test
@OperateOnDeployment("checker")
public void test() {
 
 // make sure the deployment of the first app was rolled back
 
 long count = processEngine.getRepositoryService()
  .createDeploymentQuery()
  .count();
 
 Assert.assertEquals(1, count);
   }

origin: camunda/camunda-bpm-platform

public void testQueryByInvalidDeploymentId() {
 DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentId("invalid");
 assertNull(query.singleResult());
 assertEquals(0, query.list().size());
 assertEquals(0, query.count());
 try {
  repositoryService.createDeploymentQuery().deploymentId(null);
  fail();
 } catch (ProcessEngineException e) {}
}
origin: camunda/camunda-bpm-platform

public void testQueryByInvalidNameLike() {
 DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentNameLike("invalid");
 assertNull(query.singleResult());
 assertEquals(0, query.list().size());
 assertEquals(0, query.count());
 try {
  repositoryService.createDeploymentQuery().deploymentNameLike(null);
  fail();
 } catch (ProcessEngineException e) {}
}
org.camunda.bpm.engine.repositoryDeploymentQuerycount

Popular methods of DeploymentQuery

  • list
  • singleResult
  • deploymentId
    Only select deployments with the given deployment id.
  • deploymentName
    Only select deployments with the given name.
  • deploymentAfter
    Only select deployments deployed after the given date
  • deploymentBefore
    Only select deployments deployed before the given date
  • deploymentNameLike
    Only select deployments with a name like the given string.
  • deploymentSource
    If the given source is null, then deployments are returned where source is equal to null. Otherwise
  • includeDeploymentsWithoutTenantId
    Select deployments which have no tenant id. Can be used in combination with #tenantIdIn(String...).
  • orderByDeploymentId
    Order by deployment id (needs to be followed by #asc() or #desc()).
  • orderByDeploymentName
    Order by deployment name (needs to be followed by #asc() or #desc()).
  • orderByDeploymentTime
    Order by deployment time (needs to be followed by #asc() or #desc()).
  • orderByDeploymentName,
  • orderByDeploymentTime,
  • orderByTenantId,
  • tenantIdIn,
  • withoutTenantId,
  • listPage,
  • asc,
  • desc,
  • orderByDeploymenTime

Popular in Java

  • Finding current android device location
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • requestLocationUpdates (LocationManager)
  • getExternalFilesDir (Context)
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • JComboBox (javax.swing)
  • JFrame (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now