public abstract class AbstractBddSecurityManager extends java.lang.Object implements BddSecurityManager, java.io.Serializable
BddSecurityManager. This class provides:
User, their UserGroup-s and associated Role-sStates 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 Form| Constructor 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
EQLFilters 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 BddSecurityManagerrequest - 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 securityQueryprotected 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 - EQLFilters for this user (and their groups and roles) and stateBddSecurityExceptionprotected void applyFilters(com.endeca.mdex.conversation.types.State state,
java.util.List<com.endeca.mdex.conversation.types.EQLFilter> eqlFilters)
EQLFilters to the provided State's data source filters.state - the StateeqlFilters - list of EQLFilters 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.PortalExceptioncom.liferay.portal.SystemExceptionprotected 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.NumberFormatExceptioncom.liferay.portal.PortalExceptioncom.liferay.portal.SystemExceptionprotected 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.NumberFormatExceptioncom.liferay.portal.PortalExceptioncom.liferay.portal.SystemExceptionCopyright 2003, 2014, Oracle and/or its affiliates. All rights reserved.