Пример #1
0
 public boolean canDeployToComponent(String componentName) {
   Component comp = this.registry.getComponent(componentName);
   if (comp != null) {
     // TODO: check component state
     ServiceUnitManager mgr = comp.getComponent().getServiceUnitManager();
     return mgr != null;
   }
   return false;
 }
Пример #2
0
 public boolean isDeployedServiceUnit(String componentName, String suName) throws Exception {
   Component comp = this.registry.getComponent(componentName);
   if (comp != null) {
     Unit[] units = comp.getUnits();
     for (int i = 0; i < units.length; i++) {
       if (units[i].getName().equals(suName)) {
         return true;
       }
     }
   }
   return false;
 }
Пример #3
0
 public String[] getDeployedServiceUnitList(String componentName) throws Exception {
   Component component = this.registry.getComponent(componentName);
   if (component == null) {
     throw new JBIException("Component not installed: " + componentName);
   }
   Unit[] units = component.getUnits();
   String[] names = new String[units.length];
   for (int i = 0; i < units.length; i++) {
     names[i] = units[i].getName();
   }
   return names;
 }
Пример #4
0
 public String[] getDeployedServiceAssembliesForComponent(String componentName) throws Exception {
   Component component = this.registry.getComponent(componentName);
   if (component == null) {
     throw new JBIException("Component not installed: " + componentName);
   }
   if (component != null) {
     Unit[] units = component.getUnits();
     Set names = new HashSet();
     for (int i = 0; i < units.length; i++) {
       names.add(units[i].getAssembly().getName());
     }
     return (String[]) names.toArray(new String[names.size()]);
   }
   return null;
 }