Package com.dbxml.db.common.adapters

Examples of com.dbxml.db.common.adapters.XMLSerializableAdapter.queryCollection()


   public String[] listGroupContents(String group) throws DBException {
      Transaction tx = new Transaction();
      try {
         XMLSerializableAdapter col = getContentCollection();
         ResultSet res = col.queryCollection(tx, XPathQueryResolver.STYLE_XPATH, "/content[@status='active']/groups/group[.='"+group+"']", EmptyNSMap);
         Set s = new TreeSet();
         while ( res.next() )
            s.add(res.getResultKey().toString());
      return (String[])s.toArray(EmptyStrings);
      }
View Full Code Here


            sb.append("]");
         }
         sb.append("]");

         XMLSerializableAdapter col = getContentCollection();
         ResultSet rs = col.queryCollection(tx, XPathQueryResolver.STYLE_XPATH, sb.toString(), null);
         Map grpMap = new HashMap(); // of String to List of Element

         while ( rs.next() ) {
            try {
               DocumentTable dt = rs.getResult();
View Full Code Here

   public String[] listUsersForRole(String roleID) throws DBException {
      Transaction tx = new Transaction();
      try {
         XMLSerializableAdapter col = getUsersCollection();
         String queryString = "/user[role[.='"+roleID+"']]/@id";
         ResultSet rs = col.queryCollection(tx, XPathQueryResolver.STYLE_XPATH, queryString, null);
         Set roles = new TreeSet();
         while ( rs.next() ) {
            try {
               String userID = DTSMHelper.tableToText(rs.getResult());
               roles.add(userID);
View Full Code Here

         col.remove(tx, roleID);
         roleCache.remove(roleID);

         col = getUsersCollection();
         String queryString = "/user[role[.='"+roleID+"']]/@id";
         ResultSet rs = col.queryCollection(tx, XPathQueryResolver.STYLE_XPATH, queryString, null);
         while ( rs.next() ) {
            try {
               String userID = DTSMHelper.tableToText(rs.getResult());
               User user = readUser(userID);
               user.removeRole(role);
View Full Code Here

            }
         }

         col = getAccessCollection();
         queryString = "/access[role[.='"+roleID+"']]/path/text()";
         rs = col.queryCollection(tx, XPathQueryResolver.STYLE_XPATH, queryString, null);
         while ( rs.next() ) {
            try {
               String path = DTSMHelper.tableToText(rs.getResult());
               Access access = readAccess(path);
               access.removePermissions(role);
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.