Class PortletHome

    • Constructor Summary

      Constructors 
      Constructor Description
      PortletHome()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Portlet create​(Portlet portlet)
      Creates a new portlet in the database
      static Portlet findByPrimaryKey​(int nKey)
      Returns the Portlet whose primary key is specified in parameter
      static java.util.List<Portlet> findByType​(java.lang.String strIdPortletType)
      Returns a collection of portlets according to the selected type
      static java.util.Collection<Portlet> getAliasList​(int nPortletId)
      Returns the collection of the StyleSheet objects associated to the Style
      static Portlet getLastModifiedPortlet()
      Get the last modified portlet
      static java.util.Collection<PortletImpl> getPortletListByStyle​(int nStyleId)
      Returns the collection of the StyleSheet objects associated to the Style
      static java.util.Collection<Portlet> getPortletsByRoleKey​(java.lang.String strRole)
      Gets a collection of portlets associated to a given role
      static java.util.Collection<PortletImpl> getPortletsListbyName​(java.lang.String strPortletName)
      Returns the list of portlets for the search on publishing
      static PortletType getPortletType​(java.lang.String strPortletTypeId)
      Returns the instance of the PortletType whose identifier is specified in parameter
      static ReferenceList getStylesList​(java.lang.String strIdPortletType)
      Returns all the styles corresponding to a portlet typeun type de portlet
      static java.util.List<java.lang.Integer> getUsedOrdersForColumns​(int pageId, int columnId)
      Get list of used orders for a column
      static java.lang.String getXslFile​(int nIdPortlet, int nIdMode)
      Returns the stylesheet content of the portlet according to the mode
      static byte[] getXslSource​(int nIdPortlet, int nIdMode)
      Returns the stylesheet binary content of the portlet according to the mode
      static boolean hasAlias​(int nIdPortlet)
      Indicates if the portlet has alias
      static void invalidate​(int nIdPortlet)
      Invalidate a portlet whose identifier is specified in paramaeter
      static void invalidate​(Portlet portlet)
      Invalidate the portlet which is specified in parameter Invalidates the alias portlets connected to this portlet too.
      static void notifyListeners​(PortletEvent event)
      Notifies listeners
      void remove​(Portlet portlet)
      Deletes the portlet in the database
      void update​(Portlet portlet)
      Updates a portlet with the values of the specified portlet instance
      static void updatePosition​(Portlet portlet, int nColumn, int nOrder)
      Update the status of portlet
      static void updateStatus​(Portlet portlet, int nStatus)
      Update the status of portlet
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PortletHome

        public PortletHome()
    • Method Detail

      • findByPrimaryKey

        public static Portlet findByPrimaryKey​(int nKey)
        Returns the Portlet whose primary key is specified in parameter
        Parameters:
        nKey - the portlet identifier
        Returns:
        The portlet object
      • findByType

        public static java.util.List<Portlet> findByType​(java.lang.String strIdPortletType)
        Returns a collection of portlets according to the selected type
        Parameters:
        strIdPortletType - the portlet type
        Returns:
        the portlets in form of Collection
      • getPortletsListbyName

        public static java.util.Collection<PortletImpl> getPortletsListbyName​(java.lang.String strPortletName)
        Returns the list of portlets for the search on publishing
        Parameters:
        strPortletName - STh name of the portlet
        Returns:
        the list in form of Collection
      • getXslFile

        public static java.lang.String getXslFile​(int nIdPortlet,
                                                  int nIdMode)
        Returns the stylesheet content of the portlet according to the mode
        Parameters:
        nIdPortlet - the identifier of the portlet
        nIdMode - the selected mode
        Returns:
        the stylesheet content
      • getXslSource

        public static byte[] getXslSource​(int nIdPortlet,
                                          int nIdMode)
        Returns the stylesheet binary content of the portlet according to the mode
        Parameters:
        nIdPortlet - the identifier of the portlet
        nIdMode - the selected mode
        Returns:
        the stylesheet binary content
      • getStylesList

        public static ReferenceList getStylesList​(java.lang.String strIdPortletType)
        Returns all the styles corresponding to a portlet typeun type de portlet
        Parameters:
        strIdPortletType - the identifier of the portlet type
        Returns:
        the list of styles in form of ReferenceList
      • getPortletsByRoleKey

        public static java.util.Collection<Portlet> getPortletsByRoleKey​(java.lang.String strRole)
        Gets a collection of portlets associated to a given role
        Parameters:
        strRole - The role
        Returns:
        The collection
      • create

        public Portlet create​(Portlet portlet)
        Creates a new portlet in the database
        Parameters:
        portlet - An instance of the portlet to create
        Returns:
        the Portlet instance created
      • remove

        public void remove​(Portlet portlet)
        Deletes the portlet in the database
        Parameters:
        portlet - the portlet to remove
      • update

        public void update​(Portlet portlet)
        Updates a portlet with the values of the specified portlet instance
        Parameters:
        portlet - portlet to update
      • invalidate

        public static void invalidate​(Portlet portlet)
        Invalidate the portlet which is specified in parameter Invalidates the alias portlets connected to this portlet too.
        Parameters:
        portlet - the portlet instance
      • invalidate

        public static void invalidate​(int nIdPortlet)
        Invalidate a portlet whose identifier is specified in paramaeter
        Parameters:
        nIdPortlet - the portlet identifier
      • hasAlias

        public static boolean hasAlias​(int nIdPortlet)
        Indicates if the portlet has alias
        Parameters:
        nIdPortlet - the portlet identifier
        Returns:
        true if the portlet has alias, false if not.
      • updateStatus

        public static void updateStatus​(Portlet portlet,
                                        int nStatus)
        Update the status of portlet
        Parameters:
        portlet - the portlet to remove
        nStatus - The status to update
      • updatePosition

        public static void updatePosition​(Portlet portlet,
                                          int nColumn,
                                          int nOrder)
        Update the status of portlet
        Parameters:
        portlet - the portlet to remove
        nStatus - The status to update
      • getPortletType

        public static PortletType getPortletType​(java.lang.String strPortletTypeId)
        Returns the instance of the PortletType whose identifier is specified in parameter
        Parameters:
        strPortletTypeId - the identifier of the portlet type
        Returns:
        the instance of the portlet type
      • getPortletListByStyle

        public static java.util.Collection<PortletImpl> getPortletListByStyle​(int nStyleId)
        Returns the collection of the StyleSheet objects associated to the Style
        Parameters:
        nStyleId - identifier of the style
        Returns:
        A collection of styles
      • getAliasList

        public static java.util.Collection<Portlet> getAliasList​(int nPortletId)
        Returns the collection of the StyleSheet objects associated to the Style
        Parameters:
        nPortletId - identifier of the portlet
        Returns:
        A collection of styles
      • getLastModifiedPortlet

        public static Portlet getLastModifiedPortlet()
        Get the last modified portlet
        Returns:
        the last modified portlet
      • notifyListeners

        public static void notifyListeners​(PortletEvent event)
        Notifies listeners
        Parameters:
        event - the event
      • getUsedOrdersForColumns

        public static java.util.List<java.lang.Integer> getUsedOrdersForColumns​(int pageId,
                                                                                int columnId)
        Get list of used orders for a column
        Parameters:
        pageId - the page id
        columnId - the column id
        Returns:
        list of orders used for this column