use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.
the class TestWarDeploymentWithMultiplePasAsSubdeployment2 method assertProcessDeployed.
protected void assertProcessDeployed(String processKey, String expectedDeploymentName) {
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().latestVersion().processDefinitionKey(processKey).singleResult();
DeploymentQuery deploymentQuery = repositoryService.createDeploymentQuery().deploymentId(processDefinition.getDeploymentId());
Assert.assertEquals(expectedDeploymentName, deploymentQuery.singleResult().getName());
}
use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.
the class DeploymentAuthorizationTest method testDeleteDeploymentWithDeletePermissionOnAnyDeployment.
public void testDeleteDeploymentWithDeletePermissionOnAnyDeployment() {
// given
String deploymentId = createDeployment(null);
createGrantAuthorization(DEPLOYMENT, ANY, userId, DELETE);
// when
repositoryService.deleteDeployment(deploymentId);
// then
disableAuthorization();
DeploymentQuery query = repositoryService.createDeploymentQuery();
verifyQueryResults(query, 0);
enableAuthorization();
deleteDeployment(deploymentId);
}
use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.
the class DeploymentAuthorizationTest method testDeploymentQueryWithReadPermissionOnDeployment.
public void testDeploymentQueryWithReadPermissionOnDeployment() {
// given
String deploymentId1 = createDeployment("first");
String deploymentId2 = createDeployment("second");
createGrantAuthorization(DEPLOYMENT, deploymentId1, userId, READ);
// when
DeploymentQuery query = repositoryService.createDeploymentQuery();
// then
verifyQueryResults(query, 1);
deleteDeployment(deploymentId1);
deleteDeployment(deploymentId2);
}
use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.
the class DeploymentAuthorizationTest method testSimpleDeploymentQueryWithReadPermissionOnAnyDeployment.
public void testSimpleDeploymentQueryWithReadPermissionOnAnyDeployment() {
// given
String deploymentId = createDeployment(null);
createGrantAuthorization(DEPLOYMENT, ANY, userId, READ);
// when
DeploymentQuery query = repositoryService.createDeploymentQuery();
// then
verifyQueryResults(query, 1);
deleteDeployment(deploymentId);
}
use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.
the class DeploymentAuthorizationTest method testSimpleDeploymentQueryWithoutAuthorization.
// query ////////////////////////////////////////////////////////////
public void testSimpleDeploymentQueryWithoutAuthorization() {
// given
String deploymentId = createDeployment(null);
// when
DeploymentQuery query = repositoryService.createDeploymentQuery();
// then
verifyQueryResults(query, 0);
deleteDeployment(deploymentId);
}
Aggregations