Package org.jboss.system.metadata

Examples of org.jboss.system.metadata.ServiceDependencyValueMetaData


   }

   public ServiceAttributeMetaData buildDependencyAttribute(String name, String dependency)
   {
      ServiceAttributeMetaData att = new ServiceAttributeMetaData();
      ServiceDependencyValueMetaData dep = new ServiceDependencyValueMetaData();
      dep.setDependency(dependency);     
        
      if(name != null)
         att.setName(name);
     
      att.setValue(dep);
View Full Code Here


      // set attributes
      List<ServiceAttributeMetaData> attrs = new ArrayList<ServiceAttributeMetaData>();
      // Transaction manager
      ServiceAttributeMetaData attr = new ServiceAttributeMetaData();
      attr.setName("TransactionManagerFactory");
      ServiceDependencyValueMetaData dependencyValue = new ServiceDependencyValueMetaData();
      dependencyValue.setDependency(getTransactionManagerServiceName());
      dependencyValue.setProxyType("attribute");
      attr.setValue(dependencyValue);
      attrs.add(attr);
      // Security management
      attr = new ServiceAttributeMetaData();
      attr.setName("SecurityManagement");
      ServiceInjectionValueMetaData injectionValue = new ServiceInjectionValueMetaData(securityManagementName);
      attr.setValue(injectionValue);
      attrs.add(attr);
      //Policy Registration
      attr = new ServiceAttributeMetaData();
      attr.setName("PolicyRegistration");
      ServiceInjectionValueMetaData prInjectionValue = new ServiceInjectionValueMetaData(policyRegistrationName);
      attr.setValue(prInjectionValue);
      attrs.add(attr);
      // Add injection of the WebServiceName
      String wsName = getWebServiceName();
      if (wsName != null)
      {
         ServiceAttributeMetaData ws = new ServiceAttributeMetaData();
         ws.setName("WebServiceName");
         ServiceDependencyValueMetaData wsDepends = new ServiceDependencyValueMetaData();
         wsDepends.setDependency(wsName);
         ws.setValue(wsDepends);
         attrs.add(ws);
      }
      // Injection of the TimerService
      ServiceAttributeMetaData tms = new ServiceAttributeMetaData();
      ServiceDependencyValueMetaData tmsDepends = new ServiceDependencyValueMetaData();
      tms.setName("TimerService");
      tmsDepends.setDependency(timerServiceName);
      tmsDepends.setProxyType("attribute");
      tms.setValue(tmsDepends);
      attrs.add(tms);

      ejbModule.setAttributes(attrs);
View Full Code Here

   protected void assertDependencyValue(ServiceValueMetaData actual, ObjectName expected, String proxyType) throws Exception
   {
      assertNotNull(expected);
      assertNotNull(actual);
     
      ServiceDependencyValueMetaData value = assertInstanceOf(ServiceDependencyValueMetaData.class, actual);
     
      assertEquals(expected, value.getObjectName());
      assertEquals(proxyType, value.getProxyType());
   }
View Full Code Here

            assertEquals("123456", text);
            foundAttribute = true;
         }
         else if("ServerPeer".equals(attribute.getName()))
         {
            ServiceDependencyValueMetaData value = ((ServiceDependencyValueMetaData) attribute.getValue());
            ObjectName name = value.getObjectName();
            assertNotNull(name);
         }
         else if("ExpiryQueue".equals(attribute.getName()))
         {
            ServiceTextValueMetaData value = (ServiceTextValueMetaData) attribute.getValue();
            assertNotNull(value.getText());
         }
      }
      assertTrue(foundAttribute);
   }
View Full Code Here

            parentServiceMetaData.addDependency(serviceDependencyMetaData);

            // Add an attribute in the parent service
            ServiceAttributeMetaData serviceAttributeMetaData = new ServiceAttributeMetaData();
            serviceAttributeMetaData.setName("PolicyConfigurationFacadeMBean");
            ServiceDependencyValueMetaData dependencyValue = new ServiceDependencyValueMetaData();
            dependencyValue.setDependency(subjaccPolicy.getObjectName().toString());
            dependencyValue.setProxyType("attribute");
            serviceAttributeMetaData.setValue(dependencyValue);
            parentServiceMetaData.addAttribute(serviceAttributeMetaData);
         }
      }
     
View Full Code Here

   protected void assertDependencyValue(ServiceValueMetaData actual, ObjectName expected, String proxyType) throws Exception
   {
      assertNotNull(expected);
      assertNotNull(actual);
     
      ServiceDependencyValueMetaData value = assertInstanceOf(ServiceDependencyValueMetaData.class, actual);
     
      assertEquals(expected, value.getObjectName());
      assertEquals(proxyType, value.getProxyType());
   }
View Full Code Here

            assertEquals("123456", text);
            foundAttribute = true;
         }
         else if("ServerPeer".equals(attribute.getName()))
         {
            ServiceDependencyValueMetaData value = ((ServiceDependencyValueMetaData) attribute.getValue());
            ObjectName name = value.getObjectName();
            assertNotNull(name);
         }
         else if("ExpiryQueue".equals(attribute.getName()))
         {
            ServiceTextValueMetaData value = (ServiceTextValueMetaData) attribute.getValue();
            assertNotNull(value.getText());
         }
      }
      assertTrue(foundAttribute);
   }
View Full Code Here

            ServiceTextValueMetaData text = (ServiceTextValueMetaData) value;
            value = text.getText();
         }
         else if (value instanceof ServiceDependencyValueMetaData)
         {
            ServiceDependencyValueMetaData depends = (ServiceDependencyValueMetaData) value;
            value = depends.getDependency();
         }
         // TODO: unwrap other ServiceValueMetaData types
  
         PropertyInfo propertyInfo = beanInfo.getProperty(name);
         try
View Full Code Here

               ServiceTextValueMetaData text = (ServiceTextValueMetaData) attributeValue;
               text.setText(String.valueOf(plainValue));
            }
            else if (value instanceof ServiceDependencyValueMetaData)
            {
               ServiceDependencyValueMetaData depends = (ServiceDependencyValueMetaData) attributeValue;
               depends.setDependency(String.valueOf(plainValue));
            }
            // TODO: unwrap other ServiceValueMetaData types
            else
            {
               throw new IllegalArgumentException("Unhandled attribute value type: " + name + "/" + md+", class="+attributeValue.getClass());              
View Full Code Here

   }

   public ServiceAttributeMetaData buildDependencyAttribute(String name, String dependency)
   {
      ServiceAttributeMetaData att = new ServiceAttributeMetaData();
      ServiceDependencyValueMetaData dep = new ServiceDependencyValueMetaData();
      dep.setDependency(dependency);     
        
      if(name != null)
         att.setName(name);
     
      att.setValue(dep);
View Full Code Here

TOP

Related Classes of org.jboss.system.metadata.ServiceDependencyValueMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.