FileDocCategorySizeDatePackage
PtsCodes.javaAPI DocAndroid 1.5 API15398Wed May 06 22:42:46 BST 2009com.android.im.imps

PtsCodes

public class PtsCodes extends Object

Fields Summary
private static HashMap
sCodeToTransaction
private static HashMap
sCodeToElement
private static HashMap
sCodeToCapElement
private static HashMap
sCodeToCapValue
private static HashMap
sCodeToServiceTree
private static HashMap
sCodeToPresenceAttribute
private static HashMap
sTransactionToCode
private static HashMap
sElementToCode
static HashMap
sCapElementToCode
static HashMap
sCapValueToCode
private static HashMap
sServiceTreeToCode
static HashMap
sContactListPropsToCode
private static HashMap
sPresenceAttributeToCode
private static ArrayList
sServerRequestTransactionCode
private static HashMap
sCodeToPAValue
private static HashMap
sPAValueToCode
public static final String
ClientCapability_Response
public static final String
Disconnect
public static final String
GetList_Response
public static final String
KeepAlive_Response
public static final String
Login_Response
public static final String
Service_Response
public static final String
Status
public static final String
ListManage_Response
public static final String
PresenceNotification
public static final String
GetPresence_Response
public static final String
AllFunctions
public static final String
CapabilityList
public static final String
AgreedCapabilityList
public static final String
CapabilityRequest
public static final String
ClientID
public static final String
ContactList
public static final String
DefaultContactList
public static final String
DigestSchema
public static final String
Nonce
public static final String
NotAvailableFunctions
public static final String
KeepAliveTime
public static final String
SessionID
public static final String
DefaultList
public static final String
UserNickList
public static final String
ContactListProps
public static final String
Presence
public static final String
DisplayName
public static final String
Default
Constructors Summary
private PtsCodes()

    
Methods Summary
public static java.lang.StringgetCapElement(java.lang.String type)

        // not case sensitive
        return sCodeToCapElement.get(type.toUpperCase());
    
public static java.lang.StringgetCapElementCode(java.lang.String elemType)

        return sCapElementToCode.get(elemType);
    
public static java.lang.StringgetCapValue(java.lang.String type)

        // not case sensitive
        return sCodeToCapValue.get(type.toUpperCase()) == null ?
                type : sCodeToCapValue.get(type.toUpperCase());
    
public static java.lang.StringgetCapValueCode(java.lang.String value)

        return sCapValueToCode.get(value);
    
public static java.lang.StringgetElement(java.lang.String type)

        // not case sensitive
        return sCodeToElement.get(type.toUpperCase());
    
public static java.lang.StringgetElementCode(java.lang.String elemType, java.lang.String transactionType)

        if (ImpsTags.PresenceSubList.equals(elemType)) {
            return ImpsTags.UpdatePresence_Request.equals(transactionType) ? "UV" : "PS";
        }

        return sElementToCode.get(elemType);
    
public static java.lang.StringgetPAValue(java.lang.String code)

        // not case sensitive
        String value = sCodeToPAValue.get(code.toUpperCase());

        return value == null ? code : value;
    
public static java.lang.StringgetPAValueCode(java.lang.String value)

        // not case sensitive
        String code = sPAValueToCode.get(value.toUpperCase());
        return code == null ? value : code;
    
public static java.lang.StringgetPresenceAttributeCode(java.lang.String elemType)

        return sPresenceAttributeToCode.get(elemType);
    
public static java.lang.StringgetPresenceAttributeElement(java.lang.String code)

        // not case sensitive
        return sCodeToPresenceAttribute.get(code.toUpperCase());
    
public static java.lang.StringgetServiceTreeCode(java.lang.String elemType)

        return sServiceTreeToCode.get(elemType);
    
public static java.lang.StringgetServiceTreeValue(java.lang.String type)

        // not case sensitive
        return sCodeToServiceTree.get(type.toUpperCase());
    
public static java.lang.StringgetTransaction(java.lang.String type)


         
        // not case sensitive
        return sCodeToTransaction.get(type.toUpperCase());
    
public static java.lang.StringgetTxCode(java.lang.String txType)

        return sTransactionToCode.get(txType);
    
public static booleanisServerRequestCode(java.lang.String type)

        for (String code : sServerRequestTransactionCode) {
            if (code.equals(type)) {
                return true;
            }
        }

        return false;