Examples of AttributeInfo


Examples of org.apache.axis.wsdl.wsdl2ws.info.AttributeInfo

    int intAttrFieldSz = attribfeilds.size();
    attributeParamCount = intAttrFieldSz;
    int intEleFieldSz = elementfeilds.size();
    this.attribs = new AttributeInfo[intAttrFieldSz+intEleFieldSz];
    for (int i = 0 ; i < intAttrFieldSz; i++) {
      this.attribs[i] = new AttributeInfo();
      this.attribs[i].setParamName((String)attribfeilds.get(i));
      Type attribType = type.getTypForAttribName(this.attribs[i].getParamName());           
      if(CUtils.isSimpleType(attribType.getName()))
        this.attribs[i].setTypeName(CUtils.getclass4qname(attribType.getName()));
      else{
        this.attribs[i].setTypeName(attribType.getLanguageSpecificName());
        this.attribs[i].setSimpleType(false);
      }
      this.attribs[i].setType(attribType);
      this.attribs[i].setAttribute(true);
      this.attribs[i].setElementName(attribType.getName()); //TODO this is wrong. correct immediately. this will cause attributes serialized incorrectly
      //TODO : how to find whether this attribute is optional or not ?
    }

    for (int i = intAttrFieldSz ; i < intAttrFieldSz+intEleFieldSz; i++) {
      this.attribs[i] = new AttributeInfo();
      this.attribs[i].setParamName((String) elementfeilds.get(i-attributeParamCount));  
      ElementInfo elem = type.getElementForElementName(this.attribs[i].getParamName());
      Type elementType = elem.getType();
      if(CUtils.isSimpleType(elementType.getName()))
        this.attribs[i].setTypeName(CUtils.getclass4qname(elementType.getName()));
View Full Code Here

Examples of org.apache.axis.wsdl.wsdl2ws.info.AttributeInfo

    {
     
      ElementInfo elemi = type.getExtensionBaseType();
        if (elemi != null)
        {
            extensionBaseAttrib = new AttributeInfo(this.classname);
            extensionBaseAttrib.setParamName(elemi.getName().getLocalPart());
            extensionBaseAttrib.setTypeName(
                CUtils.getclass4qname(elemi.getType().getName()));
            extensionBaseAttrib.setType(elemi.getType());
            extensionBaseAttrib.setElementName(elemi.getName());
           
           
        }
        ArrayList attribfeilds = new ArrayList();
        ArrayList elementfeilds = new ArrayList();

        Iterator names = type.getAttributeNames();
        while (names.hasNext())
        {
            attribfeilds.add(names.next());
        }
        names = type.getElementnames();
        while (names.hasNext())
        {
            elementfeilds.add(names.next());
        }
        int intAttrFieldSz = attribfeilds.size();
        attributeParamCount = intAttrFieldSz;
        int intEleFieldSz = elementfeilds.size();
        this.attribs = new AttributeInfo[intAttrFieldSz + intEleFieldSz];
        for (int i = 0; i < intAttrFieldSz; i++)
        {
            this.attribs[i] = new AttributeInfo(this.classname);
            this.attribs[i].setParamName((String) attribfeilds.get(i));
            Type attribType =
                type.getTypForAttribName(this.attribs[i].getParamName());
            if (CUtils.isSimpleType(attribType.getName()))
                this.attribs[i].setTypeName(
                    CUtils.getclass4qname(attribType.getName()));
            else
            {
                this.attribs[i].setTypeName(
                    attribType.getLanguageSpecificName());
                this.attribs[i].setSimpleType(false);
            }
            this.attribs[i].setType(attribType);
            this.attribs[i].setAttribute(true);
            this.attribs[i].setElementName(attribType.getName());
           
                       
            //TODO this is wrong. correct immediately. this will cause attributes serialized incorrectly
            //TODO : how to find whether this attribute is optional or not ?
        }

        for (int i = intAttrFieldSz; i < intAttrFieldSz + intEleFieldSz; i++)
        {
            this.attribs[i] = new AttributeInfo(this.classname);
            this.attribs[i].setParamName(
                (String) elementfeilds.get(i - attributeParamCount));
            ElementInfo elem =
                type.getElementForElementName(this.attribs[i].getParamName());
            Type elementType = elem.getType();
View Full Code Here

Examples of org.apache.commons.modeler.AttributeInfo

        Node firstN;
        firstN = DomUtil.getChild(mbeanNode, "attribute");
        for (Node descN = firstN; descN != null; descN = DomUtil.getNext(descN)) {

            // Create new attribute info
            AttributeInfo ai = new AttributeInfo();
            DomUtil.setAttributes(ai, descN);

            // Process descriptor subnode
            Node descriptorN = DomUtil.getChild(descN, "descriptor");
            if (descriptorN != null) {
                Node firstFieldN = DomUtil.getChild(descriptorN, "field");
                for (Node fieldN = firstFieldN; fieldN != null; fieldN = DomUtil.getNext(fieldN)) {
                    FieldInfo fi = new FieldInfo();
                    DomUtil.setAttributes(fi, fieldN);
                    ai.addField(fi);
                }
            }

            // Add this info to our managed bean info
            managed.addAttribute(ai);
View Full Code Here

Examples of org.apache.commons.modeler.AttributeInfo

            MBeanAttributeInfo attInfo[]=mbi.getAttributes();
            for( int i=0; i<attInfo.length; i++ ) {
                MBeanAttributeInfo mai=attInfo[i];
                String name=mai.getName();

                AttributeInfo ai=new AttributeInfo();
                ai.setName( name );

                ai.setType( mai.getType());
                ai.setReadable( mai.isReadable());
                ai.setWriteable( mai.isWritable());
                                               
                mbean.addAttribute(ai);
            }

            MBeanOperationInfo opInfo[]=mbi.getOperations();
View Full Code Here

Examples of org.apache.commons.modeler.AttributeInfo

                for (Node descN = firstN; descN != null;
                     descN = DomUtil.getNext( descN ))
                {

                    // Create new attribute info
                    AttributeInfo ai=new AttributeInfo();
                    DomUtil.setAttributes(ai, descN);

                    // Process descriptor subnode
                    Node descriptorN =
                        DomUtil.getChild(descN, "descriptor");
                    if (descriptorN != null) {
                        Node firstFieldN =
                            DomUtil.getChild(descriptorN, "field");
                        for (Node fieldN = firstFieldN; fieldN != null;
                             fieldN = DomUtil.getNext(fieldN)) {
                            FieldInfo fi = new FieldInfo();
                            DomUtil.setAttributes(fi, fieldN);
                            ai.addField(fi);
                        }
                    }

                    // Add this info to our managed bean info
                    managed.addAttribute( ai );
View Full Code Here

Examples of org.apache.commons.modeler.AttributeInfo

        try {

            Enumeration en=attMap.keys();
            while( en.hasMoreElements() ) {
                String name=(String)en.nextElement();
                AttributeInfo ai=new AttributeInfo();
                ai.setName( name );
                Method gm=(Method)getAttMap.get(name);
                if( gm!=null ) {
                    //ai.setGetMethodObj( gm );
                    ai.setGetMethod( gm.getName());
                    Class t=gm.getReturnType();
                    if( t!=null )
                        ai.setType( t.getName() );
                }
                Method sm=(Method)setAttMap.get(name);
                if( sm!=null ) {
                    //ai.setSetMethodObj(sm);
                    Class t=sm.getParameterTypes()[0];
                    if( t!=null )
                        ai.setType( t.getName());
                    ai.setSetMethod( sm.getName());
                }
                ai.setDescription("Introspected attribute " + name);
                if( log.isDebugEnabled()) log.debug("Introspected attribute " +
                        name + " " + gm + " " + sm);
                if( gm==null )
                    ai.setReadable(false);
                if( sm==null )
                    ai.setWriteable(false);
                if( sm!=null || gm!=null )
                    mbean.addAttribute(ai);
            }

            en=invokeAttMap.keys();
View Full Code Here

Examples of org.apache.commons.modeler.AttributeInfo

            MBeanAttributeInfo attInfo[]=mbi.getAttributes();
            for( int i=0; i<attInfo.length; i++ ) {
                MBeanAttributeInfo mai=attInfo[i];
                String name=mai.getName();

                AttributeInfo ai=new AttributeInfo();
                ai.setName( name );

                ai.setType( mai.getType());
                ai.setReadable( mai.isReadable());
                ai.setWriteable( mai.isWritable());
                                               
                mbean.addAttribute(ai);
            }

            MBeanOperationInfo opInfo[]=mbi.getOperations();
View Full Code Here

Examples of org.apache.commons.modeler.AttributeInfo

                for (Node descN = firstN; descN != null;
                     descN = DomUtil.getNext( descN ))
                {

                    // Create new attribute info
                    AttributeInfo ai=new AttributeInfo();
                    DomUtil.setAttributes(ai, descN);

                    // Process descriptor subnode
                    Node descriptorN =
                        DomUtil.getChild(descN, "descriptor");
                    if (descriptorN != null) {
                        Node firstFieldN =
                            DomUtil.getChild(descriptorN, "field");
                        for (Node fieldN = firstFieldN; fieldN != null;
                             fieldN = DomUtil.getNext(fieldN)) {
                            FieldInfo fi = new FieldInfo();
                            DomUtil.setAttributes(fi, fieldN);
                            ai.addField(fi);
                        }
                    }

                    // Add this info to our managed bean info
                    managed.addAttribute( ai );
View Full Code Here

Examples of org.apache.commons.modeler.AttributeInfo

        try {

            Enumeration en=attMap.keys();
            while( en.hasMoreElements() ) {
                String name=(String)en.nextElement();
                AttributeInfo ai=new AttributeInfo();
                ai.setName( name );
                Method gm=(Method)getAttMap.get(name);
                if( gm!=null ) {
                    //ai.setGetMethodObj( gm );
                    ai.setGetMethod( gm.getName());
                    Class t=gm.getReturnType();
                    if( t!=null )
                        ai.setType( t.getName() );
                }
                Method sm=(Method)setAttMap.get(name);
                if( sm!=null ) {
                    //ai.setSetMethodObj(sm);
                    Class t=sm.getParameterTypes()[0];
                    if( t!=null )
                        ai.setType( t.getName());
                    ai.setSetMethod( sm.getName());
                }
                ai.setDescription("Introspected attribute " + name);
                if( log.isDebugEnabled()) log.debug("Introspected attribute " +
                        name + " " + gm + " " + sm);
                if( gm==null )
                    ai.setReadable(false);
                if( sm==null )
                    ai.setWriteable(false);
                if( sm!=null || gm!=null )
                    mbean.addAttribute(ai);
            }

            en=invokeAttMap.keys();
View Full Code Here

Examples of org.apache.commons.modeler.AttributeInfo

                // process attribute info
                firstN=DomUtil.getChild( mbeanN, "attribute");
                for (Node descN = firstN; descN != null;
                     descN = DomUtil.getNext( descN ))
                {
                    AttributeInfo ci=new AttributeInfo();
                    DomUtil.setAttributes(ci, descN);
                    managed.addAttribute( ci );
                }

            }
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.