Examples of Property


Examples of org.apache.camel.Property

    private Expression createParameterUnmarshalExpressionForAnnotation(Class<?> clazz, Method method,
            Class<?> parameterType, Annotation annotation) {
        if (annotation instanceof Attachments) {
            return ExpressionBuilder.attachmentsExpression();
        } else if (annotation instanceof Property) {
            Property propertyAnnotation = (Property)annotation;
            return ExpressionBuilder.propertyExpression(propertyAnnotation.value());
        } else if (annotation instanceof Properties) {
            return ExpressionBuilder.propertiesExpression();
        } else if (annotation instanceof Header) {
            Header headerAnnotation = (Header)annotation;
            return ExpressionBuilder.headerExpression(headerAnnotation.value());
View Full Code Here

Examples of org.apache.cayenne.property.Property

        Persistent object = (Persistent) context.getGraphManager().getNode(nodeId);
        if (object != null && object.getPersistenceState() != PersistenceState.HOLLOW) {

            // do not override local changes....
            Property p = propertyForId(nodeId, property);
            if (Util.nullSafeEquals(p.readPropertyDirectly(object), oldValue)) {
                p.writePropertyDirectly(object, oldValue, newValue);
            }
        }
    }
View Full Code Here

Examples of org.apache.cayenne.reflect.Property

        if (descriptor == null) {
            throw new IllegalStateException("DataObject's entity is unmapped, objectId: "
                    + objectId);
        }

        Property property = descriptor.getProperty(relationshipName);
        if (property instanceof ToManyMapProperty) {
            return ((ToManyMapProperty) property).getMapKey(value);
        }

        throw new IllegalArgumentException("Relationship '"
View Full Code Here

Examples of org.apache.deltacloud.client.Property

    new HardwareProfileUnmarshaller().unmarshall(inputStream, profile);
    assertNotNull(profile);
    assertEquals(HardwareProfile2Response.id, profile.getId());
    assertEquals(HardwareProfile2Response.propMemValue + ' ' + HardwareProfile2Response.propMemUnit,
        profile.getMemory());
    Property property = profile.getNamedProperty(Property.Names.MEMORY);
    assertNotNull(property);
    assertEquals(HardwareProfile2Response.propMemRangeFirst, property.getRange().getFirst());
    assertEquals(HardwareProfile2Response.propMemRangeLast, property.getRange().getLast());
    assertEquals(HardwareProfile2Response.propStorageValue + ' ' + HardwareProfile2Response.propStorageUnit,
        profile.getStorage());
    property = profile.getNamedProperty(Property.Names.STORAGE);
    assertNotNull(property);
    assertNotNull(property.getEnums());
    assertEquals(2, property.getEnums().size());
    assertEquals(HardwareProfile2Response.propStorageEnum1, property.getEnums().get(0));
    assertEquals(HardwareProfile2Response.propStorageEnum2, property.getEnums().get(1));
    assertEquals(HardwareProfile2Response.propCPUValue, profile.getCPU());
    assertEquals(HardwareProfile2Response.propArchValue, profile.getArchitecture());
  }
View Full Code Here

Examples of org.apache.drill.exec.proto.UserProtos.Property

    public Builder withUserProperties(UserProperties properties) {
      userSession.properties = Maps.newHashMap();
      if (properties != null) {
        for (int i = 0; i < properties.getPropertiesCount(); i++) {
          Property prop = properties.getProperties(i);
          userSession.properties.put(prop.getKey(), prop.getValue());
        }
      }
      return this;
    }
View Full Code Here

Examples of org.apache.falcon.entity.v0.cluster.Property

    public void testEvaluateExpression() throws Exception {
        Cluster cluster = new Cluster();
        cluster.setName("name");
        cluster.setColo("colo");
        cluster.setProperties(new Properties());
        Property prop = new Property();
        prop.setName("pname");
        prop.setValue("pvalue");
        cluster.getProperties().getProperties().add(prop);

        Assert.assertEquals(FeedHelper.evaluateClusterExp(cluster, "${cluster.colo}/*/US"), "colo/*/US");
        Assert.assertEquals(FeedHelper.evaluateClusterExp(cluster, "${cluster.name}/*/${cluster.pname}"),
                "name/*/pvalue");
 
View Full Code Here

Examples of org.apache.falcon.entity.v0.feed.Property

        Partition partition = new Partition();
        partition.setName("1");
        newFeed.getPartitions().getPartitions().add(partition);
        Assert.assertFalse(UpdateHelper.shouldUpdate(oldFeed, newFeed, process));

        Property property = new Property();
        property.setName("1");
        property.setValue("1");
        newFeed.setProperties(new Properties());
        newFeed.getProperties().getProperties().add(property);
        Assert.assertFalse(UpdateHelper.shouldUpdate(oldFeed, newFeed, process));

        newFeed.getProperties().getProperties().remove(0);
View Full Code Here

Examples of org.apache.falcon.entity.v0.process.Property

        //Submit process with invalid property so that coord submit fails and bundle goes to failed state
        TestContext context = newContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        String tmpFileName = context.overlayParametersOverTemplate(TestContext.PROCESS_TEMPLATE, overlay);
        Process process = (Process) EntityType.PROCESS.getUnmarshaller().unmarshal(new File(tmpFileName));
        Property prop = new Property();
        prop.setName("newProp");
        prop.setValue("${formatTim()}");
        process.getProperties().getProperties().add(prop);
        File tmpFile = context.getTempFile();
        EntityType.PROCESS.getMarshaller().marshal(process, tmpFile);
        context.scheduleProcess(tmpFile.getAbsolutePath(), overlay);
        context.waitForBundleStart(Status.FAILED);
View Full Code Here

Examples of org.apache.felix.bundlerepository.Property

       
        return result;
  }

  private final String property(String propertyName) {
    Property property = properties.get(propertyName);
    return property != null ? property.getValue() : null;
  }
View Full Code Here

Examples of org.apache.felix.ipojo.util.Property

                    String name = props[j].getAttribute("name");
                    String value = props[j].getAttribute("value");
                    String type = props[j].getAttribute("type");
                    String field = props[j].getAttribute("field");

                    Property prop = new Property(name, field, null, value, type, getInstanceManager(), this);
                    properties[j] = prop;

                    // Check if the instance configuration has a value for this property
                    Object object = configuration.get(prop.getName());
                    if (object != null) {
                        prop.setValue(object);
                    }

                    if (field != null) {
                        getInstanceManager().register(new FieldMetadata(field, type), this);
                        // Cannot register the property as the interception is necessary
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.