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 address
      static int CITY
      The user's city
      static int DATE
      The date of registration
      static int EMAIL
      The user's email
      static int FIELD_IN_USER_PROPS
      Fields should be stored in user properties
      static int FIELD_IN_VCARD
      Fields should be stored in vCard
      static String[] FIELD_NAMES
      Element names of the fields, array index matches type
      static int FIRST_NAME
      The user's first name
      static int LAST_NAME
      The user's last name
      static int MISC
      Misc data to associate with the account
      static int NAME
      The user's full name
      static int PHONE
      The user's phone
      static int STATE
      The user's state
      static int TEXT
      Misc text to associate with the account
      static int UNKNOWN
      An unknown type
      static int URL
      The user's url
      static int ZIP
      The user's zip code
    • 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