org.olat.repository
Class RepositoryEntryTypeColumnDescriptor

java.lang.Object
  extended by org.olat.core.gui.components.table.DefaultColumnDescriptor
      extended by org.olat.core.gui.components.table.CustomRenderColumnDescriptor
          extended by org.olat.repository.RepositoryEntryTypeColumnDescriptor
All Implemented Interfaces:
ColumnDescriptor

public class RepositoryEntryTypeColumnDescriptor
extends CustomRenderColumnDescriptor

Description:
This repository entry type column descriptor displays a CSS icon to represent the resource type. The underlying data model must provide an object of type RepositoryEntry

Initial Date: 16.04.2008

Author:
Florian Gnägi, http://www.frentix.com

Field Summary
 
Fields inherited from class org.olat.core.gui.components.table.DefaultColumnDescriptor
DEFAULT_POPUP_ATTRIBUTES
 
Fields inherited from interface org.olat.core.gui.components.table.ColumnDescriptor
ALIGNMENT_CENTER, ALIGNMENT_LEFT, ALIGNMENT_RIGHT
 
Constructor Summary
RepositoryEntryTypeColumnDescriptor(java.lang.String headerKey, int dataColumn, java.lang.String action, java.util.Locale locale, int aligment)
          Constructor for this repo entry type column descriptor.
 
Method Summary
 int compareTo(int rowa, int rowb)
          We override the compare method because we want to sort on the resourceable type name of the contained olat resource and not on the object.
 
Methods inherited from class org.olat.core.gui.components.table.CustomRenderColumnDescriptor
renderValue, toString
 
Methods inherited from class org.olat.core.gui.components.table.DefaultColumnDescriptor
getAction, getAlignment, getHeaderKey, getHrefGenerator, getLocale, getPopUpWindowAttributes, isPopUpWindowAction, isSortingAllowed, modelChanged, otherColumnDescriptorSorted, setAlignment, setHrefGenerator, setIsPopUpWindowAction, setTable, setTranslateHeaderKey, sortingAboutToStart, translateHeaderKey
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryEntryTypeColumnDescriptor

public RepositoryEntryTypeColumnDescriptor(java.lang.String headerKey,
                                           int dataColumn,
                                           java.lang.String action,
                                           java.util.Locale locale,
                                           int aligment)
Constructor for this repo entry type column descriptor.

Parameters:
headerKey -
dataColumn -
action -
locale -
aligment -
Method Detail

compareTo

public int compareTo(int rowa,
                     int rowb)
We override the compare method because we want to sort on the resourceable type name of the contained olat resource and not on the object. Alternatively we could have implemented the Comparable interface on the Repository entry, however this would have been missleading because this compare does not compare the repository entries itself but only the resource type names.

Specified by:
compareTo in interface ColumnDescriptor
Overrides:
compareTo in class DefaultColumnDescriptor
Returns:
See Also:
DefaultColumnDescriptor.compareTo(int, int)