Package org.platformlayer

Examples of org.platformlayer.UntypedItemXml


    return DomUtils.toXml(node);
  }

  public static void formatItem(UntypedItem o, Ansi ansi, boolean fullPath) {
    UntypedItemXml item = (UntypedItemXml) o;

    Ansi.Action action = null;

    switch (item.getState()) {
    case ACTIVE:
      action = Ansi.TEXT_COLOR_GREEN;
      break;

    case BUILD_ERROR:
      action = Ansi.TEXT_COLOR_RED;
      break;

    case DELETED:
      action = Ansi.TEXT_COLOR_MAGENTA;
      break;

    default:
      action = Ansi.TEXT_COLOR_BLUE;
      break;
    }

    Ansi.Action undo = null;

    if (action != null) {
      undo = ansi.doAction(action);
    }

    try {
      PlatformLayerKey plk = item.getKey();

      if (fullPath) {
        ansi.print(plk.getUrl());
      } else {
        ansi.print(plk.getItemId().getKey());
View Full Code Here

TOP

Related Classes of org.platformlayer.UntypedItemXml

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.