Class GroovyPolicyBrowser
java.lang.Object
de.uplanet.lucy.server.security.scripting.AbstractPolicyBrowser<PolicyEntryInfo>
de.uplanet.lucy.server.security.scripting.groovy.GroovyPolicyBrowser
- All Implemented Interfaces:
IPolicyBrowser<PolicyEntryInfo>
@Scriptable
public class GroovyPolicyBrowser
extends de.uplanet.lucy.server.security.scripting.AbstractPolicyBrowser<PolicyEntryInfo>
-
Method Summary
Modifier and TypeMethodDescriptionstatic GroovyPolicyBrowser
createInstance
(de.uplanet.jdbc.JdbcConnection p_conn) Create a policy browser instance.int
forEachPolicyEntry
(groovy.lang.Closure<?> p_closure) Iterate over all policy entries, ordered by object name.getObjectPolicy
(String p_strObjectName) Get the policy for the given object.getPermissionsForContainer
(String p_strName) Get the the permissions that are effectively assigned to the given container.getPermissionsForSet
(String p_strName) Get the the permissions that are effectively assigned to the given set.getPermissionsForUser
(String p_strName) Get the the permissions that are effectively assigned to the given user.
-
Method Details
-
createInstance
Create a policy browser instance.- Parameters:
p_conn
- The database connection to be used.- Returns:
- The policy browser instance.
-
getObjectPolicy
Description copied from interface:IPolicyBrowser
Get the policy for the given object.- Specified by:
getObjectPolicy
in interfaceIPolicyBrowser<PolicyEntryInfo>
- Overrides:
getObjectPolicy
in classde.uplanet.lucy.server.security.scripting.AbstractPolicyBrowser<PolicyEntryInfo>
- Parameters:
p_strObjectName
- The name of object.- Returns:
- The policy for the given object.
-
getPermissionsForUser
Description copied from interface:IPolicyBrowser
Get the the permissions that are effectively assigned to the given user.- Specified by:
getPermissionsForUser
in interfaceIPolicyBrowser<PolicyEntryInfo>
- Overrides:
getPermissionsForUser
in classde.uplanet.lucy.server.security.scripting.AbstractPolicyBrowser<PolicyEntryInfo>
- Parameters:
p_strName
- The user's unique identifier.- Returns:
- The permissions that are effectively assigned to the given user.
-
getPermissionsForSet
Description copied from interface:IPolicyBrowser
Get the the permissions that are effectively assigned to the given set.- Specified by:
getPermissionsForSet
in interfaceIPolicyBrowser<PolicyEntryInfo>
- Overrides:
getPermissionsForSet
in classde.uplanet.lucy.server.security.scripting.AbstractPolicyBrowser<PolicyEntryInfo>
- Parameters:
p_strName
- The set's unique identifier.- Returns:
- The permissions that are effectively assigned to the given set.
-
getPermissionsForContainer
Description copied from interface:IPolicyBrowser
Get the the permissions that are effectively assigned to the given container.- Specified by:
getPermissionsForContainer
in interfaceIPolicyBrowser<PolicyEntryInfo>
- Overrides:
getPermissionsForContainer
in classde.uplanet.lucy.server.security.scripting.AbstractPolicyBrowser<PolicyEntryInfo>
- Parameters:
p_strName
- The container's unique identifier.- Returns:
- The permissions that are effectively assigned to the given container.
-
forEachPolicyEntry
public int forEachPolicyEntry(groovy.lang.Closure<?> p_closure) Iterate over all policy entries, ordered by object name. and call the given closure for each of them.- Parameters:
p_closure
- The closure that receives thePolicyEntryInfo
objects.- Returns:
- The number of policy entries reported.
-