Package com.sun.org.apache.commons.modeler

Examples of com.sun.org.apache.commons.modeler.AttributeInfo


            Enumeration keys = attrs.keys();
            while(keys.hasMoreElements())
            {
                key = (String)keys.nextElement();
                AttrIntro ai = (AttrIntro)attrs.get(key);
                AttributeInfo info = (AttributeInfo)infosTable.get(key);
                if(info==null)
                {
                    ai.whereType = LOCATED_IN_CONFIGBEAN;
                    info = ai.createAttributeInfo();
                    managedBean.addAttribute(info);
View Full Code Here


            Enumeration keys = attrs.keys();
            while(keys.hasMoreElements())
            {
                key = (String)keys.nextElement();
                AttrIntro ai = (AttrIntro)attrs.get(key);
                AttributeInfo info = (AttributeInfo)infosTable.get(key);
                if(info==null)
                {
                    ai.whereType = LOCATED_IN_RUNTIMEBEAN;
                    info = ai.createAttributeInfo();
                    managedBean.addAttribute(info);
View Full Code Here

        public String setName = null;
        public String whereType = null;
       
        public AttributeInfo createAttributeInfo()
        {
            AttributeInfo ati = new AttributeInfo();
            ati.setName(name);
            ati.setType(type);
            if(setName!=null)
            {
                ati.setWriteable(true);
                ati.addField(newField(SETTER_FIELD_NAME, setName));
            }
            else
                ati.setWriteable(false);
            if(getName!=null)
            {
                ati.setReadable(true);
                ati.addField(newField(GETTER_FIELD_NAME, getName));
            }
            else
                ati.setReadable(false);
           
            if (whereType!=null)
                ati.addField(newField(WHERE_LOCATED_FIELD_NAME, whereType));
            return ati;
        }
View Full Code Here

    private class MyManagedBean extends ManagedBean
    {
        public MyManagedBean(ManagedBean mb)
        {
            super();
            AttributeInfo attrs[] = mb.getAttributes();
            if(attrs.length>0 && "modelerType".equals(attrs[0].getName()))
            {
                attributes = new AttributeInfo[attrs.length-1];
                for(int i=1; i<attrs.length; i++)
                    attributes[i-1]=attrs[i];
View Full Code Here

    //******************************************************************************************
    public void mergeAttribute( String attrName, String attrType,
                                String attrGetMethod, String attrSetMethod,
                                boolean attrReadable, boolean attrWriteable)
    {
        AttributeInfo ai = findAttributeInfo(attrName);
        if(ai==null)
        {
            ai = new AttributeInfo();
            ai.setName(attrName);
            ai.setType(attrType);
            managedBean.addAttribute(ai);
        }
        if(ai.isReadable() && !attrReadable)
            ai.setReadable(false);
        if(ai.isWriteable() && !attrWriteable)
            ai.setWriteable(false);
        if(attrGetMethod!=null)
            ai.setGetMethod(attrGetMethod);
        if(attrSetMethod!=null)
            ai.setSetMethod(attrSetMethod);
    }
View Full Code Here

    //  it analyzes the "emptyValueAllowed"-atrribute value for given MBean attribute descriptor
    //  in mbean-descriptor file.
    //  returns true, if only it is has "true" or "yes" value
    public boolean isAttributeEmptyValueAllowed(String attrName) throws MBeanMetaException
    {
        AttributeInfo ai = findAttributeInfo(attrName);
        if(ai==null)
            throw new MBeanMetaException("Attribute info is not founmd for attribute "+attrName);
        //get attribute's descriptor fields
        List fields = ai.getFields();
        if(fields!=null)
            for(int i=0; i<fields.size(); i++) //enum fields
            {
                if(EMPTYVALUEALLOWED_FIELD_NAME.equals(((FieldInfo)fields.get(i)).getName()))
                {
View Full Code Here

        return false; //empty value is not allowed
    }

    public boolean isAttributeDynamicReconfigNeeded(String attrName) throws MBeanMetaException
    {
        AttributeInfo ai = findAttributeInfo(attrName);
        if(ai==null)
            throw new MBeanMetaException("Attribute info is not founmd for attribute "+attrName);
        //get attribute's descriptor fields
        List fields = ai.getFields();
        if(fields!=null)
            for(int i=0; i<fields.size(); i++) //enum fields
            {
                if("dynamicReconfigNeeded".equals(((FieldInfo)fields.get(i)).getName()))
                {
View Full Code Here

TOP

Related Classes of com.sun.org.apache.commons.modeler.AttributeInfo

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.