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


Java RequestCycle.get方法代码示例

本文整理汇总了Java中org.apache.wicket.RequestCycle.get方法的典型用法代码示例。如果您正苦于以下问题:Java RequestCycle.get方法的具体用法?Java RequestCycle.get怎么用?Java RequestCycle.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.wicket.RequestCycle的用法示例。


在下文中一共展示了RequestCycle.get方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: defineEntryPoint

import org.apache.wicket.RequestCycle; //导入方法依赖的package包/类
private void defineEntryPoint(IRequestTarget aTarget) {
	RequestCycle requestCycle = RequestCycle.get();
	if (!(requestCycle instanceof WebRequestCycle)) {
		return;
	}
	String entryPoint = formatEntryPoint(aTarget);
	WebResponse response = ((WebRequestCycle) requestCycle).getWebResponse();
	response.setHeader(ENTRY_POINT_HEADER, entryPoint);
}
 
开发者ID:mpobjects,项目名称:xrebelhub-wicket-endpoints,代码行数:10,代码来源:XrhRequestLogger.java

示例2: flagWicketSession

import org.apache.wicket.RequestCycle; //导入方法依赖的package包/类
protected void flagWicketSession(AuthenticationType authenticationType) {
	RequestCycle requestCycle = RequestCycle.get();
	if (requestCycle != null) {
		// flag the Wicket session, if this is a Wicket request
		GitBlitWebSession session = GitBlitWebSession.get();
		session.authenticationType = authenticationType;
	}
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:9,代码来源:GitBlit.java

示例3: GitblitRedirectException

import org.apache.wicket.RequestCycle; //导入方法依赖的package包/类
public <C extends Page> GitblitRedirectException(Class<C> pageClass, PageParameters params) {
	RequestCycle cycle = RequestCycle.get();
	String relativeUrl = cycle.urlFor(pageClass, params).toString();
	String absoluteUrl = RequestUtils.toAbsolutePath(relativeUrl);
	cycle.setRequestTarget(new RedirectRequestTarget(absoluteUrl));
	cycle.setRedirect(true);
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:8,代码来源:GitblitRedirectException.java

示例4: getExternalParams

import org.apache.wicket.RequestCycle; //导入方法依赖的package包/类
private static String getExternalParams(CharSequence encoded) {
    String externalParams;
    WebRequestCycle webRequestCycle = (WebRequestCycle) RequestCycle.get();
    HttpServletRequest request = webRequestCycle.getWebRequest().getHttpServletRequest();
    GlobalExtraParamsPlugin globalExtraParamsPlugin = PluginFactory.getPlugin(GlobalExtraParamsPlugin.class);
    if (globalExtraParamsPlugin != null) {
        externalParams = globalExtraParamsPlugin.getExtraParams(encoded, request);
    } else {
        externalParams = "";
    }
    return externalParams;
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:13,代码来源:ConstellioApplication.java

示例5: SmbServletPage

import org.apache.wicket.RequestCycle; //导入方法依赖的package包/类
public SmbServletPage(PageParameters parameters) throws SmbException {
      super(parameters);
      
      
      String recordID = parameters.getString(RECORD_ID);
      if (StringUtils.isBlank(recordID)) {
          throw new WicketRuntimeException(RECORD_ID + " parameter is required");
      } 
      String collectionName = parameters.getString(COLLECTION);
      if (StringUtils.isBlank(collectionName)) {
          throw new WicketRuntimeException(COLLECTION + " parameter is required");
      } 
      
      SmbFile downloadedSmbFile = getSmbFile(Long.valueOf(recordID), collectionName);
      
      WebRequestCycle requestCycle = (WebRequestCycle) RequestCycle.get();
      HttpServletResponse response = requestCycle.getWebResponse().getHttpServletResponse();
response.setContentType("application/octet-stream" );

response.setContentLength( (int) downloadedSmbFile .length() );
response.setHeader( "Content-Disposition", "attachment; filename=\"" + downloadedSmbFile.getName() + "\"" );

try{
	InputStream is = new BufferedInputStream(downloadedSmbFile.getInputStream());
	IOUtils.copy(is, response.getOutputStream());
	IOUtils.closeQuietly(is);
} catch(IOException e){
	throw new RuntimeException(e);
}
  }
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:31,代码来源:SmbServletPage.java

示例6: getTopicMap

import org.apache.wicket.RequestCycle; //导入方法依赖的package包/类
public TopicMap getTopicMap(String topicMapId) {
  OntopolyRequestCycle rc = (OntopolyRequestCycle)RequestCycle.get();
  return rc.getTopicMap(topicMapId);
}
 
开发者ID:ontopia,项目名称:ontopia,代码行数:5,代码来源:OntopolyApplication.java


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