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
Fields Modifier and Type Field Description static int
ADDRESS
The user's addressstatic int
CITY
The user's citystatic int
DATE
The date of registrationstatic int
EMAIL
The user's emailstatic int
FIELD_IN_USER_PROPS
Fields should be stored in user propertiesstatic int
FIELD_IN_VCARD
Fields should be stored in vCardstatic String[]
FIELD_NAMES
Element names of the fields, array index matches typestatic int
FIRST_NAME
The user's first namestatic int
LAST_NAME
The user's last namestatic int
MISC
Misc data to associate with the accountstatic int
NAME
The user's full namestatic int
PHONE
The user's phonestatic int
STATE
The user's statestatic int
TEXT
Misc text to associate with the accountstatic int
UNKNOWN
An unknown typestatic int
URL
The user's urlstatic int
ZIP
The user's zip code
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getFieldElementName(int fieldType)
Obtain the element name from a field type.int
getFieldStoreLocation()
Determines where field information is stored.int
getFieldType(String fieldElementName)
Get the setting type from a field's element name.boolean
isFieldRequired(int fieldType)
Determines if a given field is required for registration.boolean
isOpenRegistrationSupported()
Determines if users can automatically register user accounts without system administrator intervention.void
setFieldRequired(int fieldType, boolean isRequired)
Tells the server whether to require a registration field or not.void
setFieldStoreLocation(int location)
Sets the location for storing field information.void
setOpenRegistrationSupported(boolean isSupported)
Tells the server whether to support open registration or not.
-
-
-
Field Detail
-
UNKNOWN
static final int UNKNOWN
An unknown type- See Also:
- Constant Field Values
-
EMAIL
static final int EMAIL
The user's email- See Also:
- Constant Field Values
-
NAME
static final int NAME
The user's full name- See Also:
- Constant Field Values
-
FIRST_NAME
static final int FIRST_NAME
The user's first name- See Also:
- Constant Field Values
-
LAST_NAME
static final int LAST_NAME
The user's last name- See Also:
- Constant Field Values
-
ADDRESS
static final int ADDRESS
The user's address- See Also:
- Constant Field Values
-
CITY
static final int CITY
The user's city- See Also:
- Constant Field Values
-
STATE
static final int STATE
The user's state- See Also:
- Constant Field Values
-
ZIP
static final int ZIP
The user's zip code- See Also:
- Constant Field Values
-
PHONE
static final int PHONE
The user's phone- See Also:
- Constant Field Values
-
URL
static final int URL
The user's url- See Also:
- Constant Field Values
-
DATE
static final int DATE
The date of registration- See Also:
- Constant Field Values
-
MISC
static final int MISC
Misc data to associate with the account- See Also:
- Constant Field Values
-
TEXT
static final int TEXT
Misc text to associate with the account- See Also:
- Constant Field Values
-
FIELD_NAMES
static final String[] FIELD_NAMES
Element names of the fields, array index matches type
-
FIELD_IN_USER_PROPS
static final int FIELD_IN_USER_PROPS
Fields should be stored in user properties- See Also:
- Constant Field Values
-
FIELD_IN_VCARD
static final int FIELD_IN_VCARD
Fields should be stored in vCard- See Also:
- Constant Field Values
-
-
Method Detail
-
getFieldStoreLocation
int getFieldStoreLocation()
Determines where field information is stored.- Returns:
- the location type.
-
setFieldStoreLocation
void setFieldStoreLocation(int location) throws UnauthorizedException
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
void setOpenRegistrationSupported(boolean isSupported) throws UnauthorizedException
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
void setFieldRequired(int fieldType, boolean isRequired) throws UnauthorizedException
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
int getFieldType(String fieldElementName)
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
String getFieldElementName(int fieldType)
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
-
-