private void _handleMultiValues(ArrayList<String> values, String key, String command) {
        if (key == null) return;

        if (values == null || values.isEmpty()) {
            _generateEmptyMultiValueError(key);
            return;
        }

        ValidationResult vr;

        // validate the key
        vr = validator.cleanMultiValuePropertyKey(key);

        // Check for an error
        if (vr.getErrorCode() != 0) {
            pushValidationResult(vr);
        }

        // reset the key
        Object _key = vr.getObject();
        String cleanKey = (_key != null) ? vr.getObject().toString() : null;

        // if key is empty generate an error and return
        if (cleanKey == null || cleanKey.isEmpty()) {
            _generateInvalidMultiValueKeyError(key);
            return;
        }

        key = cleanKey;

        try {
            JSONArray currentValues = _constructExistingMultiValue(key, command);
            JSONArray newValues = _cleanMultiValues(values, key);
            _validateAndPushMultiValue(currentValues, newValues, values, key, command);

        } catch (Throwable t) {
            getConfigLogger().verbose(getAccountId(), "Error handling multi value operation for key " + key, t);
        }
    }
private void _handleMultiValues ( ArrayList < String > values , String key , String command ) { if ( key == null ) return ; if ( values == null || values . isEmpty ( ) ) { _generateEmptyMultiValueError ( key ) ; return ; } ValidationResult vr ; vr = validator . cleanMultiValuePropertyKey ( key ) ; if ( vr . getErrorCode ( ) != 0 ) { pushValidationResult ( vr ) ; } Object _key = vr . getObject ( ) ; String cleanKey = ( _key != null ) ? vr . getObject ( ) . toString ( ) : null ; if ( cleanKey == null || cleanKey . isEmpty ( ) ) { _generateInvalidMultiValueKeyError ( key ) ; return ; } key = cleanKey ; try { JSONArray currentValues = _constructExistingMultiValue ( key , command ) ; JSONArray newValues = _cleanMultiValues ( values , key ) ; _validateAndPushMultiValue ( currentValues , newValues , values , key , command ) ; } catch ( Throwable t ) { getConfigLogger ( ) . verbose ( getAccountId ( ) , "Error handling multi value operation for key " + key , t ) ; } }
private multi-value handlers and helpers