pubsubcreate.java

来自「一款即时通讯软件」· Java 代码 · 共 65 行

JAVA
65
字号
package edu.ou.kmi.buddyspace.plugins.pubsub.xml;

/*
 * PubsubCreate.java
 *
 * Project: BuddySpace
 * (C) Copyright Knowledge Media Institute 2003
 *
 *
 * Created on 8 October 2003, 13:18
 */

import java.util.*;
import org.jabber.jabberbeans.util.*;
import org.jabber.jabberbeans.*;
import org.jabber.jabberbeans.Extension.*;

/**
 * <code>PubsubCreate</code> contains &lt;create&gt tag from pubsub.
 *
 * @author  Jiri Komzak, Knowledge Media Institute, Open University, United Kingdom
 */
public class PubsubCreate
    extends XMLData
{
    /** Node name */
    private String node;
    
    /**
     * Creates a new <code>PubsubCreate</code> instance, based on the builder
     * state.
     *
     * @param builder an <code>PubsubCreateBuilder</code> value
     * @exception InstantiationException if malformed or insufficient data is
     * in the builder.
     */
    public PubsubCreate(PubsubCreateBuilder builder)
        throws InstantiationException
    {
        node = builder.getNode();
    }
    
    
    public String getNode() {
        return node;
    }
    
    
    /**
     * <code>appendItem</code> appends the XML representation of the
     * current packet data to the specified <code>StringBuffer</code>.
     *
     * @param retval The <code>StringBuffer</code> to append to
     */
    public void appendItem(StringBuffer retval)
    {
	retval.append("<create");
        
        if (node != null)
            retval.append(" node='" + node + "'");
        
        retval.append("/>");
    }
}

⌨️ 快捷键说明

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