Class ZoneDAO

    • Field Detail

      • ROLE

        public static final String ROLE
        Avalon Role
    • Constructor Detail

    • Method Detail

      • addSharedContent

        public Map<String,​ObjectaddSharedContent​(String pageId,
                                                         String zoneName,
                                                         String contentId,
                                                         String viewName)
        Insert a shared content into a zone
        Parameters:
        pageId - The page id
        zoneName - The zone name
        contentId - The content id to insert
        viewName - The view name
        Returns:
        The result map
      • addContentReference

        protected ZoneItem addContentReference​(ModifiableZone zone,
                                               Content content,
                                               String viewName)
        Add the given content as a zone item in the given zone.
        Parameters:
        zone - the zone to add the content in.
        content - the content to add.
        viewName - the view name.
        Returns:
        the added zone item
      • createSharedContent

        protected ZoneItem createSharedContent​(ModifiableZone zone,
                                               DefaultContent originalContent,
                                               String viewName)
        Create a shared content referencing the given content and add the shared one to the zone.
        Parameters:
        zone - the zone to create the shared content in.
        originalContent - the original content.
        viewName - the view name.
        Returns:
        the added zone item
      • removeZoneItem

        public void removeZoneItem​(String zoneItemId)
        Remove a zone item from page
        Parameters:
        zoneItemId - The id of zone item to delete
      • getContent

        public Content getContent​(ZoneItem zoneItem)
        Get the content of a zone item. Can be null if zone item is a service zone item.
        Parameters:
        zoneItem - The zone item
        Returns:
        The content or null if zone item is a service zone item.
      • getService

        public Service getService​(ZoneItem zoneItem)
        Get the service of a zone item. Can be null if zone item is not a service zone item.
        Parameters:
        zoneItem - The zone item
        Returns:
        The service or null if zone item is not a service zone item.
      • _checkZoneItem

        protected void _checkZoneItem​(ModifiablePage page,
                                      String zoneName,
                                      ZoneItem zoneItem,
                                      UserIdentity user)
        Check if the zone item can be moved to the given zone of the given page.
        Parameters:
        page - the page.
        zoneName - the zone name.
        zoneItem - the zone item to move.
        user - the user