Package org.jboss.metatype.api.types

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


                modifiedRoleNames.add(mv);
              }
            }
          }
          else {
            roleCollection = new CollectionValueSupport(new CollectionMetaType("java.util.List", SimpleMetaType.STRING)); //$NON-NLS-1$
            mappedRoleNames.setValue(roleCollection);
          }
         
          if (add) {
            modifiedRoleNames.add(ManagedUtil.wrap(SimpleMetaType.STRING, role));
View Full Code Here


    }

    public MetaValue convertToMetaValue(PropertyList propertyList, PropertyDefinitionList propertyListDefinition, MetaType metaType)
    {
        LOG.debug("GetMetaValue for property: " + propertyList.getName() + " values: " + propertyList.getList().toString());
        CollectionMetaType collectionMetaType = (CollectionMetaType)metaType;
        MetaType memberMetaType = collectionMetaType.getElementType();
        CollectionMetaType collectionType = new CollectionMetaType(propertyListDefinition.getName(), memberMetaType);
        CollectionValue collectionValue = new CollectionValueSupport(collectionType);
        populateMetaValueFromProperty(propertyList, collectionValue, propertyListDefinition);
        return collectionValue;
    }
View Full Code Here

     for (String mappedRoleName : mappedRoleNameList)
       {
        MetaValue mappedRoleNameValue = SimpleValueSupport.wrap(mappedRoleName);
        listMemberValues[memberIndex++] = mappedRoleNameValue;
       }
       return new CollectionValueSupport( new CollectionMetaType("java.util.List", SimpleMetaType.STRING), //$NON-NLS-1$
                                      listMemberValues);
      
  }
View Full Code Here

      assertNotNull("null operation return value", listAllMessagesMV);
      log.debug("result: " + listAllMessagesMV);
      MetaType resultType = listAllMessagesMV.getMetaType();
      log.debug("resultType: "+resultType);
      assertTrue("resultType instanceof CompositeMetaType", resultType instanceof CollectionMetaType);
      CollectionMetaType resultCMT = (CollectionMetaType) resultType;
      MetaType resultElementType = resultCMT.getElementType();
      log.debug("resultElementType: "+resultElementType);
      assertTrue("resultElementType instanceof CompositeMetaType", resultElementType instanceof CompositeMetaType);
      log.debug("resultElementType: "+resultElementType);
      CollectionValue listAllMessagesCV = (CollectionValue) listAllMessagesMV;
      MetaValue[] listAllMessagesElements = listAllMessagesCV.getElements();
View Full Code Here

                  if (managed)
                  {
                     if(type.isArray())
                        metaType = new ArrayMetaType(1, AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE);
                     else if (Collection.class.isAssignableFrom(type))
                        metaType = new CollectionMetaType(type.getName(), AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE);
                     else
                        metaType = AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE;
                  }
                  else
                  {
View Full Code Here

      MetaData metaData = unit.getMetaData();
      // Update the beanFactories value to a list of BeanMetaDataFactory with BeanMetaDatas
      ManagedProperty beanFactoriesMP = deploymentMO.getProperty("beanFactories");
      List<GenericValue> tmpBFs = new ArrayList<GenericValue>();
      CollectionMetaType beansFactoryType = new CollectionMetaType(BeanMetaDataFactory.class.getName(), AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE);
      if(beanFactories != null)
      {
         List<GenericValue> tmpBeans = new ArrayList<GenericValue>();
         CollectionMetaType beansType = new CollectionMetaType(BeanMetaDataFactory.class.getName(), AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE);
         for(BeanMetaDataFactory bmdf : beanFactories)
         {
           
            ManagedObject bmdfMO = mof.initManagedObject(bmdf, metaData);
            if(bmdfMO == null)
View Full Code Here

      TypeInfo[] types = typeInfo.getActualTypeArguments();
      if (types != null)
         elementType = types[0];
     
      MetaType elementMetaType = resolve(elementType);
      return new CollectionMetaType(typeInfo.getName(), elementMetaType);
   }
View Full Code Here

                  processGenericValue((GenericValue) avalue.getValue(n), md);
            }
         }
         else if (propType.isCollection())
         {
            CollectionMetaType amt = (CollectionMetaType) propType;
            MetaType etype = amt.getElementType();
            if (etype == AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE)
            {
               CollectionValue avalue = (CollectionValue) prop.getValue();
               if(avalue != null)
               {
View Full Code Here

                  processGenericValue((GenericValue) avalue.getValue(n), md);
            }
         }
         else if (propType.isCollection())
         {
            CollectionMetaType amt = (CollectionMetaType) propType;
            MetaType etype = amt.getElementType();
            if (etype == AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE)
            {
               CollectionValue avalue = (CollectionValue) prop.getValue();
               if(avalue != null)
               {
View Full Code Here

                  if (managed)
                  {
                     if(type.isArray())
                        metaType = new ArrayMetaType(1, AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE);
                     else if (Collection.class.isAssignableFrom(type))
                        metaType = new CollectionMetaType(type.getName(), AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE);
                     else
                        metaType = AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE;
                  }
                  else
                  {
View Full Code Here

TOP

Related Classes of org.jboss.metatype.api.types.CollectionMetaType

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.