Class WikiItemAttributePermissionDAO
java.lang.Object
fr.paris.lutece.plugins.wiki.business.permission.WikiItemAttributePermissionDAO
- All Implemented Interfaces:
IWikiItemAttributePermissionDAO
@ApplicationScoped
public class WikiItemAttributePermissionDAO
extends Object
implements IWikiItemAttributePermissionDAO
Data access methods for permissions granted on a directory attribute value.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int nIdItem, String strAttributeName, String strAttributeValue, String strPermissionType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Deletes one rule of an item.voidinsert(WikiItemAttributePermission permission, fr.paris.lutece.portal.service.plugin.Plugin plugin) Inserts a rule, ignoring duplicates.selectByAttributeValues(Map<String, String> mapUserAttributes, fr.paris.lutece.portal.service.plugin.Plugin plugin) Selects every rule matching one of the attribute values a user carries.selectByItemAndType(int nIdItem, String strPermissionType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Selects the rules of an item for a permission type.
-
Constructor Details
-
WikiItemAttributePermissionDAO
public WikiItemAttributePermissionDAO()
-
-
Method Details
-
insert
public void insert(WikiItemAttributePermission permission, fr.paris.lutece.portal.service.plugin.Plugin plugin) Inserts a rule, ignoring duplicates.- Specified by:
insertin interfaceIWikiItemAttributePermissionDAO- Parameters:
permission- the rule to insertplugin- the plugin
-
delete
public void delete(int nIdItem, String strAttributeName, String strAttributeValue, String strPermissionType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Deletes one rule of an item.- Specified by:
deletein interfaceIWikiItemAttributePermissionDAO- Parameters:
nIdItem- the item identifierstrAttributeName- the attribute namestrAttributeValue- the attribute valuestrPermissionType- the permission typeplugin- the plugin
-
selectByItemAndType
public List<WikiItemAttributePermission> selectByItemAndType(int nIdItem, String strPermissionType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Selects the rules of an item for a permission type.- Specified by:
selectByItemAndTypein interfaceIWikiItemAttributePermissionDAO- Parameters:
nIdItem- the item identifierstrPermissionType- the permission typeplugin- the plugin- Returns:
- the rules, ordered by label
-
selectByAttributeValues
public List<WikiItemAttributePermission> selectByAttributeValues(Map<String, String> mapUserAttributes, fr.paris.lutece.portal.service.plugin.Plugin plugin) Selects every rule matching one of the attribute values a user carries. Meant to be called once per user, so their whole set of rule-granted items is known in a single query.- Specified by:
selectByAttributeValuesin interfaceIWikiItemAttributePermissionDAO- Parameters:
mapUserAttributes- the attribute values the user carries, keyed by attribute nameplugin- the plugin- Returns:
- the matching rules
-