Package com.tensegrity.palo.gwt.core.client.models.folders

Examples of com.tensegrity.palo.gwt.core.client.models.folders.XStaticFolder


    }
    ExplorerTreeNode[] kids = folderRoot.getChildren();
    boolean hasKids = kids != null && kids.length > 0;
    // it seems that root is always a StaticFolder...
    if (folderRoot instanceof StaticFolder) {
      XStaticFolder xRoot = new XStaticFolder(folderRoot.getId(),
          folderRoot.getName());
      xRoot.setHasChildren(hasKids);
      return xRoot;
    }
    return null;
  }
View Full Code Here


//      ExplorerTreeNode parentNode = folderService.getTreeNode(xParent
//          .getId());
      StaticFolder staticFolder = folderService.createStaticFolder(name,
          parentNode, null);
//      folderService.save(staticFolder.getRoot());
      XStaticFolder xStaticFolder = new XStaticFolder(staticFolder
          .getId(), staticFolder.getName());
      xStaticFolder.setHasChildren(false);
      saveRoot(sessionId, root);
//      print(root, 0);
      return xStaticFolder;
    } catch (OperationFailedException e) {
      UserSession userSession = getUserSession(sessionId);
View Full Code Here

    return node.getParent();
  }

  private final void importViews(String operation, final XView[] xViews,
      final TreeNode parent, final boolean isPublic, final boolean isEditable) {
    XStaticFolder xParentFolder = (XStaticFolder) browserModel
        .getWrappedXObject(parent);
    ((Workbench) Registry.get(Workbench.ID)).showWaitCursor(operation);
    String sessionId = ((Workbench)Registry.get(Workbench.ID)).getUser().getSessionId();
    WPaloFolderServiceProvider.getInstance().importViewsAsFolderElements(sessionId,
        xViews, xParentFolder, isPublic, isEditable,
View Full Code Here

    return null;
  }

  private final void createFolder(String name, final TreeNode parent) {
    XObjectWrapper wrappedXObj = (XObjectWrapper) parent.getXObject();
    XStaticFolder parentFolder = (XStaticFolder) wrappedXObj.getXObject();
    String sessionId = ((Workbench)Registry.get(Workbench.ID)).getUser().getSessionId();
    WPaloFolderServiceProvider.getInstance().createFolder(sessionId, name,
        parentFolder,
        new Callback<XStaticFolder>(constants.couldNotAddFolder()) {
          public void onSuccess(XStaticFolder folder) {
View Full Code Here

    ExplorerTreeNode folderRoot = folderService.getTreeRoot();
    ExplorerTreeNode[] kids = folderRoot.getChildren();
    boolean hasKids = kids != null && kids.length > 0;
    //it seems that root is always a StaticFolder...
    if (folderRoot instanceof StaticFolder) {
      XStaticFolder xRoot = new XStaticFolder(folderRoot.getId(),
          folderRoot.getName());
      xRoot.setHasChildren(hasKids);
      return new XObject[] {wrap(xRoot)};
    }
    return new XObject[0];
  }
View Full Code Here

//    ArrayList <XObjectWrapper> elements = new ArrayList<XObjectWrapper>();
    for (int i = 0; i < children.length; ++i) {
      ExplorerTreeNode child = children[i];
      if (child instanceof StaticFolder) {
        StaticFolder staticFolder = (StaticFolder) child;
        XStaticFolder xStaticFolder = new XStaticFolder(staticFolder
            .getId(), staticFolder.getName());
        xStaticFolder
            .setHasChildren(staticFolder.getChildren().length > 0);
//        folders.add(wrap(xStaticFolder));
        xChildren[i] = wrap(xStaticFolder);
      } else if (child instanceof FolderElement) {
        FolderElement folderElement = (FolderElement) child;
View Full Code Here

    x = x.replaceAll(">", "&gt;");
    return x;
  }

  final void addView(final XView xView, final TreeNode parent, final boolean openIt, final ViewBrowser delegate, final boolean isPublic, final boolean isEditable) {
    XStaticFolder xParentFolder = (XStaticFolder) getWrappedXObject(parent);
    String sessionId = ((Workbench)Registry.get(Workbench.ID)).getUser().getSessionId();
    WPaloFolderServiceProvider.getInstance().createFolderElement(sessionId, xView,
        xParentFolder, isPublic, isEditable, new Callback<XFolderElement>("Could not create view'"+modify(xView.getName())+"!") {
          public void onSuccess(XFolderElement xFolderElement) {
            TreeNode newNode = new TreeNode(parent, wrap(xFolderElement));
View Full Code Here

TOP

Related Classes of com.tensegrity.palo.gwt.core.client.models.folders.XStaticFolder

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.