SAP NetWeaver '04

com.sapportals.wcm.rendering.base
Interface IRendererStatus

[contained in: com.sap.km.cm.ui.flex.par - km.shared.ui.flex.base_api.jar]
All Superinterfaces:
IControlStatus, IMassDataControlStatus
All Known Subinterfaces:
IConfigurableRendererStatus

public interface IRendererStatus
extends IControlStatus, IMassDataControlStatus

allows to keep data regarding a list of IResource and metadata about that list across http-request-cycles, so that rendering classes such as an ICollectionRenderer can use this as persistence mechanism. The status supports some basic user-resourcelist-interactions such as sorting, filtering and selection. The status only creates new IResource elements (which is an expensive operation) in the methods refresh setTypedResourceList setParent For the sort method, only the ResourcePropertyComparator attribute is used, not the SortDefinition attribute. This attribute is only needed by the classes which use this status as a model to persist their data across http-requests.

Since:
EP5 SP6 and EP6 SP1

Field Summary
static FieldIdentifier DESELECT_ALL
           
static FieldIdentifier ID
           
static FieldIdentifier NAME
           
static FieldIdentifier SELECT_ALL
           
 
Method Summary
 void filter()
          filters the internal list of resources.
 ResourcePropertyComparator getComparator()
           
 int getCurrentIndex()
           
 FieldSet getFieldSet(IResource res)
           
 ICollection getParent()
          returns the ICollection, whose children are handled within this status.
 com.sapportals.wcm.control.util.property.IPropertyColumn[] getPropertyColumns()
           
 IResource getResource(int index)
           
 IResourceList getResourceList()
          returns an IResourceList that does not have to be equal to either the ITypedResourceList or the result of the getChildren method on the ICollection attribute.
 IResourceList getSelectedResources()
           
 SortDefinition getSortDefintion()
           
 ITypedResourceList getTypedResourceList()
          returns the ITypedResourceList, whose elements are handled within this status.
 boolean hasMore()
          flag telling if all IResource objects that belong to the ICollection or the TypedResourceList attribute have already been instantiated (and added to the internal resourcelist) or not.
 void refresh()
          reloads resources from RF revokes all selections
 void setComparator(ResourcePropertyComparator comp)
          sets the ResourcePropertyComparator attribute of the status.
 void setCurrentIndex(int index)
          sets the index-attribute of the status to the given value.
 void setFilter(com.sapportals.wcm.service.resourcelistfilter.IResourceListFilter filter)
          sets the class, that is used to filter out resources from the given parent-collection or the ITypedResourceList.
 void setFilterParameters(com.sapportals.wcm.repository.service.layout.customizing.IParameters filterparameters)
          sets the parameters, that are used by the IResourceListFilter to determine which resources are to be filtered out.
 void setParent(ICollection parent)
          sets the collection whose children are to be handled within this status.
 void setPropertyColumns(com.sapportals.wcm.control.util.property.IPropertyColumn[] columns)
           
 void setSortDefinition(SortDefinition sd)
          sets the SortDefinition attribute of the status.
 void setTypedResourceList(ITypedResourceList list, IResourceContext context)
          sets the ITypedResourceList, whose elements are handled within this status.
 void sort()
          sorts the internal list of resources.
 
Methods inherited from interface com.sapportals.wcm.util.controlstatus.IControlStatus
execute, execute, getAction, getActions, getField, getFields, getID, getStatusInformation, setID
 
Methods inherited from interface com.sapportals.wcm.util.controlstatus.IMassDataControlStatus
getEntrySize, getFieldSet, getMassFields
 

Field Detail

ID

public static final FieldIdentifier ID

NAME

public static final FieldIdentifier NAME

SELECT_ALL

public static final FieldIdentifier SELECT_ALL

DESELECT_ALL

public static final FieldIdentifier DESELECT_ALL
Method Detail

getResourceList

public IResourceList getResourceList()
returns an IResourceList that does not have to be equal to either the ITypedResourceList or the result of the getChildren method on the ICollection attribute. It may be different because of the sort and filter methods or any other operation the implementing class decides to perform. As an implementation rule, a new creation of IResource elements to fill this list should be avoided due to the performance overhead associated with that operation.
Returns:
an IResourceList that might be empty. Must not return null.

setParent

public void setParent(ICollection parent)
               throws WcmException
sets the collection whose children are to be handled within this status. Any filtering of these children can only be done via the filter method of this status. If this method is called, the status will throw away all selection information and recreate its internal list of resources. The setTypedResourceList shows a similar behavior. Must not be null.
Throws:
WcmException, - if the RepositoryFramework does so

getParent

public ICollection getParent()
returns the ICollection, whose children are handled within this status. Might be null.

getTypedResourceList

public ITypedResourceList getTypedResourceList()
returns the ITypedResourceList, whose elements are handled within this status. Might be null or might be of size 0.

setTypedResourceList

public void setTypedResourceList(ITypedResourceList list,
                                 IResourceContext context)
                          throws WcmException
sets the ITypedResourceList, whose elements are handled within this status. Must not be null but might be of size 0. The second parameter, the context, is needed to set the IResourceContext attribute of the status. This is normally retrieved from an IResource within the list, but the list might be empty.
Throws:
WcmException, - if the RepositoryFramework does so

setCurrentIndex

public void setCurrentIndex(int index)
                     throws WcmException
sets the index-attribute of the status to the given value. This is needed e.g. to store the part of the resourcelist that is currently displayed within an iView.
Throws:
an - IndexOutOfBoundsException, if it is set to a value that exceeds the number of IResources within this status. If not all elements of the ITypedResourceList or all children of the ICollection have been retrieved yet (e.g. because of performance reasons), this method might trigger a refresh of the list and increase that number.

getCurrentIndex

public int getCurrentIndex()
                    throws WcmException
Returns:
the current position within the internal list of IResource objects.

getResource

public IResource getResource(int index)
Returns:
the IResource that is situated at this position of the internal list of IResource objects. Note that this position might change due to sort and filter methods. Returns null, if the parameter exceeds the size of the internal list.

getFieldSet

public FieldSet getFieldSet(IResource res)
Returns:
the FieldSet defined for this IResource. This set is needed to e.g. change the selection state of the resource.

getSelectedResources

public IResourceList getSelectedResources()

setSortDefinition

public void setSortDefinition(SortDefinition sd)
sets the SortDefinition attribute of the status. Might be null.

getSortDefintion

public SortDefinition getSortDefintion()
Returns:
the SortDefinition attribute of the status. Might be null.

setComparator

public void setComparator(ResourcePropertyComparator comp)
sets the ResourcePropertyComparator attribute of the status. Might be null.

getComparator

public ResourcePropertyComparator getComparator()
Returns:
the ResourcePropertyComparator attribute of the status. Might be null.

setPropertyColumns

public void setPropertyColumns(com.sapportals.wcm.control.util.property.IPropertyColumn[] columns)

getPropertyColumns

public com.sapportals.wcm.control.util.property.IPropertyColumn[] getPropertyColumns()
Returns:
the IPropertyColumn[] attribute of the status. Might be null.

sort

public void sort()
sorts the internal list of resources. It uses the ResourcePropertyComparator attribute to do this sorting. If that attribute is null, no sorting will be done and the list will be sorted as it was before this method was called.

filter

public void filter()
            throws WcmException
filters the internal list of resources. The selection status of all IResource objects will be set to false, if and only if at least one of the two attributes IResourceListFilter or (IParameters has changed since the last call of this method.
Throws:
WcmException - if the filtering class throws it

setFilter

public void setFilter(com.sapportals.wcm.service.resourcelistfilter.IResourceListFilter filter)
sets the class, that is used to filter out resources from the given parent-collection or the ITypedResourceList. A change of this parameter will result in a new filtering, if the filter method is called afterwards. The call of this method alone does not lead to a new filtering (and a reset of selected resources).
Parameters:
filter - the filter instance to use, can be null

setFilterParameters

public void setFilterParameters(com.sapportals.wcm.repository.service.layout.customizing.IParameters filterparameters)
sets the parameters, that are used by the IResourceListFilter to determine which resources are to be filtered out. A change of this parameter will result in a new filtering, if the filter method is called afterwards. The call of this method alone does not lead to a new filtering (and a reset of selected resources).
Parameters:
filterparameters - determine which rules apply to filtering, can be null

refresh

public void refresh()
             throws WcmException
reloads resources from RF revokes all selections

hasMore

public boolean hasMore()
flag telling if all IResource objects that belong to the ICollection or the TypedResourceList attribute have already been instantiated (and added to the internal resourcelist) or not.

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.