当前位置: 首页>>代码示例>>Java>>正文


Java HttpStatusCodes.NOT_IMPLEMENTED属性代码示例

本文整理汇总了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);
  }
}
 
开发者ID:apache,项目名称:olingo-odata2,代码行数:19,代码来源:InvalidDataInScenarioTest.java

示例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);
  }
}
 
开发者ID:apache,项目名称:olingo-odata2,代码行数:13,代码来源:InvalidDataInScenarioTest.java

示例3: ODataNotImplementedException

public ODataNotImplementedException(final MessageReference context) {
  super(context, HttpStatusCodes.NOT_IMPLEMENTED);
}
 
开发者ID:apache,项目名称:olingo-odata2,代码行数:3,代码来源:ODataNotImplementedException.java


注:本文中的org.apache.olingo.odata2.api.commons.HttpStatusCodes.NOT_IMPLEMENTED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。