1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-23 13:07:59 +01:00

Added ability to obtain the value of a given account attribute. SMACK-164

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2397 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2004-10-23 17:10:50 +00:00 committed by gaston
parent fd62b99a59
commit a654adc588

View file

@ -136,6 +136,25 @@ public class AccountManager {
return Collections.EMPTY_LIST.iterator();
}
/**
* Returns the value of a given account attribute or <tt>null</tt> if the account
* attribute wasn't found.
*
* @param name the name of the account attribute to return its value.
* @return the value of the account attribute or <tt>null</tt> if an account
* attribute wasn't found for the requested name.
*/
public String getAccountAttribute(String name) {
try {
if (info == null) {
getRegistrationInfo();
}
return (String) info.getAttributes().get(name);
}
catch (XMPPException xe) { }
return null;
}
/**
* Returns the instructions for creating a new account, or <tt>null</tt> if there
* are no instructions. If present, instructions should be displayed to the end-user