Package org.glassfish.admin.rest.model

Examples of org.glassfish.admin.rest.model.ResponseBody.addFailure()


        // the ResponseBody constructor to ignore resource links.
        // Since we never return links from this filter, instead of looking
        // for the header, we can just always tell the ResponseBody to ignore links.
        ResponseBody rb = new ResponseBody(false);
        String errorMsg = (String)entity;
        rb.addFailure(errorMsg);
        resCtx.setEntity(rb, resCtx.getEntityAnnotations(), Constants.MEDIA_TYPE_JSON_TYPE);
    }
}
View Full Code Here


        }
        final ResponseBody responseBody = new ResponseBody(includeResourceLinks());
        if (ExitCode.WARNING.equals(exitCode)) {
            responseBody.addWarning(report.getMessage());
        } else {
            responseBody.addFailure(report.getMessage());
        }
        return responseBody;
    }

    abstract protected boolean includeResourceLinks();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.