Class CmsAccessRestrictionInfo

java.lang.Object
org.opencms.ade.contenteditor.CmsAccessRestrictionInfo

public class CmsAccessRestrictionInfo extends Object
Class for representing information about a 'restriction' field defined in a schema.
  • Field Details

    • ROLE_CAN_IGNORE_GROUP

      public static final CmsRole ROLE_CAN_IGNORE_GROUP
      The role that can ignore group membership for manipulating the 'restricted' status.
  • Constructor Details

    • CmsAccessRestrictionInfo

      Creates a new instance.
      Parameters:
      path - the xpath for the restriction field in the schema
      group - the restriction group
  • Method Details

    • collectTypesByPath

      public static void collectTypesByPath(CmsXmlContentDefinition definition, String path, Map<String,I_CmsXmlSchemaType> typesByPath)
      Helper method for collecting all nested schema types of a content definition in a map.

      The map keys in the resulting map will be the xpaths corresponding to the schema types.

      Parameters:
      definition - a content definition
      path - the path to start with
      typesByPath - the map in which the schema types should be stored
    • getRestrictionInfo

      Gets the restriction info for the current user and content definition.

      This will only return a non-null value if the is restriction field defined in the content definition and the current user is in the group configured as the restriction group for that field.

      Parameters:
      cms - the current CMS context
      contentDef - the content definition
      Returns:
      the restriction information
    • getGroup

      public CmsGroup getGroup()
      Gets the restriction group.
      Returns:
      the restriction group
    • getPath

      public String getPath()
      Gets the xpath of the restriction field.
      Returns:
      the xpath of the restriction field