Class A_CmsListResourceCollector

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(org.opencms.file.collectors.I_CmsResourceCollector arg0)  
      protected CmsListItem createResourceListItem​(org.opencms.file.CmsResource resource, CmsHtmlList list, boolean showPermissions, boolean showDateLastMod, boolean showUserLastMod, boolean showDateCreate, boolean showUserCreate, boolean showDateRel, boolean showDateExp, boolean showState, boolean showLockedBy, boolean showSite)
      Returns a list item created from the resource information, differs between valid resources and invalid resources.
      java.lang.String getCreateLink​(org.opencms.file.CmsObject cms)  
      java.lang.String getCreateLink​(org.opencms.file.CmsObject cms, java.lang.String collectorName, java.lang.String param)  
      java.lang.String getCreateParam​(org.opencms.file.CmsObject cms)  
      java.lang.String getCreateParam​(org.opencms.file.CmsObject cms, java.lang.String collectorName, java.lang.String param)  
      int getCreateTypeId​(org.opencms.file.CmsObject cms, java.lang.String collectorName, java.lang.String param)  
      java.lang.String getDefaultCollectorName()  
      java.lang.String getDefaultCollectorParam()  
      protected CmsListItem getDummyListItem​(CmsHtmlList list)
      Returns a dummy list item.
      protected java.util.List<org.opencms.file.CmsResource> getInternalResources​(org.opencms.file.CmsObject cms, java.util.Map<java.lang.String,​java.lang.String> params)
      Wrapper method for caching the result of getResources(CmsObject, Map).
      java.util.List<CmsListItem> getListItems​(java.lang.String parameter)
      Returns a list of list items from a list of resources.
      int getOrder()  
      java.util.Set<org.opencms.file.CmsResource> getPublishResources​(org.opencms.file.CmsObject cms, org.opencms.gwt.shared.I_CmsContentLoadCollectorInfo info)  
      org.opencms.file.CmsResource getResource​(org.opencms.file.CmsObject cms, CmsListItem item)
      Returns the resource for the given item.
      protected java.util.List<java.lang.String> getResourceNamesFromParam​(java.util.Map<java.lang.String,​java.lang.String> params)
      Returns the list of resource names from the parameter map.
      abstract java.util.List<org.opencms.file.CmsResource> getResources​(org.opencms.file.CmsObject cms, java.util.Map<java.lang.String,​java.lang.String> params)
      Returns all, unsorted and unfiltered, resources.
      java.util.List<org.opencms.file.CmsResource> getResults​(org.opencms.file.CmsObject cms)  
      java.util.List<org.opencms.file.CmsResource> getResults​(org.opencms.file.CmsObject cms, java.lang.String collectorName, java.lang.String parameter)
      The parameter must follow the syntax "page:nr" where nr is the number of the page to be displayed.
      java.util.List<org.opencms.file.CmsResource> getResults​(org.opencms.file.CmsObject cms, java.lang.String collectorName, java.lang.String params, int numResults)  
      protected CmsListState getState​(java.util.Map<java.lang.String,​java.lang.String> params)
      Returns the state of the parameter map.
      A_CmsListExplorerDialog getWp()
      Returns the workplace object.
      protected abstract void setAdditionalColumns​(CmsListItem item, org.opencms.workplace.explorer.CmsResourceUtil resUtil)
      Set additional column entries for a resource.
      void setDefaultCollectorName​(java.lang.String collectorName)  
      void setDefaultCollectorParam​(java.lang.String param)
      The parameter must follow the syntax "mode|projectId" where mode is either "new", "changed", "deleted" or "modified" and projectId is the id of the project to be displayed.
      void setOrder​(int order)  
      void setPage​(int page)
      Sets the current display page.
      protected void setResourcesParam​(java.util.List<java.lang.String> resources)
      Sets the resources parameter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.opencms.file.collectors.I_CmsResourceCollector

        getCollectorNames
    • Field Detail

      • m_resCache

        protected java.util.Map<java.lang.String,​org.opencms.file.CmsResource> m_resCache
        Resource cache.
      • m_resources

        protected java.util.List<org.opencms.file.CmsResource> m_resources
        Cache for resource list result.
    • Method Detail

      • compareTo

        public int compareTo​(org.opencms.file.collectors.I_CmsResourceCollector arg0)
        Specified by:
        compareTo in interface java.lang.Comparable<org.opencms.file.collectors.I_CmsResourceCollector>
        See Also:
        Comparable.compareTo(java.lang.Object)
      • getCreateLink

        public java.lang.String getCreateLink​(org.opencms.file.CmsObject cms)
        Specified by:
        getCreateLink in interface org.opencms.file.collectors.I_CmsResourceCollector
        See Also:
        I_CmsResourceCollector.getCreateLink(org.opencms.file.CmsObject)
      • getCreateLink

        public java.lang.String getCreateLink​(org.opencms.file.CmsObject cms,
                                              java.lang.String collectorName,
                                              java.lang.String param)
        Specified by:
        getCreateLink in interface org.opencms.file.collectors.I_CmsResourceCollector
        See Also:
        I_CmsResourceCollector.getCreateLink(org.opencms.file.CmsObject, java.lang.String, java.lang.String)
      • getCreateParam

        public java.lang.String getCreateParam​(org.opencms.file.CmsObject cms)
        Specified by:
        getCreateParam in interface org.opencms.file.collectors.I_CmsResourceCollector
        See Also:
        I_CmsResourceCollector.getCreateParam(org.opencms.file.CmsObject)
      • getCreateParam

        public java.lang.String getCreateParam​(org.opencms.file.CmsObject cms,
                                               java.lang.String collectorName,
                                               java.lang.String param)
        Specified by:
        getCreateParam in interface org.opencms.file.collectors.I_CmsResourceCollector
        See Also:
        I_CmsResourceCollector.getCreateParam(org.opencms.file.CmsObject, java.lang.String, java.lang.String)
      • getCreateTypeId

        public int getCreateTypeId​(org.opencms.file.CmsObject cms,
                                   java.lang.String collectorName,
                                   java.lang.String param)
        Specified by:
        getCreateTypeId in interface org.opencms.file.collectors.I_CmsResourceCollector
        See Also:
        I_CmsResourceCollector.getCreateTypeId(org.opencms.file.CmsObject, java.lang.String, java.lang.String)
      • getDefaultCollectorName

        public java.lang.String getDefaultCollectorName()
        Specified by:
        getDefaultCollectorName in interface org.opencms.file.collectors.I_CmsResourceCollector
        See Also:
        I_CmsResourceCollector.getDefaultCollectorName()
      • getDefaultCollectorParam

        public java.lang.String getDefaultCollectorParam()
        Specified by:
        getDefaultCollectorParam in interface org.opencms.file.collectors.I_CmsResourceCollector
        See Also:
        I_CmsResourceCollector.getDefaultCollectorParam()
      • getListItems

        public java.util.List<CmsListItemgetListItems​(java.lang.String parameter)
                                                 throws org.opencms.main.CmsException
        Returns a list of list items from a list of resources.

        Specified by:
        getListItems in interface I_CmsListResourceCollector
        Parameters:
        parameter - the collector parameter or null for default.

        Returns:
        a list of CmsListItem objects
        Throws:
        org.opencms.main.CmsException - if something goes wrong
      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface org.opencms.file.collectors.I_CmsResourceCollector
        See Also:
        I_CmsResourceCollector.getOrder()
      • getPublishResources

        public java.util.Set<org.opencms.file.CmsResource> getPublishResources​(org.opencms.file.CmsObject cms,
                                                                               org.opencms.gwt.shared.I_CmsContentLoadCollectorInfo info)
                                                                        throws org.opencms.main.CmsException
        Specified by:
        getPublishResources in interface org.opencms.file.collectors.I_CmsCollectorPublishListProvider
        Throws:
        org.opencms.main.CmsException
        See Also:
        I_CmsCollectorPublishListProvider.getPublishResources(org.opencms.file.CmsObject, org.opencms.gwt.shared.I_CmsContentLoadCollectorInfo)
      • getResource

        public org.opencms.file.CmsResource getResource​(org.opencms.file.CmsObject cms,
                                                        CmsListItem item)
        Returns the resource for the given item.

        Specified by:
        getResource in interface I_CmsListResourceCollector
        Parameters:
        cms - the cms object
        item - the item
        Returns:
        the resource
      • getResources

        public abstract java.util.List<org.opencms.file.CmsResource> getResources​(org.opencms.file.CmsObject cms,
                                                                                  java.util.Map<java.lang.String,​java.lang.String> params)
                                                                           throws org.opencms.main.CmsException
        Returns all, unsorted and unfiltered, resources.

        Be sure to cache the resources.

        Specified by:
        getResources in interface I_CmsListResourceCollector
        Parameters:
        cms - the cms object
        params - the parameter map
        Returns:
        a list of CmsResource objects
        Throws:
        org.opencms.main.CmsException - if something goes wrong
      • getResults

        public java.util.List<org.opencms.file.CmsResource> getResults​(org.opencms.file.CmsObject cms)
                                                                throws org.opencms.main.CmsException
        Specified by:
        getResults in interface org.opencms.file.collectors.I_CmsResourceCollector
        Throws:
        org.opencms.main.CmsException
        See Also:
        I_CmsResourceCollector.getResults(org.opencms.file.CmsObject)
      • getResults

        public java.util.List<org.opencms.file.CmsResource> getResults​(org.opencms.file.CmsObject cms,
                                                                       java.lang.String collectorName,
                                                                       java.lang.String parameter)
                                                                throws org.opencms.main.CmsException
        The parameter must follow the syntax "page:nr" where nr is the number of the page to be displayed.

        Specified by:
        getResults in interface org.opencms.file.collectors.I_CmsResourceCollector
        Throws:
        org.opencms.main.CmsException
        See Also:
        I_CmsResourceCollector.getResults(org.opencms.file.CmsObject, java.lang.String, java.lang.String)
      • getResults

        public java.util.List<org.opencms.file.CmsResource> getResults​(org.opencms.file.CmsObject cms,
                                                                       java.lang.String collectorName,
                                                                       java.lang.String params,
                                                                       int numResults)
                                                                throws org.opencms.main.CmsException
        Specified by:
        getResults in interface org.opencms.file.collectors.I_CmsResourceCollector
        Throws:
        org.opencms.main.CmsException
        See Also:
        I_CmsResourceCollector.getResults(org.opencms.file.CmsObject, java.lang.String, java.lang.String, int)
      • setDefaultCollectorName

        public void setDefaultCollectorName​(java.lang.String collectorName)
        Specified by:
        setDefaultCollectorName in interface org.opencms.file.collectors.I_CmsResourceCollector
        See Also:
        I_CmsResourceCollector.setDefaultCollectorName(java.lang.String)
      • setDefaultCollectorParam

        public void setDefaultCollectorParam​(java.lang.String param)
        The parameter must follow the syntax "mode|projectId" where mode is either "new", "changed", "deleted" or "modified" and projectId is the id of the project to be displayed.

        Specified by:
        setDefaultCollectorParam in interface org.opencms.file.collectors.I_CmsResourceCollector
        See Also:
        I_CmsResourceCollector.setDefaultCollectorParam(java.lang.String)
      • setOrder

        public void setOrder​(int order)
        Specified by:
        setOrder in interface org.opencms.file.collectors.I_CmsResourceCollector
        See Also:
        I_CmsResourceCollector.setOrder(int)
      • createResourceListItem

        protected CmsListItem createResourceListItem​(org.opencms.file.CmsResource resource,
                                                     CmsHtmlList list,
                                                     boolean showPermissions,
                                                     boolean showDateLastMod,
                                                     boolean showUserLastMod,
                                                     boolean showDateCreate,
                                                     boolean showUserCreate,
                                                     boolean showDateRel,
                                                     boolean showDateExp,
                                                     boolean showState,
                                                     boolean showLockedBy,
                                                     boolean showSite)
        Returns a list item created from the resource information, differs between valid resources and invalid resources.

        Parameters:
        resource - the resource to create the list item from
        list - the list
        showPermissions - if to show permissions
        showDateLastMod - if to show the last modification date
        showUserLastMod - if to show the last modification user
        showDateCreate - if to show the creation date
        showUserCreate - if to show the creation date
        showDateRel - if to show the date released
        showDateExp - if to show the date expired
        showState - if to show the state
        showLockedBy - if to show the lock user
        showSite - if to show the site
        Returns:
        a list item created from the resource information
      • getDummyListItem

        protected CmsListItem getDummyListItem​(CmsHtmlList list)
        Returns a dummy list item.

        Parameters:
        list - the list object to create the entry for
        Returns:
        a dummy list item
      • getInternalResources

        protected java.util.List<org.opencms.file.CmsResource> getInternalResources​(org.opencms.file.CmsObject cms,
                                                                                    java.util.Map<java.lang.String,​java.lang.String> params)
                                                                             throws org.opencms.main.CmsException
        Wrapper method for caching the result of getResources(CmsObject, Map).

        Parameters:
        cms - the cms object
        params - the parameter map
        Returns:
        the result of getResources(CmsObject, Map)
        Throws:
        org.opencms.main.CmsException - if something goes wrong
      • getResourceNamesFromParam

        protected java.util.List<java.lang.String> getResourceNamesFromParam​(java.util.Map<java.lang.String,​java.lang.String> params)
        Returns the list of resource names from the parameter map.

        Parameters:
        params - the parameter map
        Returns:
        the list of resource names
        See Also:
        I_CmsListResourceCollector.PARAM_RESOURCES
      • getState

        protected CmsListState getState​(java.util.Map<java.lang.String,​java.lang.String> params)
        Returns the state of the parameter map.

        Parameters:
        params - the parameter map
        Returns:
        the state of the list from the parameter map
      • setAdditionalColumns

        protected abstract void setAdditionalColumns​(CmsListItem item,
                                                     org.opencms.workplace.explorer.CmsResourceUtil resUtil)
        Set additional column entries for a resource.

        Overwrite this method to set additional column entries.

        Parameters:
        item - the current list item
        resUtil - the resource util object for getting the info from
      • setResourcesParam

        protected void setResourcesParam​(java.util.List<java.lang.String> resources)
        Sets the resources parameter.

        Parameters:
        resources - the list of resource names to use