Package com.rop.security

Examples of com.rop.security.MainError


    //注意,这个不能删除,否则无法进行流化
    public ServiceUnavailableErrorResponse() {
    }

    public ServiceUnavailableErrorResponse(String method, Locale locale) {
        MainError mainError = SubErrors.getMainError(SubErrorType.ISP_SERVICE_UNAVAILABLE, locale);
        String errorCodeKey = ISP + transform(method) + SERVICE_UNAVAILABLE;
        SubError subError = SubErrors.getSubError(errorCodeKey,
                SubErrorType.ISP_SERVICE_UNAVAILABLE.value(),
                locale, method,"NONE","NONE");
        ArrayList<SubError> subErrors = new ArrayList<SubError>();
View Full Code Here


        setMainError(mainError);
        setSubErrors(subErrors);
    }

    public ServiceUnavailableErrorResponse(String method, Locale locale, Throwable throwable) {
        MainError mainError = SubErrors.getMainError(SubErrorType.ISP_SERVICE_UNAVAILABLE, locale);

        ArrayList<SubError> subErrors = new ArrayList<SubError>();

        String errorCodeKey = ISP + transform(method) + SERVICE_UNAVAILABLE;
        Throwable srcThrowable = throwable;
View Full Code Here

    public RejectedServiceResponse() {
    }

    public RejectedServiceResponse(Locale locale) {
        MainError mainError = MainErrors.getError(MainErrorType.FORBIDDEN_REQUEST, locale);
        setMainError(mainError);
    }
View Full Code Here

     * @param locale         本地化对象
     * @param params         错误信息的参数,如错误消息的值为:can't find user by {0} ,则传入的参数为001时,错误消息格式化为:
     *                       can't find user by 001
     */
    public NotExistErrorResponse(String objectName, String queryFieldName, Object queryFieldValue, Locale locale) {
        MainError mainError = SubErrors.getMainError(SubErrorType.ISV_NOT_EXIST, locale);
        String subErrorCode = SubErrors.getSubErrorCode(SubErrorType.ISV_NOT_EXIST, objectName, queryFieldName);


        SubError subError = SubErrors.getSubError(subErrorCode, SubErrorType.ISV_NOT_EXIST.value(), locale, queryFieldName, queryFieldValue);
        ArrayList<SubError> subErrors = new ArrayList<SubError>();
View Full Code Here

    public TimeoutErrorResponse() {
    }

    public TimeoutErrorResponse(String method, Locale locale, int timeout) {
        MainError mainError = SubErrors.getMainError(SubErrorType.ISP_SERVICE_TIMEOUT, locale);

        ArrayList<SubError> subErrors = new ArrayList<SubError>();

        String errorCodeKey = ISP + transform(method) + SERVICE_TIMEOUT;
        SubError subError = SubErrors.getSubError(errorCodeKey,
View Full Code Here

    //注意,这个不能删除,否则无法进行流化
    public ServiceUnavailableErrorResponse() {
    }

    public ServiceUnavailableErrorResponse(String method, Locale locale) {
        MainError mainError = SubErrors.getMainError(SubErrorType.ISP_SERVICE_UNAVAILABLE, locale);
        String errorCodeKey = ISP + transform(method) + SERVICE_UNAVAILABLE;
        SubError subError = SubErrors.getSubError(errorCodeKey,
                SubErrorType.ISP_SERVICE_UNAVAILABLE.value(),
                locale, method,"NONE","NONE");
        ArrayList<SubError> subErrors = new ArrayList<SubError>();
View Full Code Here

        setMainError(mainError);
        setSubErrors(subErrors);
    }

    public ServiceUnavailableErrorResponse(String method, Locale locale, Throwable throwable) {
        MainError mainError = SubErrors.getMainError(SubErrorType.ISP_SERVICE_UNAVAILABLE, locale);

        ArrayList<SubError> subErrors = new ArrayList<SubError>();

        String errorCodeKey = ISP + transform(method) + SERVICE_UNAVAILABLE;
        Throwable srcThrowable = throwable;
View Full Code Here

    public RejectedServiceResponse() {
    }

    public RejectedServiceResponse(RopRequestContext context) {
        MainError mainError = MainErrors.getError(MainErrorType.FORBIDDEN_REQUEST, context.getLocale(),
                                                  context.getMethod(),context.getVersion());
        setMainError(mainError);
    }
View Full Code Here

     * @param locale         本地化对象
     * @param params         错误信息的参数,如错误消息的值为:use '{0}'({1})can't find '{2}' object ,则传入的参数为001时,错误消息格式化为:
     *                       can't find user by 001
     */
    public NotExistErrorResponse(String objectName, String queryFieldName, Object queryFieldValue, Locale locale) {
        MainError mainError = SubErrors.getMainError(SubErrorType.ISV_NOT_EXIST, locale);
        String subErrorCode = SubErrors.getSubErrorCode(SubErrorType.ISV_NOT_EXIST, objectName, queryFieldName);

        SubError subError = SubErrors.getSubError(subErrorCode, SubErrorType.ISV_NOT_EXIST.value(), locale,
                                                 queryFieldName, queryFieldValue,objectName);
        ArrayList<SubError> subErrors = new ArrayList<SubError>();
View Full Code Here

    public TimeoutErrorResponse() {
    }

    public TimeoutErrorResponse(String method, Locale locale, int timeout) {
        MainError mainError = SubErrors.getMainError(SubErrorType.ISP_SERVICE_TIMEOUT, locale);

        ArrayList<SubError> subErrors = new ArrayList<SubError>();

        String errorCodeKey = ISP + transform(method) + SERVICE_TIMEOUT;
        SubError subError = SubErrors.getSubError(errorCodeKey,
View Full Code Here

TOP

Related Classes of com.rop.security.MainError

Copyright © 2018 www.massapicom. 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.