Examples of Global


Examples of ariba.appcore.Global

        }
        int count = messages.length;
        int start = Math.max(0, count-atMost);

        // we persist the ID of the last message that we processed
        Global proceededRecord = Global.findOrCreate(_LastProcessedKey);
        String lastId = proceededRecord.getStringValue();
        if (lastId != null) {
            // backup until we hit our id (or the start
            for (int i=count-1; i >=start; i--) {
                if (getMessageID(messages[i]).equals(lastId)) {
                    start = i + 1;
                    break;
                }
            }
        }

        // process backlog
        for (int i=start; i < count; i++) {
            MimeMessage message = (MimeMessage)messages[i];
            proceededRecord.setStringValue(getMessageID(message));
            ObjectContext.get().save();
            handler.process(message);
        }

      processIncomingMessages(_inbox, handler, proceededRecord);
View Full Code Here

Examples of br.com.objectos.way.etc.model.Global

    assertThat(res.get(1).getPath(), equalTo("/tmp/wetc/resources/file1.txt"));
    assertThat(res.get(2).getPath(), equalTo("/tmp/wetc/resources/file2.txt"));
  }

  public void filter_contents() {
    Global global = FakeGlobals.GLOBAL_USER_A;

    WayEtc.resourcesAt()
        .add("/tmpl/etc/user")
        .evalWith(global)
        .copyTo(dir);
View Full Code Here

Examples of com.bj58.spat.gaea.server.contract.context.Global

  public void filter(GaeaContext context) throws Exception {
   
    Protocol protocol = context.getGaeaRequest().getProtocol();   
    if(protocol.getPlatformType() == PlatformType.Java && context.getServerType() == ServerType.TCP){//java 客户端支持权限认证
      GaeaResponse response = new GaeaResponse();
      Global global = Global.getSingleton();
      //是否启用权限认证
      if(Global.getSingleton().getGlobalSecureIsRights()){
        SecureContext sc = global.getGlobalSecureContext(context.getChannel().getNettyChannel());
        //判断当前channel是否通过认证
        if(!sc.isRights()){
          //没有通过认证
          if(protocol != null && protocol.getSdpEntity() instanceof HandclaspProtocol){
            SecureKey sk = new SecureKey();
            HandclaspProtocol handclaspProtocol = (HandclaspProtocol)protocol.getSdpEntity();
            /**
             * 接收 客户端公钥
             */
            if("1".equals(handclaspProtocol.getType())){
              sk.initRSAkey();
              //客户端发送公钥数据
              String clientPublicKey = handclaspProtocol.getData();
              if(null == clientPublicKey || "".equals(clientPublicKey)){
                logger.warn("get client publicKey warn!");
              }
              //java 客户端
              if(protocol.getPlatformType() == PlatformType.Java){
                //服务器生成公/私钥,公钥传送给客户端
                sc.setServerPublicKey(sk.getStringPublicKey());
                sc.setServerPrivateKey(sk.getStringPrivateKey());
                sc.setClientPublicKey(clientPublicKey);
                handclaspProtocol.setData(sk.getStringPublicKey());//服务器端公钥
              }
             
              protocol.setSdpEntity(handclaspProtocol);
              response.setResponseBuffer(protocol.toBytes());
              context.setGaeaResponse(response);
              this.setInvokeAndFilter(context);
              logger.info("send server publieKey sucess!");
            }
            /**
             * 接收权限文件
             */
            else if("2".equals(handclaspProtocol.getType())){
              //客户端加密授权文件
              String clientSecureInfo = handclaspProtocol.getData();
              if(null == clientSecureInfo || "".equals(clientSecureInfo)){
                logger.warn("get client secureKey warn!");
              }
              //授权文件客户端原文(服务器私钥解密)
              String sourceInfo = sk.decryptByPrivateKey(clientSecureInfo, sc.getServerPrivateKey());
              //校验授权文件是否相同
              //判断是否合法,如果合法服务器端生成DES密钥,通过客户端提供的公钥进行加密传送给客户端
              if(global.containsSecureMap(sourceInfo)){
                logger.info("secureKey is ok!");
                String desKey = StringUtils.getRandomNumAndStr(8);
                //设置当前channel属性
                sc.setDesKey(desKey);
                sc.setRights(true);
View Full Code Here

Examples of com.caucho.es.Global

  {
    ResultSetMetaData md;

    md = rs.getMetaData();

    Global global = Global.getGlobalProto();
    ESBase obj;
    if (length > 0)
      obj = call.getArg(0, length);
    else
      obj = global.createObject();

    int nColumns = md.getColumnCount();
    for (int i = 0; i < nColumns; i++) {
      String name = md.getColumnName(i + 1);
      Object value = get(rs, i + 1);

      obj.setProperty(name, global.wrap(value));
    }

    return obj;
  }
View Full Code Here

Examples of com.google.gwt.jsio.client.Global

    sw.print(subContext.objRef);
    sw.print(" = ");

    Constructor constructorAnnotation = hasTag(logger, constructor,
        Constructor.class);
    Global globalAnnotation = hasTag(logger, constructor, Global.class);
    if (constructorAnnotation != null) {
      // If the imported method is acting as an invocation of a JavaScript
      // constructor, use the new Foo() syntax, otherwise treat is an an
      // invocation on a field on the underlying JSO.
      sw.print("new ");
      sw.print(constructorAnnotation.value());

      // Write the invocation's parameter list
      sw.print("(");
      for (int i = 0; i < parameters.length; i++) {
        // Create a sub-context to generate the wrap/unwrap logic
        JType subType = parameters[i].getType();
        FragmentGeneratorContext subParams = new FragmentGeneratorContext(
            context);
        subParams.returnType = subType;
        subParams.parameterName = parameters[i].getName();

        FragmentGenerator fragmentGenerator = context.fragmentGeneratorOracle.findFragmentGenerator(
            logger, context.typeOracle, subType);
        if (fragmentGenerator == null) {
          logger.log(TreeLogger.ERROR, "No fragment generator for "
              + returnType.getQualifiedSourceName(), null);
          throw new UnableToCompleteException();
        }

        fragmentGenerator.toJS(subParams);

        if (i < parameters.length - 1) {
          sw.print(", ");
        }
      }
      sw.print(")");

    } else if (globalAnnotation != null) {
      sw.print(globalAnnotation.value());

    } else {
      logger.log(TreeLogger.ERROR,
          "Writing a constructor, but no constructor-appropriate annotations",
          null);
View Full Code Here

Examples of com.google.gwt.search.jsio.client.Global

    // Determine the correct expression to use to initialize the object
    JClassType asClass = context.returnType.isClassOrInterface();
    Constructor constructorAnnotation = hasTag(logger, asClass,
        Constructor.class);
    Global globalAnnotation = hasTag(logger, asClass, Global.class);
    String constructor;
    if (globalAnnotation != null) {
      constructor = globalAnnotation.value();
    } else if (constructorAnnotation != null) {
      constructor = "new " + constructorAnnotation.value() + "()";
    } else {
      boolean hasImports = false;
      for (Task t : context.tasks) {
View Full Code Here

Examples of de.agilecoders.wicket.samples.components.scaffolding.Global

     * @param parameters the current page parameters.
     */
    public Scaffolding(PageParameters parameters) {
        super(parameters);

        add(new Global("global"));
        add(new Grid("grid"));
        add(new FluidGrid("fluidGridSystem"));
        add(new Layouts("layouts"));
        add(new Responsive("responsive"));
    }
View Full Code Here

Examples of javaguide.forms.csrf.Global

      return app.getWrappedApplication().injector().instanceOf(Crypto.class);
    }

    @Test
    public void global() {
        assertThat(new Global().filters()[0], equalTo((Class) CSRFFilter.class));
    }
View Full Code Here

Examples of net.sourceforge.htmlunit.corejs.javascript.tools.shell.Global

        System.setIn(main.getIn());
        System.setOut(main.getOut());
        System.setErr(main.getErr());

        Global global = net.sourceforge.htmlunit.corejs.javascript.tools.shell.Main.getGlobal();
        global.setIn(main.getIn());
        global.setOut(main.getOut());
        global.setErr(main.getErr());

        main.attachTo(
            net.sourceforge.htmlunit.corejs.javascript.tools.shell.Main.shellContextFactory);

        main.setScope(global);
View Full Code Here

Examples of org.drools.decisiontable.model.Global

        }
        final StringTokenizer tokens = new StringTokenizer( variableCell,
                                                      "," );
        while ( tokens.hasMoreTokens() ) {
            final String token = tokens.nextToken();
            final Global vars = new Global();
            final StringTokenizer paramTokens = new StringTokenizer( token,
                                                               " " );
            vars.setClassName( paramTokens.nextToken() );
            if ( !paramTokens.hasMoreTokens() ) {
                throw new DecisionTableParseException( "The format for global variables is incorrect. " + "It should be: [Class name, Class otherName]. But it was: [" + variableCell + "]" );
            }
            vars.setIdentifier( paramTokens.nextToken() );
            variableList.add( vars );
        }
        return variableList;
    }
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.