Interface IQRegisterInfo
public interface IQRegisterInfo
Handle the various user registration settings that are
valid under XMPP. Although user registration is a fairly
flexible beast in XMPP, much of registration is redundant to
vCard and no mainstream clients support registration fields
with much fidelity anyhow. So registration is kept simple,
and we defer to vCard for user information gathering.
- Author:
- Iain Shigeoka
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe user's addressstatic final intThe user's citystatic final intThe date of registrationstatic final intThe user's emailstatic final intFields should be stored in user propertiesstatic final intFields should be stored in vCardstatic final String[]Element names of the fields, array index matches typestatic final intThe user's first namestatic final intThe user's last namestatic final intMisc data to associate with the accountstatic final intThe user's full namestatic final intThe user's phonestatic final intThe user's statestatic final intMisc text to associate with the accountstatic final intAn unknown typestatic final intThe user's urlstatic final intThe user's zip code -
Method Summary
Modifier and TypeMethodDescriptiongetFieldElementName(int fieldType) Obtain the element name from a field type.intDetermines where field information is stored.intgetFieldType(String fieldElementName) Get the setting type from a field's element name.booleanisFieldRequired(int fieldType) Determines if a given field is required for registration.booleanDetermines if users can automatically register user accounts without system administrator intervention.voidsetFieldRequired(int fieldType, boolean isRequired) Tells the server whether to require a registration field or not.voidsetFieldStoreLocation(int location) Sets the location for storing field information.voidsetOpenRegistrationSupported(boolean isSupported) Tells the server whether to support open registration or not.
-
Field Details
-
UNKNOWN
static final int UNKNOWNAn unknown type- See Also:
-
EMAIL
static final int EMAILThe user's email- See Also:
-
NAME
static final int NAMEThe user's full name- See Also:
-
FIRST_NAME
static final int FIRST_NAMEThe user's first name- See Also:
-
LAST_NAME
static final int LAST_NAMEThe user's last name- See Also:
-
ADDRESS
static final int ADDRESSThe user's address- See Also:
-
CITY
static final int CITYThe user's city- See Also:
-
STATE
static final int STATEThe user's state- See Also:
-
ZIP
static final int ZIPThe user's zip code- See Also:
-
PHONE
static final int PHONEThe user's phone- See Also:
-
URL
static final int URLThe user's url- See Also:
-
DATE
static final int DATEThe date of registration- See Also:
-
MISC
static final int MISCMisc data to associate with the account- See Also:
-
TEXT
static final int TEXTMisc text to associate with the account- See Also:
-
FIELD_NAMES
Element names of the fields, array index matches type -
FIELD_IN_USER_PROPS
static final int FIELD_IN_USER_PROPSFields should be stored in user properties- See Also:
-
FIELD_IN_VCARD
static final int FIELD_IN_VCARDFields should be stored in vCard- See Also:
-
-
Method Details
-
getFieldStoreLocation
int getFieldStoreLocation()Determines where field information is stored.- Returns:
- the location type.
-
setFieldStoreLocation
Sets the location for storing field information.- Parameters:
location- The location type- Throws:
UnauthorizedException- If you don't have permission to adjust this setting
-
isOpenRegistrationSupported
boolean isOpenRegistrationSupported()Determines if users can automatically register user accounts without system administrator intervention.- Returns:
- True if open registration is supported
-
setOpenRegistrationSupported
Tells the server whether to support open registration or not.- Parameters:
isSupported- True if open registration is supported- Throws:
UnauthorizedException- If you don't have permission to change this setting
-
isFieldRequired
boolean isFieldRequired(int fieldType) Determines if a given field is required for registration.- Parameters:
fieldType- The field to check- Returns:
- True if the field is required
-
setFieldRequired
Tells the server whether to require a registration field or not.- Parameters:
fieldType- The field to require.isRequired- True if the field should be required- Throws:
UnauthorizedException- If you don't have permission to change this setting
-
getFieldType
Get the setting type from a field's element name. This is a convenience for looking up the correct field type from an element name.- Parameters:
fieldElementName- The known element name- Returns:
- The field type, one of the static int types defined in this class
-
getFieldElementName
Obtain the element name from a field type. This is a convience for looking up the correct field element name from it's field type.- Parameters:
fieldType- The known field type- Returns:
- The field element name
-