net.kano.joscar.snaccmd.acct
Class AcctModAck

java.lang.Object
  extended bySnacCommand
      extended byAcctCommand
          extended byAcctResponse
              extended byAcctModAck

public class AcctModAck
extends AcctResponse

A SNAC command sent in response to an AcctModCmd.

See Also:
AcctModCmd
Source of this SNAC:
AIM server
SNAC command type:
Family 0x07, command 0x05

Field Summary
static int ERRORCODE_CANT_CHANGE_TWICE
          An error code indicating that the registered email address cannot be changed while another address change is pending authorization.
static int ERRORCODE_DIFFERENT_SN
          An error code indicating that the user attempted to reformat his or her screenname in a way that made it a different screenname.
static int ERRORCODE_EMAIL_HAS_TOO_MANY_SCREENNAMES
          An error code indicating that the attempted change in this user's registered email address would result in that email address having too many screennames registered under it.
static int ERRORCODE_INVALID_EMAIL
          An error code indicating that the new registered email address is not a valid email address.
static int ERRORCODE_SN_ENDS_WITH_SPACE
          An error code indicating that the newly formatted screenname ends with a space and is thus an invalid screenname.
static int ERRORCODE_SN_TOO_LONG
          An error code indicating that the newly formatted screenname is too long (try removing some spaces).
 
Fields inherited from class AcctResponse
ERRORCODE_CANNOT_DISPLAY_INFO, ERRORCODE_NO_EMAIL, RESULT_ERROR, RESULT_SUCCESS, TYPE_DEFAULT
 
Fields inherited from class AcctCommand
CMD_ACCT_MOD, CMD_CONFIRM, CMD_CONFIRM_ACK, CMD_INFO_REQ, CMD_INFO_RESP, CMD_MOD_ACK, FAMILY_ACCT, FAMILY_INFO
 
Fields inherited from class SnacCommand
SNACFLAG_DEFAULT
 
Constructor Summary
  AcctModAck(int type, int result, java.lang.String sn, java.lang.String email, int errorCode, java.lang.String errorUrl)
          Creates an outgoing account modification response command with the given properties.
  AcctModAck(int errorCode, java.lang.String errorURL)
          Creates an outgoing account modification response command with a type of AcctResponse.TYPE_DEFAULT and a result code of AcctResponse.RESULT_ERROR.
protected AcctModAck(SnacPacket packet)
          Creates an account modification response object from the given incoming SNAC packet.
 
Methods inherited from class AcctResponse
getEmail, getErrorCode, getErrorUrl, getResult, getScreenname, getType, toString, writeData
 
Methods inherited from class SnacCommand
getCommand, getFamily, getFlag1, getFlag2
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ERRORCODE_DIFFERENT_SN

public static final int ERRORCODE_DIFFERENT_SN
An error code indicating that the user attempted to reformat his or her screenname in a way that made it a different screenname.

See Also:
OscarTools.normalize(java.lang.String), Constant Field Values

ERRORCODE_SN_ENDS_WITH_SPACE

public static final int ERRORCODE_SN_ENDS_WITH_SPACE
An error code indicating that the newly formatted screenname ends with a space and is thus an invalid screenname.

See Also:
Constant Field Values

ERRORCODE_SN_TOO_LONG

public static final int ERRORCODE_SN_TOO_LONG
An error code indicating that the newly formatted screenname is too long (try removing some spaces).

See Also:
Constant Field Values

ERRORCODE_CANT_CHANGE_TWICE

public static final int ERRORCODE_CANT_CHANGE_TWICE
An error code indicating that the registered email address cannot be changed while another address change is pending authorization.

See Also:
Constant Field Values

ERRORCODE_EMAIL_HAS_TOO_MANY_SCREENNAMES

public static final int ERRORCODE_EMAIL_HAS_TOO_MANY_SCREENNAMES
An error code indicating that the attempted change in this user's registered email address would result in that email address having too many screennames registered under it.

See Also:
Constant Field Values

ERRORCODE_INVALID_EMAIL

public static final int ERRORCODE_INVALID_EMAIL
An error code indicating that the new registered email address is not a valid email address.

See Also:
Constant Field Values
Constructor Detail

AcctModAck

protected AcctModAck(SnacPacket packet)
Creates an account modification response object from the given incoming SNAC packet.

Parameters:
packet - the account modification response SNAC packet

AcctModAck

public AcctModAck(int type,
                  int result,
                  java.lang.String sn,
                  java.lang.String email,
                  int errorCode,
                  java.lang.String errorUrl)
Creates an outgoing account modification response command with the given properties.

Parameters:
type - a result type (normally AcctResponse.TYPE_DEFAULT)
result - a result code (like AcctResponse.RESULT_SUCCESS)
sn - a screen name, or null for none
email - an email address, or null for none
errorCode - an error code, or -1 for none
errorUrl - an error URL, or -1 for none

AcctModAck

public AcctModAck(int errorCode,
                  java.lang.String errorURL)
Creates an outgoing account modification response command with a type of AcctResponse.TYPE_DEFAULT and a result code of AcctResponse.RESULT_ERROR.

Parameters:
errorCode - an error code, like ERRORCODE_EMAIL_HAS_TOO_MANY_SCREENNAMES
errorURL - an error URL, or null for none