Examples of EnumMetaType


Examples of org.jboss.metatype.api.types.EnumMetaType

      throw new AdminProcessingException(IntegrationPlugin.Util.getString("vdb_not_found", vdbName, vdbVersion)); //$NON-NLS-1$
    }
   
      ManagedProperty connectionTypeProperty = mc.getProperty("connectionType"); //$NON-NLS-1$
      if (connectionTypeProperty != null) {
        connectionTypeProperty.setValue(ManagedUtil.wrap(new EnumMetaType(ConnectionType.values()), type != null ?type.name():ConnectionType.BY_VERSION.name()));
      }
   
    try {
      getView().updateComponent(mc);
    } catch (Exception e) {
View Full Code Here

Examples of org.jboss.metatype.api.types.EnumMetaType

      request.set(START_TIME, SimpleValueSupport.wrap(object.getStartTime()));
      request.set(COMMAND, SimpleValueSupport.wrap(object.getCommand()));
      request.set(SOURCE_REQUEST, SimpleValueSupport.wrap(object.sourceRequest()));
      request.set(NODE_ID, SimpleValueSupport.wrap(object.getNodeId()));
      request.set(TRANSACTION_ID,SimpleValueSupport.wrap(object.getTransactionId()));
      EnumMetaType emt = (EnumMetaType)composite.getType(STATE);
      request.set(STATE, new EnumValueSupport(emt, object.getState()));
      request.set(THREAD_STATE, new EnumValueSupport((EnumMetaType)composite.getType(THREAD_STATE), object.getThreadState()));
      return request;
    }
    throw new IllegalArgumentException("Cannot convert RequestMetadata " + object); //$NON-NLS-1$
View Full Code Here

Examples of org.jboss.metatype.api.types.EnumMetaType

   {
      EnumConstantInfo[] constants = typeInfo.getEnumConstants();
      List<String> validValues = new ArrayList<String>(constants.length);
      for (EnumConstantInfo constant : constants)
         validValues.add(constant.getName());
      return new EnumMetaType(typeInfo.getName(), validValues);
   }
View Full Code Here

Examples of org.jboss.metatype.api.types.EnumMetaType

            currentFreeMemoryValue != freeMemoryValue);

      // The bean state
      ManagedProperty state = props.get("state");
      assertNotNull("state", state);
      EnumMetaType stateType = (EnumMetaType) state.getMetaType();
      EnumValue stateValue = (EnumValue) state.getValue();
      getLog().info("state: "+stateValue);
      EnumValue installed = new EnumValueSupport(stateType, "Installed");
      assertEquals(installed, stateValue);
   }
View Full Code Here

Examples of org.jboss.metatype.api.types.EnumMetaType

         return null;
      if(metaType instanceof CompositeMetaType)
      {
         // Extract the meta types
         CompositeMetaType composite = (CompositeMetaType) metaType;
         EnumMetaType enumMetaType= (EnumMetaType) composite.getType(DeploymentTypeName);
         // Create the composite value
         CompositeValueSupport securityDomain = new CompositeValueSupport(composite);
         // Set a default deplooymentType
         SecurityDeploymentType deploymentType = object.getSecurityDeploymentType();
         if(deploymentType == null)
View Full Code Here

Examples of org.jboss.metatype.api.types.EnumMetaType

   {
      EnumConstantInfo[] constants = typeInfo.getEnumConstants();
      List<String> validValues = new ArrayList<String>(constants.length);
      for (EnumConstantInfo constant : constants)
         validValues.add(constant.getName());
      return new EnumMetaType(typeInfo.getName(), validValues);
   }
View Full Code Here

Examples of org.jboss.metatype.api.types.EnumMetaType

    *
    * @throws Exception for any problem
    */
   public void testEnumFromString() throws Exception
   {
      EnumMetaType enumType = assertInstanceOf(resolve(TestEnum.class), EnumMetaType.class);
      EnumValue expected = new EnumValueSupport(enumType, TestEnum.ONE.name());

      MetaValue result = createMetaValue(TestEnum.ONE);
      EnumValue actual = assertInstanceOf(result, EnumValue.class);
     
View Full Code Here

Examples of org.jboss.metatype.api.types.EnumMetaType

      getLog().debug("Enum Value: " + actual);
      assertEquals(expected, actual);
   }
   public void testEnum() throws Exception
   {
      EnumMetaType enumType = assertInstanceOf(resolve(TestEnum.class), EnumMetaType.class);
      EnumValue expected = new EnumValueSupport(enumType, TestEnum.ONE);

      MetaValue result = createMetaValue(TestEnum.ONE);
      EnumValue actual = assertInstanceOf(result, EnumValue.class);
     
View Full Code Here

Examples of org.jboss.metatype.api.types.EnumMetaType

   {
      EnumConstantInfo[] constants = typeInfo.getEnumConstants();
      List<String> validValues = new ArrayList<String>(constants.length);
      for (EnumConstantInfo constant : constants)
         validValues.add(constant.getName());
      return new EnumMetaType(typeInfo.getName(), validValues);
   }
View Full Code Here

Examples of org.jboss.metatype.api.types.EnumMetaType

    * @throws Exception for any problem
    */
   public void testEnumType() throws Exception
   {
      MetaType result = resolve(TestEnum.class);
      EnumMetaType actual = assertInstanceOf(result, EnumMetaType.class);
      ArrayList<String> expectedValues = new ArrayList<String>(3);
      expectedValues.add("ONE");
      expectedValues.add("TWO");
      expectedValues.add("THREE");
      EnumMetaType expected = new EnumMetaType(TestEnum.class.getName(), expectedValues);
      getLog().debug("Enum MetaType: className=" + actual.getClassName() + " typeName=" + actual.getTypeName() + " description=" + actual.getDescription() + " values=" + actual.getValidValues());
      assertEquals(expected, actual);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.