public abstract class AbstractBddSecurityManager extends java.lang.Object implements BddSecurityManager, java.io.Serializable
BddSecurityManager
. This class provides:
User
, their UserGroup
-s and associated Role
-sState
s of the current query, generating a call to compute the (security) filters for that StatecreateFilters(PortletRequest, MDEXState, Query, State, User, List, Set)
,
which will be called once per query per State
in that query. The implementation must return the correct security filters for the
current user for that State (Collection).BddSecurityManager
,
AttributeAclSecurityManager
,
Serialized FormConstructor and Description |
---|
AbstractBddSecurityManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
applyFilters(com.endeca.mdex.conversation.types.State state,
java.util.List<com.endeca.mdex.conversation.types.EQLFilter> eqlFilters)
Adds the list of
EQLFilter s to the provided State 's data source filters. |
void |
applySecurity(javax.portlet.PortletRequest request,
MDEXState mdexState,
Query query)
|
protected abstract java.util.List<com.endeca.mdex.conversation.types.EQLFilter> |
createFilters(javax.portlet.PortletRequest request,
MDEXState mdexState,
Query query,
com.endeca.mdex.conversation.types.State state,
com.liferay.portal.model.User user,
java.util.List<com.liferay.portal.model.UserGroup> userGroups,
java.util.Set<com.liferay.portal.model.Role> roles)
Subclasses must implement this method to compute the security filters for a user and state/collection.
|
protected java.util.List<com.liferay.portal.model.UserGroup> |
lookupGroups(javax.portlet.PortletRequest request,
com.liferay.portal.model.User user)
Returns the list of user groups for a user.
|
protected java.util.Set<com.liferay.portal.model.Role> |
lookupRoles(javax.portlet.PortletRequest request,
com.liferay.portal.model.User user,
java.util.List<com.liferay.portal.model.UserGroup> userGroups)
Determines the set of roles and Liferay user groups to which the current user belongs.
|
protected com.liferay.portal.model.User |
lookupUser(javax.portlet.PortletRequest request)
Fetch the currently logged-in user and return, or return null for the guest user.
|
public void applySecurity(javax.portlet.PortletRequest request, MDEXState mdexState, Query query) throws BddSecurityException
BddSecurityManager.applySecurity(PortletRequest, MDEXState, Query)
. This implementation:
State
in the query,
to establish the user's access filters to that State/CollectionapplySecurity
in interface BddSecurityManager
request
- the PortletRequestmdexState
- the MDEXState object representing the target server and its current query statequery
- the Query to which security filters should be appliedBddSecurityException
- on error parsing, processing, or applying securityQuery
protected abstract java.util.List<com.endeca.mdex.conversation.types.EQLFilter> createFilters(javax.portlet.PortletRequest request, MDEXState mdexState, Query query, com.endeca.mdex.conversation.types.State state, com.liferay.portal.model.User user, java.util.List<com.liferay.portal.model.UserGroup> userGroups, java.util.Set<com.liferay.portal.model.Role> roles) throws BddSecurityException
request
- mdexState
- query
- state
- user
- userGroups
- roles
- EQLFilter
s for this user (and their groups and roles) and stateBddSecurityException
protected void applyFilters(com.endeca.mdex.conversation.types.State state, java.util.List<com.endeca.mdex.conversation.types.EQLFilter> eqlFilters)
EQLFilter
s to the provided State
's data source filters.state
- the State
eqlFilters
- list of EQLFilter
s to addprotected java.util.List<com.liferay.portal.model.UserGroup> lookupGroups(javax.portlet.PortletRequest request, com.liferay.portal.model.User user) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException
request
- user
- UserGroup
for this User.com.liferay.portal.PortalException
com.liferay.portal.SystemException
protected java.util.Set<com.liferay.portal.model.Role> lookupRoles(javax.portlet.PortletRequest request, com.liferay.portal.model.User user, java.util.List<com.liferay.portal.model.UserGroup> userGroups) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException
remoteUser
- String representing the id of the current user, or null if the user is unauthenticated. This param should be generated by
PortletRequest.getRemoteUser().companyId
- the Liferay company id for the current requestjava.lang.NumberFormatException
com.liferay.portal.PortalException
com.liferay.portal.SystemException
protected com.liferay.portal.model.User lookupUser(javax.portlet.PortletRequest request) throws java.lang.NumberFormatException, com.liferay.portal.PortalException, com.liferay.portal.SystemException
request
- User
, or null in the case of the guest userjava.lang.NumberFormatException
com.liferay.portal.PortalException
com.liferay.portal.SystemException
Copyright 2003, 2014, Oracle and/or its affiliates. All rights reserved.