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

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

本文整理了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

/**
 * Returns the conditions applying to this call.
 * 
 * @return The conditions applying to this call.
 */
@Override
public Conditions getConditions() {
  return getWrappedRequest().getConditions();
}

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

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

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

public void handleDelete() {
  boolean canDelete = true;
  if (getRequest().getConditions().hasSome()) {
    Variant preferredVariant = null;
      final Status status = getRequest().getConditions().getStatus(
          getRequest().getMethod(),
          getRepresentation(preferredVariant));

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

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

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

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

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

boolean canPut = true;
if (getRequest().getConditions().hasSome()) {
  Variant preferredVariant = null;
    final Status status = getRequest().getConditions().getStatus(
        getRequest().getMethod(),
        getRepresentation(preferredVariant));

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

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

相关文章