Examples of PropertyDescription


Examples of org.apache.felix.ipojo.architecture.PropertyDescription

     */
    public ConfigurationHandlerDescription(Handler handler, List/*<Property>*/ props, String pid) {
        super(handler);
        m_properties = new PropertyDescription[props.size()];
        for (int i = 0; i < props.size(); i++) {
            m_properties[i] = new PropertyDescription((Property) props.get(i));
        }       
        m_pid = pid;
    }
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.PropertyDescription

            boolean mandatory = false;
            String man = configurables[i].getAttribute("mandatory");
            mandatory =  man != null && man.equalsIgnoreCase("true");

            PropertyDescription pd = null;
            if (value == null) {
                pd = new PropertyDescription(name, type, null, false); // Cannot be immutable if we have no value.
            } else {
                pd = new PropertyDescription(name, type, value, immutable);
            }

            if (mandatory) {
                pd.setMandatory();
            }

            desc.addProperty(pd);
        }
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.PropertyDescription

                String imm = props[j].getAttribute("immutable");
                if (imm != null && imm.equalsIgnoreCase("true")) {
                    immutable = true;
                }

                PropertyDescription pd = new PropertyDescription(name, type, value, immutable);
                desc.addProperty(pd);

                String man = props[j].getAttribute("mandatory");
                if (man != null && man.equalsIgnoreCase("true")) {
                    pd.setMandatory();
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.PropertyDescription

    public ConfigurationHandlerDescription(ConfigurationHandler handler, List/*<Property>*/ props, String pid) {
        super(handler);
        m_conf = handler;
        m_properties = new PropertyDescription[props.size()];
        for (int i = 0; i < props.size(); i++) {
            m_properties[i] = new PropertyDescription((Property) props.get(i));
        }       
        m_pid = pid;
    }
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.PropertyDescription

            boolean mandatory = false;
            String man = configurables[i].getAttribute("mandatory");
            mandatory = man != null && man.equalsIgnoreCase("true");

            PropertyDescription pd;
            if (value == null) {
                pd = new PropertyDescription(name, type, null, false); // Cannot be immutable if we have no value.
            } else {
                pd = new PropertyDescription(name, type, value, immutable);
            }

            if (mandatory) {
                pd.setMandatory();
            }

            desc.addProperty(pd);
        }
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.PropertyDescription

                String imm = props[j].getAttribute("immutable");
                if (imm != null && imm.equalsIgnoreCase("true")) {
                    immutable = true;
                }

                PropertyDescription pd = new PropertyDescription(name, type, value, immutable);
                desc.addProperty(pd);

                String man = props[j].getAttribute("mandatory");
                if (man != null && man.equalsIgnoreCase("true")) {
                    pd.setMandatory();
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.PropertyDescription

            Element metadata)
        throws ConfigurationException {

        // Update the current component description
        Dictionary dict = new Properties();
        PropertyDescription pd = new PropertyDescription(TOPICS_PROPERTY,
                Dictionary.class.getName(), dict.toString());
        cd.addProperty(pd);

        // Get Metadata publishers
        Element[] publishers = metadata.getElements("publisher", NAMESPACE);
View Full Code Here

Examples of org.apache.felix.ipojo.architecture.PropertyDescription

            Element metadata)
        throws ConfigurationException {

        // Update the current component description
        Dictionary dict = new Properties();
        cd.addProperty(new PropertyDescription(TOPICS_PROPERTY,
                Dictionary.class.getName(), dict.toString()));
        dict = new Properties();
        cd.addProperty(new PropertyDescription(FILTER_PROPERTY,
                Dictionary.class.getName(), dict.toString()));

        // Get Metadata subscribers
        Element[] subscribers = metadata.getElements("subscriber", NAMESPACE);
        if (subscribers != null) {
View Full Code Here

Examples of org.apache.felix.scrplugin.description.PropertyDescription

    /** Generates a property descriptor of type {@link PropertyType#String[]} */
    private void generateStringPropertyDescriptor(final ClassAnnotation cad, final ClassDescription classDescription,
            final boolean metatype, final String propertyName, final String propertyDescriptorName, String label, String description, boolean isArray) {


        final PropertyDescription pd = new PropertyDescription(cad);
        pd.setName(propertyDescriptorName);
        pd.setLabel(label);
        pd.setDescription(description);
        pd.setType(PropertyType.String);

        if(isArray) {
            final String[] values = (String[]) cad.getValue(propertyName);
            pd.setMultiValue(values);
            pd.setUnbounded(PropertyUnbounded.ARRAY);
            pd.setCardinality(Integer.MAX_VALUE);
        } else {
            final String propertyVal = (String) cad.getValue(propertyName);
            pd.setValue(propertyVal);
            pd.setUnbounded(PropertyUnbounded.DEFAULT);
        }
       
        if (!metatype) {
            pd.setPrivate(true);
        }
        classDescription.add(pd);
    }
View Full Code Here

Examples of org.apache.felix.scrplugin.description.PropertyDescription

        final String[] values = (String[]) cad.getValue(annotationName);
        if (values == null) {
            return;
        }

        final PropertyDescription pd = new PropertyDescription(cad);
        pd.setName(propertyDescriptorName);
        pd.setMultiValue(values);
        pd.setType(PropertyType.String);
        if (metatype) {
            pd.setPrivate(true);
        }
        classDescription.add(pd);
    }
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.