|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.portal.data.security.DefaultMDEXSecurityManager
public class DefaultMDEXSecurityManager
This is a simple implementation of MDEXSecurityManager, providing role-based security filters via data source configuration. For a given data source, the following properties can be configured:
applySecurity(PortletRequest, MDEXState, Query)
method.
Field Summary | |
---|---|
static java.lang.String |
CONFIG_PROPERTY_INHERIT_SECURITY
JSON key for toggling security filter inheritance from parents on/off |
static java.lang.String |
CONFIG_PROPERTY_ROLE_PERMISSIONS
JSON key for defining available security roles for filters |
static java.lang.String |
CONFIG_PROPERTY_SECURITY_ENABLED
JSON key for toggling security on/off |
static java.lang.String |
CONFIG_PROPERTY_SECURITY_FILTERS
JSON key for security filters |
protected boolean |
dirty
|
protected java.util.Map<java.lang.String,java.util.Set<QueryFunction>> |
mdexSecurityFilterMap
|
protected java.util.Set<com.liferay.portal.model.Role> |
userRoles
|
Constructor Summary | |
---|---|
DefaultMDEXSecurityManager()
Default constructor |
Method Summary | |
---|---|
void |
applySecurity(javax.portlet.PortletRequest request,
MDEXState mdexState,
Query query)
See MDEXSecurityManager.applySecurity(PortletRequest, MDEXState, Query) |
protected java.util.Set<QueryFunction> |
createFilterSetFromJSON(org.json.JSONArray filterRefArray,
org.json.JSONObject securityFilters)
Searches a set of JSON object representations of filters identified by name in the provided JSONArray. |
protected void |
init(javax.portlet.PortletRequest request)
Initializes an internal map of security filters associated with the user making the request, under any of the following conditions: This is the first time a request is made for the session. |
protected void |
initMDEXPermissions(MDEXState mdexState,
UserSession userSession)
Initializes a set of security filters for the provided MDEXState, which is then stored in this security manager's internal map of data source-to-filter mappings for the user. |
protected void |
initRoleBasedSecurityFilters(MDEXState mdexState,
UserSession userSession)
Gets a list of role-based security filters for a specified MDEXState. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient boolean dirty
public static final java.lang.String CONFIG_PROPERTY_SECURITY_ENABLED
public static final java.lang.String CONFIG_PROPERTY_ROLE_PERMISSIONS
public static final java.lang.String CONFIG_PROPERTY_SECURITY_FILTERS
public static final java.lang.String CONFIG_PROPERTY_INHERIT_SECURITY
protected java.util.Map<java.lang.String,java.util.Set<QueryFunction>> mdexSecurityFilterMap
protected transient java.util.Set<com.liferay.portal.model.Role> userRoles
Constructor Detail |
---|
public DefaultMDEXSecurityManager()
Method Detail |
---|
public void applySecurity(javax.portlet.PortletRequest request, MDEXState mdexState, Query query) throws MDEXSecurityException
MDEXSecurityManager.applySecurity(PortletRequest, MDEXState, Query)
applySecurity
in interface MDEXSecurityManager
request
- the PortletRequestmdexState
- the MDEXState object representing the target
MDEX and its current statequery
- the Query to which security filters should be applied
MDEXSecurityException
- on error parsing, processing, or applying securityQuery
protected void init(javax.portlet.PortletRequest request) throws MDEXSecurityException
#initMDEXPermissions(MDEXState)
method is called.
request
- the PortletRequest
MDEXSecurityException
protected void initMDEXPermissions(MDEXState mdexState, UserSession userSession) throws MDEXSecurityException
mdexState
- the MDEXStateuserSession
- the UserSession instance for this session
MDEXSecurityException
protected void initRoleBasedSecurityFilters(MDEXState mdexState, UserSession userSession) throws MDEXSecurityException
mdexState
- the MDEXStateuserSession
- the UserSession instance for this session
MDEXSecurityException
protected java.util.Set<QueryFunction> createFilterSetFromJSON(org.json.JSONArray filterRefArray, org.json.JSONObject securityFilters) throws org.json.JSONException, MDEXSecurityException
JSONArray of names:
["filter1","filter2"]
List of security filters:
{
"filter1": {
"class":"com.endeca.portal.data.functions.RecordFilter",
"recordFilter":"OR(Region:Bordeaux,Region:Burgundy)"
},
"filter2": {
"class":"com.endeca.portal.data.functions.RecordFilter",
"recordFilter":"AND(Region:Sonoma)"
}
}
filterRefArray
- a JSON Array of filter names to look forsecurityFilters
- a JSON Object storing a list of filters
org.json.JSONException
MDEXSecurityException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |