* @param serviceAssemblyName
* @return
*/
public String listServiceAssemblies(String state, String componentName, String serviceAssemblyName) throws Exception {
List<ServiceAssembly> assemblies = new ArrayList<ServiceAssembly>();
Component component = null;
if (StringUtils.hasLength(componentName)) {
component = deployer.getComponent(componentName);
}
for (ServiceAssembly sa : deployer.getServiceAssemblies().values()) {
boolean match = true;
if (StringUtils.hasLength(serviceAssemblyName)) {
match = serviceAssemblyName.equals(sa.getName());
}
if (match && StringUtils.hasLength(state)) {
match = state.equalsIgnoreCase(sa.getCurrentState());
}
if (match && StringUtils.hasLength(componentName)) {
match = false;
if (component != null) {
for (ServiceUnit su : component.getServiceUnits()) {
if (sa.getName().equals(su.getServiceAssembly().getName())) {
match = true;
break;
}
}