Examples of ApiResponseResponse


Examples of org.apache.cloudstack.api.response.ApiResponseResponse

            response.setRelated(responseName);


            Field[] responseFields = apiCmdAnnotation.responseObject().getDeclaredFields();
            for(Field responseField: responseFields) {
                ApiResponseResponse responseResponse = getFieldResponseMap(responseField);
                response.addApiResponse(responseResponse);
            }

            response.setObjectName("api");
            s_apiNameDiscoveryResponseMap.put(apiName, response);
View Full Code Here

Examples of org.apache.cloudstack.api.response.ApiResponseResponse

        }
        return responseApiNameListMap;
    }

    private ApiResponseResponse getFieldResponseMap(Field responseField) {
        ApiResponseResponse responseResponse = new ApiResponseResponse();
        SerializedName serializedName = responseField.getAnnotation(SerializedName.class);
        Param param = responseField.getAnnotation(Param.class);
        if (serializedName != null && param != null) {
            responseResponse.setName(serializedName.value());
            responseResponse.setDescription(param.description());
            responseResponse.setType(responseField.getType().getSimpleName().toLowerCase());
            //If response is not of primitive type - we have a nested entity
            Class fieldClass = param.responseObject();
            if (fieldClass != null) {
                Class<?> superClass = fieldClass.getSuperclass();
                if (superClass != null) {
                    String superName = superClass.getName();
                    if (superName.equals(BaseResponse.class.getName())) {
                        Field[] fields = fieldClass.getDeclaredFields();
                        for (Field field : fields) {
                            ApiResponseResponse innerResponse = getFieldResponseMap(field);
                            if (innerResponse != null) {
                                responseResponse.addApiResponse(innerResponse);
                            }
                        }
                    }
View Full Code Here

Examples of org.apache.cloudstack.api.response.ApiResponseResponse

            }
            response.setRelated(responseName);

            Field[] responseFields = apiCmdAnnotation.responseObject().getDeclaredFields();
            for (Field responseField : responseFields) {
                ApiResponseResponse responseResponse = getFieldResponseMap(responseField);
                response.addApiResponse(responseResponse);
            }

            response.setObjectName("api");
            s_apiNameDiscoveryResponseMap.put(apiName, response);
View Full Code Here

Examples of org.apache.cloudstack.api.response.ApiResponseResponse

        }
        return responseApiNameListMap;
    }

    private ApiResponseResponse getFieldResponseMap(Field responseField) {
        ApiResponseResponse responseResponse = new ApiResponseResponse();
        SerializedName serializedName = responseField.getAnnotation(SerializedName.class);
        Param param = responseField.getAnnotation(Param.class);
        if (serializedName != null && param != null) {
            responseResponse.setName(serializedName.value());
            responseResponse.setDescription(param.description());
            responseResponse.setType(responseField.getType().getSimpleName().toLowerCase());
            //If response is not of primitive type - we have a nested entity
            Class fieldClass = param.responseObject();
            if (fieldClass != null) {
                Class<?> superClass = fieldClass.getSuperclass();
                if (superClass != null) {
                    String superName = superClass.getName();
                    if (superName.equals(BaseResponse.class.getName())) {
                        Field[] fields = fieldClass.getDeclaredFields();
                        for (Field field : fields) {
                            ApiResponseResponse innerResponse = getFieldResponseMap(field);
                            if (innerResponse != null) {
                                responseResponse.addApiResponse(innerResponse);
                            }
                        }
                    }
View Full Code Here

Examples of org.apache.cloudstack.api.response.ApiResponseResponse

            response.setRelated(responseName);


            Field[] responseFields = apiCmdAnnotation.responseObject().getDeclaredFields();
            for(Field responseField: responseFields) {
                ApiResponseResponse responseResponse = getFieldResponseMap(responseField);
                response.addApiResponse(responseResponse);
            }

            response.setObjectName("api");
            s_apiNameDiscoveryResponseMap.put(apiName, response);
View Full Code Here

Examples of org.apache.cloudstack.api.response.ApiResponseResponse

        }
        return responseApiNameListMap;
    }

    private ApiResponseResponse getFieldResponseMap(Field responseField) {
        ApiResponseResponse responseResponse = new ApiResponseResponse();
        SerializedName serializedName = responseField.getAnnotation(SerializedName.class);
        Param param = responseField.getAnnotation(Param.class);
        if (serializedName != null && param != null) {
            responseResponse.setName(serializedName.value());
            responseResponse.setDescription(param.description());
            responseResponse.setType(responseField.getType().getSimpleName().toLowerCase());
            //If response is not of primitive type - we have a nested entity
            Class fieldClass = param.responseObject();
            if (fieldClass != null) {
                Class<?> superClass = fieldClass.getSuperclass();
                if (superClass != null) {
                    String superName = superClass.getName();
                    if (superName.equals(BaseResponse.class.getName())) {
                        Field[] fields = fieldClass.getDeclaredFields();
                        for (Field field : fields) {
                            ApiResponseResponse innerResponse = getFieldResponseMap(field);
                            if (innerResponse != null) {
                                responseResponse.addApiResponse(innerResponse);
                            }
                        }
                    }
View Full Code Here

Examples of org.apache.cloudstack.api.response.ApiResponseResponse

            Field[] responseFields = apiCmdAnnotation.responseObject().getDeclaredFields();
            for(Field responseField: responseFields) {
                SerializedName serializedName = responseField.getAnnotation(SerializedName.class);
                if(serializedName != null) {
                    ApiResponseResponse responseResponse = new ApiResponseResponse();
                    responseResponse.setName(serializedName.value());
                    Param param = responseField.getAnnotation(Param.class);
                    if (param != null)
                        responseResponse.setDescription(param.description());
                    responseResponse.setType(responseField.getType().getSimpleName().toLowerCase());
                    response.addApiResponse(responseResponse);
                }
            }

            Set<Field> fields = ReflectUtil.getAllFieldsForClass(cmdClass,
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.