gpt4 book ai didi

org.apache.cocoon.components.flow.WebContinuation.disposed()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 02:47:05 28 4
gpt4 key购买 nike

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

WebContinuation.disposed介绍

[英]Return true if this continuation was disposed of
[中]如果已处理此延续,则返回true

代码示例

代码示例来源:origin: org.apache.cocoon/cocoon-flowscript-impl

/**
 * Return this continuation if it is valid, or first valid parent
 */
private FOM_WebContinuation findValidParent(FOM_WebContinuation wk) {
  if (wk != null) {
    WebContinuation wc = wk.getWebContinuation();
    while (wc != null && wc.disposed()) {
      wc = wc.getParentContinuation();
    }
    if (wc != null) {
      return new FOM_WebContinuation(wc);
    }
  }
  return null;
}

代码示例来源:origin: org.apache.cocoon/cocoon-ajax-impl

public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception {
  String continuationId;
  if (source == null) {
    continuationId = ObjectModelHelper.getRequest(objectModel).getParameter("continuation-id");
  } else {
    continuationId = source;
  }
  
  // The interpreter id is the sitemap's URI
  String interpreterId = SitemapParameters.getLocation(parameters).getURI();
  WebContinuation wk = this.contManager.lookupWebContinuation(continuationId, interpreterId);
  if (wk == null || wk.disposed()) {
    return null;
  } else {
    // Getting the continuation updates the last access time
    wk.getContinuation();
    FlowHelper.setWebContinuation(objectModel, newObjectModel, wk);
    return Collections.EMPTY_MAP;
  }
}

代码示例来源:origin: org.apache.cocoon/cocoon-forms-impl

public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException {
  super.setup(resolver, objectModel, src, par);
  
  Request req = ObjectModelHelper.getRequest(objectModel);
  
  String continuationId = par.getParameter("continuation-id", req.getParameter("continuation-id"));
  String widgetPath = par.getParameter("widget", req.getParameter("widget")).replace('.', '/');
  this.filter = par.getParameter("filter", req.getParameter("filter"));
  
  // The interpreter id is the sitemap's URI
  String interpreterId = SitemapParameters.getLocation(parameters).getURI();
  wk = this.contManager.lookupWebContinuation(continuationId, interpreterId);
  if (wk == null || wk.disposed()) {
    throw new InvalidContinuationException("Cannot get continuation for suggestion list");
  }
  
  Form form = (Form)wk.getAttribute("form");
  if (form == null) {
    throw new ProcessingException("No form is attached to the continuation");
  }
  
  this.locale = form.getLocale();
  
  Field field = (Field)form.lookupWidget(widgetPath);
  list = field.getSuggestionList();
  if (list == null) {
    throw new ProcessingException(field + " has no suggestion list");
  }
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com