Oracle Fusion Middleware Communication Services 11.1.1.3.0 Java API Reference
E14785-02

oracle.sdp.presence.integration
Interface Buddy


public interface Buddy

Abstraction of a "buddy" - a resource identifying a person for whom we want to set permissions for accessing presence information, or whom we want to add to different lists ("friends", "buddies", "workmates" etc).


Method Summary
 boolean equals(java.lang.Object other)
           Evaluates if the two buddies are considered equal.
 java.lang.String getDisplayname()
           
 java.lang.String getParentDisplayname()
          Get the display name of the parent of a buddy in a buddy list.
 java.lang.String getParentName()
          Get the name of the enclosing resource list
 java.lang.String getParentPath()
          Get the full "path" of the enclosing resource list
 java.net.URI getURI()
          Returns the URI of this Buddy.
 VCard getVCard()
           
 void setDisplayname(java.lang.String displayname)
          Set this.display to displayname.
 void setParentDisplayname(java.lang.String parentDisplayname)
          Set the display name of the parent of a buddy in a buddy list.
 void setVCard(VCard vcard)
          set this.vcard to vCard.
 

Method Detail

equals

boolean equals(java.lang.Object other)

Evaluates if the two buddies are considered equal.

Two buddies are considered equal if their URI:s are equal. No other information is taken into account (hence, same URI but different display names would still return true)

Overrides:
equals in class java.lang.Object
Parameters:
other -
Returns:
true if these two objects are considered to be equal, false otherwise

getDisplayname

java.lang.String getDisplayname()
Returns:
this.displayname

getParentDisplayname

java.lang.String getParentDisplayname()
Get the display name of the parent of a buddy in a buddy list.


getParentName

java.lang.String getParentName()
Get the name of the enclosing resource list

Returns:
the name of the enclosing resource list - this is the last token of the full path of the enclosing resource list

getParentPath

java.lang.String getParentPath()
Get the full "path" of the enclosing resource list

Returns:
the full path (eg friends/close ) of this buddy's enclosing list. TODO decide on exactly what "path-separator" should be

getURI

java.net.URI getURI()
Returns the URI of this Buddy. Note, the returned URI will be a clone so changes to the returned URI will not have any affect on the uri within the Buddy itself.

Returns:
the uri

getVCard

VCard getVCard()
Returns:
a copy of this.vcard. Modifying the returned Vcard does not modify this Buddy; for modifications to apply, users must call the setVCard(VCard) method with the updated Vcard object.

setDisplayname

void setDisplayname(java.lang.String displayname)
Set this.display to displayname.

Parameters:
displayname -

setParentDisplayname

void setParentDisplayname(java.lang.String parentDisplayname)
Set the display name of the parent of a buddy in a buddy list.

Parameters:
parentDisplayname -

setVCard

void setVCard(VCard vcard)
set this.vcard to vCard. Note that implementations will keep an internal copy of the vcard, so any changes you make to vcard outside of this class after setting the vCard with this method will NOT change this buddy. In order to change the vcard information, the setVCard(VCard) method must be called again with the updated Vcard object.

Parameters:
vcard -

Oracle Fusion Middleware Communication Services 11.1.1.3.0 Java API Reference
E14785-02

Copyright © 2005, 2010 Oracle and/or its affiliates. All rights reserved.