SAP NetWeaver '04

com.sapportals.wcm.rendering.collection
Class AbstractRendererStatus

[contained in: com.sap.km.cm.ui.flex.par - km.shared.ui.flex.collection_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.rendering.collection.AbstractRendererStatus
All Implemented Interfaces:
IConfigurableRendererStatus, IControlStatus, IMassDataControlStatus, IRendererStatus, IVolatileStatus
Direct Known Subclasses:
CollectionRendererStatus, SearchRendererStatus

public abstract class AbstractRendererStatus
extends java.lang.Object
implements IConfigurableRendererStatus, IVolatileStatus

Since:
EP5 SP6 and EP6 SP1

Inner Class Summary
 class AbstractRendererStatus.CompleteResource
           
 class AbstractRendererStatus.CompleteResourceComparator
           
 
Field Summary
protected  FieldSet actions
           
protected  IResourceContext context
           
protected  ITypedResourceList list
           
 
Fields inherited from interface com.sapportals.wcm.rendering.base.IRendererStatus
DESELECT_ALL, ID, NAME, SELECT_ALL
 
Constructor Summary
AbstractRendererStatus()
           
 
Method Summary
 StatusInformation execute(IExecutable execution)
          carries out the action described by the given parameter.
 StatusInformation execute(java.lang.String execution)
          different signature for this method.
 void filter()
          filters the current IResourceList attribute of the status using the set IResourceListFilter and the IParameters.
 IExecutable getAction(FieldIdentifier ident)
          returns the IExecutable with the given ident-parameter or null, if no such instance could be found.
 ResourcePropertyComparator getComparator()
           
 int getCurrentIndex()
           
 int getEntrySize()
          returns the number of entries that are managed within this status
 IField getField(FieldIdentifier ident)
          returns the field with the given ident-parameter or null, if no such instance could be found.
 java.util.List getFields()
          returns a list with all fields defined by the implementing class
 FieldSet getFieldSet(int index)
          returns the fieldset for the given index.
 FieldSet getFieldSet(IResource res)
           
protected  com.sapportals.wcm.service.resourcelistfilter.IResourceListFilter getFilter()
           
protected  com.sapportals.wcm.repository.service.layout.customizing.IParameters getFilterParameters()
           
 java.lang.String getID()
          returns the ID under which this status was registered by the Service
 java.util.List getMassFields()
          returns all fields that will be available for the managed types of this class.
protected  java.util.Hashtable getParameters()
           
 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.
 java.lang.String getResourceTypeMapping()
           
 IResourceList getSelectedResources()
           
 SortDefinition getSortDefintion()
           
 StatusInformation getStatusInformation()
          returns the status of the implementing class.
 ITypedResourceList getTypedResourceList()
          returns the ITypedResourceList, whose elements are handled within this status.
 boolean hasMore()
          flag telling, if all resources available for the given parent or the given resourcelist are included in the presently returned resourcelist.
protected  void initializeSelectionList()
           
 boolean isVolatile()
           
 void refresh()
          reloads resources from RF revokes all selections filters and sorts depending on the settings
 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 setID(java.lang.String ID)
          sets the ID under which this status was registered by the service this field is set by the service and must not be altered afterwards.
 void setParameters(java.util.Hashtable parameters)
           
 void setParent(ICollection collection)
          sets the parent collection for the status.
 void setPropertyColumns(com.sapportals.wcm.control.util.property.IPropertyColumn[] columns)
           
 void setResourceTypeMapping(java.lang.String mapping)
           
 void setSortDefinition(SortDefinition sd)
          sets the SortDefinition attribute of the status.
 void setTypedResourceList(ITypedResourceList resourcelist, IResourceContext context)
          sets the typed resource list attribute for this status At the same time, it sets the internal attribute for an ICollection to null to prevent that a resource list and a collection with children are active within the status at the same time.
 void sort()
          sorts the internal list of resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sapportals.wcm.rendering.base.IConfigurableRendererStatus
getNewInstance
 
Methods inherited from interface com.sapportals.wcm.util.controlstatus.IControlStatus
getActions
 

Field Detail

list

protected ITypedResourceList list

context

protected IResourceContext context

actions

protected FieldSet actions
Constructor Detail

AbstractRendererStatus

public AbstractRendererStatus()
Method Detail

isVolatile

public boolean isVolatile()
Specified by:
isVolatile in interface IVolatileStatus
Following copied from interface: com.sapportals.wcm.rendering.base.IVolatileStatus
Returns:
flag stating if the status might be deleted after the first click or not. return true, if it might be deleted.

setParameters

public void setParameters(java.util.Hashtable parameters)
Specified by:
setParameters in interface IConfigurableRendererStatus

getParameters

protected java.util.Hashtable getParameters()

getResourceTypeMapping

public java.lang.String getResourceTypeMapping()
Specified by:
getResourceTypeMapping in interface IConfigurableRendererStatus

setResourceTypeMapping

public void setResourceTypeMapping(java.lang.String mapping)
Specified by:
setResourceTypeMapping in interface IConfigurableRendererStatus

setParent

public void setParent(ICollection collection)
               throws WcmException
sets the parent collection for the status. At the same time, it sets the internal attribute for a ITypedResourceList to null to prevent that a resource list and a collection with children are active within the status at the same time.
Specified by:
setParent in interface IRendererStatus
Following copied from interface: com.sapportals.wcm.rendering.base.IRendererStatus
Throws:
WcmException, - if the RepositoryFramework does so

setTypedResourceList

public void setTypedResourceList(ITypedResourceList resourcelist,
                                 IResourceContext context)
                          throws WcmException
sets the typed resource list attribute for this status At the same time, it sets the internal attribute for an ICollection to null to prevent that a resource list and a collection with children are active within the status at the same time.
Specified by:
setTypedResourceList in interface IRendererStatus
Following copied from interface: com.sapportals.wcm.rendering.base.IRendererStatus
Throws:
WcmException, - if the RepositoryFramework does so

getParent

public ICollection getParent()
Description copied from interface: IRendererStatus
returns the ICollection, whose children are handled within this status. Might be null.
Specified by:
getParent in interface IRendererStatus

getTypedResourceList

public ITypedResourceList getTypedResourceList()
Description copied from interface: IRendererStatus
returns the ITypedResourceList, whose elements are handled within this status. Might be null or might be of size 0.
Specified by:
getTypedResourceList in interface IRendererStatus

setPropertyColumns

public void setPropertyColumns(com.sapportals.wcm.control.util.property.IPropertyColumn[] columns)
Specified by:
setPropertyColumns in interface IRendererStatus

getPropertyColumns

public com.sapportals.wcm.control.util.property.IPropertyColumn[] getPropertyColumns()
Specified by:
getPropertyColumns in interface IRendererStatus
Following copied from interface: com.sapportals.wcm.rendering.base.IRendererStatus
Returns:
the IPropertyColumn[] attribute of the status. Might be null.

getCurrentIndex

public int getCurrentIndex()
                    throws WcmException
Specified by:
getCurrentIndex in interface IRendererStatus
Following copied from interface: com.sapportals.wcm.rendering.base.IRendererStatus
Returns:
the current position within the internal list of IResource objects.

setCurrentIndex

public void setCurrentIndex(int index)
                     throws WcmException
Description copied from interface: IRendererStatus
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.
Specified by:
setCurrentIndex in interface IRendererStatus
Following copied from interface: com.sapportals.wcm.rendering.base.IRendererStatus
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.

setSortDefinition

public void setSortDefinition(SortDefinition sd)
Description copied from interface: IRendererStatus
sets the SortDefinition attribute of the status. Might be null.
Specified by:
setSortDefinition in interface IRendererStatus

getSortDefintion

public SortDefinition getSortDefintion()
Specified by:
getSortDefintion in interface IRendererStatus
Following copied from interface: com.sapportals.wcm.rendering.base.IRendererStatus
Returns:
the SortDefinition attribute of the status. Might be null.

getEntrySize

public int getEntrySize()
Description copied from interface: IMassDataControlStatus
returns the number of entries that are managed within this status
Specified by:
getEntrySize in interface IMassDataControlStatus
Following copied from interface: com.sapportals.wcm.util.controlstatus.IMassDataControlStatus
Returns:
entrySize

setComparator

public void setComparator(ResourcePropertyComparator comp)
Description copied from interface: IRendererStatus
sets the ResourcePropertyComparator attribute of the status. Might be null.
Specified by:
setComparator in interface IRendererStatus

getComparator

public ResourcePropertyComparator getComparator()
Specified by:
getComparator in interface IRendererStatus
Following copied from interface: com.sapportals.wcm.rendering.base.IRendererStatus
Returns:
the ResourcePropertyComparator attribute of the status. Might be null.

getMassFields

public java.util.List getMassFields()
Description copied from interface: IMassDataControlStatus
returns all fields that will be available for the managed types of this class. The returned fields could not hold any values, but will provide meta-information and the according FieldIdentifier values.
Specified by:
getMassFields in interface IMassDataControlStatus
Following copied from interface: com.sapportals.wcm.util.controlstatus.IMassDataControlStatus
Returns:
massFields

sort

public void sort()
Description copied from interface: IRendererStatus
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.
Specified by:
sort in interface IRendererStatus

refresh

public void refresh()
             throws WcmException
reloads resources from RF revokes all selections filters and sorts depending on the settings
Specified by:
refresh in interface IRendererStatus

filter

public void filter()
            throws WcmException
filters the current IResourceList attribute of the status using the set IResourceListFilter and the IParameters. If one of these is null, no filtering will be done, but a logging entry is written. Also, if the list has been filtered before and no new information has been provided by either
setting a new IResourceListFilter
setting new IParameters or
calling the refresh() method
the method will not call the filter algorithm again due to performance reasons.
Also, this method will set the current index back to 0, because the index as it was might exceed the number of elements left over after the filtering.
The list of selected resources will be reseted as well, so no elements will be selected.
Specified by:
filter in interface IRendererStatus
Following copied from interface: com.sapportals.wcm.rendering.base.IRendererStatus
Throws:
WcmException - if the filtering class throws it

setFilter

public void setFilter(com.sapportals.wcm.service.resourcelistfilter.IResourceListFilter filter)
Description copied from interface: IRendererStatus
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).
Specified by:
setFilter in interface IRendererStatus
Following copied from interface: com.sapportals.wcm.rendering.base.IRendererStatus
Parameters:
filter - the filter instance to use, can be null

getFilter

protected com.sapportals.wcm.service.resourcelistfilter.IResourceListFilter getFilter()

setFilterParameters

public void setFilterParameters(com.sapportals.wcm.repository.service.layout.customizing.IParameters filterparameters)
Description copied from interface: IRendererStatus
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).
Specified by:
setFilterParameters in interface IRendererStatus
Following copied from interface: com.sapportals.wcm.rendering.base.IRendererStatus
Parameters:
filterparameters - determine which rules apply to filtering, can be null

getFilterParameters

protected com.sapportals.wcm.repository.service.layout.customizing.IParameters getFilterParameters()

getResourceList

public IResourceList getResourceList()
Description copied from interface: IRendererStatus
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.
Specified by:
getResourceList in interface IRendererStatus
Following copied from interface: com.sapportals.wcm.rendering.base.IRendererStatus
Returns:
an IResourceList that might be empty. Must not return null.

getFieldSet

public FieldSet getFieldSet(int index)
returns the fieldset for the given index. A FieldSet is always associated with an IResource.
Specified by:
getFieldSet in interface IMassDataControlStatus
Following copied from interface: com.sapportals.wcm.util.controlstatus.IMassDataControlStatus
Parameters:
index - TBD: Description of the incoming method parameter
Returns:
fieldSet

getFieldSet

public FieldSet getFieldSet(IResource res)
Specified by:
getFieldSet in interface IRendererStatus
Following copied from interface: com.sapportals.wcm.rendering.base.IRendererStatus
Returns:
the FieldSet defined for this IResource. This set is needed to e.g. change the selection state of the resource.

initializeSelectionList

protected void initializeSelectionList()
                                throws WcmException

getSelectedResources

public IResourceList getSelectedResources()
Specified by:
getSelectedResources in interface IRendererStatus

getResource

public IResource getResource(int index)
Specified by:
getResource in interface IRendererStatus
Following copied from interface: com.sapportals.wcm.rendering.base.IRendererStatus
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.

execute

public StatusInformation execute(IExecutable execution)
                          throws WcmException
carries out the action described by the given parameter.
Specified by:
execute in interface IControlStatus
Returns:
the status of the execution - can be null.

execute

public StatusInformation execute(java.lang.String execution)
                          throws WcmException
different signature for this method. The implementation must iterate through its defined list of IExecutable objects. If the given parameter matches the IExecutable's getIdentifier.getID, this IExecutable must be passed to the other signature of this method.
Specified by:
execute in interface IControlStatus
Throws:
WcmException, - if no matching class could be found.

getField

public IField getField(FieldIdentifier ident)
returns the field with the given ident-parameter or null, if no such instance could be found.
Specified by:
getField in interface IControlStatus
Following copied from interface: com.sapportals.wcm.util.controlstatus.IControlStatus
Parameters:
ident - TBD: Description of the incoming method parameter
Returns:
field

getAction

public IExecutable getAction(FieldIdentifier ident)
returns the IExecutable with the given ident-parameter or null, if no such instance could be found.
Specified by:
getAction in interface IControlStatus
Following copied from interface: com.sapportals.wcm.util.controlstatus.IControlStatus
Parameters:
ident - TBD: Description of the incoming method parameter
Returns:
action

getFields

public java.util.List getFields()
returns a list with all fields defined by the implementing class
Specified by:
getFields in interface IControlStatus
Following copied from interface: com.sapportals.wcm.util.controlstatus.IControlStatus
Returns:
fields

getStatusInformation

public StatusInformation getStatusInformation()
returns the status of the implementing class. This status is obtained by asking all of the fields of the implementing class for their status. The first class, that returns a status != null will be used and its status will be returned. Consequently, this method might return null
Specified by:
getStatusInformation in interface IControlStatus
Following copied from interface: com.sapportals.wcm.util.controlstatus.IControlStatus
Returns:
statusInformation

hasMore

public boolean hasMore()
flag telling, if all resources available for the given parent or the given resourcelist are included in the presently returned resourcelist.
Specified by:
hasMore in interface IRendererStatus
Returns:
false, if all resources are included

getID

public java.lang.String getID()
Description copied from interface: IControlStatus
returns the ID under which this status was registered by the Service
Specified by:
getID in interface IControlStatus
Following copied from interface: com.sapportals.wcm.util.controlstatus.IControlStatus
Returns:
iD

setID

public void setID(java.lang.String ID)
Description copied from interface: IControlStatus
sets the ID under which this status was registered by the service this field is set by the service and must not be altered afterwards.
Specified by:
setID in interface IControlStatus
Following copied from interface: com.sapportals.wcm.util.controlstatus.IControlStatus
Parameters:
id - iD to be set

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.