Examples of HasStorage


Examples of com.dbxml.db.admin.nodes.HasStorage

      return false;
   }

   private boolean storeNewDocument() {
      AdminNode[] nodes = null;
      HasStorage store = null;
      AdminNode refresh = null;

      TreePath path = browser.getSelectionPath();
      Object[] components = null;
      if ( path != null ) {
         components = path.getPath();
         java.util.List list = new ArrayList();
         for ( int i = 0; i < components.length; i++ ) {
            DefaultMutableTreeNode n = (DefaultMutableTreeNode)components[i];
            list.add(n.getUserObject());
         }
         nodes = (AdminNode[])list.toArray(EmptyAdminNodes);

         for ( int i = nodes.length-1; store == null && i >= 0; i-- ) {
            if ( nodes[i] instanceof HasStorage ) {
               store = (HasStorage)nodes[i];
               refresh = store.getRefreshTarget();
            }
         }
      }

      if ( store == null ) {
         StringBuffer sb = new StringBuffer();
         sb.append("There is currently no container selected.\n");
         sb.append("Please select a container to save the Document.");

         JOptionPane.showMessageDialog(this, sb.toString(), "Save Document", JOptionPane.OK_OPTION);
         return false;
      }

      StringBuffer sb = new StringBuffer();
      sb.append("Please type a name for your new Document.");
      String name = JOptionPane.showInputDialog(this, sb.toString(), "New Document", JOptionPane.OK_CANCEL_OPTION);
      if ( name != null && name.length() > 0 )
         doc.setName(name);
      else
         return false;

      Stopwatch sw = new Stopwatch("Document Storage", true);
      TabbedNodeEditor ne = (TabbedNodeEditor)paneEdit.getSelectedComponent();
      if ( ne.deactivate() ) {
         store.storeDocWrapper(doc);
         ne.activate(readOnly);
         nodeEditor = ne;
      }
      sw.stop();
      statusBar.setText(sw.toString());
View Full Code Here

Examples of com.foundationdb.ais.model.HasStorage

    }

    private static void checkObject(HasStorage object, AISValidationOutput output, Map<Object,HasStorage> keyMap) {
        Object key = object.getStorageUniqueKey();
        if(key != null) {
            HasStorage curObject = keyMap.put(key, object);
            if(curObject != null) {
                output.reportFailure(
                    new AISValidationFailure(
                        new DuplicateStorageDescriptionKeysException(curObject, object, key)));
            }
View Full Code Here

Examples of com.foundationdb.ais.model.HasStorage

        if(o instanceof Index) return (Index)o;
        throw new IllegalArgumentException("Unknown TreeLink holder: " + o);
    }

    private void expectTree(Object hasTreeLink) throws Exception {
        HasStorage link = treeLink(hasTreeLink);
        assertTrue("tree should exist: " + link.getStorageNameString(), treeExists(link));
    }
View Full Code Here

Examples of com.foundationdb.ais.model.HasStorage

        assertTrue("tree should exist: " + link.getStorageNameString(), treeExists(link));
    }

    private void expectNoTree(Object hasTreeLink) throws Exception {
        cleanupTrees();
        HasStorage link = treeLink(hasTreeLink);
        assertFalse("tree should not exist: " + link.getStorageNameString(), treeExists(link));
    }
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.