public String availability(AvailabilityCondition condition) {
        String description;
        if (condition.getContext() != null && condition.getContext().get(CONTEXT_PROPERTY_DESCRIPTION) != null) {
            description = condition.getContext().get(CONTEXT_PROPERTY_DESCRIPTION);
        } else {
            description = condition.getDataId();
        }
        AvailabilityCondition.Operator operator = condition.getOperator();
        switch (operator) {
            case DOWN:
                description += " is down";
                break;
            case NOT_UP:
                description += " is not up";
                break;
            case UP:
                description += " is up";
                break;
            default:
                throw new IllegalArgumentException(operator.name());
        }
        return description;
    }
public String availability ( AvailabilityCondition condition ) { String description ; if ( condition . getContext ( ) != null && condition . getContext ( ) . get ( CONTEXT_PROPERTY_DESCRIPTION ) != null ) { description = condition . getContext ( ) . get ( CONTEXT_PROPERTY_DESCRIPTION ) ; } else { description = condition . getDataId ( ) ; } AvailabilityCondition . Operator operator = condition . getOperator ( ) ; switch ( operator ) { case DOWN : description += " is down" ; break ; case NOT_UP : description += " is not up" ; break ; case UP : description += " is up" ; break ; default : throw new IllegalArgumentException ( operator . name ( ) ) ; } return description ; }
Create a description for an AvailabilityCondition object.
It supports Condition.context properties:
- "description": Description of the dataId used for this condition, if not present, description will use
dataId literal
i.e. "description": "Response Time"

@param condition the condition
@return a description to be used on email templates