Package com.dbxml.db.common.security

Examples of com.dbxml.db.common.security.AccessManagerClient


      try {
         jbInit();

         int permissions = 0;

         AccessManagerClient manager = new AccessManagerClient(col.getClient());
         if ( roleID == null ) {
            Set set = new TreeSet();
            String[] roles = manager.listRoles();
            for ( int i = 0; i < roles.length; i++ )
               set.add(roles[i]);

            Map acl = manager.listAccessControl(col.getCanonicalName());
            Iterator iter = acl.keySet().iterator();
            while ( iter.hasNext() )
               set.remove((String)iter.next());

            roles = (String[])set.toArray(EmptyStrings);

            for ( int i = 0; i < roles.length; i++ ) {
               cmbRole.addItem(roles[i]);
               if ( roles[i].equals(roleID) )
                  cmbRole.setSelectedIndex(i);
            }
            pnlRoleLayout.show(pnlRole, "combo");
         }
         else {
            Map permMap = manager.listAccessControl(col.getCanonicalName());
            Integer permInt = (Integer)permMap.get(roleID);
            if ( permInt != null )
               permissions = permInt.intValue();

            lblRoleID.setText(roleID);
View Full Code Here


         if ( res == JOptionPane.NO_OPTION )
            return;
      }

      try {
         AccessManagerClient manager = new AccessManagerClient(col.getClient());

         int permissions = 0;
         for ( int i = 0; i < INTS.length; i++ )
            if ( chk[i].isSelected() )
               permissions |= INTS[i];
View Full Code Here

   protected String getArgumentName() {
      return "User ID";
   }

   protected void process(CollectionClient col, String argument) throws dbXMLException {
      AccessManagerClient manager = new AccessManagerClient(cl.getClient());
      manager.addUser(argument);
      PrintWriter pw = cl.getWriter();
      pw.println("User '"+argument+"' added");
   }
View Full Code Here

   protected String getAction() {
      return "Revoke";
   }

   protected void process(String path, String roleID, int permissions) throws dbXMLException {
      AccessManagerClient manager = new AccessManagerClient(cl.getClient());
      manager.revoke(path, roleID, permissions);
   }
View Full Code Here

   protected String getType() {
      return "Role";
   }

   protected String[] getList(CollectionClient col) throws dbXMLException {
      AccessManagerClient manager = new AccessManagerClient(cl.getClient());
      return manager.listRoles();
   }
View Full Code Here

   protected String getType() {
      return "User";
   }

   protected String[] getList(CollectionClient col) throws dbXMLException {
      AccessManagerClient manager = new AccessManagerClient(cl.getClient());
      return manager.listUsers();
   }
View Full Code Here

   protected String getArgumentName() {
      return "Role ID";
   }

   protected void process(CollectionClient col, String argument) throws dbXMLException {
      AccessManagerClient manager = new AccessManagerClient(cl.getClient());
      manager.addRole(argument);
      PrintWriter pw = cl.getWriter();
      pw.println("Role '"+argument+"' added");
   }
View Full Code Here

         catch ( Exception e ) {
            throw new dbXMLException("Error obtaining answer");
         }
      }

      AccessManagerClient manager = new AccessManagerClient(cl.getClient());
      manager.removeRole(argument);

      pw.println("Role '"+argument+"' removed");
   }
View Full Code Here

   protected String getAction() {
      return "Grant";
   }

   protected void process(String path, String roleID, int permissions) throws dbXMLException {
      AccessManagerClient manager = new AccessManagerClient(cl.getClient());
      manager.grant(path, roleID, permissions);
   }
View Full Code Here

         catch ( Exception e ) {
            throw new dbXMLException("Error obtaining answer");
         }
      }

      AccessManagerClient manager = new AccessManagerClient(cl.getClient());
      manager.removeUser(argument);
      pw.println("User '"+argument+"' removed");
   }
View Full Code Here

TOP

Related Classes of com.dbxml.db.common.security.AccessManagerClient

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.