1 /** 2 * $RCSfile: DiscoItem.java,v $ 3 * $Revision: 1.2 $ 4 * $Date: 2004/10/25 23:41:58 $ 5 * 6 * Copyright (C) 2004 Jive Software. All rights reserved. 7 * 8 * This software is published under the terms of the GNU Public License (GPL), 9 * a copy of which is included in this distribution. 10 */ 11 12 package org.jivesoftware.messenger.disco; 13 14 /** 15 * An item is associated with an XMPP Entity, usually thought of a children of the parent 16 * entity and normally are addressable as a JID.<p> 17 * <p/> 18 * An item associated with an entity may not be addressable as a JID. In order to handle 19 * such items, Service Discovery uses an optional 'node' attribute that supplements the 20 * 'jid' attribute. 21 * 22 * @author Gaston Dombiak 23 */ 24 public interface DiscoItem { 25 26 /** 27 * Returns the entity's ID. 28 * 29 * @return the entity's ID. 30 */ 31 public abstract String getJID(); 32 33 /** 34 * Returns the node attribute that supplements the 'jid' attribute. A node is merely 35 * something that is associated with a JID and for which the JID can provide information.<p> 36 * <p/> 37 * Node attributes SHOULD be used only when trying to provide or query information which 38 * is not directly addressable. 39 * 40 * @return the node attribute that supplements the 'jid' attribute 41 */ 42 public abstract String getNode(); 43 44 /** 45 * Returns the entity's name. The entity's name specifies in natural-language the name for the 46 * item. 47 * 48 * @return the entity's name. 49 */ 50 public abstract String getName(); 51 52 /** 53 * Returns the action (i.e. update or remove) that indicates what must be done with this item or 54 * null if none. An "update" action requests the server to create or update the item. Whilst a 55 * "remove" action requests to remove the item. 56 * 57 * @return the action (i.e. update or remove) that indicates what must be done with this item or 58 * null if none. 59 */ 60 public abstract String getAction(); 61 } 62