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

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


    Group jackrabbitGroup = getJackrabbitGroup( theTenant, roleName, session );

    if ( ( jackrabbitGroup == null )
        || !TenantUtils.isAccessibleTenant( theTenant == null ? tenantedRoleNameUtils.getTenant( jackrabbitGroup
            .getID() ) : theTenant ) ) {
      throw new NotFoundException( Messages.getInstance().getString(
          "AbstractJcrBackedUserRoleDao.ERROR_0002_ROLE_NOT_FOUND" ) );
    }
    HashMap<String, User> currentlyAssignedUsers = new HashMap<String, User>();
    Iterator<Authorizable> currentMembers = jackrabbitGroup.getMembers();
    while ( currentMembers.hasNext() ) {
View Full Code Here


    User jackrabbitUser = getJackrabbitUser( theTenant, userName, session );

    if ( ( jackrabbitUser == null )
        || !TenantUtils.isAccessibleTenant( theTenant == null ? tenantedUserNameUtils
            .getTenant( jackrabbitUser.getID() ) : theTenant ) ) {
      throw new NotFoundException( Messages.getInstance().getString(
          "AbstractJcrBackedUserRoleDao.ERROR_0003_USER_NOT_FOUND" ) );
    }

    HashMap<String, Group> finalCollectionOfAssignedGroups = new HashMap<String, Group>();
    ITenant tenant = theTenant == null ? JcrTenantUtils.getTenant( userName, true ) : theTenant;
View Full Code Here

    User jackrabbitUser = getJackrabbitUser( theTenant, userName, session );

    if ( ( jackrabbitUser == null )
        || !TenantUtils.isAccessibleTenant( theTenant == null ? tenantedUserNameUtils
            .getTenant( jackrabbitUser.getID() ) : theTenant ) ) {
      throw new NotFoundException( Messages.getInstance().getString(
          "AbstractJcrBackedUserRoleDao.ERROR_0003_USER_NOT_FOUND" ) );
    }
    HashMap<String, Group> currentlyAssignedGroups = new HashMap<String, Group>();
    Iterator<Group> currentGroups = jackrabbitUser.memberOf();
    while ( currentGroups.hasNext() ) {
View Full Code Here

    }
    if ( tenant == null || tenant.getId() == null ) {
      tenant = JcrTenantUtils.getCurrentTenant();
    }
    if ( !TenantUtils.isAccessibleTenant( tenant ) ) {
      throw new NotFoundException( Messages.getInstance().getString(
          "AbstractJcrBackedUserRoleDao.ERROR_0006_TENANT_NOT_FOUND", theTenant.getId() ) );
    }
    String roleId = tenantedRoleNameUtils.getPrincipleId( tenant, role );

    UserManager tenantUserMgr = getUserManager( tenant, session );
View Full Code Here

    }
    if ( tenant == null || tenant.getId() == null ) {
      tenant = JcrTenantUtils.getCurrentTenant();
    }
    if ( !TenantUtils.isAccessibleTenant( tenant ) ) {
      throw new NotFoundException( Messages.getInstance().getString(
          "AbstractJcrBackedUserRoleDao.ERROR_0006_TENANT_NOT_FOUND", theTenant.getId() ) );
    }
    String userId = tenantedUserNameUtils.getPrincipleId( tenant, user );
    UserManager tenantUserMgr = getUserManager( tenant, session );
    tenantUserMgr.createUser( userId, password, new PrincipalImpl( userId ), "" ); //$NON-NLS-1$
View Full Code Here

      Group jackrabbitGroup = getJackrabbitGroup( role.getTenant(), role.getName(), session );
      if ( jackrabbitGroup != null
          && TenantUtils.isAccessibleTenant( tenantedRoleNameUtils.getTenant( jackrabbitGroup.getID() ) ) ) {
        jackrabbitGroup.remove();
      } else {
        throw new NotFoundException( "" ); //$NON-NLS-1$
      }
      for ( IPentahoUser roleMember : roleMembers ) {
        purgeUserFromCache( roleMember.getUsername() );
      }
    } else {
View Full Code Here

        }
        purgeUserFromCache( user.getUsername() );
        // [BISERVER-9215]
        jackrabbitUser.remove();
      } else {
        throw new NotFoundException( "" ); //$NON-NLS-1$
      }
    } else {
      throw new RepositoryException( Messages.getInstance().getString(
          "AbstractJcrBackedUserRoleDao.ERROR_0004_LAST_USER_NEEDED_IN_ROLE", tenantAdminRoleName ) );
    }
View Full Code Here

        jackrabbitGroup.removeProperty( "description" ); //$NON-NLS-1$
      } else {
        jackrabbitGroup.setProperty( "description", session.getValueFactory().createValue( description ) ); //$NON-NLS-1$
      }
    } else {
      throw new NotFoundException( Messages.getInstance().getString(
          "AbstractJcrBackedUserRoleDao.ERROR_0002_ROLE_NOT_FOUND" ) );
    }
  }
View Full Code Here

      final String description ) throws NotFoundException, RepositoryException {
    User jackrabbitUser = getJackrabbitUser( theTenant, userName, session );
    if ( ( jackrabbitUser == null )
        || !TenantUtils.isAccessibleTenant( theTenant == null ? tenantedUserNameUtils
            .getTenant( jackrabbitUser.getID() ) : theTenant ) ) {
      throw new NotFoundException( Messages.getInstance().getString(
          "AbstractJcrBackedUserRoleDao.ERROR_0003_USER_NOT_FOUND" ) );
    }
    if ( description == null ) {
      jackrabbitUser.removeProperty( "description" ); //$NON-NLS-1$
    } else {
View Full Code Here

    throws NotFoundException, RepositoryException {
    User jackrabbitUser = getJackrabbitUser( theTenant, userName, session );
    if ( ( jackrabbitUser == null )
        || !TenantUtils.isAccessibleTenant( theTenant == null ? tenantedUserNameUtils
            .getTenant( jackrabbitUser.getID() ) : theTenant ) ) {
      throw new NotFoundException( Messages.getInstance().getString(
          "AbstractJcrBackedUserRoleDao.ERROR_0003_USER_NOT_FOUND" ) );
    }
    jackrabbitUser.changePassword( password );

    /**
 
View Full Code Here

TOP

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

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.