Package org.pentaho.platform.api.engine.security.userroledao

Examples of org.pentaho.platform.api.engine.security.userroledao.AlreadyExistsException


          return createRole( session, tenant, roleName, description, memberUserNames );
        }
      } );
    } catch ( DataAccessException e ) {
      if ( ( e instanceof JcrSystemException ) && ( e.getCause() instanceof AuthorizableExistsException ) ) {
        throw new AlreadyExistsException( "" );
      }
      throw new UncategorizedUserRoleDaoException( Messages.getInstance().getString(
          "JcrUserRoleDao.ERROR_0002_CREATING_ROLE", e.getLocalizedMessage() ), e );
    }
  }
View Full Code Here


          return createUser( session, tenant, userName, password, description, roles );
        }
      } );
    } catch ( DataAccessException e ) {
      if ( ( e instanceof JcrSystemException ) && ( e.getCause() instanceof AuthorizableExistsException ) ) {
        throw new AlreadyExistsException( "" );
      }
      throw new UncategorizedUserRoleDaoException( Messages.getInstance().getString(
          "JcrUserRoleDao.ERROR_0003_CREATING_USER", e.getLocalizedMessage() ), e );
    }
    return user;
View Full Code Here

      if ( role == null ) {
        role = new PentahoRole( tenant, roleName, description );
        roles.add( role );
        setRoleMembers( tenant, roleName, memberUserNames );
      } else {
        throw new AlreadyExistsException( "" );
      }
      return role;
    }
View Full Code Here

    if ( !tenantRoles.get( tenant ).contains( role ) ) {
      tenantRoles.get( tenant ).add( role );
      roleMembers.put( role, new HashSet<IPentahoUser>() );
    } else {
      throw new AlreadyExistsException( roleName.toString() );
    }

    setRoleMembers( tenant, roleName, memberUserNames );
    return role;
  }
View Full Code Here

    MockPentahoUser user = new MockPentahoUser( tenant, username, password, description, true );
    if ( !tenantUsers.get( tenant ).contains( user ) ) {
      tenantUsers.get( tenant ).add( user );
      userRoles.put( user, new HashSet<IPentahoRole>() );
    } else {
      throw new AlreadyExistsException( username );
    }
    setUserRoles( tenant, username, roles );
    return user;
  }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.engine.security.userroledao.AlreadyExistsException

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.