Examples of Context


Examples of br.com.starcode.parccser.model.Context

            sb.append(simpleSelectorSequence);
            //sends combinator here (the first case it's null)
            simpleSelectors.add(simpleSelectorSequence);
            parserListener.selectorSequence(simpleSelectorSequence, combinator);
        }
        return new Selector(simpleSelectors, combinators, new Context(content, sb.toString(), initialPosition, pos));
    }
View Full Code Here

Examples of business.test.Context

        return story;
    }

    @Override
    public Context getContext(String string) {
        Context context = new Context();
        context.setId("PRO_1233");
        return context;
    }
View Full Code Here

Examples of bytecodeparser.Context

  /**
   * Constructs an analyzer for the given behavior.
   * @param behavior
   */
  public StackAnalyzer(CtBehavior behavior) {
    this.context = new Context(behavior);
    this.stack = new Stack();
    this.frames = new Frame[context.behavior.getMethodInfo().getCodeAttribute().getCodeLength()];
  }
View Full Code Here

Examples of cascading.operation.filter.Limit.Context

       
        @Override
        public void prepare(FlowProcess flowProcess, OperationCall<Limit.Context> operationCall) {
            super.prepare(flowProcess, operationCall);
           
            Context context = new Context();

            operationCall.setContext( context );


            int numTasks = flowProcess.getNumProcessSlices();
View Full Code Here

Examples of cc.redberry.core.context.Context

    }

    @Override
    public Context createContext() {
        //Creating context defaults
        Context context = new Context(DefaultContextSettings.create());
        return context;
    }
View Full Code Here

Examples of center.task.Context

  }

  protected Object calculate(TimeList tl, Context cntx) throws CalculateException {
    try {
      tl.addPointTime(Type.START);
      Context res = new Context(cntx, cntx.id_subject, 0, cntx.ta, tsk);
      AProcessor po = tsk.newProcessorInstance(res);
      try {
        res.info.calculate(TimeState.getInstance(TimeState.Time.before, State.PROCESSING), res);
      } catch (Throwable e) {
        e.printStackTrace();
      }
      State st;
      try {
        st = po.process(res);
        res.setPrmByFullName("tsk", "STATUS_ID", st, false);
        res.info.calculate(TimeState.getInstance(TimeState.Time.after, State.PROCESSING), res);
      } catch (Throwable e) {
        st = State.DONE_ERR;
        res.setPrmByFullName("tsk", "STATUS_ID", st, false);
        throw new CalculateException(owner, e);
      }
      return res;
    } catch (SysException e) {
      throw new CalculateException(owner, e);
View Full Code Here

Examples of ch.qos.logback.core.Context

    if (defaultMap != null) {
      effectiveMap.putAll(defaultMap);
    }

    // contextMap is more specific than the default map
    Context context = getContext();
    if (context != null) {
      @SuppressWarnings("unchecked")
      Map<String, String> contextMap = (Map<String, String>) context
          .getObject(CoreConstants.PATTERN_RULE_REGISTRY);
      if (contextMap != null) {
        effectiveMap.putAll(contextMap);
      }
    }
View Full Code Here

Examples of cn.edu.pku.dr.requirement.elicitation.system.Context

    public void view() throws EasyJException {
        Project project = (Project) object;
        project = (Project) dp.get(project);
        SysUserCache userCache = (SysUserCache) request.getSession()
                .getAttribute(Globals.SYS_USER_CACHE);
        Context context = new Context();
        context.setProjectId(project.getProjectId());
        context.setProjectName(project.getProjectName());
        // 下面的程序用来确定此用户在此project中的角色

        // 1.首先确定是不是owner。
        if (project.getCreatorId().longValue() == user.getUserId().longValue()) {
            context.setProjectRole(DictionaryConstant.OWNER);
        } else {
            // 2.判断用户是否是参与了当前项目
            UserProjectRelation relation = new UserProjectRelation();
            relation.setUserId(user.getUserId());
            relation.setProjectId(project.getProjectId());
            ArrayList relationList = dp.query(relation);
            // 如果不存在数据,说明没有加入;否则根据状态来确定。
            if (relationList.size() == 0) {
                context.setProjectRole(DictionaryConstant.OTHER);
            } else {
                relation = (UserProjectRelation) relationList.get(0);
                int applyState = relation.getUserProjectStateRelatedValue()
                        .intValue();
                // 此状态请参见表dictionary中的PROJECT_APPLY_STATE 对应的related value部分。
                switch (applyState) {
                    case 2:
                        context.setProjectRole(DictionaryConstant.GROUP);
                        break;
                    default:
                        context.setProjectRole(DictionaryConstant.OTHER);
                        break;
                }
            }
        }

        userCache.setContext(context);

        HashMap<String,String> roles = context.getRoles();
        roles.clear();
       
        //将此项目所拥有的角色加入环境当中
        Role role = new Role();
        role.setProjectId(project.getProjectId());
View Full Code Here

Examples of co.cask.cdap.pipeline.Context

      @Override
      public T call() throws Exception {
        Object input = o;
        Object output = null;
        for (Stage stage : getStages()) {
          Context ctx = new StageContext(input);
          stage.process(ctx);
          output = ctx.getDownStream();
          input = output;  // Output of previous stage is input to next stage.
        }
        return (T) output;
      }
    });
View Full Code Here

Examples of com.adito.boot.Context

      if (bundle == null) {
        throw new ExtensionException(ExtensionException.INVALID_EXTENSION, id);
      }

      // Check host version
      Context context = ContextHolder.getContext();
      if (bundle.getRequiredHostVersion() != null && bundle.getRequiredHostVersion().compareTo(context.getVersion()) > 0) {
        throw new ExtensionException(ExtensionException.INSUFFICIENT_ADITO_HOST_VERSION,
                bundle.getId(),
                bundle.getRequiredHostVersion().toString());
     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.