org.tinygroup.context.Context.remove()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(178)

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

Context.remove介绍

[英]从子上下文中删除name的参数信息
[中]从子上下文中删除名称的参数信息

代码示例

代码示例来源:origin: org.tinygroup/org.tinygroup.beancontext

public <T> T remove(String contextName, String name) {
  return (T) context.remove(contextName, name);
}

代码示例来源:origin: org.tinygroup/org.tinygroup.beancontext

public <T> T remove(String name) {
  return (T) context.remove(name);
}

代码示例来源:origin: org.tinygroup/org.tinygroup.context

public <T> T remove(String contextName, String name) {
  Context subContext = subContextMap.get(contextName);
  if (subContext != null) {
    return (T) subContext.remove(name);
  }
  return null;
}

代码示例来源:origin: org.tinygroup/context

public <T> T remove(String contextName, String name) {
  Context subContext = subContextMap.get(contextName);
  if (subContext != null) {
    return (T) subContext.remove(name);
  }
  return null;
}

代码示例来源:origin: org.tinygroup/org.tinygroup.velocity

public Object remove(Object key) {
  return context.remove(key.toString());
}

代码示例来源:origin: org.tinygroup/velocity

public Object remove(Object key) {
  return context.remove(key.toString());
}

代码示例来源:origin: org.tinygroup/org.tinygroup.cepcore

/**
   * 从上下文中解出THREAD_CONTEXT_KEY,并设置为线程变量
   *
   * @param mainContext
   */
  public static void parseCurrentThreadContext(Context mainContext) {
    if (!mainContext.exist(THREAD_CONTEXT_KEY)) {
      return;
    }
    Map<String, Object> currentContext = mainContext.remove(THREAD_CONTEXT_KEY);
//        Context currentContext = mainContext.getSubContext(THREAD_CONTEXT_KEY);
    if (currentContext != null) {
      threadVariableMap.set(currentContext);
    }
  }
}

代码示例来源:origin: org.tinygroup/flowbasiccomponent

public void execute(Context context) {
  if (keyValues == null || "".equals(keyValues)) {
    String[] array = keyValues.split(",");
    for (String s : array) {
      String[] keyvalue = s.split(":");
      if (keyvalue.length == 2) {
        context.put(keyvalue[1], context.get(keyvalue[0]));
        if(replaceModel)
          context.remove(keyvalue[0]);
      }
    }
  }
}

代码示例来源:origin: org.tinygroup/org.tinygroup.flowbasiccomponent

public void execute(Context context) {
  if (!StringUtil.isBlank(keyValues)) {
    String[] array = keyValues.split(",");
    for (String s : array) {
      String[] keyvalue = s.split(":");
      if (keyvalue.length == 2) {
        context.put(keyvalue[1], context.get(keyvalue[0]));
        if (replaceModel)
          context.remove(keyvalue[0]);
      }
    }
  } else {
    LOGGER.logMessage(LogLevel.WARN, "keyValues为空");
  }
}

代码示例来源:origin: org.tinygroup/org.tinygroup.cepcorebase

public static void resetEventContext(Event event, CEPCore core,
                     Context oldContext) {
    oldContext.remove(IS_CHANGED);
    String serviceId = event.getServiceRequest().getServiceId();
    Context context = event.getServiceRequest().getContext();
    ServiceInfo service = core.getServiceInfo(serviceId);
    List<Parameter> outputs = service.getResults();
    if (outputs != null) {
      for (Parameter output : outputs) {
        String name = output.getName();
        if (context.exist(name)) {
          oldContext.put(name, context.get(name));
        }
      }
    }
    event.getServiceRequest().setContext(oldContext);
  }
}

相关文章