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

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

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

Request.getOriginalRef介绍

[英]Returns the original reference as requested by the client. Note that this property is not used during request routing. See the #getResourceRef() method for details.
[中]返回客户端请求的原始引用。请注意,在请求路由期间不使用此属性。有关详细信息,请参见#getResourceRef()方法。

代码示例

代码示例来源:origin: internetarchive/heritrix3

pw.println("<input type='submit' value='save changes' id='savebutton'>");
pw.println(fileRepresentation.getFile());
Reference viewRef = dirResource.getRequest().getOriginalRef().clone(); 
viewRef.setQuery(null);
pw.println("<a href='"+viewRef+"'>view</a>");

代码示例来源:origin: internetarchive/heritrix3

protected void copyJob(String copyTo, boolean asProfile)
    throws ResourceException {
  try {
    getEngine().copy(cj, copyTo, asProfile);
  } catch (IOException e) {
    Flash.addFlash(getResponse(), "Job not copied: " + e.getMessage(),
        Flash.Kind.NACK);
    getResponse().redirectSeeOther(getRequest().getOriginalRef());
    return;
  }
  // redirect to destination job page
  getResponse().redirectSeeOther(copyTo);
}

代码示例来源:origin: internetarchive/heritrix3

/**
   * Construct navigational URI for given parameters.
   * 
   * @param pos desired position in file
   * @param lines desired signed line count
   * @param reverse if line ordering should be displayed in reverse
   * @return String URI appropriate to navigate to desired view
   */
  protected String getControlUri(long pos, int lines, boolean reverse) {
    Form query = new Form(); 
    query.add("format","paged");
    if(pos!=0) {
      query.add("pos", Long.toString(pos));
    }
    if(lines!=128) {
      if(Math.abs(lines)<1) {
        lines = 1;
      }
      query.add("lines",Integer.toString(lines));
    }
    if(reverse) {
      query.add("reverse","y");
    }
    Reference viewRef = dirResource.getRequest().getOriginalRef().clone(); 
    viewRef.setQuery(query.getQueryString());
    
    return viewRef.toString(); 
  }
}

代码示例来源:origin: internetarchive/heritrix3

Reference ref = getRequest().getOriginalRef().clone();

代码示例来源:origin: internetarchive/heritrix3

getResponse().redirectSeeOther(getRequest().getOriginalRef());

代码示例来源:origin: internetarchive/heritrix3

getResponse().redirectSeeOther(getRequest().getOriginalRef());

代码示例来源:origin: org.archive.heritrix/heritrix-engine

pw.println("<input type='submit' value='save changes' id='savebutton'>");
pw.println(fileRepresentation.getFile());
Reference viewRef = dirResource.getRequest().getOriginalRef().clone(); 
viewRef.setQuery(null);
pw.println("<a href='"+viewRef+"'>view</a>");

代码示例来源:origin: org.archive.heritrix/heritrix-engine

protected void copyJob(String copyTo, boolean asProfile)
    throws ResourceException {
  try {
    getEngine().copy(cj, copyTo, asProfile);
  } catch (IOException e) {
    Flash.addFlash(getResponse(), "Job not copied: " + e.getMessage(),
        Flash.Kind.NACK);
    getResponse().redirectSeeOther(getRequest().getOriginalRef());
    return;
  }
  // redirect to destination job page
  getResponse().redirectSeeOther(copyTo);
}

代码示例来源:origin: org.archive.heritrix/heritrix-engine

/**
   * Construct navigational URI for given parameters.
   * 
   * @param pos desired position in file
   * @param lines desired signed line count
   * @param reverse if line ordering should be displayed in reverse
   * @return String URI appropriate to navigate to desired view
   */
  protected String getControlUri(long pos, int lines, boolean reverse) {
    Form query = new Form(); 
    query.add("format","paged");
    if(pos!=0) {
      query.add("pos", Long.toString(pos));
    }
    if(lines!=128) {
      if(Math.abs(lines)<1) {
        lines = 1;
      }
      query.add("lines",Integer.toString(lines));
    }
    if(reverse) {
      query.add("reverse","y");
    }
    Reference viewRef = dirResource.getRequest().getOriginalRef().clone(); 
    viewRef.setQuery(query.getQueryString());
    
    return viewRef.toString(); 
  }
}

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

String servletPath = request.getOriginalRef().getPath();
String nexusPath = urlConverter.convertDeploy( servletPath );
if ( nexusPath == null )

代码示例来源:origin: org.archive.heritrix/heritrix-engine

Reference ref = getRequest().getOriginalRef().clone();

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

String servletPath = request.getOriginalRef().getPath();
String nexusPath = urlConverter.convertDownload( servletPath );
if ( nexusPath == null )

代码示例来源:origin: org.archive.heritrix/heritrix-engine

getResponse().redirectSeeOther(getRequest().getOriginalRef());

代码示例来源:origin: org.archive.heritrix/heritrix-engine

getResponse().redirectSeeOther(getRequest().getOriginalRef());

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

result.setRequestUrl(request.getOriginalRef().toString());

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

resource.setRequestUrl(req.getOriginalRef().toString());

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

resource.setRequestUrl( req.getOriginalRef().toString() );

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

result.setRequestUrl(request.getOriginalRef().toString());

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

result.setRequestUrl( request.getOriginalRef().toString() );

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

result.setRequestUrl( request.getOriginalRef().toString() );

相关文章