本文整理汇总了Java中org.apache.olingo.odata2.api.commons.HttpStatusCodes.NOT_IMPLEMENTED属性的典型用法代码示例。如果您正苦于以下问题:Java HttpStatusCodes.NOT_IMPLEMENTED属性的具体用法?Java HttpStatusCodes.NOT_IMPLEMENTED怎么用?Java HttpStatusCodes.NOT_IMPLEMENTED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.olingo.odata2.api.commons.HttpStatusCodes
的用法示例。
在下文中一共展示了HttpStatusCodes.NOT_IMPLEMENTED属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readEntity
@Override
public ODataResponse readEntity(GetEntityUriInfo uriInfo, String contentType) throws ODataException {
HashMap<String, Object> data = new HashMap<String, Object>();
if ("Employees".equals(uriInfo.getTargetEntitySet().getName())) {
if ("2".equals(uriInfo.getKeyPredicates().get(0).getLiteral())) {
data.put("EmployeeId", "1");
data.put("TeamId", "420");
}
ODataContext context = getContext();
EntityProviderWriteProperties writeProperties =
EntityProviderWriteProperties.serviceRoot(context.getPathInfo().getServiceRoot()).build();
return EntityProvider.writeEntry(contentType, uriInfo.getTargetEntitySet(), data, writeProperties);
} else {
throw new ODataApplicationException("Wrong testcall", Locale.getDefault(), HttpStatusCodes.NOT_IMPLEMENTED);
}
}
示例2: readEntitySet
@Override
public ODataResponse readEntitySet(GetEntitySetUriInfo uriInfo, String contentType) throws ODataException {
if ("Employees".equals(uriInfo.getTargetEntitySet().getName())) {
ODataContext context = getContext();
EntityProviderWriteProperties writeProperties =
EntityProviderWriteProperties.serviceRoot(context.getPathInfo().getServiceRoot()).build();
List<Map<String, Object>> data = new ArrayList<Map<String, Object>>();
data.add(new HashMap<String, Object>());
return EntityProvider.writeFeed(contentType, uriInfo.getTargetEntitySet(), data, writeProperties);
} else {
throw new ODataApplicationException("Wrong testcall", Locale.getDefault(), HttpStatusCodes.NOT_IMPLEMENTED);
}
}
示例3: ODataNotImplementedException
public ODataNotImplementedException(final MessageReference context) {
super(context, HttpStatusCodes.NOT_IMPLEMENTED);
}