Package org.palo.viewapi.internal

Examples of org.palo.viewapi.internal.FolderElement


  public XFolderElement createFolderElement(String sessionId, XView xView,
      XStaticFolder xParentFolder, boolean isPublic, boolean isEditable) throws DbOperationFailedException,
      SessionExpiredException {
    //ExplorerTreeNode parentFolder = getFolder(xParentFolder);
    FolderElement folderElement = createFolderElement(sessionId, xView, xParentFolder, true, isPublic, isEditable);
    return createXFolderElement(folderElement, xView);
  }
View Full Code Here


    List<XFolderElement> xFolderElements = new ArrayList<XFolderElement>();
//    ExplorerTreeNode parentFolder = getFolder(xParentFolder);
    for (XView xView : views) {
      XView importedXView = importViewWith(sessionId, converter, xView);
      if (xParentFolder != null) {
        FolderElement folderElement = createFolderElement(sessionId, importedXView,
          xParentFolder, true, isPublic, isEditable);
        xFolderElements.add(createXFolderElement(folderElement,
          importedXView));
        List <String> roleIds = new ArrayList<String>();
        List <String> roleNames = new ArrayList<String>();
View Full Code Here

 
  private final FolderElement createFolderElement(String sessionId, XView xView,
      XStaticFolder parentFolder, boolean p,
      boolean isPublic, boolean isEditable) throws DbOperationFailedException,
      SessionExpiredException {
    FolderElement fe = null;
    try {
//      CubeViewReader.CHECK_RIGHTS = false;
      ExplorerTreeNode root = FolderModel.getInstance().load(getLoggedInUser(sessionId));
      FolderService folderService = ServiceProvider
          .getFolderService(getLoggedInUser(sessionId))
      ExplorerTreeNode parent = find(root, parentFolder.getId());
      fe = folderService.createFolderElement(xView.getName(),
          parent, null);
      View view = getView(sessionId, xView);
      try {
        assignViewerAndEditorRole(sessionId, fe, view, isPublic, isEditable);
      } catch (SQLException e) {
        e.printStackTrace();
      }
      fe.setSourceObject(view);
//      ExplorerTreeNode root = fe.getRoot();
//      if (root != null)
//        folderService.save(root);
      saveRoot(sessionId, root);
//      print(root, 0);
View Full Code Here

        xStaticFolder
            .setHasChildren(staticFolder.getChildren().length > 0);
//        folders.add(wrap(xStaticFolder));
        xChildren[i] = wrap(xStaticFolder);
      } else if (child instanceof FolderElement) {
        FolderElement folderElement = (FolderElement) child;
        XView xView = null;
        Object sourceObj = folderElement.getSourceObject();
        if (sourceObj instanceof View) {
          View view = (View) sourceObj;
          xView = (XView) XConverter.createX(view);
        }
        XFolderElement xFolderElement = new XFolderElement(folderElement.getId(), folderElement.getName(), xView);
//        elements.add(wrap(xFolderElement));
        xChildren[i] = wrap(xFolderElement);
      }
    }
//    Collections.sort(folders, new Comparator<XObjectWrapper>() {
View Full Code Here

      }     
    }
   
    try {
      ExplorerTreeNode root = FolderModel.getInstance().load(getLoggedInUser(sessionId));
      FolderElement folderElement = (FolderElement) find(root, element.getId());
      try {
        CubeViewReader.CHECK_RIGHTS = false;
        assignViewerAndEditorRole(sessionId, folderElement, view, visible, editable);
      } catch (SQLException e) {
        e.printStackTrace();
      } finally {
        CubeViewReader.CHECK_RIGHTS = true;
      }     
      folderElement.setSourceObject(view);
      saveRoot(sessionId, root);
      try {
        CubeViewReader.CHECK_RIGHTS = false;
        vService.save(view);
      } catch (OperationFailedException e) {
View Full Code Here

TOP

Related Classes of org.palo.viewapi.internal.FolderElement

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.