src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java
/**
     * Checks for account property that can override this status.
     * If missing use the shift value to create the priority to use, make sure
     * it is not zero or less than it.
     * @param statusName the status to check/create priority
     * @param availableShift the difference from available resource
     *                       value to use.
     */
Checks for account property that can override this status.
If missing use the shift value to create the priority to use, make sure
it is not zero or less than it.
@param statusName the status to check/create priority
@param availableShift the difference from available resource
value to use.
Checks for account property that can override this status . If missing use the shift value to create the priority to use make sure it is not zero or less than it . @param statusName the status to check / create priority @param availableShift the difference from available resource value to use .
private void addDefaultValue(String statusName, int availableShift)
    {
        String resourcePriority = getAccountPriorityForStatus(statusName);
        if(resourcePriority != null)
        {
            try
            {
                addPresenceToPriorityMapping(
                    statusName,
                    Integer.parseInt(resourcePriority));
            }
            catch(NumberFormatException ex)
            {
                logger.error(
                    "Wrong value for resource priority for status: "
                        + statusName, ex);
            }
        }
        else
        {
            int priority = resourcePriorityAvailable + availableShift;
            if(priority <= 0)
                priority = resourcePriorityAvailable;
            addPresenceToPriorityMapping(statusName, priority);
        }
    }
private void addDefaultValue ( String statusName , int availableShift ) { String resourcePriority = getAccountPriorityForStatus ( statusName ) ; if ( resourcePriority != null ) { try { addPresenceToPriorityMapping ( statusName , Integer . parseInt ( resourcePriority ) ) ; } catch ( NumberFormatException ex ) { logger . error ( "Wrong value for resource priority for status: " + statusName , ex ) ; } } else { int priority = resourcePriorityAvailable + availableShift ; if ( priority <= 0 ) priority = resourcePriorityAvailable ; addPresenceToPriorityMapping ( statusName , priority ) ; } }
Checks for account property that can override this status.
Checks for account property that can override this status .
// if priority is less than zero, use the available priority