org.restlet.data.Request.getConditions()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(288)

本文整理了Java中org.restlet.data.Request.getConditions方法的一些代码示例,展示了Request.getConditions的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getConditions方法的具体详情如下:
包路径:org.restlet.data.Request
类名称:Request
方法名:getConditions

Request.getConditions介绍

[英]Returns the modifiable conditions applying to this request. Creates a new instance if no one has been set.
[中]返回应用于此请求的可修改条件。如果未设置任何实例,则创建新实例。

代码示例

代码示例来源:origin: org.restlet/org.restlet

  1. /**
  2. * Returns the conditions applying to this call.
  3. *
  4. * @return The conditions applying to this call.
  5. */
  6. @Override
  7. public Conditions getConditions() {
  8. return getWrappedRequest().getConditions();
  9. }

代码示例来源:origin: org.sonatype.nexus/nexus-rest-api

  1. throws ResourceException
  2. if ( req.getConditions().getModifiedSince() != null )
  3. if ( file.getModified() > req.getConditions().getModifiedSince().getTime() )
  4. else if ( req.getConditions().getNoneMatch() != null && req.getConditions().getNoneMatch().size() > 0
  5. && file.getRepositoryItemAttributes().containsKey( DigestCalculatingInspector.DIGEST_SHA1_KEY ) )
  6. Tag tag = req.getConditions().getNoneMatch().get( 0 );

代码示例来源:origin: org.restlet/org.restlet

  1. public void handleDelete() {
  2. boolean canDelete = true;
  3. if (getRequest().getConditions().hasSome()) {
  4. Variant preferredVariant = null;
  5. final Status status = getRequest().getConditions().getStatus(
  6. getRequest().getMethod(),
  7. getRepresentation(preferredVariant));

代码示例来源:origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin

  1. if (request.getConditions().getModifiedSince() != null) {
  2. result.setIfModifiedSince(request.getConditions().getModifiedSince().getTime());
  3. if (request.getConditions().getNoneMatch() != null && request.getConditions().getNoneMatch().size() > 0) {
  4. final Tag tag = request.getConditions().getNoneMatch().get(0);

代码示例来源:origin: org.sonatype.nexus/nexus-rest-api

  1. if ( request.getConditions().getModifiedSince() != null )
  2. result.setIfModifiedSince( request.getConditions().getModifiedSince().getTime() );
  3. if ( request.getConditions().getNoneMatch() != null && request.getConditions().getNoneMatch().size() > 0 )
  4. Tag tag = request.getConditions().getNoneMatch().get( 0 );

代码示例来源:origin: org.restlet/org.restlet

  1. boolean canPut = true;
  2. if (getRequest().getConditions().hasSome()) {
  3. Variant preferredVariant = null;
  4. final Status status = getRequest().getConditions().getStatus(
  5. getRequest().getMethod(),
  6. getRepresentation(preferredVariant));

代码示例来源:origin: org.restlet/org.restlet

  1. if (getRequest().getConditions().hasSome()) {
  2. final Status status = getRequest().getConditions()
  3. .getStatus(getRequest().getMethod(),
  4. selectedRepresentation);

相关文章