use of org.camunda.bpm.engine.impl.persistence.entity.ResourceManager in project camunda-bpm-platform by camunda.
the class DeployCmd method getResourcesByName.
protected List<ResourceEntity> getResourcesByName(Map<String, Set<String>> resourcesByName, CommandContext commandContext) {
List<ResourceEntity> result = new ArrayList<ResourceEntity>();
ResourceManager resourceManager = commandContext.getResourceManager();
for (String deploymentId : resourcesByName.keySet()) {
Set<String> resourceNames = resourcesByName.get(deploymentId);
String[] resourceNameArray = resourceNames.toArray(new String[resourceNames.size()]);
List<ResourceEntity> resources = resourceManager.findResourceByDeploymentIdAndResourceNames(deploymentId, resourceNameArray);
ensureResourcesWithNamesExist(deploymentId, resourceNames, resources);
result.addAll(resources);
}
return result;
}
use of org.camunda.bpm.engine.impl.persistence.entity.ResourceManager in project camunda-bpm-platform by camunda.
the class DeployCmd method getResourcesById.
protected List<ResourceEntity> getResourcesById(Map<String, Set<String>> resourcesById, CommandContext commandContext) {
List<ResourceEntity> result = new ArrayList<ResourceEntity>();
ResourceManager resourceManager = commandContext.getResourceManager();
for (String deploymentId : resourcesById.keySet()) {
Set<String> resourceIds = resourcesById.get(deploymentId);
String[] resourceIdArray = resourceIds.toArray(new String[resourceIds.size()]);
List<ResourceEntity> resources = resourceManager.findResourceByDeploymentIdAndResourceIds(deploymentId, resourceIdArray);
ensureResourcesWithIdsExist(deploymentId, resourceIds, resources);
result.addAll(resources);
}
return result;
}
Aggregations