Package com.dbxml.db.common.adapters

Examples of com.dbxml.db.common.adapters.XMLSerializableAdapter


   XMLSerializableAdapter getGroupsCollection() throws DBException {
      if ( groupsCol == null ) {
         Collection sysCol = getCollection().getSystemCollection();
         Collection metaCol = sysCol.getCollection(SystemCollection.METADATA);
         Collection col = metaCol.getCollection(GROUPS_COL);
         groupsCol = new XMLSerializableAdapter(col);
      }
      return groupsCol;
   }
View Full Code Here


   XMLSerializableAdapter getContentCollection() throws DBException {
      if ( contentCol == null ) {
         Collection sysCol = getCollection().getSystemCollection();
         Collection metaCol = sysCol.getCollection(SystemCollection.METADATA);
         Collection col = metaCol.getCollection(CONTENT_COL);
         contentCol = new XMLSerializableAdapter(col);
      }
      return contentCol;
   }
View Full Code Here

   }

   public String[] listPaths() throws DBException {
      Transaction tx = new Transaction();
      try {
         XMLSerializableAdapter col = getAccessCollection();
      Key[] keys = col.listKeys(tx);
      String[] result = new String[keys.length];
      for ( int i = 0; i < keys.length; i++ )
        result[i] = keys[i].toString();
         return result;
      }
View Full Code Here

   }

   public Access readAccess(String path) throws InvalidAccessException {
      Transaction tx = new Transaction();
      try {
         XMLSerializableAdapter col = getAccessCollection();
         Access access = (Access)accessCache.get(path);
      if ( access != null ) {
        // Perform access check for cached items
        checkAccess(col, Access.READ);
      }
      else {
            access = (Access)col.getObject(tx, path);
        if ( access == null ) {
          access = new Access();
          access.setPath(path);
        }
            accessCache.put(path, access);
View Full Code Here

   }

   public void storeAccess(Access access) throws DBException {
      Transaction tx = new Transaction();
      try {
         XMLSerializableAdapter col = getAccessCollection();
         String path = access.getPath();
         col.setObject(tx, path, access);
         accessCache.put(path, access);
      }
      catch ( DBException e ) {
         tx.cancel();
         throw e;
View Full Code Here

   }

   public void removeAccess(String path) throws DBException {
      Transaction tx = new Transaction();
      try {
         XMLSerializableAdapter col = getAccessCollection();
         col.remove(tx, path);
         accessCache.remove(path);
      }
      catch ( DBException e ) {
         tx.cancel();
         throw e;
View Full Code Here

   private XMLSerializableAdapter getUsersCollection() throws DBException {
      if ( userCol == null ) {
         Collection sysCol = database.getSystemCollection();
         Collection col = sysCol.getCollection(SystemCollection.USERS);
         userCol = new XMLSerializableAdapter(col);
      }
      return userCol;
   }
View Full Code Here

   private XMLSerializableAdapter getRolesCollection() throws DBException {
      if ( roleCol == null ) {
         Collection sysCol = database.getSystemCollection();
         Collection col = sysCol.getCollection(SystemCollection.ROLES);
         roleCol = new XMLSerializableAdapter(col);
      }
      return roleCol;
   }
View Full Code Here

   private XMLSerializableAdapter getAccessCollection() throws DBException {
      if ( accessCol == null ) {
         Collection sysCol = database.getSystemCollection();
         Collection col = sysCol.getCollection(SystemCollection.ACCESS);
         accessCol = new XMLSerializableAdapter(col);
      }
      return accessCol;
   }
View Full Code Here

TOP

Related Classes of com.dbxml.db.common.adapters.XMLSerializableAdapter

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.