Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.portal.um
Interface PumaEnvironment
public interface PumaEnvironmentThe PumaEnvironment provides functions to access virtual principals and common properties of the User Management component. Additionally, it offers functionality to bypass access control on Principals.
- Since:
- 6.1
Nested Class Summary static class PumaEnvironment.VirtualPrincipalNames
This enumeration contains the identifiers of all available virtual principals.
Field Summary static java.lang.String EXTERNAL_USERS_PARENT_DN_ALIAS
Alias for the parent DN configured for external users.
Method Summary Group getAllAuthenticatedUserGroup()
Deprecated. since 6.1.0.2 use #getVirtualPrincipal(PumaEnvironment.VirtualPrincipalNames.AllAuthenticatedPortalUsers) instead.Group getAllExternalUserGroup()
Deprecated. since 6.1.0.2 use #getVirtualPrincipal(VirtualPrincipalNames.AllExternalPortalUsers) instead.Group getAllGroupsGroup()
Deprecated. since 6.1.0.2 use #getVirtualPrincipal(VirtualPrincipalNames.AllPortalUserGroups) instead.Group getAllInternalUserGroup()
Deprecated. since 6.1.0.2 use #getVirtualPrincipal(VirtualPrincipalNames.AllInternalPortalUsers) instead.java.util.List<java.lang.String> getAllParentDNs()
Retrieves all parent DNs available in the current virtual portal contextUser getAnonymousUser()
Deprecated. since 6.1.0.2 use #getVirtualPrincipal(VirtualPrincipalNames.AnonymousPortalUser) instead.java.lang.String getExternalParentDN()
Return the DN that is configured for external users.java.lang.String getParentDN(java.lang.String alias)
Return the DN that bound to the given aliasjava.util.Properties getStoreProperties()
Return the Properties for the default store (PumaHome.DEFAULT_PROVIDER)java.util.Properties getStoreProperties(java.lang.String storeName)
Return the Properties for the specified storePrincipal getVirtualPrincipal(PumaEnvironment.VirtualPrincipalNames principalName)
Return the Principal (User or Group) object referenced by the given nameboolean isExternal(Principal aPrincipal)
Checks whether the DN of the given principal is configured as 'external'.boolean isVirtual(Principal principal)
Determines if the specified principal is a virtual principalboolean isVirtualPrincipal(Principal principal)
Deprecated. since 6.1.0.2 use isVirtual(Principal) instead.boolean matchesParentDN(Principal aPrincipal, java.lang.String alias)
checks whether the DN of the given principal matches to the parent DN of the given alias
<T> T runUnrestricted(java.security.PrivilegedExceptionAction<T> action)
Executes the code provided by PrivilegedExceptionAction without executing Access Control filtering in the PUMA layer.
Field Detail EXTERNAL_USERS_PARENT_DN_ALIAS
static final java.lang.String EXTERNAL_USERS_PARENT_DN_ALIAS
- Alias for the parent DN configured for external users.
- See Also:
- getParentDN(String), Constant Field Values
Method Detail runUnrestricted
<T> T runUnrestricted(java.security.PrivilegedExceptionAction<T> action) throws java.security.PrivilegedActionException
- Executes the code provided by PrivilegedExceptionAction without executing Access Control filtering in the PUMA layer. The run method of the given PrivilegedExceptionAction will be executed without enforcing access control on users and groups. Other access control checks (e.g. on portlets or pages) are still executed. As this method allows execution with higher authority, the execution of this method is protected by Java 2 Security. If Java 2 Security is enabled, calling code needs an AuthPermission "doAs"
- Parameters:
- action - PrivilegedExceptionAction that contains the code that is to be executed
- Returns:
- Object - the Object returned by the PrivilegedExceptionAction. null will be returned if the action does not have a return value.
- Throws:
- java.security.PrivilegedActionException - Exceptions of the provided action are wrapped as PrivilegedActionException
- java.lang.SecurityException - if access is not permitted based on the current security policy.
- Since:
- 6.1
- See Also:
- javax.security.auth.AuthPermission
isExternal
boolean isExternal(Principal aPrincipal)
- Checks whether the DN of the given principal is configured as 'external'. This is equivalent to matchesParentDN(principal, EXTERNAL_USERS_PARENT_DN_ALIAS)
- Parameters:
- aPrincipal - the Principal to be processed. null is not allowed as input parameter
- Returns:
- true if and only if the principal has a DN that matches the parent DN configured for external
- Since:
- 6.1
matchesParentDN
boolean matchesParentDN(Principal aPrincipal, java.lang.String alias)
- checks whether the DN of the given principal matches to the parent DN of the given alias
- Parameters:
- aPrincipal - the Principal to be processed. null is not allowed as input parameter
- alias - the alias of the parent DN
- Returns:
- true if and only if the principal has a DN that matches to the parent DN of the given alias
- Since:
- 6.1
getParentDN
java.lang.String getParentDN(java.lang.String alias)
- Returns the DN that bound to the given alias
- Parameters:
- alias - - the alias that points to the stored DN.
- Returns:
- the parent DN for a given alias
- Since:
- 6.1
getExternalParentDN
java.lang.String getExternalParentDN()
- Returns the DN that is configured for external users. This is equivalent to getParentDN(EXTERNAL_USERS_PARENT_DN_ALIAS)
- Returns:
- the DN that s configured for external users
- Since:
- 6.1
getAllParentDNs
java.util.List<java.lang.String> getAllParentDNs() throws PumaSystemException
- Retrieves all parent DNs available in the current virtual portal context
- Returns:
- list of Strings - representing the parent DNs available in the current virtual Portal context
- Throws:
- PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
- Since:
- 6.1
getAnonymousUser
User getAnonymousUser() throws com.ibm.wps.util.DataBackendException
- Deprecated. since 6.1.0.2 use #getVirtualPrincipal(VirtualPrincipalNames.AnonymousPortalUser) instead.
- Returns the User object representing the Anonymous User.
- Parameters:
- user -
- Throws:
- com.ibm.wps.util.DataBackendException
getAllAuthenticatedUserGroup
Group getAllAuthenticatedUserGroup() throws com.ibm.wps.util.DataBackendException
- Deprecated. since 6.1.0.2 use #getVirtualPrincipal(PumaEnvironment.VirtualPrincipalNames.AllAuthenticatedPortalUsers) instead.
- Returns the Group object representing the All Authenticated User.
- Throws:
- com.ibm.wps.util.DataBackendException
getAllGroupsGroup
Group getAllGroupsGroup() throws com.ibm.wps.util.DataBackendException
- Deprecated. since 6.1.0.2 use #getVirtualPrincipal(VirtualPrincipalNames.AllPortalUserGroups) instead.
- Returns the Group object representing the All Groups Group.
- Throws:
- com.ibm.wps.util.DataBackendException
getAllExternalUserGroup
Group getAllExternalUserGroup() throws com.ibm.wps.util.DataBackendException
- Deprecated. since 6.1.0.2 use #getVirtualPrincipal(VirtualPrincipalNames.AllExternalPortalUsers) instead.
- Returns the Group object representing the All External Users Group.
- Throws:
- com.ibm.wps.util.DataBackendException
getAllInternalUserGroup
Group getAllInternalUserGroup() throws com.ibm.wps.util.DataBackendException
- Deprecated. since 6.1.0.2 use #getVirtualPrincipal(VirtualPrincipalNames.AllInternalPortalUsers) instead.
- Returns the Group object representing the All Internal Users Group.
- Throws:
- com.ibm.wps.util.DataBackendException
isVirtualPrincipal
boolean isVirtualPrincipal(Principal principal) throws com.ibm.wps.util.DataBackendException
- Deprecated. since 6.1.0.2 use isVirtual(Principal) instead.
- Determines if the specified principal is a virtual principal
- Parameters:
- principal - - the principal to test
- Returns:
- true if the specified principal is a virtual principal
- Throws:
- com.ibm.wps.util.DataBackendException
isVirtual
boolean isVirtual(Principal principal)
- Determines if the specified principal is a virtual principal
- Parameters:
- principal - - the principal to test
- Returns:
- true if the specified principal is a virtual principal
getStoreProperties
java.util.Properties getStoreProperties()
- Returns the Properties for the default store (PumaHome.DEFAULT_PROVIDER)
- Returns:
- Properties
- Since:
- 6.1.0.2
getStoreProperties
java.util.Properties getStoreProperties(java.lang.String storeName)
- Returns the Properties for the specified store
- Parameters:
- storeName - - the name of the store (@see PumaHome.getController(String)
- Returns:
- Properties
getVirtualPrincipal
Principal getVirtualPrincipal(PumaEnvironment.VirtualPrincipalNames principalName)
- Returns the Principal (User or Group) object referenced by the given name
- Parameters:
- principalName - - a member of Enumeration PumaEnvironment.VirtualPrincipalNames
- Returns:
- the (virtual) Principal object that has the given Name as identifier
- Since:
- 6.1.0.2
Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD