protected Map<String, String> getMapForLocale(final String localeString) {
   Map<String, String> map = new HashMap<String, String>();
   for (IAuthorizationAction authorizationAction : authorizationActions) {
     map.put(
         authorizationAction.getName(), authorizationAction.getLocalizedDisplayName(localeString));
   }
   return map;
 }
 public void updateImmutableRoleBindingNames() {
   for (List<String> roles : immutableRoleBindingNames.values()) {
     roles.clear();
     for (final IAuthorizationAction action : authorizationActions) {
       roles.add(action.getName());
     }
   }
 }
  public AbstractJcrBackedRoleBindingDao(
      final Map<String, List<IAuthorizationAction>> immutableRoleBindings,
      final Map<String, List<String>> bootstrapRoleBindings,
      final String superAdminRoleName,
      final ITenantedPrincipleNameResolver tenantedRoleNameUtils,
      final List<IAuthorizationAction> authorizationActions) {
    this();
    // TODO: replace with IllegalArgumentException
    Assert.notNull(immutableRoleBindings);
    Assert.notNull(bootstrapRoleBindings);
    Assert.notNull(superAdminRoleName);
    Assert.notNull(authorizationActions);

    setAuthorizationActions(authorizationActions);

    this.immutableRoleBindings = immutableRoleBindings;
    this.bootstrapRoleBindings = bootstrapRoleBindings;
    this.superAdminRoleName = superAdminRoleName;
    this.tenantedRoleNameUtils = tenantedRoleNameUtils;

    immutableRoleBindingNames = new HashMap<String, List<String>>();
    for (final Entry<String, List<IAuthorizationAction>> entry : immutableRoleBindings.entrySet()) {
      final List<String> roles = new ArrayList<String>();
      for (final IAuthorizationAction a : entry.getValue()) {
        roles.add(a.getName());
      }
      immutableRoleBindingNames.put(entry.getKey(), roles);
    }

    // TODO this code can be replaced for 7.0 version by commit
    // https://github.com/AliaksandrDrebenchuk/pentaho-platform/commit/3adf0df3a337b6dc1b864e74b62143510d0381ee
    IPluginManager pluginManager = PentahoSystem.get(IPluginManager.class);
    if (pluginManager != null) {
      pluginManager.addPluginManagerListener(
          new IPluginManagerListener() {

            private boolean loaded = false;

            @Override
            public void onReload() {
              if (!loaded) {
                setAuthorizationActions(PentahoSystem.getAll(IAuthorizationAction.class));
                updateImmutableRoleBindingNames();
                loaded = true;
              }
            }
          });
    }
  }