Examples of Context


Examples of org.kie.internal.command.Context

        this.identifier = identifier;
        this.contextName = contextName;
    }

    public Object execute(Context ctx) {       
        Context targetCtx;
        if ( this.contextName == null ) {
            targetCtx = ctx;
        } else {
            targetCtx = ctx.getContextManager().getContext( this.contextName );
        }
       
        return targetCtx.get( identifier);       
    }
View Full Code Here

Examples of org.kie.marshalling.ObjectMarshallingStrategy.Context

                                             ProtobufMessages.Header.Builder _header) throws IOException {
        for( Entry<ObjectMarshallingStrategy,Integer> entry : context.usedStrategies.entrySet() ) {
            Builder _strat = ProtobufMessages.Header.StrategyIndex.newBuilder()
                                     .setId( entry.getValue().intValue() )
                                     .setName( entry.getKey().getClass().getName() );
            Context ctx = context.strategyContext.get( entry.getKey() );
            if( ctx != null ) {
                Output os = ByteString.newOutput();
                ctx.write( new DroolsObjectOutputStream( os ) );
                _strat.setData( os.toByteString() );
                os.close();
            }
            _header.addStrategy( _strat.build() );
        }
View Full Code Here

Examples of org.kite9.diagram.adl.Context

      Arrow ww = new Arrow("worked_with", "worked with");
     
      new Link(ww, hf, null, null, null, null, Direction.RIGHT);
      new Link(ww, rs);

      Context bladerunner = new Context("bladerunner", listOf(hf, rs, ww), true, new TextLine("Bladerunner"), null);

     
      Diagram d1 = new Diagram("my_diagram", listOf(bladerunner), null);
      return d1;
   
View Full Code Here

Examples of org.lilystudio.smarty4j.Context

    Assert.assertEquals("或运算", getResult("{$null || $int}"), "-1");
  }

  @Test
  public void testBean() throws Exception {
    Context c = new Context();
    Bean bean = new Bean();
    c.putBean(bean);
    Template template = new Template(engine, "{$number}");
    Writer writer = new StringWriter();
    template.merge(c, writer);
    Assert.assertEquals("Bean导入", writer.toString(), "10");
View Full Code Here

Examples of org.locationtech.geogig.api.Context

    @Override
    public Context build(Hints hints) {
        FunctionalTestModule functionalTestModule = new FunctionalTestModule(platform.clone());

        Context context = Guice.createInjector(
                Modules.override(new GeogigModule()).with(new PluginsModule(),
                        new CLIContextBuilder.DefaultPlugins(), functionalTestModule,
                        new HintsModule(hints), new CachingModule())).getInstance(Context.class);
        return context;
    }
View Full Code Here

Examples of org.megatome.frame2.event.Context

    ForwardProxy response = processor.callHandlers(this.elements[0]
        .getNodeName(), poi, ViewType.XML);

    assertEquals("key1", response.getPath()); //$NON-NLS-1$

    Context context = processor.getContextWrapper();

    assertSame(poi, context.getRequestAttribute(response.getPath()));
    assertEquals(PurchaseOrderHandler.NEW_COMMENT, poi.getComment());
  }
View Full Code Here

Examples of org.mortbay.jetty.servlet.Context

        super.setUp();
       
        httpServer = new Server(8191);
       
       
        Context context = new Context(httpServer,"/",Context.SESSIONS);
       
       
       
        ServletHolder servlet = new ServletHolder(new XFireServlet());
       
        context.addServlet(servlet, "/*");
        SecurityHandler sh = new SecurityHandler();
        context.addHandler(sh);
       
        HashUserRealm userRealm = new HashUserRealm();
        userRealm.put("user", "pass");
        userRealm.addUserToRole("user", "role");

        assertNotNull(userRealm.authenticate("user", "pass", null));
       
        sh.setUserRealm(userRealm);
       
        Constraint constraint = new Constraint();
        constraint.setName(Constraint.__BASIC_AUTH);;
        constraint.setRoles(new String[]{"role"});
        constraint.setAuthenticate(true);
       
       
        ConstraintMapping cm = new ConstraintMapping();
        cm.setConstraint(constraint);
        cm.setPathSpec("/*");
       
        context.setAttribute(XFireServlet.XFIRE_INSTANCE, getXFire());
       
        httpServer.start();
       
        service = getServiceFactory().create(Echo.class);
        service.setProperty(ObjectInvoker.SERVICE_IMPL_CLASS, EchoImpl.class);
View Full Code Here

Examples of org.mozilla.javascript.Context

            }
        }
        wrapper = new WrapMaker();
        wrapper.setJavaPrimitiveWrap(false);

        Context context = contextFactory.enterContext();

        try {
            // create global object
            global = new GlobalObject(this, app, false);
            // call the initStandardsObject in ImporterTopLevel so that
View Full Code Here

Examples of org.mybatis.generator.config.Context

    String introspectedColumnImpl = attributes.getProperty("introspectedColumnImpl"); //$NON-NLS-1$
    String id = attributes.getProperty("id"); //$NON-NLS-1$

    ModelType mt = defaultModelType == null ? null : ModelType.getModelType(defaultModelType);

    Context context = new Context(mt);
    context.setId(id);
    if (stringHasValue(introspectedColumnImpl)) {
      context.setIntrospectedColumnImpl(introspectedColumnImpl);
    }
    if (stringHasValue(targetRuntime)) {
      context.setTargetRuntime(targetRuntime);
    }

    configuration.addContext(context);

    NodeList nodeList = node.getChildNodes();
View Full Code Here

Examples of org.nimbustools.api.repr.ctx.Context

        final boolean isSuperuser = rs.getBoolean("creator_is_superuser");
        _Caller caller = repr._newCaller();
        caller.setIdentity(creatorDN);
        caller.setSuperUser(isSuperuser);
        // NOTE: this context isn't persisted because it doesn't seem to be used
        final Context context = repr._newContext();

        final long t = rs.getLong("creation_time");
        final String sshKeyName = rs.getString("ssh_key_name");
        final Calendar creationTime = Calendar.getInstance();
        creationTime.setTimeInMillis(t);
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.