Package org.eclipse.orion.server.cf.manifest.v2

Examples of org.eclipse.orion.server.cf.manifest.v2.Token


    Tree t = (Tree)create(fromToken);
    return t;
  }

  public Object create(int tokenType, String text) {
    Token fromToken = createToken(tokenType, text);
    Tree t = (Tree)create(fromToken);
    return t;
  }
View Full Code Here


  public void consume() {
    if ( initialStreamState ) {
      consumeInitialHiddenTokens();
    }
    int a = input.index();
    Token t = input.LT(1);
    input.consume();
    int b = input.index();
    dbg.consumeToken(t);
    if ( b>a+1 ) {
      // then we consumed more than one token; must be off channel tokens
View Full Code Here

    super(adaptor, elementDescription, elements);
  }

  /** Get next token from stream and make a node for it */
  public Object nextNode() {
    Token t = (Token)_next();
    return adaptor.create(t);
  }
View Full Code Here

  }
*/
  public void process() throws IOException {
    CharStream input = new ANTLRFileStream(dispelFile);
    DISPEL lexer = new DISPEL(input);
    Token token;
    while ((token = lexer.nextToken()) != Token.EOF_TOKEN) {
      tp.process(token);
    }
  }
View Full Code Here

    CharStream input;
    try {
      input = new ANTLRInputStream(is);
     
      DISPEL lexer = new DISPEL(input);
      Token token;
       
        while ((token = lexer.nextToken()).getType() !=
          org.antlr.runtime3_3_0.Token.EOF) {
   
          tp.process(token);
View Full Code Here

        line = processLine(line);
        if (line.isEmpty() || line.trim().isEmpty())
          continue;

        InputLine inputLine = new InputLine(line, currentLine);
        contents.add(inputLine);
      }

      return contents;
View Full Code Here

  @Override
  protected IStatus validateParams() {
    try {
      /* read deploy parameters */
      ManifestParseTree manifest = getApplication().getManifest();
      ManifestParseTree app = manifest.get("applications").get(0); //$NON-NLS-1$

      /* optional */
      ManifestParseTree domainNode = app.getOpt(CFProtocolConstants.V2_KEY_DOMAIN);
      appDomain = (domainNode != null) ? domainNode.getValue() : ""; //$NON-NLS-1$

      ManifestParseTree noRouteNode = app.getOpt(CFProtocolConstants.V2_KEY_NO_ROUTE);
      noRoute = (noRouteNode != null) ? Boolean.parseBoolean(noRouteNode.getValue()) : false;

      return Status.OK_STATUS;

    } catch (InvalidAccessException e) {
      return new MultiServerStatus(new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_BAD_REQUEST, e.getMessage(), null));
View Full Code Here

  @Override
  protected IStatus validateParams() {
    try {
      /* read deploy parameters */
      ManifestParseTree manifest = application.getManifest();
      ManifestParseTree app = manifest.get("applications").get(0); //$NON-NLS-1$

      String appName = null;
      if (application.getName() != null)
        appName = application.getName();
      else
        appName = app.get(CFProtocolConstants.V2_KEY_NAME).getValue();

      /* extract host information if present */
      ManifestParseTree hostNode = app.getOpt(CFProtocolConstants.V2_KEY_HOST);
      appHost = (hostNode != null) ? hostNode.getValue() : ManifestUtils.slugify(appName);

      if (appHost != null)
        return Status.OK_STATUS;

      return new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_NOT_FOUND, "Route not found", null);
View Full Code Here

  @Override
  protected IStatus validateParams() {
    try {
      /* read deploy parameters */
      ManifestParseTree manifest = application.getManifest();
      ManifestParseTree app = manifest.get("applications").get(0); //$NON-NLS-1$

      if (application.getName() != null) {
        appName = application.getName();
        return Status.OK_STATUS;
      }

      appName = app.get(CFProtocolConstants.V2_KEY_NAME).getValue();
      return Status.OK_STATUS;

    } catch (InvalidAccessException e) {
      return new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_BAD_REQUEST, e.getMessage(), null);
    }
View Full Code Here

            IStatus status = parseManifestCommand.doIt();
            if (!status.isOK())
              return status;

            /* get the manifest name */
            ManifestParseTree manifest = parseManifestCommand.getManifest();
            if (manifest != null) {
              ManifestParseTree applications = manifest.get(CFProtocolConstants.V2_KEY_APPLICATIONS);
              if (applications.getChildren().size() > 0) {
                manifestAppName = applications.get(0).get(CFProtocolConstants.V2_KEY_NAME).getValue();
                return new GetAppCommand(target, manifestAppName).doIt();
              }
            }

            return new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_NOT_FOUND, "Can not determine the application name", null);
View Full Code Here

TOP

Related Classes of org.eclipse.orion.server.cf.manifest.v2.Token

Copyright © 2018 www.massapicom. 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.