Package org.pentaho.platform.api.engine

Examples of org.pentaho.platform.api.engine.IPermissionRecipient


  @SuppressWarnings( "deprecation" )
  protected Map<IPermissionRecipient, IPermissionMask> transformEntries( List<IPentahoAclEntry> entriesFromHolder ) {
    Map<IPermissionRecipient, IPermissionMask> permissionsMap =
        new LinkedHashMap<IPermissionRecipient, IPermissionMask>();
    for ( IPentahoAclEntry pentahoAclEntry : entriesFromHolder ) {
      IPermissionRecipient permissionRecipient = null;
      if ( pentahoAclEntry.getRecipient() instanceof GrantedAuthorityImpl ) {
        GrantedAuthorityImpl grantedAuthorityImpl = (GrantedAuthorityImpl) pentahoAclEntry.getRecipient();
        permissionRecipient = new SimpleRole( grantedAuthorityImpl.toString() );
      } else if ( pentahoAclEntry.getRecipient() instanceof SimpleRole ) {
        permissionRecipient = new SimpleRole( (String) pentahoAclEntry.getRecipient() );
View Full Code Here


    IAclHolder aclHolder = (IAclHolder) object;
    Set<Map.Entry<IPermissionRecipient, IPermissionMask>> mapEntrySet = permissionsMap.entrySet();
    ArrayList<IPentahoAclEntry> aclList = new ArrayList<IPentahoAclEntry>();
    for ( Entry<IPermissionRecipient, IPermissionMask> mapEntry : mapEntrySet ) {
      PentahoAclEntry pentahoAclEntry = new PentahoAclEntry();
      IPermissionRecipient permissionRecipient = mapEntry.getKey();
      if ( permissionRecipient instanceof SimpleRole ) {
        pentahoAclEntry.setRecipient( new GrantedAuthorityImpl( permissionRecipient.getName() ) );
      } else {
        pentahoAclEntry.setRecipient( permissionRecipient.getName() );
      }
      pentahoAclEntry.addPermission( mapEntry.getValue().getMask() );
      aclList.add( pentahoAclEntry );
    }
    // HibernateUtil.beginTransaction(); - This is now handled in the RepositoryFile
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.engine.IPermissionRecipient

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.