本文整理了Java中com.hp.oo.sdk.content.annotations.Response
类的一些代码示例,展示了Response
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response
类的具体详情如下:
包路径:com.hp.oo.sdk.content.annotations.Response
类名称:Response
暂无
代码示例来源:origin: CloudSlang/cs-actions
},
responses = {
@Response(text = SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, matchType = MatchType.COMPARE_EQUAL),
@Response(text = FAILURE, field = RETURN_CODE, value = RETURN_CODE_FAILURE, matchType = MatchType.COMPARE_EQUAL, isOnFail = true, isDefault = true)
})
public Map<String, String> appendElement(@Param(value = LIST, required = true) String list,
代码示例来源:origin: CloudSlang/cs-actions
},
responses = {
@Response(text = SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, matchType = MatchType.COMPARE_EQUAL),
@Response(text = FAILURE, field = RETURN_CODE, value = RETURN_CODE_FAILURE, matchType = MatchType.COMPARE_EQUAL, isOnFail = true, isDefault = true)
})
public Map<String, String> prependElement(@Param(value = LIST, required = true) String list,
代码示例来源:origin: CloudSlang/cs-actions
},
responses = {
@Response(text = Constants.ResponseNames.SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, matchType = MatchType.COMPARE_EQUAL),
@Response(text = Constants.ResponseNames.FAILURE, field = RETURN_CODE, value = RETURN_CODE_FAILURE, matchType = MatchType.COMPARE_EQUAL, isOnFail = true, isDefault = true)
})
public Map<String, String> getListSize(@Param(value = LIST, required = true) String list,
代码示例来源:origin: CloudSlang/cs-actions
},
responses = {
@Response(text = SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, matchType = MatchType.COMPARE_EQUAL),
@Response(text = FAILURE, field = RETURN_CODE, value = RETURN_CODE_FAILURE, matchType = MatchType.COMPARE_EQUAL, isOnFail = true, isDefault = true)
})
public Map<String, String> removeElement(@Param(value = LIST, required = true) String list,
代码示例来源:origin: CloudSlang/cs-actions
},
responses = {
@Response(text = SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, matchType = MatchType.COMPARE_EQUAL),
@Response(text = FAILURE, field = RETURN_CODE, value = RETURN_CODE_FAILURE, matchType = MatchType.COMPARE_EQUAL, isOnFail = true, isDefault = true)
})
public Map<String, String> sortList(@Param(value = LIST, required = true) String list,
代码示例来源:origin: io.cloudslang.content/score-http-client
},
responses = {
@Response(text = "success", field = RETURN_CODE, value = "0", matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.RESOLVED),
@Response(text = "failure", field = RETURN_CODE, value = "-1", matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.ERROR)
代码示例来源:origin: io.openscore.content/score-http-client
},
responses = {
@Response(text = "success", field = RETURN_CODE, value = "0", matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.RESOLVED),
@Response(text = "failure", field = RETURN_CODE, value = "-1", matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.ERROR)
代码示例来源:origin: CloudSlang/cs-actions
@Action(name = "List Iterator", description = LIST_ITERATOR,
outputs = {
@Output(value = RESULT_STRING, description = RESULT_STRING_DESC),
@Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC),
@Output(value = RETURN_CODE, description = RETURN_CODE_DESC)},
responses = {
@Response(text = HAS_MORE, field = RESULT_TEXT, value = HAS_MORE, matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.RESOLVED, description = HAS_MORE_DESC),
@Response(text = NO_MORE, field = RESULT_TEXT, value = NO_MORE, matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.RESOLVED, description = NO_MORE_DESC),
@Response(text = FAILURE, field = RESULT_TEXT, value = FAILURE, matchType = MatchType.COMPARE_EQUAL, isDefault = true, isOnFail = true, description = FAILURE_DESC)})
public Map<String, String> execute(@Param(value = LIST, required = true, description = LIST_DESC) String list,
@Param(value = SEPARATOR, required = true, description = Constants.Descriptions.SEPARATOR_DESC) String separator,
@Param("globalSessionObject") GlobalSessionObject<Map<String, Object>> globalSessionObject) {
//Get default values
final String separatorImp = defaultIfEmpty(separator, ",");
return ListService.iterate(list, separatorImp, globalSessionObject);
}
}
代码示例来源:origin: CloudSlang/cs-actions
},
responses = {
@Response(text = SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, matchType = MatchType.COMPARE_EQUAL),
@Response(text = FAILURE, field = RESPONSE, value = RETURN_CODE_FAILURE, matchType = MatchType.COMPARE_EQUAL, isOnFail = true, isDefault = true)
})
public Map<String, String> grabItemFromList(@Param(value = LIST, required = true) String list,
代码示例来源:origin: io.cloudslang.content/cs-http-client
@Action(name = "URL Decoder", description = URL_DECODER_DESC,
outputs = {
@Output(value = EXCEPTION, description = EXCEPTION_DESC),
@Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
@Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC)
},
responses = {
@Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS,
matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.RESOLVED),
@Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE,
matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.ERROR)
}
)
public Map<String, String> execute(
@Param(value = URL, required = true, description = URL_DESC) String url,
@Param(value = CHARACTER_SET, description = CHARACTER_SET_DESC) String characterSet) {
try {
if (StringUtils.isEmpty(characterSet)) {
characterSet = Utils.DEFAULT_CHARACTER_SET;
}
final String returnResult = URLDecoder.decode(url, characterSet);
return getSuccessResultsMap(returnResult);
} catch (Exception e) {
return getFailureResultsMap(e.getMessage());
}
}
}
代码示例来源:origin: CloudSlang/cs-actions
@Output(RETURN_CODE)
},
responses = {@Response(text = SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, matchType = MatchType.COMPARE_EQUAL),
@Response(text = FAILURE, field = RETURN_CODE, value = RETURN_CODE_FAILURE, matchType = MatchType.COMPARE_EQUAL, isOnFail = true, isDefault = true)})
代码示例来源:origin: io.cloudslang.content/cs-http-client
@Action(name = "URL Encoder", description = URL_ENCODER_DESC,
outputs = {
@Output(value = HttpClientService.EXCEPTION, description = EXCEPTION_DESC),
@Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
@Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC)
},
responses = {
@Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS,
matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.RESOLVED),
@Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE,
matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.ERROR)
}
)
public Map<String, String> execute(
@Param(value = TEXT, required = true, description = URL_DESC) String text,
@Param(value = CHARACTER_SET, description = CHARACTER_SET_DESC) String characterSet) {
try {
if (StringUtils.isEmpty(characterSet)) {
characterSet = Utils.DEFAULT_CHARACTER_SET;
}
String returnResult = URLEncoder.encode(text, characterSet);
return getSuccessResultsMap(returnResult);
} catch (Exception e) {
return getFailureResultsMap(e.getMessage());
}
}
代码示例来源:origin: CloudSlang/cs-actions
},
responses = {
@Response(text = SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, matchType = MatchType.COMPARE_EQUAL),
@Response(text = FAILURE, field = RETURN_CODE, value = RETURN_CODE_FAILURE, matchType = MatchType.COMPARE_EQUAL, isOnFail = true, isDefault = true)
})
public Map<String, String> containsElement(@Param(value = SUBLIST, required = true) String sublist,
代码示例来源:origin: CloudSlang/cs-actions
@Action(name = "URL Encoder", description = URL_ENCODER_DESC,
outputs = {
@Output(value = HttpClientService.EXCEPTION, description = EXCEPTION_DESC),
@Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
@Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC)
},
responses = {
@Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS,
matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.RESOLVED),
@Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE,
matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.ERROR)
}
)
public Map<String, String> execute(
@Param(value = TEXT, required = true, description = URL_DESC) String text,
@Param(value = CHARACTER_SET, description = CHARACTER_SET_DESC) String characterSet) {
try {
if (StringUtils.isEmpty(characterSet)) {
characterSet = Utils.DEFAULT_CHARACTER_SET;
}
String returnResult = URLEncoder.encode(text, characterSet);
return getSuccessResultsMap(returnResult);
} catch (Exception e) {
return getFailureResultsMap(e.getMessage());
}
}
代码示例来源:origin: CloudSlang/cs-actions
@Action(name = "URL Decoder", description = URL_DECODER_DESC,
outputs = {
@Output(value = EXCEPTION, description = EXCEPTION_DESC),
@Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
@Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC)
},
responses = {
@Response(text = SUCCESS, field = RETURN_CODE, value = ReturnCodes.SUCCESS,
matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.RESOLVED),
@Response(text = FAILURE, field = RETURN_CODE, value = ReturnCodes.FAILURE,
matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.ERROR)
}
)
public Map<String, String> execute(
@Param(value = URL, required = true, description = URL_DESC) String url,
@Param(value = CHARACTER_SET, description = CHARACTER_SET_DESC) String characterSet) {
try {
if (StringUtils.isEmpty(characterSet)) {
characterSet = Utils.DEFAULT_CHARACTER_SET;
}
final String returnResult = URLDecoder.decode(url, characterSet);
return getSuccessResultsMap(returnResult);
} catch (Exception e) {
return getFailureResultsMap(e.getMessage());
}
}
}
代码示例来源:origin: CloudSlang/cs-actions
},
responses = {
@Response(text = ResponseNames.SUCCESS, field = OutputNames.RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.RESOLVED),
@Response(text = ResponseNames.FAILURE, field = OutputNames.RETURN_CODE, value = ReturnCodes.FAILURE, matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.ERROR, isOnFail = true)
})
public Map<String, String> execute(@Param(value = Constants.InputNames.ARRAY, required = true) String array) {
代码示例来源:origin: CloudSlang/cs-actions
},
responses = {
@Response(text = ResponseNames.SUCCESS, field = RETURN_CODE, value = SUCCESS,
matchType = MatchType.COMPARE_EQUAL,
responseType = ResponseType.RESOLVED),
@Response(text = ResponseNames.FAILURE, field = RETURN_CODE, value = FAILURE,
matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.ERROR, isOnFail = true)
})
代码示例来源:origin: CloudSlang/cs-actions
@Action(name = "Remove Empty Elements",
outputs = {
@Output(OutputNames.RETURN_CODE),
@Output(OutputNames.RETURN_RESULT)
},
responses = {
@Response(text = ResponseNames.SUCCESS, field = OutputNames.RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.RESOLVED),
@Response(text = ResponseNames.FAILURE, field = OutputNames.RETURN_CODE, value = ReturnCodes.FAILURE, matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.ERROR, isOnFail = true)
})
public Map<String, String> removeEmptyElements(@Param(value = Constants.InputNames.JSON_OBJECT, required = true) String json) {
try {
final String result = new JsonService().removeEmptyElementsJson(json);
return OutputUtilities.getSuccessResultsMap(result);
} catch (Exception ex) {
return OutputUtilities.getFailureResultsMap(ex);
}
}
}
代码示例来源:origin: CloudSlang/cs-actions
},
responses = {
@Response(text = ResponseNames.SUCCESS, field = OutputNames.RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.RESOLVED),
@Response(text = ResponseNames.FAILURE, field = OutputNames.RETURN_CODE, value = ReturnCodes.FAILURE, matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.ERROR, isOnFail = true)
})
public Map<String, String> execute(
代码示例来源:origin: CloudSlang/cs-actions
},
responses = {
@Response(text = ResponseNames.SUCCESS, field = OutputNames.RETURN_CODE, value = ReturnCodes.SUCCESS, matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.RESOLVED),
@Response(text = ResponseNames.FAILURE, field = OutputNames.RETURN_CODE, value = ReturnCodes.FAILURE, matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.ERROR, isOnFail = true)
})
public Map<String, String> execute(
内容来源于网络,如有侵权,请联系作者删除!