Class WikiItemAttributePermissionHome

java.lang.Object
fr.paris.lutece.plugins.wiki.business.permission.WikiItemAttributePermissionHome

public final class WikiItemAttributePermissionHome extends Object
Home for permissions granted on a directory attribute value.
  • Method Details

    • create

      public static void create(int nIdItem, String strAttributeName, String strAttributeValue, String strAttributeLabel, String strPermissionType)
      Grants a permission to everyone carrying an attribute value. Does nothing when already granted.
      Parameters:
      nIdItem - the item identifier
      strAttributeName - the attribute name
      strAttributeValue - the attribute value
      strAttributeLabel - the attribute label, as shown to whoever granted the rule
      strPermissionType - the permission type
    • remove

      public static void remove(int nIdItem, String strAttributeName, String strAttributeValue, String strPermissionType)
      Revokes a rule of an item.
      Parameters:
      nIdItem - the item identifier
      strAttributeName - the attribute name
      strAttributeValue - the attribute value
      strPermissionType - the permission type
    • findByItemAndType

      public static List<WikiItemAttributePermission> findByItemAndType(int nIdItem, String strPermissionType)
      Returns the rules of an item for a permission type.
      Parameters:
      nIdItem - the item identifier
      strPermissionType - the permission type
      Returns:
      the rules, ordered by label
    • findByAttributeValues

      public static List<WikiItemAttributePermission> findByAttributeValues(Map<String,String> mapUserAttributes)
      Returns every rule matching one of the attribute values a user carries.
      Parameters:
      mapUserAttributes - the attribute values the user carries, keyed by attribute name
      Returns:
      the matching rules