本文整理汇总了Java中org.biokoframework.utils.fields.Fields.containsKey方法的典型用法代码示例。如果您正苦于以下问题:Java Fields.containsKey方法的具体用法?Java Fields.containsKey怎么用?Java Fields.containsKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.biokoframework.utils.fields.Fields
的用法示例。
在下文中一共展示了Fields.containsKey方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addHeaders
import org.biokoframework.utils.fields.Fields; //导入方法依赖的package包/类
private void addHeaders(Fields output, HttpServletResponse response) {
for (Map.Entry<String, String> entry : fHeadersMapping.entrySet()) {
if (output.containsKey(entry.getKey())) {
response.setHeader(entry.getValue(), output.get(entry.getKey()).toString());
}
}
}
示例2: canAuthenticate
import org.biokoframework.utils.fields.Fields; //导入方法依赖的package包/类
@Override
public boolean canAuthenticate(Fields fields) {
if (!fields.containsKey(HTTP_HEADERS)) {
return false;
} else {
Fields headers = fields.get(HTTP_HEADERS);
return headers.containsKey(AUTHORIZATION);
}
}
示例3: getFirstNotVoidFieldKey
import org.biokoframework.utils.fields.Fields; //导入方法依赖的package包/类
private String getFirstNotVoidFieldKey(Fields fields) {
String foundKey=null;
for (String fieldKey: fields.keys()) {
if (fields.containsKey(fieldKey)) {
foundKey=fieldKey;
break;
}
}
return foundKey;
}
示例4: execute
import org.biokoframework.utils.fields.Fields; //导入方法依赖的package包/类
@Override
public Fields execute(Fields input) throws CommandException, ValidationException {
Fields overAllOutput = Fields.successful();
LOGGER.info("Executing MultipleCommand: " + this.getClass().getSimpleName());
LOGGER.info("Steps: " + _steps.size());
for (Entry<String,AbstractCommand> step : _steps.entrySet()) {
Fields output = new Fields();
LOGGER.info("Executing step: " + step.getKey());
output = step.getValue().execute(input);
if (output.containsKey(FieldsErrors.FAILURE)) {
output.put(FieldNames.FAILED_COMMAND, step.getValue().getClass().getSimpleName());
LOGGER.info("Step " + step.getKey() + " execution failed!");
return overAllOutput.putAll(Fields.failed()).putAll(output);
} else if (output.containsKey(FieldsErrors.ERROR)) {
output.put(FieldNames.ERROR_COMMAND, step.getValue().getClass().getSimpleName());
LOGGER.info("Step " + step.getKey() + " execution error!");
return overAllOutput.putAll(Fields.failed()).putAll(output);
}
overAllOutput.putAll(output);
input.putAll(output);
}
LOGGER.info("MultipleCommand output: " + overAllOutput.toString());
LOGGER.info("End MultipleCommand: " + this.getClass().getSimpleName());
return overAllOutput;
}