Examples of Property


Examples of org.apache.s4.schema.Schema.Property

        String streamName = eventWrapper.getStreamName();
        String fieldName = eventClockStreamsMap.get(streamName);
        if (fieldName != null) {
            Object event = eventWrapper.getEvent();
            Schema schema = schemaContainer.getSchema(event.getClass());
            Property property = schema.getProperties().get(fieldName);
            if (property != null
                    && (property.getType().equals(Long.TYPE) || property
                            .getType().equals(Long.class))) {
                try {
                    eventTime = (Long) property.getGetterMethod().invoke(event);
                    updateTime(eventTime);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
View Full Code Here

Examples of org.apache.servicemix.bean.Property

    }

    protected Expression createParameterUnmarshalExpressionForAnnotation(Class clazz, Method method,
                Class parameterType, Annotation annotation) {
        if (annotation instanceof Property) {
            Property propertyAnnotation = (Property) annotation;
            return new PropertyExpression(propertyAnnotation.name());
        } else if (annotation instanceof Content) {
            Content content = (Content) annotation;
            final PojoMarshaler marshaller = newInstance(content);
            return createContentExpression(marshaller);
        } else if (annotation instanceof XPath) {
View Full Code Here

Examples of org.apache.shale.tiger.managed.Property

            Field[] fields = fields(clazz);
            for (Field field : fields) {
                if (log().isTraceEnabled()) {
                    log().trace("  Scanning field '" + field.getName() + "'");
                }
                Property property = (Property) field.getAnnotation(Property.class);
                if (property != null) {
                    if (log().isDebugEnabled()) {
                        log().debug("  Field '" + field.getName() + "' has a @Property annotation");
                    }
                    ManagedPropertyConfig mpc = new ManagedPropertyConfig();
                    String name = property.name();
                    if ((name == null) || "".equals(name)) {
                        name = field.getName();
                    }
                    mpc.setName(name);
                    mpc.setType(field.getType().getName()); // FIXME - primitives, arrays, etc.
                    mpc.setValue(property.value());
                    mbc.addProperty(mpc);
                    continue;
                }
                // Support deprecated @Value annotation as well
                Value value = (Value) field.getAnnotation(Value.class);
View Full Code Here

Examples of org.apache.stanbol.cmsadapter.servicesapi.model.web.Property

        // initialize a dummy repository
        repository = new ArrayList<Object>();
        PropertyDefinition pd1 = new PropertyDefinitionBuilder(PX_PD_1).build();
        PropertyDefinition pd2 = new PropertyDefinitionBuilder(PX_PD_2).build();
        PropertyDefinition pd3 = new PropertyDefinitionBuilder(PX_PD_3).build();
        Property p1 = new PropertyBuilder(PX_P_1).propertyDefinition(pd1).build();
        Property p2 = new PropertyBuilder(PX_P_2).propertyDefinition(pd2).build();
        CMSObject root = new CMSObjectBuilder(PX_ROOT).build();
        CMSObject child11 = new CMSObjectBuilder(PX_O_11).build();
        CMSObject child12 = new CMSObjectBuilder(PX_O_12).build();
        CMSObject child21 = new CMSObjectBuilder(PX_O_21).build();
        CMSObject child13 = new CMSObjectBuilder(PX_O_13).build();
View Full Code Here

Examples of org.apache.stratos.cloud.controller.stub.pojo.Property

                              .getAttributeValue();
            String value =
                           prop.getAttribute(new QName(AutoScalerConstants.PROPERTY_VALUE_ATTR))
                               .getAttributeValue();

            Property property = new Property();
            property.setName(name);
            property.setValue(value);
            propertyList.add(property);
        }
       
        if(propertyList.isEmpty()) {
            return null;
View Full Code Here

Examples of org.apache.stratos.cloud.controller.util.xsd.Property

        df.setParseBigDecimal(true);

        Properties properties = new Properties();
        List<Property> allProperties = new ArrayList<Property>();
        // min_app_instances
        Property property = new Property();
        property.setName("min_app_instances");
        property.setValue(df.format(policy.getMinAppInstances()));
        allProperties.add(property);
       
       
     // max_app_instances
        property = new Property();
        property.setName("max_app_instances");
        property.setValue(df.format(policy.getMaxAppInstances()));
        allProperties.add(property);
       
        // max_requests_per_second
        property = new Property();
        property.setName("max_requests_per_second");
        property.setValue(df.format(policy.getMaxRequestsPerSecond()));
        allProperties.add(property);
       
        // alarming_upper_rate
        property = new Property();
        property.setName("alarming_upper_rate");
        property.setValue(df.format(policy.getAlarmingUpperRate()));
        allProperties.add(property);
       
     // alarming_lower_rate
        property = new Property();
        property.setName("alarming_lower_rate");
        property.setValue(df.format(policy.getAlarmingLowerRate()));
        allProperties.add(property);
       
        // scale_down_factor
        property = new Property();
        property.setName("scale_down_factor");
        property.setValue(df.format(policy.getScaleDownFactor()));
        allProperties.add(property);
       
     // rounds_to_average
        property = new Property();
        property.setName("rounds_to_average");
        property.setValue(df.format(policy.getRoundsToAverage()));
        allProperties.add(property);
       
       // tenant id
        property = new Property();
        property.setName("tenant_id");
        property.setValue(String.valueOf(tenantId));
        allProperties.add(property);
       
        // alias
        property = new Property();
        property.setName("alias");
        property.setValue(String.valueOf(alias));
        allProperties.add(property);
       
        properties.setProperties(allProperties.toArray(new Property[allProperties.size()]));
        return properties;
    }
View Full Code Here

Examples of org.apache.struts2.components.Property

    public String getBeanName() {
        return "property";
    }

    protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        return new Property(stack);
    }
View Full Code Here

Examples of org.apache.synapse.config.Property

        if (!sequenceMap.containsKey(correlationValue)) {
            sequenceID = UUIDGenerator.getUUID();
            if (log.isDebugEnabled()) {
                log.debug("setting sequenceID " + sequenceID + " for correlation " + correlationValue);
            }
            Property sequenceProperty = new Property();
            sequenceProperty.setValue(sequenceID);
            sequenceProperty.setExpiryTime(System.currentTimeMillis() + SEQUENCE_EXPIRY_TIME);
            sequenceMap.put(correlationValue, sequenceProperty);
        } else {
            sequenceID = (String) ((Property) sequenceMap.get(correlationValue)).getValue();
            if (log.isDebugEnabled()) {
                log.debug("got sequenceID " + sequenceID + " for correlation " + correlationValue);
View Full Code Here

Examples of org.apache.tapestry.annotations.Property

{
    public void transform(ClassTransformation transformation, MutableComponentModel model)
    {
        for (String fieldName : transformation.findAllFieldsWithAnnotation(Property.class))
        {
            Property annotation = transformation.getFieldAnnotation(fieldName, Property.class);

            String propertyName = InternalUtils.capitalize(InternalUtils.stripMemberPrefix(fieldName));

            String fieldType = transformation.getFieldType(fieldName);

            if (annotation.read())
            {
                TransformMethodSignature getter
                        = new TransformMethodSignature(Modifier.PUBLIC | Modifier.FINAL, fieldType,
                                                       "get" + propertyName,
                                                       null, null);

                transformation.addTransformedMethod(getter, "return " + fieldName + ";");
            }

            if (annotation.write())
            {
                TransformMethodSignature setter
                        = new TransformMethodSignature(Modifier.PUBLIC | Modifier.FINAL, "void", "set" + propertyName,
                                                       new String[] { fieldType }, null);
View Full Code Here

Examples of org.apache.tapestry5.annotations.Property

        field.createAccessors(accessType);
    }

    private PropertyAccessType toType(PlasticField field)
    {
        Property annotation = field.getAnnotation(Property.class);

        boolean read = annotation.read();
        boolean write = annotation.write();

        if (read && write)
            return PropertyAccessType.READ_WRITE;

        if (read)
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.