List<ManagedDeployment> deployments = new ArrayList<ManagedDeployment>();
// Check the file name
if(this.managedDeployments.containsKey(name))
{
ManagedDeployment md = this.managedDeployments.get(name);
if(md != null)
deployments.add(md);
}
else
{
// Look for a simple name
for(String deployment : this.rootDeployments)
{
String fixedDeploymentName = deployment;
if(deployment.endsWith("/"))
fixedDeploymentName = deployment.substring(0, deployment.length() - 1);
if(fixedDeploymentName.endsWith(name))
{
ManagedDeployment md = this.managedDeployments.get(deployment);
if(md != null)
deployments.add(md);
}
}
}