Class CmsAccessRestrictionInfo

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


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

      • CmsAccessRestrictionInfo

        public CmsAccessRestrictionInfo​(java.lang.String path,
                                        CmsGroup group)
        Creates a new instance.
        path - the xpath for the restriction field in the schema
        group - the restriction group
    • Method Detail

      • collectTypesByPath

        public static void collectTypesByPath​(CmsXmlContentDefinition definition,
                                              java.lang.String path,
                                              java.util.Map<java.lang.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.

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

        public static CmsAccessRestrictionInfo getRestrictionInfo​(CmsObject cms,
                                                                  CmsXmlContentDefinition contentDef)
        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.

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

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

        public java.lang.String getPath()
        Gets the xpath of the restriction field.
        the xpath of the restriction field