code: private void primAdd(IPermission[] perms) throws Exception {
          Connection conn = null;
          int rc = 0;
  
          try {
              conn = RDBMServices.getConnection();
              String sQuery = getInsertPermissionSql();
              PreparedStatement ps = conn.prepareStatement(sQuery);
              try {
                  RDBMServices.setAutoCommit(conn, false);
  
                  for (int i = 0; i < perms.length; i++) {
                      primAdd(perms[i], ps);
                      if (log.isDebugEnabled()) log.debug("RDBMPermissionImpl.primAdd(): " + ps);
                      rc = ps.executeUpdate();
  
                      if (rc != 1) {
                          String errMsg = "Problem adding " + perms[i] + " RC: " + rc;
                          log.error(errMsg);
                          RDBMServices.rollback(conn);
                          throw new AuthorizationException(errMsg);
                      }
                  }
              } finally {
                  ps.close();
              }
  
              RDBMServices.commit(conn);
  
          } catch (Exception ex) {
              log.error("Exception adding permissions " + Arrays.toString(perms), ex);
              RDBMServices.rollback(conn);
              throw ex;
          } finally {
              try {
                  RDBMServices.setAutoCommit(conn, true);
              } finally {
                  RDBMServices.releaseConnection(conn);
              }
          }
      }
docs: Add the IPermissions to the store.
  
  @param perms org.apereo.portal.security.IPermission[]
  @exception Exception