Examples of Property


Examples of org.jboss.dna.graph.properties.Property

                }

                // Copy the properties ...
                Iterator<Property> propertyIterator = contribution.getProperties();
                while (propertyIterator.hasNext()) {
                    Property property = propertyIterator.next();
                    // Skip the "uuid" property on all root nodes ...
                    if (federatedNode.getPath().isRoot() && property.getName().getLocalName().equals("uuid")) continue;
                    Property existing = properties.put(property.getName(), property);
                    if (existing != null) {
                        // There's already an existing property, so we need to merge them ...
                        Property merged = merge(existing, property, context.getPropertyFactory(), removeDuplicateProperties);
                        properties.put(property.getName(), merged);
                    }

                    if (uuid == null && property.getName().getLocalName().equals("uuid") && property.isSingle()) {
                        if (uuidFactory == null) uuidFactory = context.getValueFactories().getUuidFactory();
                        try {
                            uuid = uuidFactory.create(property.getValues().next());
                        } catch (IoException e) {
                            // Ignore conversion exceptions
                            assert uuid == null;
                        }
                    }
                }
            }
        }
        // If we found a single "uuid" property whose value is a valid UUID ..
        if (uuid != null) {
            // then set the UUID on the federated node ...
            federatedNode.setUuid(uuid);
        }
        // Set the UUID as a property ...
        Property uuidProperty = context.getPropertyFactory().create(DnaLexicon.UUID, federatedNode.getUuid());
        properties.put(uuidProperty.getName(), uuidProperty);

        // Assign the merge plan ...
        MergePlan mergePlan = MergePlan.create(contributions);
        federatedNode.setMergePlan(mergePlan);
    }
View Full Code Here

Examples of org.jboss.dna.graph.property.Property

        assert topNode.equals(startingLocation);
        Map<Name, Property> properties = readSubgraph.getPropertiesFor(topNode);
        if (properties == null) return;
        if (startingLocation.getPath().isRoot()) {
            // The properties of the root node generally don't include the primary type, but we need to add it here ...
            Property rootPrimaryType = context.getPropertyFactory().create(JcrLexicon.PRIMARY_TYPE, DnaLexicon.ROOT);
            properties.put(JcrLexicon.PRIMARY_TYPE, rootPrimaryType);
        }
        UpdatePropertiesRequest request = new UpdatePropertiesRequest(topNode, workspaceName, properties, true);
        request.setActualLocationOfNode(topNode);
        process(request);
View Full Code Here

Examples of org.jboss.forge.addon.parser.java.beans.Property

   @Override
   public Result execute(UIExecutionContext context) throws Exception
   {
      UIContext uiContext = context.getUIContext();
      Map<Object, Object> attributeMap = uiContext.getAttributeMap();
      Property property = (Property) attributeMap.get(Property.class);
      ConstraintType constraintType = (ConstraintType) attributeMap.get(ConstraintType.class);
      Boolean onAccessor = (Boolean) attributeMap.get("onAccessor");
      final AnnotationTarget<JavaClass, ?> annotationTarget;
      if (onAccessor)
      {
         annotationTarget = property.getAccessor();
      }
      else
      {
         annotationTarget = property.getActualField();
      }
      Class<? extends Annotation> constraintAnnotation = constraintType.getConstraint();
      org.jboss.forge.parser.java.Annotation<JavaClass> annotation = annotationTarget
               .addAnnotation(constraintAnnotation);
      populateAnnotation(constraintAnnotation, annotation);
View Full Code Here

Examples of org.jboss.javabean.plugins.xml.Common.Property

    */
   public void add(Object parent, Object child, QName name)
   {
      Holder holder = (Holder) parent;
      Object parentValue = holder.getValue();
      Property prop = (Property) child;
      Object value = prop.getValue();
      String property = prop.getProperty();

      try
      {
         if( parentValue instanceof Ctor )
         {
            Ctor ctor = (Ctor) parentValue;
            if( ctor.isCtorWasDeclared() )
            {
               BeanInfo beanInfo = ConfigurationUtil.getBeanInfo(ctor.getClassName());
               PropertyInfo propertyInfo = beanInfo.getProperty(property);
               value = ConfigurationUtil.convertValue(propertyInfo, prop.getType(), value);
               ctor.addParam(propertyInfo.getType().getName(), value);
            }
            else
            {
               // There was no explicit ctor to create the bean and reset the parent value
               parentValue = ctor.newInstance();
               holder.setValue(parentValue);
               add(parent, child, name);
            }
         }
         else
         {
            BeanInfo beanInfo = ConfigurationUtil.getBeanInfo(parentValue);
            value = ConfigurationUtil.convertValue(parentValue, property, prop.getType(), value);
            beanInfo.setProperty(parentValue, property, value);
         }
      }
      catch (RuntimeException e)
      {
View Full Code Here

Examples of org.jboss.jbossas.servermanager.Property

      // Set server's JVM arguments
      setServerVMArgs(server, javaVmArguments());

      // Set server's system properties
      Property prop = new Property();
      prop.setKey("jbosstest.udp.ip_ttl");
      prop.setValue("0");
      server.addSysProperty(prop);
      prop = new Property();
      prop.setKey("java.endorsed.dirs");
      prop.setValue(new File(configuration.getJbossHome(), "lib/endorsed").getAbsolutePath());
      server.addSysProperty(prop);
     
      return server;
   }
View Full Code Here

Examples of org.jboss.soa.esb.listeners.config.xbeanmodel101.PropertyDocument.Property

        if ( activationConfig != null )
        {
            List<Property> propertyList = activationConfig.getPropertyList();
            for (Iterator<Property> iterator = propertyList.iterator(); iterator.hasNext();)
        {
          Property prop = iterator.next();
          if ( defaultPropertyNames.contains( prop.getName() ))
              throw new ConfigurationException( "activation-config already contains [" + prop.getName() + "], which cannot be overridden");
         
                addPropertyElement(activationConfigElement, prop.getName(), prop.getValue()) ;
        }
        }
    }
View Full Code Here

Examples of org.jboss.soa.esb.listeners.config.xbeanmodel110.PropertyDocument.Property

        if ( activationConfig != null )
        {
            List<Property> propertyList = activationConfig.getPropertyList();
            for (Iterator<Property> iterator = propertyList.iterator(); iterator.hasNext();)
        {
          Property prop = iterator.next();
          if ( defaultPropertyNames.contains( prop.getName() ))
              throw new ConfigurationException( "activation-config already contains [" + prop.getName() + "], which cannot be overridden");
         
                addPropertyElement(activationConfigElement, prop.getName(), prop.getValue()) ;
        }
        }
    }
View Full Code Here

Examples of org.jboss.soa.esb.listeners.config.xbeanmodel120.PropertyDocument.Property

        if ( activationConfig != null )
        {
            List<Property> propertyList = activationConfig.getPropertyList();
            for (Iterator<Property> iterator = propertyList.iterator(); iterator.hasNext();)
        {
          Property prop = iterator.next();
          if ( defaultPropertyNames.contains( prop.getName() ))
              throw new ConfigurationException( "activation-config already contains [" + prop.getName() + "], which cannot be overridden");

                addPropertyElement(activationConfigElement, prop.getName(), prop.getValue()) ;
        }
        }
    }
View Full Code Here

Examples of org.jboss.soa.esb.listeners.config.xbeanmodel130.PropertyDocument.Property

        // Map the <property> elements targeted at the listener - from the listener itself.
        List<Property> propertyList = gateway.getPropertyList();
        Iterator<Property> propertyIterator = propertyList.iterator();
        while (propertyIterator.hasNext()) {
          Property property = propertyIterator.next();
          // Enforce adding routes the prescribed way
          if (CamelGateway.ROUTES.equals(property.getName())) {
            propertyIterator.remove();
          }
        }
        MapperUtil.mapProperties(propertyList, gatewayNode);
       
View Full Code Here

Examples of org.jgroups.annotations.Property

                // copy all setters marked with @Property
                Method[] methods=clazz.getDeclaredMethods();
                for(Method method: methods) {
                    String methodName=method.getName();
                    if(method.isAnnotationPresent(Property.class) && Configurator.isSetPropertyMethod(method)) {
                        Property annotation=method.getAnnotation(Property.class);
                        List<String> possible_names=new LinkedList<String>();
                        if(annotation.name() != null)
                            possible_names.add(annotation.name());
                        possible_names.add(methodName.substring(3));
                        possible_names.add(Configurator.renameFromJavaCodingConvention(methodName.substring(3)));
                        Field field=findField(prot, possible_names);
                        if(field != null) {
                            Object value=Configurator.getField(field, prot);
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.