use of org.camunda.bpm.engine.impl.cmd.GetDeploymentResourceCmd in project camunda-bpm-platform by camunda.
the class GetDeploymentDecisionModelCmd method execute.
public InputStream execute(final CommandContext commandContext) {
DecisionDefinition decisionDefinition = new GetDeploymentDecisionDefinitionCmd(decisionDefinitionId).execute(commandContext);
final String deploymentId = decisionDefinition.getDeploymentId();
final String resourceName = decisionDefinition.getResourceName();
return commandContext.runWithoutAuthorization(new Callable<InputStream>() {
public InputStream call() throws Exception {
return new GetDeploymentResourceCmd(deploymentId, resourceName).execute(commandContext);
}
});
}
use of org.camunda.bpm.engine.impl.cmd.GetDeploymentResourceCmd in project camunda-bpm-platform by camunda.
the class GetDeploymentDecisionDiagramCmd method execute.
public InputStream execute(final CommandContext commandContext) {
DecisionDefinition decisionDefinition = new GetDeploymentDecisionDefinitionCmd(decisionDefinitionId).execute(commandContext);
final String deploymentId = decisionDefinition.getDeploymentId();
final String resourceName = decisionDefinition.getDiagramResourceName();
if (resourceName != null) {
return commandContext.runWithoutAuthorization(new Callable<InputStream>() {
public InputStream call() throws Exception {
return new GetDeploymentResourceCmd(deploymentId, resourceName).execute(commandContext);
}
});
} else {
return null;
}
}
use of org.camunda.bpm.engine.impl.cmd.GetDeploymentResourceCmd in project camunda-bpm-platform by camunda.
the class GetDeploymentCaseDiagramCmd method execute.
@Override
public InputStream execute(final CommandContext commandContext) {
CaseDefinitionEntity caseDefinition = Context.getProcessEngineConfiguration().getDeploymentCache().findDeployedCaseDefinitionById(caseDefinitionId);
for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) {
checker.checkReadCaseDefinition(caseDefinition);
}
final String deploymentId = caseDefinition.getDeploymentId();
final String resourceName = caseDefinition.getDiagramResourceName();
InputStream caseDiagramStream = null;
if (resourceName != null) {
caseDiagramStream = commandContext.runWithoutAuthorization(new Callable<InputStream>() {
public InputStream call() throws Exception {
return new GetDeploymentResourceCmd(deploymentId, resourceName).execute(commandContext);
}
});
}
return caseDiagramStream;
}
use of org.camunda.bpm.engine.impl.cmd.GetDeploymentResourceCmd in project camunda-bpm-platform by camunda.
the class GetDeploymentCaseModelCmd method execute.
public InputStream execute(final CommandContext commandContext) {
ensureNotNull("caseDefinitionId", caseDefinitionId);
CaseDefinitionEntity caseDefinition = Context.getProcessEngineConfiguration().getDeploymentCache().findDeployedCaseDefinitionById(caseDefinitionId);
for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) {
checker.checkReadCaseDefinition(caseDefinition);
}
final String deploymentId = caseDefinition.getDeploymentId();
final String resourceName = caseDefinition.getResourceName();
InputStream inputStream = commandContext.runWithoutAuthorization(new Callable<InputStream>() {
public InputStream call() throws Exception {
return new GetDeploymentResourceCmd(deploymentId, resourceName).execute(commandContext);
}
});
return inputStream;
}
use of org.camunda.bpm.engine.impl.cmd.GetDeploymentResourceCmd in project camunda-bpm-platform by camunda.
the class GetDeploymentDecisionRequirementsModelCmd method execute.
public InputStream execute(final CommandContext commandContext) {
DecisionRequirementsDefinition decisionRequirementsDefinition = new GetDeploymentDecisionRequirementsDefinitionCmd(decisionRequirementsDefinitionId).execute(commandContext);
final String deploymentId = decisionRequirementsDefinition.getDeploymentId();
final String resourceName = decisionRequirementsDefinition.getResourceName();
return commandContext.runWithoutAuthorization(new Callable<InputStream>() {
public InputStream call() throws Exception {
return new GetDeploymentResourceCmd(deploymentId, resourceName).execute(commandContext);
}
});
}
Aggregations