@Override public Collection<String> filter(String pattern, Collection<String> identifiers) { Collection<String> filtered = new ArrayList<String>(); String found = DeploymentIdResolver.matchAndReturnLatest(pattern, identifiers); if (found != null && !found.equals(pattern)) { filtered.add(found); } return filtered; }
@Override public RuntimeManager getRuntimeManager(String deploymentUnitId) { if (deploymentUnitId != null && deploymentsMap.containsKey(deploymentUnitId)) { return deploymentsMap.get(deploymentUnitId).getRuntimeManager(); } else if (deploymentUnitId != null && deploymentUnitId.toLowerCase().contains("latest")) { String matched = DeploymentIdResolver.matchAndReturnLatest(deploymentUnitId, deploymentsMap.keySet()); return deploymentsMap.get(matched).getRuntimeManager(); } return null; }
@Override public DeployedUnit getDeployedUnit(String deploymentUnitId) { DeployedUnit deployedUnit = null; if (deploymentsMap.containsKey(deploymentUnitId)) { deployedUnit = deploymentsMap.get(deploymentUnitId); } else if (deploymentUnitId != null && deploymentUnitId.toLowerCase().contains("latest")) { String matched = DeploymentIdResolver.matchAndReturnLatest(deploymentUnitId, deploymentsMap.keySet()); deployedUnit = deploymentsMap.get(matched); } return deployedUnit; }