⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setparameterattributes.java

📁 openacs source for CPE wan management
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package org.openacs.message;import java.io.Serializable;import java.util.ArrayList;import java.util.List;import javax.xml.soap.SOAPBodyElement;import javax.xml.soap.SOAPElement;import javax.xml.soap.SOAPException;import javax.xml.soap.SOAPFactory;import org.openacs.Message;/** * * @author Administrator */public class SetParameterAttributes extends Message {    private class SetParameterAttributesStruct implements Serializable {        public String Name;        public boolean NotificationChange;        public int Notification;        public boolean AccessListChange;        public String [] AccessList;                SetParameterAttributesStruct (String Name, boolean NotificationChange, int Notification, boolean AccessListChange, String [] AccessList) {            this.Name = Name;            this.NotificationChange = NotificationChange;            this.Notification = Notification;            this.AccessList = AccessList;            this.AccessListChange = AccessListChange;        }    }        public SetParameterAttributes() {        name = "SetParameterAttributes";        attrs = new ArrayList <SetParameterAttributesStruct> ();    }    public void AddAttribute (String Name, boolean NotificationChange, int Notification, boolean AccessListChange, String [] AccessList) {        attrs.add(new SetParameterAttributesStruct (Name, NotificationChange, Notification, AccessListChange, AccessList));    }    protected void createBody(SOAPBodyElement body, SOAPFactory spf) throws SOAPException {        SOAPElement elm = body.addChildElement(spf.createName("ParameterList"));        elm.setAttribute("soap-enc:arrayType", "xsd:SetParameterAttributesStruct["+String.valueOf(attrs.size())+"]" );        int c = attrs.size();        for (int i = 0; i < c; i++) {            SOAPElement  param = elm.addChildElement("SetParameterAttributesStruct");            param.addChildElement("Name").setValue(attrs.get(i).Name);            param.addChildElement("NotificationChange").setValue(b2s(attrs.get(i).NotificationChange));            param.addChildElement("Notification").setValue(String.valueOf(attrs.get(i).Notification));            SOAPElement al = body.addChildElement(spf.createName("AccessList"));            String acl [] = attrs.get(i).AccessList;            int ca = acl.length;            al.setAttribute("soap-enc:arrayType", "xsd:string["+String.valueOf(ca)+"]" );            for (int i2 = 0; i2 < ca; i2++) {                SOAPElement acle = al.addChildElement("string");                acle.setValue(acl[i2]);                acle.setAttribute ("xsi:type","xsd:string");            }                        param.addChildElement("AccessListChange").setValue(b2s(attrs.get(i).AccessListChange));        }    }    protected void parseBody(SOAPBodyElement body, SOAPFactory f) throws SOAPException {    }    private List <SetParameterAttributesStruct> attrs;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -