com.sapportals.wcm.rendering.collection

Interface ICollectionRenderer

All Superinterfaces:
IDelegatedReceiver, ILayoutObject
All Known Implementing Classes:
AbstractCollectionRenderer, LightCollectionRenderer

public interface ICollectionRenderer
extends ILayoutObject, IDelegatedReceiver

The implementing class renders the given ICollection or TypedResourceList. Classes should not be directly accessible but only through the CollectionRendererFactory. Implementing classes can - but do not have to - react on the parameters that are available for the given resource.


Field Summary
static String ORDERED_COLLECTION
          ordered list behavior - entries and keys for Cache
static String SORTED
           
static String UNSORTED
           
 
Fields inherited from interface com.sapportals.wcm.rendering.base.ILayoutObject
DEF_VALUE, KEY, LINE_BREAK
 
Method Summary
 String getID()
           
 IResourceContext getResourceContext()
           
 void readInputData(DynPage page)
          reads out the input of the modifiable Components rendered by the implementing class.
 void refresh()
          asks the implementing class to refresh its list of IResource objects.
 Component renderAll()
           
 void setParentCollection(ICollection collection)
          is called from the factory after instantiating a new collection renderer to set the collection which has to be rendered.
 void setResourceContext(IResourceContext context)
          sets the context-attribute for the renderer.
 void setSortDefinition(SortDefinition sd)
          sets the sort-definition attribute for the implementing class.
 void setTypedResourceList(ITypedResourceList resourcelist)
          is called from the factory after instantiating a new collection renderer to set the resourceList which has to be rendered.
 
Methods inherited from interface com.sapportals.wcm.rendering.base.ILayoutObject
getAlias, getConfiguration, getFlavor, getNewInstance, getParameter, getParameters, getSupportedParameters, is508enabled, setAlias, setFlavor, setParameter, setParameters, setProxy
 
Methods inherited from interface com.sapportals.wcm.rendering.base.IDelegatedReceiver
onEvent
 

Field Detail

ORDERED_COLLECTION

public static final String ORDERED_COLLECTION
ordered list behavior - entries and keys for Cache

See Also:
Constant Field Values

UNSORTED

public static final String UNSORTED
See Also:
Constant Field Values

SORTED

public static final String SORTED
See Also:
Constant Field Values
Method Detail

renderAll

public Component renderAll()
                    throws WcmException
Returns:
Component an htmlb-Component that will be displayed. The calling class can include this component in another htmlb-Component.
Throws:
WcmException

setParentCollection

public void setParentCollection(ICollection collection)
is called from the factory after instantiating a new collection renderer to set the collection which has to be rendered. Instead of this method, the setTypedResourceList(ITypedResourceList resourcelist) method is called, i.e. when a search result has to be rendered.

Parameters:
collection - the collection to render (and whose chidren to render)

setTypedResourceList

public void setTypedResourceList(ITypedResourceList resourcelist)
is called from the factory after instantiating a new collection renderer to set the resourceList which has to be rendered. Instead of this method, the setParentCollection(ICollection collection) method is called, i.e. when a folder has to be rendered

Parameters:
resourcelist - the resourcelist to render (and whose members to render)

setResourceContext

public void setResourceContext(IResourceContext context)
sets the context-attribute for the renderer. Must not be null


getResourceContext

public IResourceContext getResourceContext()
Returns:
the context-attribute of the renderer. Does not return null

getID

public String getID()
Returns:
the ID of the renderer. The renderer can obtain an ID that will be unique within one browser window by using the return value of IProxy's method register. This ID will be stable over http-requests.

readInputData

public void readInputData(DynPage page)
                   throws WcmException
reads out the input of the modifiable Components rendered by the implementing class.

Throws:
WcmException

setSortDefinition

public void setSortDefinition(SortDefinition sd)
sets the sort-definition attribute for the implementing class. This definition is used to specify the property the list is sorted by as well as the direction (top-down vs. bottom-up) of the sorting.


refresh

public void refresh()
asks the implementing class to refresh its list of IResource objects. This is needed, if a list that is displayed by this is modified after this has created its internal representation of these resources. This call is only useful, if the setParentCollection or setTypedResourceList method has been invoked in advance. This method can be very expensive, depending on the size of the resource list and the ordering and filtering calls that have to be carried out. In a standard scenario, this call is not needed, as the IProxyControl will refresh automatically all resource-list representations that use the proxy as persistence-layer. Implementations such as the AbstractCollectionRenderer may not react on this method at all, as they do not persist their resource list representations and therefore always have an up-to-date representation.



Copyright 2006 SAP AG Complete Copyright Notice