Interface IWikiItemAttributePermissionDAO
- All Known Implementing Classes:
WikiItemAttributePermissionDAO
public interface IWikiItemAttributePermissionDAO
Data access interface for permissions granted on a directory attribute value.
-
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.
-
Method Details
-
insert
void insert(WikiItemAttributePermission permission, fr.paris.lutece.portal.service.plugin.Plugin plugin) Inserts a rule, ignoring duplicates.- Parameters:
permission- the rule to insertplugin- the plugin
-
delete
void delete(int nIdItem, String strAttributeName, String strAttributeValue, String strPermissionType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Deletes one rule of an item.- Parameters:
nIdItem- the item identifierstrAttributeName- the attribute namestrAttributeValue- the attribute valuestrPermissionType- the permission typeplugin- the plugin
-
selectByItemAndType
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.- Parameters:
nIdItem- the item identifierstrPermissionType- the permission typeplugin- the plugin- Returns:
- the rules, ordered by label
-
selectByAttributeValues
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.- Parameters:
mapUserAttributes- the attribute values the user carries, keyed by attribute nameplugin- the plugin- Returns:
- the matching rules
-