Class AbstractJcrBackedRoleBindingDao
- java.lang.Object
-
- org.pentaho.platform.security.policy.rolebased.AbstractJcrBackedRoleBindingDao
-
- All Implemented Interfaces:
IRoleAuthorizationPolicyRoleBindingDao
- Direct Known Subclasses:
JcrRoleAuthorizationPolicyRoleBindingDao
public abstract class AbstractJcrBackedRoleBindingDao extends Object implements IRoleAuthorizationPolicyRoleBindingDao
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,List<String>>
bootstrapRoleBindings
static String
FOLDER_NAME_AUTHZ
static String
FOLDER_NAME_ROLEBASED
static String
FOLDER_NAME_RUNTIMEROLES
protected Map<String,List<String>>
immutableRoleBindingNames
protected Map<String,List<org.pentaho.platform.api.engine.IAuthorizationAction>>
immutableRoleBindings
protected String
superAdminRoleName
protected org.pentaho.platform.api.mt.ITenantedPrincipleNameResolver
tenantedRoleNameUtils
-
Constructor Summary
Constructors Constructor Description AbstractJcrBackedRoleBindingDao()
AbstractJcrBackedRoleBindingDao(Map<String,List<org.pentaho.platform.api.engine.IAuthorizationAction>> immutableRoleBindings, Map<String,List<String>> bootstrapRoleBindings, String superAdminRoleName, org.pentaho.platform.api.mt.ITenantedPrincipleNameResolver tenantedRoleNameUtils, List<org.pentaho.platform.api.engine.IAuthorizationAction> authorizationActions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getBoundLogicalRoleNames(javax.jcr.Session session, List<String> runtimeRoleNames)
This was added to decouplePentahoEntryCollector
Gets the logical roles bound to the given runtime roles.List<String>
getBoundLogicalRoleNames(javax.jcr.Session session, org.pentaho.platform.api.mt.ITenant tenant, List<String> runtimeRoleNames)
This was added to decouplePentahoEntryCollector
Gets the logical roles bound to the given runtime roles in a particular tenant.protected Map<String,String>
getMapForLocale(String localeString)
protected Map<String,List<String>>
getRoleBindings(javax.jcr.Session session, org.pentaho.platform.api.mt.ITenant tenant)
RoleBindingStruct
getRoleBindingStruct(javax.jcr.Session session, org.pentaho.platform.api.mt.ITenant tenant, String locale)
javax.jcr.Node
getRuntimeRolesFolderNode(javax.jcr.Session session, org.pentaho.platform.api.mt.ITenant tenant)
protected boolean
isImmutable(String runtimeRoleName)
void
setAuthorizationActions(List<org.pentaho.platform.api.engine.IAuthorizationAction> authorizationActions)
void
setRoleBindings(javax.jcr.Session session, org.pentaho.platform.api.mt.ITenant tenant, String runtimeRoleName, List<String> logicalRoleNames)
void
updateImmutableRoleBindingNames()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.platform.security.policy.rolebased.IRoleAuthorizationPolicyRoleBindingDao
getBoundLogicalRoleNames, getBoundLogicalRoleNames, getRoleBindingStruct, getRoleBindingStruct, setRoleBindings, setRoleBindings
-
-
-
-
Field Detail
-
tenantedRoleNameUtils
protected org.pentaho.platform.api.mt.ITenantedPrincipleNameResolver tenantedRoleNameUtils
-
immutableRoleBindings
protected Map<String,List<org.pentaho.platform.api.engine.IAuthorizationAction>> immutableRoleBindings
-
superAdminRoleName
protected String superAdminRoleName
-
FOLDER_NAME_AUTHZ
public static final String FOLDER_NAME_AUTHZ
- See Also:
- Constant Field Values
-
FOLDER_NAME_ROLEBASED
public static final String FOLDER_NAME_ROLEBASED
- See Also:
- Constant Field Values
-
FOLDER_NAME_RUNTIMEROLES
public static final String FOLDER_NAME_RUNTIMEROLES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractJcrBackedRoleBindingDao
public AbstractJcrBackedRoleBindingDao()
-
AbstractJcrBackedRoleBindingDao
public AbstractJcrBackedRoleBindingDao(Map<String,List<org.pentaho.platform.api.engine.IAuthorizationAction>> immutableRoleBindings, Map<String,List<String>> bootstrapRoleBindings, String superAdminRoleName, org.pentaho.platform.api.mt.ITenantedPrincipleNameResolver tenantedRoleNameUtils, List<org.pentaho.platform.api.engine.IAuthorizationAction> authorizationActions)
-
-
Method Detail
-
updateImmutableRoleBindingNames
public void updateImmutableRoleBindingNames()
-
setAuthorizationActions
public void setAuthorizationActions(List<org.pentaho.platform.api.engine.IAuthorizationAction> authorizationActions)
-
getBoundLogicalRoleNames
public List<String> getBoundLogicalRoleNames(javax.jcr.Session session, List<String> runtimeRoleNames) throws javax.jcr.NamespaceException, javax.jcr.RepositoryException
Description copied from interface:IRoleAuthorizationPolicyRoleBindingDao
This was added to decouplePentahoEntryCollector
Gets the logical roles bound to the given runtime roles. Note that the size of the incoming list might not match the size of the returned list. This is a convenience method. The same result could be obtained from#getRoleBindingStruct()
.- Specified by:
getBoundLogicalRoleNames
in interfaceIRoleAuthorizationPolicyRoleBindingDao
runtimeRoleNames
- list of runtime role names- Returns:
- list of logical role names, never
null
- Throws:
javax.jcr.NamespaceException
javax.jcr.RepositoryException
-
getBoundLogicalRoleNames
public List<String> getBoundLogicalRoleNames(javax.jcr.Session session, org.pentaho.platform.api.mt.ITenant tenant, List<String> runtimeRoleNames) throws javax.jcr.NamespaceException, javax.jcr.RepositoryException
Description copied from interface:IRoleAuthorizationPolicyRoleBindingDao
This was added to decouplePentahoEntryCollector
Gets the logical roles bound to the given runtime roles in a particular tenant. Note that the size of the incoming list might not match the size of the returned list. This is a convenience method. The same result could be obtained from#getRoleBindingStruct()
.- Specified by:
getBoundLogicalRoleNames
in interfaceIRoleAuthorizationPolicyRoleBindingDao
runtimeRoleNames
- list of runtime role names- Returns:
- list of logical role names, never
null
- Throws:
javax.jcr.NamespaceException
javax.jcr.RepositoryException
-
setRoleBindings
public void setRoleBindings(javax.jcr.Session session, org.pentaho.platform.api.mt.ITenant tenant, String runtimeRoleName, List<String> logicalRoleNames) throws javax.jcr.NamespaceException, javax.jcr.RepositoryException
- Throws:
javax.jcr.NamespaceException
javax.jcr.RepositoryException
-
isImmutable
protected boolean isImmutable(String runtimeRoleName)
-
getRoleBindings
protected Map<String,List<String>> getRoleBindings(javax.jcr.Session session, org.pentaho.platform.api.mt.ITenant tenant) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
getRoleBindingStruct
public RoleBindingStruct getRoleBindingStruct(javax.jcr.Session session, org.pentaho.platform.api.mt.ITenant tenant, String locale) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
getRuntimeRolesFolderNode
public javax.jcr.Node getRuntimeRolesFolderNode(javax.jcr.Session session, org.pentaho.platform.api.mt.ITenant tenant) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
-