Class CmsElementView


  • public class CmsElementView
    extends java.lang.Object
    Represents a element view for the container page editor.

    • Constructor Detail

      • CmsElementView

        public CmsElementView​(CmsExplorerTypeSettings explorerType)
        Creates a new element view based on the given explorer type.

        Parameters:
        explorerType - the explorer type
      • CmsElementView

        public CmsElementView​(CmsObject cms,
                              CmsResource resource)
                       throws java.lang.Exception
        Constructor.

        Parameters:
        cms - the cms context
        resource - the group resource
        Throws:
        java.lang.Exception - if parsing the resource fails
      • CmsElementView

        public CmsElementView​(CmsUUID id)
        Creates a new view with the given id, but initializes no other fields.

        Parameters:
        id - the id
    • Method Detail

      • getExplorerTypeViewId

        public static CmsUUID getExplorerTypeViewId​(java.lang.String typeName)
        Helper method to compute the uuid for views based on explorer types.

        Parameters:
        typeName - the explorer type name
        Returns:
        the element view id computed from the type name
      • getId

        public CmsUUID getId()
        Returns the element view id.

        Returns:
        the group id
      • getOrder

        public int getOrder()
        The order.

        Returns:
        the order
      • getParentViewId

        public CmsUUID getParentViewId()
        Gets the parent view id (null if there is no parent view).

        Returns:
        the parent view id
      • getResource

        public CmsResource getResource()
        Returns the element view resource.

        Returns:
        the element view resource
      • getTitle

        public java.lang.String getTitle​(CmsObject cms,
                                         java.util.Locale locale)
        Returns the element view title.

        Parameters:
        cms - the cms context
        locale - the locale
        Returns:
        the title
      • hasPermission

        public boolean hasPermission​(CmsObject cms,
                                     CmsResource folder)
        Checks whether the current user has permissions to use the element view.

        Parameters:
        cms - the cms context
        folder - used for permission checks for explorertype based views
        Returns:
        true if the current user has permissions to use the element view
      • isOther

        public boolean isOther()
        'Other types' view, for everything that isn't assigned to any other view.

        Returns:
        true if this is the 'other types' view