Class CategoryRight

All Implemented Interfaces:
JcmsConstants, ImportConstants, MashupConstants, Storable, JaliosConstants, LangPropertyArgument, Cloneable, Comparable<BasicStorable>

public class CategoryRight extends DataRight
This class represents the rights of a Member on a set of category roots.
Author:
Olivier Dedieu
  • Field Details

  • Constructor Details

    • CategoryRight

      public CategoryRight()
    • CategoryRight

      public CategoryRight(HashSet<Category> roots, int mode, boolean publish, boolean updateOther, boolean deleteOther, Member author)
    • CategoryRight

      public CategoryRight(CategoryRight other)
  • Method Details

    • canPublish

      public boolean canPublish(Data data)
      Overrides:
      canPublish in class DataRight
    • canUpdateOther

      public boolean canUpdateOther(Data data)
      Overrides:
      canUpdateOther in class DataRight
    • canDeleteOther

      public boolean canDeleteOther(Data data)
      Overrides:
      canDeleteOther in class DataRight
    • addRoots

      public void addRoots(HashSet<Category> set)
      Add a set of root categories
      Parameters:
      set - a set of Category
      Since:
      jcms-3.0
    • isMemberOnly

      public boolean isMemberOnly()
      Returns:
      true if mode == MEMBER_ONLY
      Since:
      jcms-4.0
    • isGroupOnly

      public boolean isGroupOnly()
      Returns:
      true if mode == GROUP_ONLY
      Since:
      jcms-4.0
    • isGroupAndMember

      public boolean isGroupAndMember()
      Returns:
      true if mode == GROUP_MEMBER;
      Since:
      jcms-4.0
    • getRoots

      public HashSet<Category> getRoots()
      Retrieves the roots category referenced by this CategoryRight
      Returns:
      an HashSet of Category
    • setRoots

      public void setRoots(HashSet<Category> rootCatSet)
      Sets the roots category of this CategoryRight
      Parameters:
      rootCatSet - an HashSet of Category
    • getMode

      public int getMode()
      Retrieve the right mode of this CategoryRight.
      Returns:
      an integer value from one of the third possible value, GROUP_AND_MEMBER, MEMBER_ONLY or GROUP_ONLY;
    • setMode

      public void setMode(int mode)
      Set the right mode of this CategoryRight.
      Parameters:
      mode - an integer value from one of the third possible value, GROUP_AND_MEMBER, MEMBER_ONLY or GROUP_ONLY;
    • toString

      public String toString()
      Overrides:
      toString in class DataRight
      Since:
      jcms-7.0.3