diff options
author | Emil Ivov <emcho@jitsi.org> | 2006-02-05 16:07:13 +0000 |
---|---|---|
committer | Emil Ivov <emcho@jitsi.org> | 2006-02-05 16:07:13 +0000 |
commit | 812d105c664d15f1c4413a77f751113c5adfb4d2 (patch) | |
tree | a31a8603d1d856e12e75ec0e698371cdc88fe21f /src/net/java/sip/communicator | |
parent | 55e0911c61e697db067abc8bca1cb7b090502f97 (diff) | |
download | jitsi-812d105c664d15f1c4413a77f751113c5adfb4d2.zip jitsi-812d105c664d15f1c4413a77f751113c5adfb4d2.tar.gz jitsi-812d105c664d15f1c4413a77f751113c5adfb4d2.tar.bz2 |
Replaced <code> tags with <tt> in all javadocs
Diffstat (limited to 'src/net/java/sip/communicator')
44 files changed, 1022 insertions, 260 deletions
diff --git a/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java b/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java index d0a116e..44d1207 100644 --- a/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java +++ b/src/net/java/sip/communicator/impl/configuration/ChangeEventDispatcher.java @@ -50,7 +50,7 @@ public class ChangeEventDispatcher private Object source; /** - * Constructs a <code>VetoableChangeSupport</code> object. + * Constructs a <tt>VetoableChangeSupport</tt> object. * * @param sourceObject The object to be given as the source for any events. */ diff --git a/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java b/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java index 2707da1..c217116 100644 --- a/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java +++ b/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java @@ -657,10 +657,10 @@ public class ConfigurationServiceImpl } /** - * Creates new entries in the xml <code>doc</code> for every element in the - * <code>newProperties</code> table. + * Creates new entries in the xml <tt>doc</tt> for every element in the + * <tt>newProperties</tt> table. * - * @param doc the XML <code>Document</code> where the new entries should be + * @param doc the XML <tt>Document</tt> where the new entries should be * created * @param newProperties the table containing the properties that are to be * in troduced in the document. @@ -682,11 +682,11 @@ public class ConfigurationServiceImpl } /** - * Creates an entry in the xml <code>doc</code> for the specified key value + * Creates an entry in the xml <tt>doc</tt> for the specified key value * pair. - * @param doc the XML <code>document</code> to update. - * @param key the value of the <code>name</code> attribute for the new entry - * @param value the value of the <code>value</code> attribue for the new + * @param doc the XML <tt>document</tt> to update. + * @param key the value of the <tt>name</tt> attribute for the new entry + * @param value the value of the <tt>value</tt> attribue for the new * @param isSystem specifies whether this is a system property (system * attribute will be set to true). * entry. @@ -757,7 +757,7 @@ public class ConfigurationServiceImpl * @param propertyName the name of the property that is being queried. * @return the result of calling the property's toString method and null in * case there was no vlaue mapped against the specified - * <code>propertyName</code>, or the returned string had zero length or + * <tt>propertyName</tt>, or the returned string had zero length or * contained whitespaces only. */ public String getString(String propertyName) @@ -829,7 +829,7 @@ public class ConfigurationServiceImpl /** * Determines whether the property with the specified - * <code>propertyName</code> has been previously declared as System + * <tt>propertyName</tt> has been previously declared as System * * @param propertyName the name of the property to verify * @return true if someone at some point specified that property to be diff --git a/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java b/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java new file mode 100644 index 0000000..173d7ea --- /dev/null +++ b/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java @@ -0,0 +1,164 @@ +package net.java.sip.communicator.impl.contactlist; + +import java.util.*; + +import net.java.sip.communicator.service.contactlist.*; + +/** + * A Default implementation of a MetaContactGroup. + * + * @author Emil Ivov + */ +public class MetaContactGroupImpl + implements MetaContactGroup +{ + /** + * All child contacts for this group. + */ + private Vector childContacts = new Vector(); + + private final List dummySubgroupsList = new LinkedList(); + + protected MetaContactGroupImpl() + { + } + + /** + * Determines whether or not this group can contain subgroups. + * + * @return Always false since only the root contact group may contain sub + * groups in our implementation. + */ + public boolean canContainSubgroups() + { + return false; + } + + /** + * Returns the number of <tt>MetaContact</tt>s that this group contains + * <p> + * @return an int indicating the number of MetaContact-s that this group + * contains. + */ + public int countChildContacts() + { + return childContacts.size(); + } + + /** + * Returns a <tt>java.util.Iterator</tt> over the <tt>MetaContact</tt>s + * contained in this <tt>MetaContactGroup</tt>. + * + * @return a <tt>java.util.Iterator</tt> over the <tt>MetaContacts</tt> + * in this group. + */ + public Iterator getChildContacts() + { + return childContacts.iterator(); + } + + /** + * Returns the contact with the specified identifier + * + * @param metaContactID a String identifier obtained through the + * <tt>MetaContact.getMetaContactID()</tt> method. <p> + * @return the <tt>MetaContact</tt> with the specified idnetifier. + */ + public MetaContact getMetaContact(String metaContactID) + { + Iterator contactsIter = getChildContacts(); + while(contactsIter.hasNext()) + { + MetaContact contact = (MetaContact)contactsIter.next(); + + if (contact.getMetaContactID().equals(metaContactID)) + return contact; + } + + return null; + } + + /** + * Returns the meta contact on the specified index. + * + * @param index the index of the meta contact to return. + * @return the MetaContact with the specified index, <p> + * @throws IndexOutOfBoundsException in case <tt>index</tt> is not a + * valid index for this group. + */ + public MetaContact getMetaContact(int index) throws + IndexOutOfBoundsException + { + return (MetaContact)childContacts.get(index); + } + + /** + * Returns the <tt>MetaContactGroup</tt> with the specified index. + * + * @param index the index of the group to return. + * @return always null since only the root contact group may contain sub + * gorups in our implementation. + * @throws IndexOutOfBoundsException if <tt>index</tt> is not a valid + * index. + */ + public MetaContactGroup getMetaContactSubgroup(int index) throws + IndexOutOfBoundsException + { + return null; + } + + /** + * Returns the <tt>MetaContactGroup</tt> with the specified name. + * + * @param groupName the name of the group to return. + * @return always null since only the root contact group may contain + * subgroups in our implementation. + */ + public MetaContactGroup getMetaContactSubgroup(String groupName) + { + return null; + } + + /** + * Returns the number of subgroups that this <tt>MetaContactGroup</tt> + * contains. + * + * @return always 0 since only the root contact group may contain subgroups + * in our implementation. + */ + public int countSubgroups() + { + return 0; + } + + /** + * Returns an <tt>java.util.Iterator</tt> over the sub groups that this + * <tt>MetaContactGroup</tt> contains. + * + * @return an Iterator over the empty subgroups list. + */ + public Iterator getSubgroups() + { + return childContacts.iterator(); + } + + /** + * Adds the specified <tt>metaContact</tt> to ths local list of child + * contacts. + * @param metaContact the <tt>MetaContact</tt> to add in the local vector. + */ + void addMetaContact(MetaContact metaContact) + { + this.childContacts.add(metaContact); + } + + /** + * Removes the specified <tt>metaContact</tt> from the local list of + * contacts. + * @param metaContact the <tt>MetaContact</tt> + */ + void removeMetaContact(MetaContact metaContact) + { + this.childContacts.remove( metaContact ); + } +} diff --git a/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java b/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java new file mode 100644 index 0000000..7f3a776 --- /dev/null +++ b/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java @@ -0,0 +1,406 @@ +/* + * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ +package net.java.sip.communicator.impl.contactlist; + +import net.java.sip.communicator.service.contactlist.*; +import net.java.sip.communicator.service.contactlist.event.*; +import net.java.sip.communicator.service.protocol.*; +import java.util.*; +import org.osgi.framework.*; +import net.java.sip.communicator.util.Logger; + +/** + * An almost dummy implementation of the MetaContactListService that would only + * connect to protocol service providers and build its contact list + * accordingly only basing itself on the contact list stored by the icq service. + * <p> + * In its current form, the purpose of this implementation is to provide a tool + * for retrieving any contact list so that other modules such as the user + * interface may use it. + * <p> + * Because of its experimental-patch nature, the implementa would only function + * properly if the underlying service providers have already been loaded at the + * time this one gets started. + * + * @author Emil Ivov + */ +public class MetaContactListServiceImpl + implements MetaContactListService, + ServiceListener +{ + private static final Logger logger = + Logger.getLogger(MetaContactListServiceImpl.class); + /** + * Listeners interested in events dispatched upond modification of the + * meta contact list. + */ + private Vector contactListListeners = new Vector(); + + /** + * The BundleContext that we got from the OSGI bus. + */ + private BundleContext bundleContext = null; + + /** + * The list of protocol providers that we're currently aware of. + */ + Vector currentlyInstalledProviders = new Vector(); + + /** + * Creates an instance of this class. + */ + public MetaContactListServiceImpl() + { + } + + /** + *Starts this implementation of the MetaContactListService. The + * implementation would first restore a default contact list from what has + * been stored in a file. It would then connect to OSGI and retrieve + * any existing protocol providers and if <br> + * 1) They provide implementations of OperationSetPersistentPresence, it + * would synchronize their contact lists with the local one (adding + * subscriptions for contacts that do not exist in the server stored + * contact list and ading locally contacts that were found on the server + * but not in the local file). + * <p> + * 2) The only provide non persistent implementations of + * OperationSetPresence, the meta contact list impl would create + * subscriptions for all local contacts in the corresponding protocol + * provider. + * <p> + * This implementation would also start listening for any newly registered + * protocol provider implementations and perform the same algorithm with + * them. + */ + public void start(BundleContext bc) + { + this.bundleContext = bc; + + //start listening for newly register or removed protocol providers + bc.addServiceListener(this); + + //first discover the icq service + //find the protocol provider service + ServiceReference[] protocolProviderRefs = null; + try + { + protocolProviderRefs + = bc.getServiceReferences( + ProtocolProviderService.class.getName(), null); + } + catch (InvalidSyntaxException ex) + { + //this shouldn't happen since we're providing no parameter string + //but let's log just in case. + logger.error("Error while retrieving service refs", ex); + return; + } + + //retrieve the root groups for all protocol providers and create the + //meta contact list + for (int i = 0; i < protocolProviderRefs.length; i++) + { + ProtocolProviderService provider = (ProtocolProviderService)bc + .getService(protocolProviderRefs[i]); + + this.handleProviderAdded(provider); + } + } + + /** + * Adds a listener for <tt>MetaContactListChangeEvent</tt>s posted + * after the tree changes. + * + * @param l the listener to add + */ + public void addContactListListener(MetaContactListListener l) + { + /**@todo implement addContactListListener() */ + System.out.println("@todo implement addContactListListener()"); + } + + /** + * First makes the specified protocol provider create the contact as + * indicated by <tt>contactID</tt>, and then associates it to the + * _existing_ <tt>metaContact</tt> given as an argument. + * + * @param provider the ProtocolProviderService that should create the + * contact indicated by <tt>contactID</tt>. + * @param metaContact the meta contact where that the newly created + * contact should be associated to. + * @param contactID the identifier of the contact that the specified + * provider + * @throws MetaContactListException with an appropriate code if the + * operation fails for some reason. + */ + public void addNewContactToMetaContact(ProtocolProviderService provider, + MetaContact metaContact, + String contactID) throws + MetaContactListException + { + /**@todo implement addNewContactToMetaContact() */ + System.out.println("@todo implement addNewContactToMetaContact()"); + } + + /** + * First makes the specified protocol provider create a contact + * corresponding to the specified <tt>contactID</tt>, then creates a + * new MetaContact which will encapsulate the newly crated protocol + * specific contact. + * + * @param provider a ref to <tt>ProtocolProviderService</tt> + * instance which will create the actual protocol specific contact. + * @param contactGroup the MetaContactGroup where the newly created meta + * contact should be stored. + * @param contactID a protocol specific string identifier indicating the + * contact the prtocol provider should create. + * @throws MetaContactListException with an appropriate code if the + * operation fails for some reason. + */ + public void createMetaContact(ProtocolProviderService provider, + MetaContactGroup contactGroup, + String contactID) throws + MetaContactListException + { + /**@todo implement createMetaContact() */ + System.out.println("@todo implement createMetaContact()"); + } + + /** + * Creates a <tt>MetaContactGroup</tt> with the specified group name. + * + * @param groupName the name of the <tt>MetaContactGroup</tt> to + * create. + * @throws MetaContactListException with an appropriate code if the + * operation fails for some reason. + */ + public void createMetaContactGroup(String groupName) throws + MetaContactListException + { + /**@todo implement createMetaContactGroup() */ + System.out.println("@todo implement createMetaContactGroup()"); + } + + /** + * Returns the root <tt>MetaContactGroup</tt> in this contact list. + * + * @return the root <tt>MetaContactGroup</tt> for this contact list. + */ + public MetaContactGroup getRoot() + { + /**@todo implement getRoot() */ + System.out.println("@todo implement getRoot()"); + return null; + } + + /** + * Makes the specified <tt>contact</tt> a child of the + * <tt>newParent</tt> MetaContact. + * + * @param contact the <tt>Contact</tt> to move to the + * @param newParent the MetaContact where we'd like contact to be moved. + * @throws MetaContactListException with an appropriate code if the + * operation fails for some reason. + */ + public void moveContact(Contact contact, MetaContact newParent) throws + MetaContactListException + { + /**@todo implement moveContact() */ + System.out.println("@todo implement moveContact()"); + } + + /** + * Moves the specified <tt>MetaContact</tt> to <tt>newGroup</tt>. + * + * @param metaContact the <tt>MetaContact</tt> to move. + * @param newGroup the <tt>MetaContactGroup</tt> that should be the + * new parent of <tt>contact</tt>. + * @throws MetaContactListException with an appropriate code if the + * operation fails for some reason. + */ + public void moveMetaContact(MetaContact metaContact, + MetaContactGroup newGroup) throws + MetaContactListException + { + /**@todo implement moveMetaContact() */ + System.out.println("@todo implement moveMetaContact()"); + } + + /** + * Deletes the specified contact from both the local contact list and (if + * applicable) the server stored contact list if supported by the + * corresponding protocol. + * + * @param contact the contact to remove. + * @throws MetaContactListException with an appropriate code if the + * operation fails for some reason. + */ + public void removeContact(Contact contact) throws MetaContactListException + { + /**@todo implement removeContact() */ + System.out.println("@todo implement removeContact()"); + } + + /** + * Removes a listener previously added with + * <tt>addContactListListener</tt>. + * + * @param l the listener to remove + */ + public void removeContactListListener(MetaContactListListener l) + { + /**@todo implement removeContactListListener() */ + System.out.println("@todo implement removeContactListListener()"); + } + + /** + * Removes the specified <tt>metaContact</tt> as well as all of its + * underlying contacts. + * + * @param metaContact the metaContact to remove. + * @throws MetaContactListException with an appropriate code if the + * operation fails for some reason. + */ + public void removeMetaContact(MetaContact metaContact) throws + MetaContactListException + { + /**@todo implement removeMetaContact() */ + System.out.println("@todo implement removeMetaContact()"); + } + + /** + * Removes the specified meta contact group, all its corresponding + * protocol specific groups and all their children. + * + * @param groupToRemove the <tt>MetaContactGroup</tt> to have + * removed. + * @throws MetaContactListException with an appropriate code if the + * operation fails for some reason. + */ + public void removeMetaContactGroup(MetaContactGroup groupToRemove) throws + MetaContactListException + { + /**@todo implement removeMetaContactGroup() */ + System.out.println("@todo implement removeMetaContactGroup()"); + } + + /** + * Returns the MetaContact containing the specified contact or null if no + * such MetaContact was found. The method can be used when for example + * we need to find the MetaContact that is the author of an incoming message + * and the corresponding ProtocolProviderService has only provided a + * <tt>Contact</tt> as its author. + * @return the MetaContact containing the speicified contact or null + * if no such contact is present in this contact list. + */ + public MetaContact findMetaContactByContact(Contact contact) + { + /** @todo implement findMetaContactByContact() */ + return null; + } + + /** + * Returns the MetaContact that corresponds to the specified metaContactID. + * + * @param metaContactID a String identifier of a meta contact. + * @return the MetaContact with the speicified string identifier or null + * if no such meta contact was found. + */ + public MetaContact findMetaContactByID(String metaContactID) + { + /** @todo implement findMetaContactByID() */ + return null; + } + + /** + * Goes through the server stored ContactList of the specified operation + * set, retrieves all protocol specific contacts it contains and makes + * sure they are all present in the local contact list. + * @param presenceOpSet the presence operation set whose contact list we'd + * like to synchronize with the local contact list. + */ + private void synchronizeWithServerContactList( + OperationSetPersistentPresence presenceOpSet) + { + ContactGroup root = presenceOpSet.getServerStoredContactListRoot(); + + + + logger.trace("subgroups: " + root.countSubGroups()); + } + + /** + * Adds the specified provider to the list of currently known providers. In + * case the provider supports persistent presence the method would also + * extract all contacts and synchronize them with the local contact list. + * Otherwise it would start a process where local contacts would be added + * on the server. + * + * @param provider the ProtocolProviderService that we've just detected. + */ + private void handleProviderAdded(ProtocolProviderService provider) + { + logger.debug("Adding protocol provider " + provider.getProtocolName()); + + //first check whether the provider has a persistent presence op set + OperationSetPersistentPresence opSetPersPresence + = (OperationSetPersistentPresence)provider + .getSupportedOperationSets() .get( + OperationSetPersistentPresence.class.getName()); + + //If we have a persistent presence op set - then retrieve its contat + //list and merge it with the local one. + if( opSetPersPresence != null ){ + synchronizeWithServerContactList(opSetPersPresence); + } + + /** @todo implement handling non persistent presence operation sets */ + this.currentlyInstalledProviders.add(provider); + } + + /** + * Removes the specified provider from the list of currently known providers + * and ignores all the contacts that it has registered locally. + * @param provider the ProtocolProviderService that has been unregistered. + */ + private void handleProviderRemoved(ProtocolProviderService provider) + { + logger.debug("Removing protocol provider " + provider.getProtocolName()); + + this.currentlyInstalledProviders.remove(provider); + } + + /** + * Implements the <tt>ServiceListener</tt> method. Verifies whether the + * passed event concerns a <tt>ProtocolProviderService</tt> and modifies the + * list of registered protocol providers accordingly. + * + * @param event The <tt>ServiceEvent</tt> object. + */ + public void serviceChanged(ServiceEvent event) + { + Object sService = bundleContext.getService(event.getServiceReference()); + + logger.trace("Received a service event for: " + + sService.getClass().getName()); + + //we don't care if the source service is not a protocol provider + if( !(sService instanceof ProtocolProviderService) ) + return; + + if(event.getType() == ServiceEvent.REGISTERED) + { + this.handleProviderAdded((ProtocolProviderService)sService); + } + else if(event.getType() == ServiceEvent.UNREGISTERING) + { + this.handleProviderRemoved((ProtocolProviderService)sService); + } + } + +} diff --git a/src/net/java/sip/communicator/impl/netaddr/AddressPreference.java b/src/net/java/sip/communicator/impl/netaddr/AddressPreference.java index 612e019..b5369dc 100644 --- a/src/net/java/sip/communicator/impl/netaddr/AddressPreference.java +++ b/src/net/java/sip/communicator/impl/netaddr/AddressPreference.java @@ -81,7 +81,7 @@ public class AddressPreference } /** - * Returns true if <code>obj</code> is the same object as this + * Returns true if <tt>obj</tt> is the same object as this * AddressPreference or is at least an instance of AddressPreference and * has the same numerical value. In all other cases the method returns * false. diff --git a/src/net/java/sip/communicator/impl/netaddr/NetworkAddressManagerServiceImpl.java b/src/net/java/sip/communicator/impl/netaddr/NetworkAddressManagerServiceImpl.java index 8409033..ada7d36 100644 --- a/src/net/java/sip/communicator/impl/netaddr/NetworkAddressManagerServiceImpl.java +++ b/src/net/java/sip/communicator/impl/netaddr/NetworkAddressManagerServiceImpl.java @@ -555,7 +555,7 @@ public class NetworkAddressManagerServiceImpl * change. In case we don't like the new value we throw a * PropertyVetoException to prevent the actual change from happening. * - * @param evt a <code>PropertyChangeEvent</code> object describing the + * @param evt a <tt>PropertyChangeEvent</tt> object describing the * event source and the property that will change. * @exception PropertyVetoException if we don't want the change to happen. */ diff --git a/src/net/java/sip/communicator/impl/protocol/icq/AbstractContactGroupIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/AbstractContactGroupIcqImpl.java index 2c86403..92039e7 100644 --- a/src/net/java/sip/communicator/impl/protocol/icq/AbstractContactGroupIcqImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/icq/AbstractContactGroupIcqImpl.java @@ -4,9 +4,9 @@ import net.java.sip.communicator.service.protocol.*; /** * The ICQ implementation of the service.protocol.ContactGroup interface. There - * are two types of groups possible here. <code>RootContactGroupIcqImpl</code> + * are two types of groups possible here. <tt>RootContactGroupIcqImpl</tt> * which is the root node of the ContactList itself and - * <code>ContactGroupIcqImpl</code> which represents standard icq groups. The + * <tt>ContactGroupIcqImpl</tt> which represents standard icq groups. The * reason for having those 2 is that generally, ICQ groups may not contain * subgroups. A contact list on the other hand may not directly contain buddies. * diff --git a/src/net/java/sip/communicator/impl/protocol/icq/AccountManagerIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/AccountManagerIcqImpl.java index 03080d4..0e8b25c 100644 --- a/src/net/java/sip/communicator/impl/protocol/icq/AccountManagerIcqImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/icq/AccountManagerIcqImpl.java @@ -62,7 +62,7 @@ public class AccountManagerIcqImpl /** * Initializaed and creates an accoung corresponding to the specified * accountProperties and registers the resulting ProtocolProvider in the - * <code>context</code> BundleContext parameter. + * <tt>context</tt> BundleContext parameter. * * @param context the BundleContext parameter where the newly created * ProtocolProviderService would have to be registered. diff --git a/src/net/java/sip/communicator/impl/protocol/icq/ContactGroupIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/ContactGroupIcqImpl.java index 56bc107..be754c7 100644 --- a/src/net/java/sip/communicator/impl/protocol/icq/ContactGroupIcqImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/icq/ContactGroupIcqImpl.java @@ -14,10 +14,10 @@ import net.kano.joustsim.*; /** * The ICQ implementation of the ContactGroup interface. Intances of this class - * (contrary to <code>RootContactGroupIcqImpl</code>) may only contain buddies + * (contrary to <tt>RootContactGroupIcqImpl</tt>) may only contain buddies * and cannot have sub groups. Note that instances of this class only use the * corresponding joust sim source group for reading their names and only - * initially fill their <code>buddies</code> <code>java.util.List</code> with + * initially fill their <tt>buddies</tt> <tt>java.util.List</tt> with * the ContactIcqImpl objects corresponding to those contained in the source * group at the moment it is being created. They would, however, never try to * sync or update their contents ulteriorly. This would have to be done through @@ -48,7 +48,7 @@ public class ContactGroupIcqImpl private String nameCopy = null; /** - * Creates an ICQ group using the specified <code>joustSimGroup</code> as + * Creates an ICQ group using the specified <tt>joustSimGroup</tt> as * a source. The newly created group will always return the name of the * underlying joustSimGroup and would thus automatically adapt to changes. * It would, however, not receive or try to poll for modifications of the @@ -89,11 +89,11 @@ public class ContactGroupIcqImpl } /** - * Returns the number of <code>Contact</code> members of this - * <code>ContactGroup</code> + * Returns the number of <tt>Contact</tt> members of this + * <tt>ContactGroup</tt> * - * @return an int indicating the number of <code>Contact</code>s, - * members of this <code>ContactGroup</code>. + * @return an int indicating the number of <tt>Contact</tt>s, + * members of this <tt>ContactGroup</tt>. */ public int countContacts() { @@ -140,7 +140,7 @@ public class ContactGroupIcqImpl /** * Removes all buddies in this group and reinsterts them as specified - * by the <code>newOrder</code> param. Contacts not contained in the + * by the <tt>newOrder</tt> param. Contacts not contained in the * newOrder list are left at the end of this group. * * @param newOrder a list containing all contacts in the order that is @@ -155,10 +155,10 @@ public class ContactGroupIcqImpl /** * Returns an Iterator over all contacts, member of this - * <code>ContactGroup</code>. + * <tt>ContactGroup</tt>. * * @return a java.util.Iterator over all contacts inside this - * <code>ContactGroup</code>. In case the group doesn't contain any + * <tt>ContactGroup</tt>. In case the group doesn't contain any * memebers it will return an empty iterator. */ public Iterator contacts() @@ -167,10 +167,10 @@ public class ContactGroupIcqImpl } /** - * Returns the <code>Contact</code> with the specified index. + * Returns the <tt>Contact</tt> with the specified index. * - * @param index the index of the <code>Contact</code> to return. - * @return the <code>Contact</code> with the specified index. + * @param index the index of the <tt>Contact</tt> to return. + * @return the <tt>Contact</tt> with the specified index. */ public Contact getContact(int index) { @@ -178,11 +178,11 @@ public class ContactGroupIcqImpl } /** - * Returns the <code>Contact</code> with the specified address or + * Returns the <tt>Contact</tt> with the specified address or * identifier. - * @param id the addres or identifier of the <code>Contact</code> we are + * @param id the addres or identifier of the <tt>Contact</tt> we are * looking for. - * @return the <code>Contact</code> with the specified id or address. + * @return the <tt>Contact</tt> with the specified id or address. */ public Contact getContact(String id) { @@ -212,7 +212,7 @@ public class ContactGroupIcqImpl * Returns the subgroup with the specified index (i.e. always null since * this group may not contain subgroups). * - * @param index the index of the <code>ContactGroup</code> to retrieve. + * @param index the index of the <tt>ContactGroup</tt> to retrieve. * @return always null */ public ContactGroup getGroup(int index) @@ -222,8 +222,8 @@ public class ContactGroupIcqImpl /** * Returns the subgroup with the specified name. - * @param groupName the name of the <code>ContactGroup</code> to retrieve. - * @return the <code>ContactGroup</code> with the specified index. + * @param groupName the name of the <tt>ContactGroup</tt> to retrieve. + * @return the <tt>ContactGroup</tt> with the specified index. */ public ContactGroup getGroup(String groupName) { @@ -244,7 +244,7 @@ public class ContactGroupIcqImpl /** * Returns the number of subgroups contained by this group, which is * always 0 since sub groups in the icq protocol may only be contained - * by the root group - <code>RootContactGroupIcqImpl</code>. + * by the root group - <tt>RootContactGroupIcqImpl</tt>. * @return a 0 int. */ public int countSubGroups() @@ -279,8 +279,8 @@ public class ContactGroupIcqImpl * <p> * * @param obj the reference object with which to compare. - * @return <code>true</code> if this object is the same as the obj - * argument; <code>false</code> otherwise. + * @return <tt>true</tt> if this object is the same as the obj + * argument; <tt>false</tt> otherwise. */ public boolean equals(Object obj) { @@ -328,7 +328,7 @@ public class ContactGroupIcqImpl * * @param joustSimBuddy the buddy whose encapsulating contact we're looking * for. - * @return the <code>ContactIcqImpl</code> corresponding to the specified + * @return the <tt>ContactIcqImpl</tt> corresponding to the specified * joustSimBuddy or null if no such contact was found. */ ContactIcqImpl findContact(Buddy joustSimBuddy) @@ -372,7 +372,7 @@ public class ContactGroupIcqImpl * * @param screenName the screenName (or icq UIN) for the contact we're * looking for. - * @return the <code>ContactIcqImpl</code> corresponding to the specified + * @return the <tt>ContactIcqImpl</tt> corresponding to the specified * screnname or null if no such contact existed. */ ContactIcqImpl findContact(String screenName) @@ -400,7 +400,7 @@ public class ContactGroupIcqImpl /** * Returns the name of the group as it was at the last call of initNameCopy. * @return a String containing a copy of the name of this group as it was - * last time when we called <code>initNameCopy</code>. + * last time when we called <tt>initNameCopy</tt>. */ String getNameCopy() { diff --git a/src/net/java/sip/communicator/impl/protocol/icq/ContactIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/ContactIcqImpl.java index c2a77b0..f4f51e9 100644 --- a/src/net/java/sip/communicator/impl/protocol/icq/ContactIcqImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/icq/ContactIcqImpl.java @@ -78,8 +78,8 @@ public class ContactIcqImpl * <p> * * @param obj the reference object with which to compare. - * @return <code>true</code> if this object is the same as the obj - * argument; <code>false</code> otherwise. + * @return <tt>true</tt> if this object is the same as the obj + * argument; <tt>false</tt> otherwise. */ public boolean equals(Object obj) { @@ -132,8 +132,8 @@ public class ContactIcqImpl * received for it. Note that this method is not to perform any network * operations and will simply return the status received in the last * status update message. If you want a reliable way of retrieving someone's - * status, you should use the <code>queryContactStatus()</code> method in - * <code>OperationSetPresence</code>. + * status, you should use the <tt>queryContactStatus()</tt> method in + * <tt>OperationSetPresence</tt>. * @return the PresenceStatus that we've received in the last status update * pertaining to this contact. */ diff --git a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java index b167a90..be42925 100644 --- a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetPersistentPresenceIcqImpl.java @@ -249,12 +249,12 @@ public class OperationSetPersistentPresenceIcqImpl * <p> * @param contactIdentifier the dientifier of the contact whose status we're * interested in. - * @return PresenceStatus the <code>PresenceStatus</code> of the specified - * <code>contact</code> + * @return PresenceStatus the <tt>PresenceStatus</tt> of the specified + * <tt>contact</tt> * @throws java.lang.IllegalStateException if the provider is not signed * on ICQ - * @throws java.lang.IllegalArgumentException if <code>contact</code> is not - * a valid <code>IcqContact</code> + * @throws java.lang.IllegalArgumentException if <tt>contact</tt> is not + * a valid <tt>IcqContact</tt> */ public PresenceStatus queryContactStatus(String contactIdentifier) throws IllegalStateException, IllegalArgumentException @@ -369,7 +369,7 @@ public class OperationSetPersistentPresenceIcqImpl * <p> * @throws OperationFailedException with code NETWORK_FAILURE if subscribing * fails due to errors experienced during network communication - * @throws IllegalArgumentException if <code>contact</code> is not a contact + * @throws IllegalArgumentException if <tt>contact</tt> is not a contact * known to the underlying protocol provider * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -401,8 +401,8 @@ public class OperationSetPersistentPresenceIcqImpl * <p> * @throws OperationFailedException with code NETWORK_FAILURE if subscribing * fails due to errors experienced during network communication - * @throws IllegalArgumentException if <code>contact</code> or - * <code>parent</code> are not a contact known to the underlying protocol + * @throws IllegalArgumentException if <tt>contact</tt> or + * <tt>parent</tt> are not a contact known to the underlying protocol * provider. * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -427,7 +427,7 @@ public class OperationSetPersistentPresenceIcqImpl * * @throws OperationFailedException with code NETWORK_FAILURE if unsubscribing * fails due to errors experienced during network communication - * @throws IllegalArgumentException if <code>contact</code> is not a contact + * @throws IllegalArgumentException if <tt>contact</tt> is not a contact * known to this protocol provider or is not an ICQ contact * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -462,7 +462,7 @@ public class OperationSetPersistentPresenceIcqImpl * @param contactID a String identifier of the contact which we're seeking a * reference of. * @return a reference to the Contact with the specified - * <code>contactID</code> or null if we don't have a subscription for the + * <tt>contactID</tt> or null if we don't have a subscription for the * that identifier. */ public Contact findContactByID(String contactID) @@ -544,7 +544,7 @@ public class OperationSetPersistentPresenceIcqImpl * * @throws OperationFailedException with code NETWORK_FAILURE if unsubscribing * fails due to errors experienced during network communication - * @throws IllegalArgumentException if <code>contact</code> is not a contact + * @throws IllegalArgumentException if <tt>contact</tt> is not a contact * known to the underlying protocol provider * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -568,7 +568,7 @@ public class OperationSetPersistentPresenceIcqImpl * * @throws OperationFailedException with code NETWORK_FAILURE if deleting * the group fails because of a network error. - * @throws IllegalArgumentException if <code>parent</code> is not a contact + * @throws IllegalArgumentException if <tt>parent</tt> is not a contact * known to the underlying protocol provider. * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -587,7 +587,7 @@ public class OperationSetPersistentPresenceIcqImpl /** * Renames the specified group from the server stored contact list. This * method would return before the group has actually been renamed. A - * <code>ServerStoredGroupEvent</code> would be dispatched once new name + * <tt>ServerStoredGroupEvent</tt> would be dispatched once new name * has been acknowledged by the server. * * @param group the group to rename. @@ -595,7 +595,7 @@ public class OperationSetPersistentPresenceIcqImpl * * @throws OperationFailedException with code NETWORK_FAILURE if deleting * the group fails because of a network error. - * @throws IllegalArgumentException if <code>parent</code> is not a contact + * @throws IllegalArgumentException if <tt>parent</tt> is not a contact * known to the underlying protocol provider. * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -614,9 +614,9 @@ public class OperationSetPersistentPresenceIcqImpl /** * Removes the specified contact from its current parent and places it - * under <code>newParent</code>. - * @param contactToMove the <code>Contact</code> to move - * @param newParent the <code>ContactGroup</code> where <code>Contact</code> + * under <tt>newParent</tt>. + * @param contactToMove the <tt>Contact</tt> to move + * @param newParent the <tt>ContactGroup</tt> where <tt>Contact</tt> * would be placed. */ public void moveContactToGroup(Contact contactToMove, diff --git a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderServiceIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderServiceIcqImpl.java index 32c0c27..72990b5 100644 --- a/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderServiceIcqImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/icq/ProtocolProviderServiceIcqImpl.java @@ -59,13 +59,13 @@ public class ProtocolProviderServiceIcqImpl /** * A list of all listeners registered for - * <code>RegistrationStateChangeEvent</code>s. + * <tt>RegistrationStateChangeEvent</tt>s. */ private List registrationListeners = new ArrayList(); /** * Returns the state of the registration of this protocol provider - * @return the <code>RegistrationState</code> that this provider is + * @return the <tt>RegistrationState</tt> that this provider is * currently in or null in case it is in a unknown state. */ public RegistrationState getRegistrationState() @@ -170,7 +170,7 @@ public class ProtocolProviderServiceIcqImpl * Initialized the service implementation, and puts it in a sate where it * could interoperate with other services. It is strongly recomended that * properties in this Map be mapped to property names as specified by - * <code>AccountProperties</code>. + * <tt>AccountProperties</tt>. * * @param screenname the account id/uin/screenname of the account that we're * about to create @@ -248,7 +248,7 @@ public class ProtocolProviderServiceIcqImpl * RegistrationState of this provider. * * @param listener the listener to register for - * <code>RegistrationStateChangeEvent</code>s. + * <tt>RegistrationStateChangeEvent</tt>s. */ public void removeRegistrationStateChangeListener( RegistrationStateChangeListener listener) @@ -338,8 +338,8 @@ public class ProtocolProviderServiceIcqImpl } /** - * Returns the <code>AimSession</code> opened by this provider. - * @return a reference to the <code>AimSession</code> that this provider + * Returns the <tt>AimSession</tt> opened by this provider. + * @return a reference to the <tt>AimSession</tt> that this provider * last opened. */ protected AimSession getAimSession() @@ -348,8 +348,8 @@ public class ProtocolProviderServiceIcqImpl } /** - * Returns the <code>AimConnection</code>opened by this provider - * @return a reference to the <code>AimConnection</code> last opened by this provider. + * Returns the <tt>AimConnection</tt>opened by this provider + * @return a reference to the <tt>AimConnection</tt> last opened by this provider. */ protected AimConnection getAimConnection() { diff --git a/src/net/java/sip/communicator/impl/protocol/icq/RootContactGroupIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/RootContactGroupIcqImpl.java index 42641d5..b7a4c81 100644 --- a/src/net/java/sip/communicator/impl/protocol/icq/RootContactGroupIcqImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/icq/RootContactGroupIcqImpl.java @@ -33,7 +33,7 @@ public class RootContactGroupIcqImpl /** * Returns the name of this group which is always - * <code>ROOT_CONTACT_GROUP_NAME</code>. + * <tt>ROOT_CONTACT_GROUP_NAME</tt>. * * @return a String containing the name of this group. */ @@ -83,7 +83,7 @@ public class RootContactGroupIcqImpl /** * Removes all contact sub groups and reinsterts them as specified - * by the <code>newOrder</code> param. Contact groups not contained in the + * by the <tt>newOrder</tt> param. Contact groups not contained in the * newOrder list are left at the end of this group. * * @param newOrder a list containing all contact groups in the order that is @@ -98,7 +98,7 @@ public class RootContactGroupIcqImpl /** * Returns the number of subgroups contained by this - * <code>RootContactGroupIcqImpl</code>. + * <tt>RootContactGroupIcqImpl</tt>. * * @return an int indicating the number of subgroups that this * ContactGroup contains. @@ -111,8 +111,8 @@ public class RootContactGroupIcqImpl /** * Returns the subgroup with the specified index. * - * @param index the index of the <code>ContactGroup</code> to retrieve. - * @return the <code>ContactGroup</code> with the specified index. + * @param index the index of the <tt>ContactGroup</tt> to retrieve. + * @return the <tt>ContactGroup</tt> with the specified index. */ public ContactGroup getGroup(int index) { @@ -121,8 +121,8 @@ public class RootContactGroupIcqImpl /** * Returns the subgroup with the specified name. - * @param groupName the name of the <code>ContactGroup</code> to retrieve. - * @return the <code>ContactGroup</code> with the specified index. + * @param groupName the name of the <tt>ContactGroup</tt> to retrieve. + * @return the <tt>ContactGroup</tt> with the specified index. */ public ContactGroup getGroup(String groupName) { @@ -139,11 +139,11 @@ public class RootContactGroupIcqImpl } /** - * Returns the <code>Contact</code> with the specified address or + * Returns the <tt>Contact</tt> with the specified address or * identifier. - * @param id the addres or identifier of the <code>Contact</code> we are + * @param id the addres or identifier of the <tt>Contact</tt> we are * looking for. - * @return the <code>Contact</code> with the specified id or address. + * @return the <tt>Contact</tt> with the specified id or address. */ public Contact getContact(String id) { @@ -153,9 +153,9 @@ public class RootContactGroupIcqImpl /** * Returns an iterator over the sub groups that this - * <code>ContactGroup</code> contains. + * <tt>ContactGroup</tt> contains. * - * @return a java.util.Iterator over the <code>ContactGroup</code> + * @return a java.util.Iterator over the <tt>ContactGroup</tt> * children of this group (i.e. subgroups). */ public Iterator subGroups() @@ -164,10 +164,10 @@ public class RootContactGroupIcqImpl } /** - * Returns the number, which is always 0, of <code>Contact</code> members - * of this <code>ContactGroup</code> - * @return an int indicating the number of <code>Contact</code>s, members - * of this <code>ContactGroup</code>. + * Returns the number, which is always 0, of <tt>Contact</tt> members + * of this <tt>ContactGroup</tt> + * @return an int indicating the number of <tt>Contact</tt>s, members + * of this <tt>ContactGroup</tt>. */ public int countContacts() { @@ -176,9 +176,9 @@ public class RootContactGroupIcqImpl /** * Returns an Iterator over all contacts, member of this - * <code>ContactGroup</code>. + * <tt>ContactGroup</tt>. * @return a java.util.Iterator over all contacts inside this - * <code>ContactGroup</code> + * <tt>ContactGroup</tt> */ public Iterator contacts() { @@ -188,8 +188,8 @@ public class RootContactGroupIcqImpl /** * A dummy impl of the corresponding interface method - always returns null. * - * @param index the index of the <code>Contact</code> to return. - * @return the <code>Contact</code> with the specified index, i.e. always + * @param index the index of the <tt>Contact</tt> to return. + * @return the <tt>Contact</tt> with the specified index, i.e. always * null. */ public Contact getContact(int index) diff --git a/src/net/java/sip/communicator/service/configuration/ConfigurationService.java b/src/net/java/sip/communicator/service/configuration/ConfigurationService.java index ee15197..8516633 100644 --- a/src/net/java/sip/communicator/service/configuration/ConfigurationService.java +++ b/src/net/java/sip/communicator/service/configuration/ConfigurationService.java @@ -73,7 +73,7 @@ public interface ConfigurationService * @param propertyName the name of the property that is being queried. * @return the result of calling the property's toString method and null in * case there was no vlaue mapped against the specified - * <code>propertyName</code>, or the returned string had zero length or + * <tt>propertyName</tt>, or the returned string had zero length or * contained whitespaces only. */ public String getString(String propertyName); diff --git a/src/net/java/sip/communicator/service/configuration/PropertyVetoException.java b/src/net/java/sip/communicator/service/configuration/PropertyVetoException.java index dd57f95..06479e6 100644 --- a/src/net/java/sip/communicator/service/configuration/PropertyVetoException.java +++ b/src/net/java/sip/communicator/service/configuration/PropertyVetoException.java @@ -26,7 +26,7 @@ public class PropertyVetoException private PropertyChangeEvent evt; /** - * Constructs a <code>PropertyVetoException</code> with a + * Constructs a <tt>PropertyVetoException</tt> with a * detailed message. * * @param mess Descriptive message @@ -39,7 +39,7 @@ public class PropertyVetoException } /** - * Gets the vetoed <code>PropertyChangeEvent</code>. + * Gets the vetoed <tt>PropertyChangeEvent</tt>. * * @return A PropertyChangeEvent describing the vetoed change. */ diff --git a/src/net/java/sip/communicator/service/configuration/event/PropertyChangeEvent.java b/src/net/java/sip/communicator/service/configuration/event/PropertyChangeEvent.java index 641a8c5..688442d 100644 --- a/src/net/java/sip/communicator/service/configuration/event/PropertyChangeEvent.java +++ b/src/net/java/sip/communicator/service/configuration/event/PropertyChangeEvent.java @@ -57,7 +57,7 @@ public class PropertyChangeEvent private Object oldValue; /** - * Constructs a new <code>PropertyChangeEvent</code>. + * Constructs a new <tt>PropertyChangeEvent</tt>. * * @param source The bean that fired the event. * @param propertyName The programmatic name of the property diff --git a/src/net/java/sip/communicator/service/configuration/event/VetoableChangeListener.java b/src/net/java/sip/communicator/service/configuration/event/VetoableChangeListener.java index 2f09263..851b441 100644 --- a/src/net/java/sip/communicator/service/configuration/event/VetoableChangeListener.java +++ b/src/net/java/sip/communicator/service/configuration/event/VetoableChangeListener.java @@ -36,7 +36,7 @@ public interface VetoableChangeListener * for pending changes over constained properties you should provide * an empty implementation of the method. * - * @param evt a <code>PropertyChangeEvent</code> object describing the + * @param evt a <tt>PropertyChangeEvent</tt> object describing the * event source and the property that has changed. * @exception PropertyVetoException if the recipient wishes the property * change to be rolled back. diff --git a/src/net/java/sip/communicator/service/contactlist/MetaContact.java b/src/net/java/sip/communicator/service/contactlist/MetaContact.java index ee62859..c40f13d 100644 --- a/src/net/java/sip/communicator/service/contactlist/MetaContact.java +++ b/src/net/java/sip/communicator/service/contactlist/MetaContact.java @@ -6,10 +6,64 @@ */ package net.java.sip.communicator.service.contactlist; + +import net.java.sip.communicator.service.protocol.*; +import java.util.List; + /** - * + * A MetaContact is an abstraction used for merging mutltiple Contacts (most + * often) belonging to different <tt>ProtocolProvider</tt>s. + * <p> + * Instances of a MetaContact are readonly objects that cannot be modified + * directly but only through the corresponding MetaContactListService. + * <p> * @author Emil Ivov */ public interface MetaContact { + /** + * Returns the default protocol specific <tt>Contact</tt> to use when + * communicating with this <tt>MetaContact</tt>. + * @return the default <tt>Contact</tt> to use when communicating with + * this <tt>MetaContact</tt> + */ + public Contact getDefaultContact(); + + /** + * Returns a <tt>java.util.List</tt> with all protocol specific + * <tt>Contacts</tt> encapsulated by this <tt>MetaContact</tt>. + * @return a <tt>java.util.List</tt> containing all protocol specific + * <tt>Contact</tt>s that were registered as subcontacts for this + * <tt>MetaContact</tt> + */ + public List getContacts(); + + /** + * Returns the number of protocol speciic <tt>Contact</tt>s that this + * <tt>MetaContact</tt> contains. + * @return an int indicating the number of protocol specific contacts merged + * in this <tt>MetaContact</tt> + */ + public int getContactCount(); + + /** + * Returns a Contact, encapsulated by this MetaContact and coming from the + * specified ProtocolProviderService. If none of the contacts encapsulated + * by this MetaContact is originating from the specified provider then + * <tt>null</tt> is returned. + * <p> + * @param provider a reference to the <tt>ProtocolProviderService</tt> + * that we'd like to get a <tt>Contact</tt> for. + * @return a <tt>Contact</tt> encapsulated in this + * <tt>MetaContact</tt> and originating from the specified provider. + */ + public Contact getContactForProvider(ProtocolProviderService provider); + + /** + * Returns a String identifier (the actual contents is left to + * implementations) that uniquely represents this <tt>MetaContact</tt> + * in the containing <tt>MetaContactList</tt> + * @return String + */ + public String getMetaContactID(); } diff --git a/src/net/java/sip/communicator/service/contactlist/MetaContactGroup.java b/src/net/java/sip/communicator/service/contactlist/MetaContactGroup.java index fd4d4eb..2e7dbb3 100644 --- a/src/net/java/sip/communicator/service/contactlist/MetaContactGroup.java +++ b/src/net/java/sip/communicator/service/contactlist/MetaContactGroup.java @@ -6,14 +6,105 @@ */ package net.java.sip.communicator.service.contactlist; +import java.util.*; + /** - * + * <tt>MetaContactGroup</tt>s are used to merge groups (often originating + * in different protocols). + * <p> + * A <tt>MetaContactGroup</tt> may contain contacts and some groups may + * also have sub-groups as children. To verify whether or not a particular + * group may contain subgroups, a developer has to call the + * <tt>canContainSubgroups()</tt> method + * <p> * @author Emil Ivov */ -public class MetaContactGroup +public interface MetaContactGroup { - public MetaContactGroup() - { - super(); - } + /** + * Returns a <tt>java.util.Iterator</tt> over the <tt>MetaContact</tt>s + * contained in this <tt>MetaContactGroup</tt>. + * @return a <tt>java.util.Iterator</tt> over the <tt>MetaContacts</tt> in + * this group. + */ + public Iterator getChildContacts(); + + /** + * Returns the number of <tt>MetaContact</tt>s that this group contains + * <p> + * @return an int indicating the number of MetaContact-s that this group + * contains. + */ + public int countChildContacts(); + + /** + * Returns an <tt>java.util.Iterator</tt> over the sub groups that this + * <tt>MetaContactGroup</tt> contains. Not all <tt>MetaContactGroup</tt>s + * can have sub groups. In case there are no subgroups in this + * <tt>MetaContactGroup</tt>, the method would return an empty list. + * The <tt>canContainSubgroups()</tt> method allows us to verify whether + * this is the case with the group at hand. + * <p> + * @return a <tt>java.util.Iterator</tt> containing all subgroups. + */ + public Iterator getSubgroups(); + + /** + * Returns the number of subgroups that this <tt>MetaContactGroup</tt> + * contains. + * @return an int indicating the number of subgroups in this group. + */ + public int countSubgroups(); + + /** + * Determines whether or not this group can contain subgroups. The method + * should be called befor creating subgroups in order to avoir invalid + * argument exceptions. + * <p> + * @return <tt>true</tt> if this groups can contain subgroups and + * <tt>false</tt> otherwise. + */ + public boolean canContainSubgroups(); + + /** + * Returns the contact with the specified identifier + * @param metaContactID a String identifier obtained through the + * <tt>MetaContact.getMetaContactID()</tt> method. + * <p> + * @return the <tt>MetaContact</tt> with the specified idnetifier. + */ + public MetaContact getMetaContact(String metaContactID); + + /** + * Returns the meta contact on the specified index. + * @param index the index of the meta contact to return. + * @return the MetaContact with the specified index, + * <p> + * @throws java.lang.IndexOutOfBoundsException in case <tt>index</tt> is + * not a valid index for this group. + */ + public MetaContact getMetaContact(int index) + throws IndexOutOfBoundsException; + + /** + * Returns the <tt>MetaContactGroup</tt> with the specified name. + * @param groupName the name of the group to return. + * @return the <tt>MetaContactGroup</tt> with the specified name or null + * if no such group exists. + */ + public MetaContactGroup getMetaContactSubgroup(String groupName); + + /** + * Returns the <tt>MetaContactGroup</tt> with the specified index. + * <p> + * @param index the index of the group to return. + * @return the <tt>MetaContactGroup</tt> with the specified index. + * <p> + * @throws java.lang.IndexOutOfBoundsException if <tt>index</tt> is not + * a valid index. + */ + public MetaContactGroup getMetaContactSubgroup(int index) + throws IndexOutOfBoundsException; + + } diff --git a/src/net/java/sip/communicator/service/contactlist/MetaContactListException.java b/src/net/java/sip/communicator/service/contactlist/MetaContactListException.java index 1131df8..aaf4bf9 100644 --- a/src/net/java/sip/communicator/service/contactlist/MetaContactListException.java +++ b/src/net/java/sip/communicator/service/contactlist/MetaContactListException.java @@ -1,4 +1,9 @@ -/** @todo add lgpl licence string*/ +/* + * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ package net.java.sip.communicator.service.contactlist; /** diff --git a/src/net/java/sip/communicator/service/contactlist/MetaContactListService.java b/src/net/java/sip/communicator/service/contactlist/MetaContactListService.java index dd0ae85..5e4ff03 100644 --- a/src/net/java/sip/communicator/service/contactlist/MetaContactListService.java +++ b/src/net/java/sip/communicator/service/contactlist/MetaContactListService.java @@ -10,10 +10,10 @@ import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.service.contactlist.event.MetaContactListListener; /** - * The <code>MetaContactListService</code> handles the global project contact + * The <tt>MetaContactListService</tt> handles the global project contact * list including contacts from all implemented protocols. * <p> - * An implementation of the <code>MetaContactListService</code> would take care + * An implementation of the <tt>MetaContactListService</tt> would take care * of synchronizing the local copy ot the contact list with the versions stored * on the various server protocols. * <p> @@ -21,10 +21,10 @@ import net.java.sip.communicator.service.contactlist.event.MetaContactListListen * list should use this service rather than accessing protocol providers * directly. * <p> - * The point of <code>MetaContact</code>s is being able to merge different + * The point of <tt>MetaContact</tt>s is being able to merge different * protocol specific contacts so that they represent a single person or identity. - * Every protocol specific <code>Contact</code> would therefore automatically - * be assigned to a corresponding <code>MetaContact</code>. A single + * Every protocol specific <tt>Contact</tt> would therefore automatically + * be assigned to a corresponding <tt>MetaContact</tt>. A single * MetaContact may containg multiple contacts (e.g. a single person often * has accounts in different protocols) while a single protocol specific * Contact may only be assigned to a exactly one MetaContact. @@ -46,16 +46,36 @@ import net.java.sip.communicator.service.contactlist.event.MetaContactListListen public interface MetaContactListService { /** - * Returns the root <code>MetaContactGroup</code> in this contact list. + * Returns the root <tt>MetaContactGroup</tt> in this contact list. * All meta contacts and subgroups are children of the root meta contact * and references to them can only be obtained through it. * - * @return the root <code>MetaContactGroup</code> for this contact list. + * @return the root <tt>MetaContactGroup</tt> for this contact list. */ public MetaContactGroup getRoot(); /** - * Adds a listener for <code>MetaContactListChangeEvent</code>s posted after + * Returns the MetaContact containing the specified contact or null if no + * such MetaContact was found. The method can be used when for example + * we need to find the MetaContact that is the author of an incoming message + * and the corresponding ProtocolProviderService has only provided a + * <tt>Contact</tt> as its author. + * @return the MetaContact containing the speicified contact or null + * if no such contact is present in this contact list. + */ + public MetaContact findMetaContactByContact(Contact contact); + + /** + * Returns the MetaContact that corresponds to the specified metaContactID. + * + * @param metaContactID a String identifier of a meta contact. + * @return the MetaContact with the speicified string identifier or null + * if no such meta contact was found. + */ + public MetaContact findMetaContactByID(String metaContactID); + + /** + * Adds a listener for <tt>MetaContactListChangeEvent</tt>s posted after * the tree changes. * * @param l the listener to add @@ -64,21 +84,21 @@ public interface MetaContactListService /** * Removes a listener previously added with - * <code>addContactListListener</code>. + * <tt>addContactListListener</tt>. * * @param l the listener to remove */ public void removeContactListListener(MetaContactListListener l); /** - * Makes the specified <code>contact</code> a child of the - * <code>newParent</code> MetaContact. If <code>contact</code> was + * Makes the specified <tt>contact</tt> a child of the + * <tt>newParent</tt> MetaContact. If <tt>contact</tt> was * previously a child of another meta contact, it will be removed from its * old parent before being added to the new one. If the specified contact * was the only child of its previous parent, then it (the previous parent) * will be removed. * - * @param contact the <code>Contact</code> to move to the + * @param contact the <tt>Contact</tt> to move to the * @param newParent the MetaContact where we'd like contact to be moved. * * @throws MetaContactListException with an appropriate code if the @@ -90,7 +110,7 @@ public interface MetaContactListService /** * Deletes the specified contact from both the local contact list and (if * applicable) the server stored contact list if supported by the - * corresponding protocol. If the <code>MetaContact</code> that contained + * corresponding protocol. If the <tt>MetaContact</tt> that contained * the given contact had no other children, it will be removed. * <p> * @param contact the contact to remove. @@ -102,11 +122,11 @@ public interface MetaContactListService /** * First makes the specified protocol provider create the contact as - * indicated by <code>contactID</code>, and then associates it to the - * _existing_ <code>metaContact</code> given as an argument. + * indicated by <tt>contactID</tt>, and then associates it to the + * _existing_ <tt>metaContact</tt> given as an argument. * <p> * @param provider the ProtocolProviderService that should create the - * contact indicated by <code>contactID</code>. + * contact indicated by <tt>contactID</tt>. * @param metaContact the meta contact where that the newly created contact * should be associated to. * @param contactID the identifier of the contact that the specified provider @@ -121,7 +141,7 @@ public interface MetaContactListService /** * First makes the specified protocol provider create a contact - * corresponding to the specified <code>contactID</code>, then creates a new + * corresponding to the specified <tt>contactID</tt>, then creates a new * MetaContact which will encapsulate the newly crated protocol specific * contact. Depending on implementations the method may sometimes need * time to complete as it may be necessary for an underlying protocol to @@ -131,7 +151,7 @@ public interface MetaContactListService * group on the protocol server, it will be created before the contact * itself. * <p> - * @param provider a ref to <code>ProtocolProviderService</code> instance + * @param provider a ref to <tt>ProtocolProviderService</tt> instance * which will create the actual protocol specific contact. * @param contactGroup the MetaContactGroup where the newly created meta * contact should be stored. @@ -147,11 +167,11 @@ public interface MetaContactListService throws MetaContactListException; /** - * Moves the specified <code>MetaContact</code> to <code>newGroup</code>. + * Moves the specified <tt>MetaContact</tt> to <tt>newGroup</tt>. * <p> - * @param metaContact the <code>MetaContact</code> to move. - * @param newGroup the <code>MetaContactGroup</code> that should be the - * new parent of <code>contact</code>. + * @param metaContact the <tt>MetaContact</tt> to move. + * @param newGroup the <tt>MetaContactGroup</tt> that should be the + * new parent of <tt>contact</tt>. * * @throws MetaContactListException with an appropriate code if the * operation fails for some reason. @@ -161,7 +181,7 @@ public interface MetaContactListService throws MetaContactListException; /** - * Removes the specified <code>metaContact</code> as well as all of its + * Removes the specified <tt>metaContact</tt> as well as all of its * underlying contacts. * <p> * @param metaContact the metaContact to remove. @@ -172,13 +192,13 @@ public interface MetaContactListService throws MetaContactListException; /** - * Creates a <code>MetaContactGroup</code> with the specified group name. + * Creates a <tt>MetaContactGroup</tt> with the specified group name. * Initially, the group would only be created locally. Corresponding * server stored groups will be created on the fly, whenever real protocol * specific contacts are added to the group if the protocol lying behind * them supports that. * <p> - * @param groupName the name of the <code>MetaContactGroup</code> to create. + * @param groupName the name of the <tt>MetaContactGroup</tt> to create. * * @throws MetaContactListException with an appropriate code if the * operation fails for some reason. @@ -191,7 +211,7 @@ public interface MetaContactListService * specific groups and all their children. If some of the children belong to * server stored contact lists, they will be updated to not include the * child contacts any more. - * @param groupToRemove the <code>MetaContactGroup</code> to have removed. + * @param groupToRemove the <tt>MetaContactGroup</tt> to have removed. * * @throws MetaContactListException with an appropriate code if the * operation fails for some reason. diff --git a/src/net/java/sip/communicator/service/contactlist/event/MetaContactListEvent.java b/src/net/java/sip/communicator/service/contactlist/event/MetaContactListEvent.java new file mode 100644 index 0000000..123349a --- /dev/null +++ b/src/net/java/sip/communicator/service/contactlist/event/MetaContactListEvent.java @@ -0,0 +1,22 @@ +/* + * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ +package net.java.sip.communicator.service.contactlist.event; + +import java.util.*; + +/** + * + * @author Emil Ivov + */ +public class MetaContactListEvent + extends EventObject +{ + public MetaContactListEvent(Object source) + { + super(source); + } +} diff --git a/src/net/java/sip/communicator/service/gui/UIService.java b/src/net/java/sip/communicator/service/gui/UIService.java index 05127b1..aa34b74 100644 --- a/src/net/java/sip/communicator/service/gui/UIService.java +++ b/src/net/java/sip/communicator/service/gui/UIService.java @@ -113,27 +113,27 @@ public interface UIService * Adds the specified UI component to the user interface according to the * provided string constraint. The method is meant to be used by plugins or * bundles that would like to add components to the user interface. The - * <code>constraint</code> string is used by the implementation to determine - * the place where the component should be added. The <code>constraint</code> + * <tt>constraint</tt> string is used by the implementation to determine + * the place where the component should be added. The <tt>constraint</tt> * String SHOULD be one of the COMPONENT_CONSTRAINT_XXX constants. It is up - * to the service implementation to verify that <code>component</code> is an + * to the service implementation to verify that <tt>component</tt> is an * instance of a class compatible with the gui library used by it. If this * is not the case and adding the requested object would not be possible the * implementation MUST through a ClassCastException exception. * Implementations of this service MUST understant and know how to handle * all COMPONENT_CONSTRAINT_XXX Strings defined by this interface, they * MAY also define additional constraints. In case the addComponent method - * is called with a <code>constraint</code> that the implementation does + * is called with a <tt>constraint</tt> that the implementation does * not understand it MUST through a java.lang.IllegalArgumentException <br> * <br> * @param component the component we'd like to add * @param constraint a String (possibly one of the COMPONENT_CONSTRAINT_XXX * strings) indicating the place where the component should be added. - * @throws ClassCastException if <code>component</code> is not an + * @throws ClassCastException if <tt>component</tt> is not an * instance of a class supported by the service implementation. An SWT impl * would, for example through a ClassCastException if handed a * java.awt.Component - * @throws IllegalArgumentException if the specified <code>constraint</code> + * @throws IllegalArgumentException if the specified <tt>constraint</tt> * is not recognized by the implementation (note that implementations * MUST properly handle all COMPONENT_CONSTRAINT_XXX strings. */ diff --git a/src/net/java/sip/communicator/service/history/BidirectionalIterator.java b/src/net/java/sip/communicator/service/history/BidirectionalIterator.java index 5d7cf76..9db9f9c 100644 --- a/src/net/java/sip/communicator/service/history/BidirectionalIterator.java +++ b/src/net/java/sip/communicator/service/history/BidirectionalIterator.java @@ -11,28 +11,28 @@ import java.util.NoSuchElementException; /** * The standard Java Iterator is uni-directional, allowing the user to explore - * the contents of a collection in one way only. This interface defines a - * bi-directional iterator, permiting the user to go forwards and backwards in + * the contents of a collection in one way only. This interface defines a + * bi-directional iterator, permiting the user to go forwards and backwards in * a collection. - * + * * @author Alexander Pelov */ public interface BidirectionalIterator extends Iterator { /** - * Returns true if the iteration has elements preceeding the current one. - * (In other words, returns true if <code>prev</code> would return an element rather + * Returns true if the iteration has elements preceeding the current one. + * (In other words, returns true if <tt>prev</tt> would return an element rather * than throwing an exception.) - * - * @return true if the iterator has preceeding elements. + * + * @return true if the iterator has preceeding elements. */ boolean hasPrev(); - + /** - * Returns the previous element in the iteration. - * + * Returns the previous element in the iteration. + * * @return the previous element in the iteration. - * - * @throws NoSuchElementException iteration has no more elements. + * + * @throws NoSuchElementException iteration has no more elements. */ Object prev() throws NoSuchElementException; } diff --git a/src/net/java/sip/communicator/service/history/HistoryReader.java b/src/net/java/sip/communicator/service/history/HistoryReader.java index 8ae3f3d..8ccd4c7 100644 --- a/src/net/java/sip/communicator/service/history/HistoryReader.java +++ b/src/net/java/sip/communicator/service/history/HistoryReader.java @@ -12,21 +12,21 @@ import java.util.Date; * @author Alexander Pelov */ public interface HistoryReader { - + /** * Searches the history for all records with timestamp - * after <code>startDate</code>. - * + * after <tt>startDate</tt>. + * * @throws RuntimeException Thrown if an exception occurs during * the execution of the query, such as internal IO error. */ QueryResultSet findByStartDate(Date startDate) throws RuntimeException; - + /** - * Searches the history for all records with timestamp - * before <code>endDate</code>. - * + * Searches the history for all records with timestamp + * before <tt>endDate</tt>. + * * @throws RuntimeException Thrown if an exception occurs during * the execution of the query, such as internal IO error. */ @@ -35,40 +35,40 @@ public interface HistoryReader { /** * Searches the history for all records with timestamp - * between <code>startDate</code> and <code>endDate</code>. - * + * between <tt>startDate</tt> and <tt>endDate</tt>. + * * @throws RuntimeException Thrown if an exception occurs during * the execution of the query, such as internal IO error. */ - QueryResultSet findByPeriod(Date startDate, Date endDate) + QueryResultSet findByPeriod(Date startDate, Date endDate) throws RuntimeException; - + /** - * Searches the history for all records containing the <code>keyword</code>. - * + * Searches the history for all records containing the <tt>keyword</tt>. + * * @throws RuntimeException Thrown if an exception occurs during * the execution of the query, such as internal IO error. */ QueryResultSet findByKeyword(String keyword) throws RuntimeException; - + /** - * Searches the history for all records containing all <code>keywords</code>. - * + * Searches the history for all records containing all <tt>keywords</tt>. + * * @throws RuntimeException Thrown if an exception occurs during * the execution of the query, such as internal IO error. */ QueryResultSet findByKeywords(String[] keywords) throws RuntimeException; - + /** - * Searches for all history records containing all <code>keywords</code>, - * with timestamp between <code>startDate</code> and <code>endDate</code>. - * + * Searches for all history records containing all <tt>keywords</tt>, + * with timestamp between <tt>startDate</tt> and <tt>endDate</tt>. + * * @throws RuntimeException Thrown if an exception occurs during * the execution of the query, such as internal IO error. */ - QueryResultSet findByText(Date startDate, Date endDate, String[] keywords) + QueryResultSet findByText(Date startDate, Date endDate, String[] keywords) throws UnsupportedOperationException; - + } diff --git a/src/net/java/sip/communicator/service/history/HistoryService.java b/src/net/java/sip/communicator/service/history/HistoryService.java index 1d8cc5e..188f1d5 100644 --- a/src/net/java/sip/communicator/service/history/HistoryService.java +++ b/src/net/java/sip/communicator/service/history/HistoryService.java @@ -13,43 +13,43 @@ import net.java.sip.communicator.service.history.records.HistoryRecordStructure; /** * This service provides the functionality to store history records. The - * records are called <code>HistoryRecord</code>s and are grouped by ID. - * + * records are called <tt>HistoryRecord</tt>s and are grouped by ID. + * * The ID may be used to set hierarchical structure. In a typical usage one * may set the first string to be the userID, and the second - the service name. - * + * * @author Alexander Pelov */ public interface HistoryService { /** * Returns the IDs of all existing histories. - * + * * @return An iterator to a list of IDs. */ Iterator getExistingIDs(); /** * Returns the history associated with this ID. - * + * * @param id The ID of the history. * @return Returns the history with this ID. * @throws IllegalArgumentException Thrown if there is no such history. */ - History getHistory(HistoryID id) + History getHistory(HistoryID id) throws IllegalArgumentException; - + /** * Tests if a history with the given ID exists. - * + * * @param id The ID to test. * @return True if a history with this ID exists. False otherwise. */ boolean isHistoryExisting(HistoryID id); - + /** * Creates a new history for this ID. - * + * * @param id The ID of the history to be created. * @param recordStructure The structure of the data. * @return Returns the history with this ID. @@ -57,6 +57,6 @@ public interface HistoryService { * @throws IOException Thrown if the history could not be created due to * a IO error. */ - History createHistory(HistoryID id, HistoryRecordStructure recordStructure) - throws IllegalArgumentException, IOException; + History createHistory(HistoryID id, HistoryRecordStructure recordStructure) + throws IllegalArgumentException, IOException; } diff --git a/src/net/java/sip/communicator/service/history/QueryResultSet.java b/src/net/java/sip/communicator/service/history/QueryResultSet.java index ccf6f59..e490c23 100644 --- a/src/net/java/sip/communicator/service/history/QueryResultSet.java +++ b/src/net/java/sip/communicator/service/history/QueryResultSet.java @@ -18,21 +18,21 @@ import net.java.sip.communicator.service.history.records.HistoryRecord; public interface QueryResultSet extends BidirectionalIterator { /** - * A strongly-typed variant of <code>next()</code>. - * + * A strongly-typed variant of <tt>next()</tt>. + * * @return the next history record. - * - * @throws NoSuchElementException iteration has no more elements. + * + * @throws NoSuchElementException iteration has no more elements. */ HistoryRecord nextRecord() throws NoSuchElementException; - + /** - * A strongly-typed variant of <code>prev()</code>. - * + * A strongly-typed variant of <tt>prev()</tt>. + * * @return the previous history record. - * - * @throws NoSuchElementException iteration has no more elements. + * + * @throws NoSuchElementException iteration has no more elements. */ HistoryRecord prevRecord() throws NoSuchElementException; - + } diff --git a/src/net/java/sip/communicator/service/protocol/AccountID.java b/src/net/java/sip/communicator/service/protocol/AccountID.java index 32d705c..404d845 100644 --- a/src/net/java/sip/communicator/service/protocol/AccountID.java +++ b/src/net/java/sip/communicator/service/protocol/AccountID.java @@ -73,7 +73,7 @@ public abstract class AccountID /** * Returns a hash code value for the object. This method is * supported for the benefit of hashtables such as those provided by - * <code>java.util.Hashtable</code>. + * <tt>java.util.Hashtable</tt>. * <p> * @return a hash code value for this object. * @see java.lang.Object#equals(java.lang.Object) @@ -88,8 +88,8 @@ public abstract class AccountID * Indicates whether some other object is "equal to" this account id. * <p> * @param obj the reference object with which to compare. - * @return <code>true</code> if this object is the same as the obj - * argument; <code>false</code> otherwise. + * @return <tt>true</tt> if this object is the same as the obj + * argument; <tt>false</tt> otherwise. * @see #hashCode() * @see java.util.Hashtable */ diff --git a/src/net/java/sip/communicator/service/protocol/AccountManager.java b/src/net/java/sip/communicator/service/protocol/AccountManager.java index 57c3e3a..abd155a 100644 --- a/src/net/java/sip/communicator/service/protocol/AccountManager.java +++ b/src/net/java/sip/communicator/service/protocol/AccountManager.java @@ -37,7 +37,7 @@ public interface AccountManager /** * Initializaed and creates an account corresponding to the specified * accountProperties and registers the resulting ProtocolProvider in the - * <code>context</code> BundleContext parameter. Note that account + * <tt>context</tt> BundleContext parameter. Note that account * registration is persistent and accounts that are registered during * a particular sip-communicator session would be automatically reloaded * during all following sessions until they are removed through the diff --git a/src/net/java/sip/communicator/service/protocol/Contact.java b/src/net/java/sip/communicator/service/protocol/Contact.java index 443e284..27976c0 100644 --- a/src/net/java/sip/communicator/service/protocol/Contact.java +++ b/src/net/java/sip/communicator/service/protocol/Contact.java @@ -58,8 +58,8 @@ public interface Contact * received for it. Note that this method is not to perform any network * operations and will simply return the status received in the last * status update message. If you want a reliable way of retrieving someone's - * status, you should use the <code>queryContactStatus()</code> method in - * <code>OperationSetPresence</code>. + * status, you should use the <tt>queryContactStatus()</tt> method in + * <tt>OperationSetPresence</tt>. * @return the PresenceStatus that we've received in the last status update * pertaining to this contact. */ diff --git a/src/net/java/sip/communicator/service/protocol/ContactGroup.java b/src/net/java/sip/communicator/service/protocol/ContactGroup.java index a7d7f4f..fe2886e 100644 --- a/src/net/java/sip/communicator/service/protocol/ContactGroup.java +++ b/src/net/java/sip/communicator/service/protocol/ContactGroup.java @@ -9,13 +9,13 @@ package net.java.sip.communicator.service.protocol; import java.util.*; /** - * A <code>ContactGroup</code> is a collection of Contacts/Buddies/Subscriptions, + * A <tt>ContactGroup</tt> is a collection of Contacts/Buddies/Subscriptions, * stored by a communications service (e.g. AIM/ICQ or Skype)returned by * persistent presence operation sets. A group may contain simple members or - * subgroups. Instances of <code>ContactGroup</code> cannot be directly modified + * subgroups. Instances of <tt>ContactGroup</tt> cannot be directly modified * by users of the protocol provider service. In order to add buddies or - * subgroups to a <code>ContactGroup</code> one needs to do so through the - * <code>OperationSetPersistentPresence</code> interface. + * subgroups to a <tt>ContactGroup</tt> one needs to do so through the + * <tt>OperationSetPersistentPresence</tt> interface. * * @author Emil Ivov */ @@ -23,15 +23,15 @@ public interface ContactGroup { /** * Returns an iterator over the sub groups that this - * <code>ContactGroup</code> contains. + * <tt>ContactGroup</tt> contains. * - * @return a java.util.Iterator over the <code>ContactGroup</code> children + * @return a java.util.Iterator over the <tt>ContactGroup</tt> children * of this group (i.e. subgroups). */ public Iterator subGroups(); /** - * Returns the number of subgroups contained by this <code>ContactGroup</code>. + * Returns the number of subgroups contained by this <tt>ContactGroup</tt>. * @return an int indicating the number of subgroups that this ContactGroup * contains. */ @@ -39,55 +39,55 @@ public interface ContactGroup /** * Returns the subgroup with the specified index. - * @param index the index of the <code>ContactGroup</code> to retrieve. - * @return the <code>ContactGroup</code> with the specified index. + * @param index the index of the <tt>ContactGroup</tt> to retrieve. + * @return the <tt>ContactGroup</tt> with the specified index. */ public ContactGroup getGroup(int index); /** * Returns the subgroup with the specified name. - * @param groupName the name of the <code>ContactGroup</code> to retrieve. - * @return the <code>ContactGroup</code> with the specified index. + * @param groupName the name of the <tt>ContactGroup</tt> to retrieve. + * @return the <tt>ContactGroup</tt> with the specified index. */ public ContactGroup getGroup(String groupName); /** * Returns an Iterator over all contacts, member of this - * <code>ContactGroup</code>. + * <tt>ContactGroup</tt>. * @return a java.util.Iterator over all contacts inside this - * <code>ContactGroup</code> + * <tt>ContactGroup</tt> */ public Iterator contacts(); /** - * Returns the number of <code>Contact</code> members of this - * <code>ContactGroup</code> - * @return an int indicating the number of <code>Contact</code>s, members - * of this <code>ContactGroup</code>. + * Returns the number of <tt>Contact</tt> members of this + * <tt>ContactGroup</tt> + * @return an int indicating the number of <tt>Contact</tt>s, members + * of this <tt>ContactGroup</tt>. */ public int countContacts(); /** - * Returns the <code>Contact</code> with the specified index. - * @param index the index of the <code>Contact</code> to return. - * @return the <code>Contact</code> with the specified index. + * Returns the <tt>Contact</tt> with the specified index. + * @param index the index of the <tt>Contact</tt> to return. + * @return the <tt>Contact</tt> with the specified index. */ public Contact getContact(int index); /** - * Returns the <code>Contact</code> with the specified address or + * Returns the <tt>Contact</tt> with the specified address or * identifier. - * @param id the addres or identifier of the <code>Contact</code> we are + * @param id the addres or identifier of the <tt>Contact</tt> we are * looking for. - * @return the <code>Contact</code> with the specified id or address. + * @return the <tt>Contact</tt> with the specified id or address. */ public Contact getContact(String id); /** * Determines whether the group may contain subgroups or not. * @return true if the groups may be a parent of other - * <code>ContactGroup</code>s and false otherwise. + * <tt>ContactGroup</tt>s and false otherwise. */ public boolean canContainSubgroups(); diff --git a/src/net/java/sip/communicator/service/protocol/Message.java b/src/net/java/sip/communicator/service/protocol/Message.java index 6862e7e..9f386a6 100644 --- a/src/net/java/sip/communicator/service/protocol/Message.java +++ b/src/net/java/sip/communicator/service/protocol/Message.java @@ -9,7 +9,7 @@ package net.java.sip.communicator.service.protocol; * </p> * <p> * Messages are created through the - * <code>OperationSetBaicInstanceMessaging</code> operation set. + * <tt>OperationSetBaicInstanceMessaging</tt> operation set. * </p> * <p> * </p> diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetPersistentPresence.java b/src/net/java/sip/communicator/service/protocol/OperationSetPersistentPresence.java index 11d9e15..7028d5c 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetPersistentPresence.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetPersistentPresence.java @@ -17,12 +17,12 @@ import net.java.sip.communicator.service.protocol.event.ServerStoredGroupListene * interface allows GUI and other plugins to use it in a way similar to the * way they'd use a javax.swing.tree.TreeModel, i.e. it would contain an initial * number of members/children that is likely to change, dispatching a series of - * events delivered through the <code>SubscriptionListener</code> and - * <code>ServerStoredGroupChangeListener</code> interfaces. + * events delivered through the <tt>SubscriptionListener</tt> and + * <tt>ServerStoredGroupChangeListener</tt> interfaces. * <p> * The interfaces defines extended subscription methods that include an extra - * <code>parentGroup</code> parameter. Simple subscribe and usubscribe - * operations defined by the parent <code>OperationSetPresence</code> operation + * <tt>parentGroup</tt> parameter. Simple subscribe and usubscribe + * operations defined by the parent <tt>OperationSetPresence</tt> operation * set, will still work, adding contacts to a default, root group. * to be used by GUI and other plugins the same way that they would use a * @@ -52,7 +52,7 @@ public interface OperationSetPersistentPresence * <p> * @throws OperationFailedException with code NETWORK_FAILURE if subscribing * fails due to errors experienced during network communication - * @throws IllegalArgumentException if <code>contact</code> is not a contact + * @throws IllegalArgumentException if <tt>contact</tt> is not a contact * known to the underlying protocol provider * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -79,8 +79,8 @@ public interface OperationSetPersistentPresence * <p> * @throws OperationFailedException with code NETWORK_FAILURE if subscribing * fails due to errors experienced during network communication - * @throws IllegalArgumentException if <code>contact</code> or - * <code>parent</code> are not a contact known to the underlying protocol + * @throws IllegalArgumentException if <tt>contact</tt> or + * <tt>parent</tt> are not a contact known to the underlying protocol * provider. * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -100,7 +100,7 @@ public interface OperationSetPersistentPresence * * @throws OperationFailedException with code NETWORK_FAILURE if unsubscribing * fails due to errors experienced during network communication - * @throws IllegalArgumentException if <code>contact</code> is not a contact + * @throws IllegalArgumentException if <tt>contact</tt> is not a contact * known to the underlying protocol provider * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -118,7 +118,7 @@ public interface OperationSetPersistentPresence * * @throws OperationFailedException with code NETWORK_FAILURE if creating * the group fails because of a network error. - * @throws IllegalArgumentException if <code>parent</code> is not a contact + * @throws IllegalArgumentException if <tt>parent</tt> is not a contact * known to the underlying protocol provider * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -132,7 +132,7 @@ public interface OperationSetPersistentPresence * * @throws OperationFailedException with code NETWORK_FAILURE if deleting * the group fails because of a network error. - * @throws IllegalArgumentException if <code>parent</code> is not a contact + * @throws IllegalArgumentException if <tt>parent</tt> is not a contact * known to the underlying protocol provider. * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -142,7 +142,7 @@ public interface OperationSetPersistentPresence /** * Renames the specified group from the server stored contact list. This * method would return before the group has actually been renamed. A - * <code>ServerStoredGroupEvent</code> would be dispatched once new name + * <tt>ServerStoredGroupEvent</tt> would be dispatched once new name * has been acknowledged by the server. * * @param group the group to rename. @@ -150,7 +150,7 @@ public interface OperationSetPersistentPresence * * @throws OperationFailedException with code NETWORK_FAILURE if deleting * the group fails because of a network error. - * @throws IllegalArgumentException if <code>parent</code> is not a contact + * @throws IllegalArgumentException if <tt>parent</tt> is not a contact * known to the underlying protocol provider. * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -160,9 +160,9 @@ public interface OperationSetPersistentPresence /** * Removes the specified contact from its current parent and places it - * under <code>newParent</code>. - * @param contactToMove the <code>Contact</code> to move - * @param newParent the <code>ContactGroup</code> where <code>Contact</code> + * under <tt>newParent</tt>. + * @param contactToMove the <tt>Contact</tt> to move + * @param newParent the <tt>ContactGroup</tt> where <tt>Contact</tt> * would be placed. */ public void moveContactToGroup(Contact contactToMove, diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetPresence.java b/src/net/java/sip/communicator/service/protocol/OperationSetPresence.java index b1b9d99..9b8ef52 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetPresence.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetPresence.java @@ -78,12 +78,12 @@ public interface OperationSetPresence * <p> * @param contactIdentifier the identifier of the contact whose status we're * interested in. - * @return PresenceStatus the <code>PresenceStatus</code> of the specified - * <code>contact</code> + * @return PresenceStatus the <tt>PresenceStatus</tt> of the specified + * <tt>contact</tt> * * @throws OperationFailedException with code NETWORK_FAILURE if retrieving * the status fails due to errors experienced during network communication - * @throws IllegalArgumentException if <code>contact</code> is not a contact + * @throws IllegalArgumentException if <tt>contact</tt> is not a contact * known to the underlying protocol provider * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -109,7 +109,7 @@ public interface OperationSetPresence * <p> * @throws OperationFailedException with code NETWORK_FAILURE if subscribing * fails due to errors experienced during network communication - * @throws IllegalArgumentException if <code>contact</code> is not a contact + * @throws IllegalArgumentException if <tt>contact</tt> is not a contact * known to the underlying protocol provider * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -125,7 +125,7 @@ public interface OperationSetPresence * * @throws OperationFailedException with code NETWORK_FAILURE if unsubscribing * fails due to errors experienced during network communication - * @throws IllegalArgumentException if <code>contact</code> is not a contact + * @throws IllegalArgumentException if <tt>contact</tt> is not a contact * known to the underlying protocol provider * @throws IllegalStateException if the underlying protocol provider is not * registered/signed on a public service. @@ -141,7 +141,7 @@ public interface OperationSetPresence * @param contactID a String identifier of the contact which we're seeking a * reference of. * @return a reference to the Contact with the specified - * <code>contactID</code> or null if we don't have a subscription for the + * <tt>contactID</tt> or null if we don't have a subscription for the * that identifier. */ public Contact findContactByID(String contactID); diff --git a/src/net/java/sip/communicator/service/protocol/PresenceStatus.java b/src/net/java/sip/communicator/service/protocol/PresenceStatus.java index bb75f4a..e41ee5e 100644 --- a/src/net/java/sip/communicator/service/protocol/PresenceStatus.java +++ b/src/net/java/sip/communicator/service/protocol/PresenceStatus.java @@ -169,8 +169,8 @@ public class PresenceStatus * connecfitivity coefficient and their name are equal. * <p> * @param obj the reference object with which to compare. - * @return <code>true</code> if this presence status instance is equal to - * the obj argument; <code>false</code> otherwise. + * @return <tt>true</tt> if this presence status instance is equal to + * the obj argument; <tt>false</tt> otherwise. */ public boolean equals(Object obj) { @@ -190,7 +190,7 @@ public class PresenceStatus /** * Returns a hash code value for the object. This method is * supported for the benefit of hashtables such as those provided by - * <code>java.util.Hashtable</code>. + * <tt>java.util.Hashtable</tt>. * <p> * * @return a hash code value for this object (which is actually the result diff --git a/src/net/java/sip/communicator/service/protocol/event/ContactPresenceStatusChangeEvent.java b/src/net/java/sip/communicator/service/protocol/event/ContactPresenceStatusChangeEvent.java index a64b9df..27a372e 100644 --- a/src/net/java/sip/communicator/service/protocol/event/ContactPresenceStatusChangeEvent.java +++ b/src/net/java/sip/communicator/service/protocol/event/ContactPresenceStatusChangeEvent.java @@ -24,7 +24,7 @@ public class ContactPresenceStatusChangeEvent extends PropertyChangeEvent /** * Creates an event instance indicating that the specified source contact - * has changed status from <code>oldValue</code> to <code>newValue</code>. + * has changed status from <tt>oldValue</tt> to <tt>newValue</tt>. * @param source the provider that generated the event * @param sourceProvider the protocol provider that the contact belongs to. * @param parentGroup the group containing the contact that caused this diff --git a/src/net/java/sip/communicator/service/protocol/event/ContactPresenceStatusListener.java b/src/net/java/sip/communicator/service/protocol/event/ContactPresenceStatusListener.java index 8fe8064..879ab58 100644 --- a/src/net/java/sip/communicator/service/protocol/event/ContactPresenceStatusListener.java +++ b/src/net/java/sip/communicator/service/protocol/event/ContactPresenceStatusListener.java @@ -9,7 +9,7 @@ package net.java.sip.communicator.service.protocol.event; import java.util.*; /** - * <code>ContactPresenceStatusListener</code>s listener for events caused by + * <tt>ContactPresenceStatusListener</tt>s listener for events caused by * changes in the status of contacts that we have active subscriptions for. * <p> * Events handled by this listener a most often the direct result of server/ diff --git a/src/net/java/sip/communicator/service/protocol/event/ProviderPresenceStatusChangeEvent.java b/src/net/java/sip/communicator/service/protocol/event/ProviderPresenceStatusChangeEvent.java index f2bebbb..bfa9287 100644 --- a/src/net/java/sip/communicator/service/protocol/event/ProviderPresenceStatusChangeEvent.java +++ b/src/net/java/sip/communicator/service/protocol/event/ProviderPresenceStatusChangeEvent.java @@ -20,8 +20,8 @@ public class ProviderPresenceStatusChangeEvent extends PropertyChangeEvent /** * Creates an event instance indicating a change of the property - * specified by <code>eventType</code> from <code>oldValue</code> to - * <code>newValue</code>. + * specified by <tt>eventType</tt> from <tt>oldValue</tt> to + * <tt>newValue</tt>. * @param source the provider that generated the event * @param oldValue the status the source provider was int before enetering * the new state. diff --git a/src/net/java/sip/communicator/service/protocol/event/ProviderStatusChangeEvent.java b/src/net/java/sip/communicator/service/protocol/event/ProviderStatusChangeEvent.java index 2618285..34fc1f1 100644 --- a/src/net/java/sip/communicator/service/protocol/event/ProviderStatusChangeEvent.java +++ b/src/net/java/sip/communicator/service/protocol/event/ProviderStatusChangeEvent.java @@ -20,8 +20,8 @@ public class ProviderStatusChangeEvent extends PropertyChangeEvent /** * Creates an event instance indicating a change of the property - * specified by <code>eventType</code> from <code>oldValue</code> to - * <code>newValue</code>. + * specified by <tt>eventType</tt> from <tt>oldValue</tt> to + * <tt>newValue</tt>. * @param source the provider that generated the event * @param eventType the type of the newly created event. * @param oldValue the status the source provider was int before enetering diff --git a/src/net/java/sip/communicator/service/protocol/event/RegistrationStateChangeEvent.java b/src/net/java/sip/communicator/service/protocol/event/RegistrationStateChangeEvent.java index 5392f7e..f05e650 100644 --- a/src/net/java/sip/communicator/service/protocol/event/RegistrationStateChangeEvent.java +++ b/src/net/java/sip/communicator/service/protocol/event/RegistrationStateChangeEvent.java @@ -20,8 +20,8 @@ public class RegistrationStateChangeEvent extends PropertyChangeEvent /** * Creates an event instance indicating a change of the property - * specified by <code>eventType</code> from <code>oldValue</code> to - * <code>newValue</code>. + * specified by <tt>eventType</tt> from <tt>oldValue</tt> to + * <tt>newValue</tt>. * @param source the provider that generated the event * @param oldValue the status the source provider was int before enetering * the new state. @@ -70,7 +70,7 @@ public class RegistrationStateChangeEvent extends PropertyChangeEvent /** * Returns a string representation of this event. * @return a String containing the name of the event as well as the names - * of the old and new <code>RegistrationState</code>s + * of the old and new <tt>RegistrationState</tt>s */ public String toString() { diff --git a/src/net/java/sip/communicator/service/protocol/event/ServerStoredGroupEvent.java b/src/net/java/sip/communicator/service/protocol/event/ServerStoredGroupEvent.java index 2681f3e..e317a34 100644 --- a/src/net/java/sip/communicator/service/protocol/event/ServerStoredGroupEvent.java +++ b/src/net/java/sip/communicator/service/protocol/event/ServerStoredGroupEvent.java @@ -48,7 +48,7 @@ public class ServerStoredGroupEvent } /** - * Returns a reference to the <code>ContactGroup</code> that this event is + * Returns a reference to the <tt>ContactGroup</tt> that this event is * pertaining to. * @return a reference to the ContactGroup that caused the event. */ diff --git a/src/net/java/sip/communicator/service/protocol/icqconstants/IcqStatusEnum.java b/src/net/java/sip/communicator/service/protocol/icqconstants/IcqStatusEnum.java index 8e685ab..2f63f63 100644 --- a/src/net/java/sip/communicator/service/protocol/icqconstants/IcqStatusEnum.java +++ b/src/net/java/sip/communicator/service/protocol/icqconstants/IcqStatusEnum.java @@ -9,7 +9,7 @@ import java.util.*; * support other forms of PresenceStatus but they MUST ALL support those * enumerated here. * <p> - * For testing purposes, this class also provides a <code>List</code> containing + * For testing purposes, this class also provides a <tt>List</tt> containing * all of the status fields. * * @author Emil Ivov diff --git a/src/net/java/sip/communicator/util/Logger.java b/src/net/java/sip/communicator/util/Logger.java index b95829c..6ed4bfc 100644 --- a/src/net/java/sip/communicator/util/Logger.java +++ b/src/net/java/sip/communicator/util/Logger.java @@ -337,7 +337,7 @@ public class Logger } /** - * Set logging level for all handlers to <code>level</code> + * Set logging level for all handlers to <tt>level</tt> * * @param level the level to set for all logger handlers */ diff --git a/src/net/java/sip/communicator/util/xml/XMLUtils.java b/src/net/java/sip/communicator/util/xml/XMLUtils.java index 01a279a..f176d13 100644 --- a/src/net/java/sip/communicator/util/xml/XMLUtils.java +++ b/src/net/java/sip/communicator/util/xml/XMLUtils.java @@ -172,7 +172,7 @@ public class XMLUtils /** * Returns element's TEXXT child node (if it has one). * @param element the element whose TEXT we need to get. - * @return a <code>Text</code> object containing the specified element's + * @return a <tt>Text</tt> object containing the specified element's * text content. */ public static Text getTextNode(Element element) @@ -190,11 +190,11 @@ public class XMLUtils } /** - * Returns first of the <code>element</code>'s child nodes that is of type - * <code>nodeType</code>. + * Returns first of the <tt>element</tt>'s child nodes that is of type + * <tt>nodeType</tt>. * @param element the element whose child we need. * @param nodeType the type of the child we need. - * @return a child of the specified <code>nodeType</code> or null if none + * @return a child of the specified <tt>nodeType</tt> or null if none * was found. */ public static Node getChildByType(Element element, short nodeType) |