@Override
    public JSONObject get(String path, Map<String,String> headers)
            throws ServiceException, JSONException {
        Asset rules = getRulesAsset(path);

        Operand input = new Operand();
        input.setContext(getContext(path));
        Query query = getQuery(path, headers);
        input.setParams(query.getFilters());
        input.setMeta(headers);

        JSONObject response = invokeRules(rules, input, getExecutor(headers));

        Status status = input.getStatus();
        if (status != null) {
            headers.put(Listener.METAINFO_HTTP_STATUS_CODE, String.valueOf(status.getCode()));
            if (response == null)
                return status.getJson();
        }

        return response;
    }
@ Override public JSONObject get ( String path , Map < String , String > headers ) throws ServiceException , JSONException { Asset rules = getRulesAsset ( path ) ; Operand input = new Operand ( ) ; input . setContext ( getContext ( path ) ) ; Query query = getQuery ( path , headers ) ; input . setParams ( query . getFilters ( ) ) ; input . setMeta ( headers ) ; JSONObject response = invokeRules ( rules , input , getExecutor ( headers ) ) ; Status status = input . getStatus ( ) ; if ( status != null ) { headers . put ( Listener . METAINFO_HTTP_STATUS_CODE , String . valueOf ( status . getCode ( ) ) ) ; if ( response == null ) return status . getJson ( ) ; } return response ; }
Apply rules designated in asset path against incoming request parameters.