Class PortletCollection

    • Field Detail

      • PORTAL_ACTION_UP

        public static final java.lang.String PORTAL_ACTION_UP
        See Also:
        Constant Field Values
      • PORTAL_ACTION_DOWN

        public static final java.lang.String PORTAL_ACTION_DOWN
        See Also:
        Constant Field Values
      • PORTAL_ACTION_LEFT

        public static final java.lang.String PORTAL_ACTION_LEFT
        See Also:
        Constant Field Values
      • PORTAL_ACTION_RIGHT

        public static final java.lang.String PORTAL_ACTION_RIGHT
        See Also:
        Constant Field Values
      • PORTAL_ACTION_DELETE

        public static final java.lang.String PORTAL_ACTION_DELETE
        See Also:
        Constant Field Values
      • cachedChildrenMap

        protected transient java.util.LinkedHashMap<java.lang.String,​java.lang.String> cachedChildrenMap
      • cachedBindingMap

        protected transient java.util.LinkedHashMap<java.lang.String,​java.lang.String> cachedBindingMap
      • cachedChildren

        protected transient PortalElement[] cachedChildren
      • cachedBindings

        protected transient java.lang.String[] cachedBindings
      • ICON_STATSREPORT

        public static final java.lang.String ICON_STATSREPORT
        See Also:
        Constant Field Values
      • ICON_JSP_COLLECT

        public static final java.lang.String ICON_JSP_COLLECT
        See Also:
        Constant Field Values
    • Constructor Detail

      • PortletCollection

        public PortletCollection()
      • PortletCollection

        public PortletCollection​(Publication other)
      • PortletCollection

        public PortletCollection​(PortalElement other)
      • PortletCollection

        public PortletCollection​(Portlet other)
    • Method Detail

      • duplicateDeep

        protected void duplicateDeep​(WizardContext context,
                                     PortalElement parent)
        Description copied from class: PortalElement
        Performs a deep duplicate of the PortalElement in a WizardContext. Update prefix, workspace, category, groups, ...
        Overrides:
        duplicateDeep in class PortalElement
        Parameters:
        context - WizardContext describe the dupliate context
        parent - PortalElement parent of portlets to deeply duplicate
      • checkWrite

        public ControllerStatus checkWrite​(int op,
                                           Member mbr,
                                           boolean checkIntegrity,
                                           java.util.Map context)
        Description copied from class: Publication
        Checks if the given write operation can be performed
        Overrides:
        checkWrite in class Publication
        Parameters:
        op - the operation (OP_CREATE, OP_UPDATE, ...)
        mbr - the member which requests the write operation
        checkIntegrity - if true, requires the constraints integrity to be checked
        context - a map which contains context parameters (may be null)
        Returns:
        a ControllerStatus
      • getChildrenBindings

        public abstract java.lang.String[] getChildrenBindings()
      • setChildrenBindings

        public abstract void setChildrenBindings​(java.lang.String[] v)
      • getCachedBindingMap

        public java.util.LinkedHashMap<java.lang.String,​java.lang.String> getCachedBindingMap()
        Returns a Map of Keys: String: Labels or PortalElement's ids Values: PortalElement or List of PortalElement WARNING: return internal Index not a copy !
        Returns:
        LinkedHashMap (String/PortalElement)
      • getCachedChildrenMap

        public java.util.LinkedHashMap<java.lang.String,​java.lang.String> getCachedChildrenMap()
        Returns a Map of Keys: String: PortalElement's ids Values: String: Label bind to given PortalElement WARNING: return internal Index not a copy !
        Returns:
        LinkedHashMap (String/String)
      • getBinding

        public java.lang.String getBinding​(PortalElement portlet)
        Returns Label associated to given PortalElement or null if it has not been declared
        Parameters:
        portlet - the portlet to work with
        Returns:
        String label bind to given portlet
      • getChild

        public PortalElement getChild​(java.lang.String bindName)
        Returns the first PortalElement matching the given binding
        Parameters:
        bindName - the binding name
        Returns:
        PortalElement or Null if the binding do not match
      • getChildrenList

        public java.util.List<PortalElement> getChildrenList​(java.lang.String bindName)
        Returns a List of PortalElement matching the given binding
        Parameters:
        bindName - the binding name
        Returns:
        List of PortalElement
      • getChildrenList

        public java.util.List getChildrenList​(java.lang.String[] bindNames)
        Returns a List of PortalElement matching the given binding
        Parameters:
        bindNames - the binding name
        Returns:
        List of PortalElement
      • getChildren

        public PortalElement[] getChildren​(java.lang.String[] bindNames)
        Returns a List of PortalElement matching the given binding
        Parameters:
        bindNames - the binding name
        Returns:
        List of PortalElement
      • performChildrenBindings

        protected void performChildrenBindings​(PortalElement[] children,
                                               java.lang.String[] bindings)
        Update the Children BindingMap.
        Parameters:
        children - the children
        bindings - String[] of bindings or null
      • setChildrenMap

        public void setChildrenMap​(java.util.Map<java.lang.String,​java.lang.String> deltaMap)
        Convenient method to Partially update children/bindings arrays with the given Map of Id/Label.
        • Override label declared
        • Preserve labels not declared in the Map
        • Preserve binging not declared in the Map
        No store modification is performed, invoke on a collection copy and save your modification afterward.
        Parameters:
        deltaMap - Map of Id/Label
      • setChildren

        public abstract void setChildren​(PortalElement[] p)
      • cut

        public Portlet cut​(int index,
                           Member loggedMember)
        Cut a Portlet at the specified index from the current Collection
        Parameters:
        index - the index
        loggedMember - the logged member
        Returns:
        Portlet
        Since:
        jcms-4.0
      • delete

        public boolean delete​(int index,
                              Member loggedMember)
        Cut a Portlet at the specified index from the current Collection
        Parameters:
        index - the index
        loggedMember - the loggedMember
        Returns:
        Portlet
        Since:
        jcms-4.0
      • past

        public boolean past​(Portlet portlet,
                            int index,
                            Member loggedMember)
        Past a Portlet at the specified index into the current Collection
        Parameters:
        portlet - the portlet
        index - the index
        loggedMember - the logged member
        Returns:
        true if operation was performed and portlet was modified, false otherwise
        Since:
        jcms-4.0
      • move

        public void move​(int pos,
                         int direction,
                         Member loggedMember)
      • processAction

        public void processAction​(Member mbr,
                                  javax.servlet.http.HttpServletRequest request)
      • handleSortable

        public ControllerStatus handleSortable​(JcmsJspContext jcmsContext)
        Handle a sortable request (ie a DnD) received for this portlet
        Parameters:
        jcmsContext - the jcmsContext.
        Returns:
        the status of the update.
        Since:
        jcms-10.0.4
      • findPortletSet

        public <T> java.util.Set<T> findPortletSet​(java.lang.Class<? extends T> clazz)
        Returns all the children portlet of the given class.
        Type Parameters:
        T - a type of
        Parameters:
        clazz - the class
        Returns:
        all the children portlet of the given class.
        Since:
        jcms-10.0.5
      • findFirstPortlet

        public <T> T findFirstPortlet​(java.lang.Class<? extends T> clazz)
        Returns the first child portlet of the given class.
        Type Parameters:
        T - a type of
        Parameters:
        clazz - the class
        Returns:
        the first child portlet of the given class.
        Since:
        jcms-10.0.5