aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2011-04-19 09:29:56 +0000
committerDamian Minkov <damencho@jitsi.org>2011-04-19 09:29:56 +0000
commit01248b564c6f538bf2bfa304ca3300ee24e284a8 (patch)
tree507983d0042d3810a8b803043f70a1e8ea828184 /src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java
parentf7fcd1d03598041044727aa4097dbcbf02bb742e (diff)
downloadjitsi-01248b564c6f538bf2bfa304ca3300ee24e284a8.zip
jitsi-01248b564c6f538bf2bfa304ca3300ee24e284a8.tar.gz
jitsi-01248b564c6f538bf2bfa304ca3300ee24e284a8.tar.bz2
Rename protocol contacts where possible.
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java
index d7ca13e..14269df 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java
@@ -773,6 +773,27 @@ public class OperationSetPersistentPresenceJabberImpl
}
/**
+ * Sets the display name for <tt>contact</tt> to be <tt>newName</tt>.
+ * <p>
+ * @param contact the <tt>Contact</tt> that we are renaming
+ * @param newName a <tt>String</tt> containing the new display name for
+ * <tt>metaContact</tt>.
+ * @throws IllegalArgumentException if <tt>contact</tt> is not an
+ * instance that belongs to the underlying implementation.
+ */
+ public void setDisplayName(Contact contact, String newName)
+ throws IllegalArgumentException
+ {
+ assertConnected();
+
+ if(! (contact instanceof ContactJabberImpl) )
+ throw new IllegalArgumentException(
+ "Argument is not an jabber contact (contact=" + contact + ")");
+
+ ((ContactJabberImpl)contact).getSourceEntry().setName(newName);
+ }
+
+ /**
* Our listener that will tell us when we're registered to server
* and is ready to accept us as a listener.
*/