org.opencms.workplace.commons
Class CmsListResourceLinkRelationCollector

java.lang.Object
  extended by org.opencms.workplace.list.A_CmsListResourceCollector
      extended by org.opencms.workplace.commons.CmsListResourceLinkRelationCollector
All Implemented Interfaces:
java.lang.Comparable, I_CmsResourceCollector, I_CmsListResourceCollector

public class CmsListResourceLinkRelationCollector
extends A_CmsListResourceCollector

Collector for resources with relations to a given resource.

Since:
6.9.1
Version:
$Revision: 1.9 $
Author:
Raphael Schnuck

Field Summary
protected static org.apache.commons.logging.Log LOG
          The log object for this class.
 
Fields inherited from class org.opencms.workplace.list.A_CmsListResourceCollector
m_collectorParameter, m_liCache, m_resCache, m_resources, VFS_PATH_NONE
 
Fields inherited from interface org.opencms.workplace.list.I_CmsListResourceCollector
PARAM_FILTER, PARAM_ORDER, PARAM_PAGE, PARAM_RESOURCES, PARAM_SORTBY, SEP_KEYVAL, SEP_PARAM
 
Constructor Summary
CmsListResourceLinkRelationCollector(A_CmsListExplorerDialog wp, java.lang.String resource, boolean isSource)
          Public constructor.
 
Method Summary
 java.util.List getCollectorNames()
          Returns a list of all collector names (Strings) this collector implementation supports.
 java.lang.String getResource()
          Returns the resource.
 CmsResource getResource(CmsObject cms, CmsListItem item)
          Returns the resource for the given item.
 java.util.List getResources(CmsObject cms, java.util.Map params)
          Returns all, unsorted and unfiltered, resources.
 boolean isSource()
          Returns the isSource.
protected  void setAdditionalColumns(CmsListItem item, CmsResourceUtil resUtil)
          Set additional column entries for a resource.
 void setResource(java.lang.String resource)
          Sets the resource.
 void setSource(boolean isSource)
          Sets the isSource.
 
Methods inherited from class org.opencms.workplace.list.A_CmsListResourceCollector
compareTo, createResourceListItem, getCreateLink, getCreateLink, getCreateParam, getCreateParam, getDefaultCollectorName, getDefaultCollectorParam, getDummyListItem, getInternalResources, getListItems, getOrder, getResourceNamesFromParam, getResults, getResults, getState, getWp, setDefaultCollectorName, setDefaultCollectorParam, setOrder, setPage, setResourcesParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG
The log object for this class.

Constructor Detail

CmsListResourceLinkRelationCollector

public CmsListResourceLinkRelationCollector(A_CmsListExplorerDialog wp,
                                            java.lang.String resource,
                                            boolean isSource)
Public constructor.

Parameters:
wp - the current list explorer dialog
resource - the current resource to get link relations for
isSource - indicates if the current request shows the source resources for the relations are shown
Method Detail

getCollectorNames

public java.util.List getCollectorNames()
Description copied from interface: I_CmsResourceCollector
Returns a list of all collector names (Strings) this collector implementation supports.

Returns:
a list of all collector names this collector implementation supports
See Also:
I_CmsResourceCollector.getCollectorNames()

getResource

public java.lang.String getResource()
Returns the resource.

Returns:
the resource

getResource

public CmsResource getResource(CmsObject cms,
                               CmsListItem item)
Description copied from class: A_CmsListResourceCollector
Returns the resource for the given item.

Specified by:
getResource in interface I_CmsListResourceCollector
Overrides:
getResource in class A_CmsListResourceCollector
Parameters:
cms - the cms object
item - the item
Returns:
the resource
See Also:
A_CmsListResourceCollector.getResource(org.opencms.file.CmsObject, org.opencms.workplace.list.CmsListItem)

getResources

public java.util.List getResources(CmsObject cms,
                                   java.util.Map params)
Description copied from class: A_CmsListResourceCollector
Returns all, unsorted and unfiltered, resources.

Be sure to cache the resources.

Specified by:
getResources in interface I_CmsListResourceCollector
Specified by:
getResources in class A_CmsListResourceCollector
Parameters:
cms - the cms object
params - the parameter map
Returns:
a list of CmsResource objects
See Also:
A_CmsListResourceCollector.getResources(org.opencms.file.CmsObject, java.util.Map)

isSource

public boolean isSource()
Returns the isSource.

Returns:
the isSource

setResource

public void setResource(java.lang.String resource)
Sets the resource.

Parameters:
resource - the resource to set

setSource

public void setSource(boolean isSource)
Sets the isSource.

Parameters:
isSource - the isSource to set

setAdditionalColumns

protected void setAdditionalColumns(CmsListItem item,
                                    CmsResourceUtil resUtil)
Description copied from class: A_CmsListResourceCollector
Set additional column entries for a resource.

Overwrite this method to set additional column entries.

Specified by:
setAdditionalColumns in class A_CmsListResourceCollector
Parameters:
item - the current list item
resUtil - the resource util object for getting the info from
See Also:
A_CmsListResourceCollector.setAdditionalColumns(org.opencms.workplace.list.CmsListItem, org.opencms.workplace.explorer.CmsResourceUtil)