com.sapportals.wcm.rendering.collection

Class CLPRendererStatus

java.lang.Object
  extended by com.sapportals.wcm.rendering.collection.CLPRendererStatus
All Implemented Interfaces:
IConfigurableRendererStatus, IRendererStatus, IVolatileStatus, IControlStatus, IMassDataControlStatus

public class CLPRendererStatus
extends Object
implements IConfigurableRendererStatus, IVolatileStatus


Field Summary
protected  FieldSet actions
           
static FieldIdentifier[] ACTIONS
           
protected  IPropertyColumn[] columns
           
protected  ResourcePropertyComparator comparator
           
protected  IResourceContext context
           
protected  int currentIndex
           
protected  Map fieldSetCache
           
protected  IResourceList internalList
           
protected  Locale locale
           
protected  ICollection parent
           
protected  String resourceTypeMapping
           
protected  SortDefinition sortDefinition
           
protected  String statusId
           
protected  ITypedResourceList trl
           
protected  Hashtable urlParameters
           
 
Fields inherited from interface com.sapportals.wcm.rendering.base.IRendererStatus
DESELECT_ALL, ID, NAME, SELECT_ALL
 
Constructor Summary
CLPRendererStatus()
           
 
Method Summary
 StatusInformation execute(IExecutable executable)
          carries out the action described by the given parameter.
 StatusInformation execute(String execution)
          different signature for this method.
 void filter()
          filters the internal list of resources.
 IExecutable getAction(FieldIdentifier ident)
          returns the IExecutable with the given ident-parameter or null , if no such instance could be found.
 List getActions()
          returns a list with all IExecutable s defined by the implementing class
 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.
 List getFields()
          returns a list with all fields defined by the implementing class
 FieldSet getFieldSet(int index)
          returns all fields available for the instance of the managed type at this index of the internal list.
 FieldSet getFieldSet(IResource res)
           
 String getID()
          returns the ID under which this status was registered by the Service
 List getMassFields()
          returns all fields that will be available for the managed types of this class.
 IConfigurableRendererStatus getNewInstance()
           
 ICollection getParent()
          returns the ICollection, whose children are handled within this status.
 IPropertyColumn[] getPropertyColumns()
          TODO what about null?
 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.
 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 IResource objects that belong to the ICollection or the TypedResourceList attribute have already been instantiated (and added to the internal resourcelist) or not.
protected  void initialize()
           
 boolean isVolatile()
           
 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(IResourceListFilter filter)
          sets the class, that is used to filter out resources from the given parent-collection or the ITypedResourceList.
 void setFilterParameters(IParameters filterparameters)
          sets the parameters, that are used by the IResourceListFilter to determine which resources are to be filtered out.
 void setID(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(Hashtable parameters)
           
 void setParent(ICollection parent)
          sets the collection whose children are to be handled within this status.
 void setPropertyColumns(IPropertyColumn[] columns)
          TODO what about null?
 void setResourceTypeMapping(String mapping)
           
 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTIONS

public static final FieldIdentifier[] ACTIONS

parent

protected ICollection parent

urlParameters

protected Hashtable urlParameters

trl

protected ITypedResourceList trl

resourceTypeMapping

protected String resourceTypeMapping

statusId

protected String statusId

context

protected IResourceContext context

locale

protected Locale locale

currentIndex

protected int currentIndex

sortDefinition

protected SortDefinition sortDefinition

comparator

protected ResourcePropertyComparator comparator

columns

protected IPropertyColumn[] columns

actions

protected FieldSet actions

internalList

protected IResourceList internalList

fieldSetCache

protected Map fieldSetCache
Constructor Detail

CLPRendererStatus

public CLPRendererStatus()
Method Detail

getNewInstance

public IConfigurableRendererStatus getNewInstance()
Specified by:
getNewInstance in interface IConfigurableRendererStatus

initialize

protected void initialize()
                   throws WcmException
Throws:
WcmException

getResourceTypeMapping

public String getResourceTypeMapping()
Specified by:
getResourceTypeMapping in interface IConfigurableRendererStatus

setParameters

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

setResourceTypeMapping

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

filter

public void filter()
            throws WcmException
Description copied from interface: IRendererStatus
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.

Specified by:
filter in interface IRendererStatus
Throws:
WcmException

getComparator

public ResourcePropertyComparator getComparator()
Specified by:
getComparator in interface IRendererStatus
Returns:
the ResourcePropertyComparator attribute of the status. Might be null.

getCurrentIndex

public int getCurrentIndex()
                    throws WcmException
Specified by:
getCurrentIndex in interface IRendererStatus
Returns:
the current position within the internal list of IResource objects.
Throws:
WcmException

getFieldSet

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

getFieldSet

public FieldSet getFieldSet(int index)
Description copied from interface: IMassDataControlStatus
returns all fields available for the instance of the managed type at this index of the internal list. Throws an IndexOutOfBoundsException if no field set exists for the given index.

Specified by:
getFieldSet in interface IMassDataControlStatus
Parameters:
index - TBD: Description of the incoming method parameter
Returns:
fieldSet

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

getPropertyColumns

public IPropertyColumn[] getPropertyColumns()
Description copied from interface: IRendererStatus
TODO what about null?

Specified by:
getPropertyColumns in interface IRendererStatus
Returns:
the IPropertyColumn[] attribute of the status. Might be null.

getResource

public IResource getResource(int index)
Specified by:
getResource in interface 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.

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
Returns:
an IResourceList that might be empty. Must not return null.

getSelectedResources

public IResourceList getSelectedResources()
Specified by:
getSelectedResources in interface IRendererStatus
Returns:
a list of all resources that have been set to selected.

getSortDefintion

public SortDefinition getSortDefintion()
Specified by:
getSortDefintion in interface IRendererStatus
Returns:
the SortDefinition attribute of the status. Might be null.

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

hasMore

public boolean hasMore()
Description copied from interface: IRendererStatus
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.

Specified by:
hasMore in interface IRendererStatus

refresh

public void refresh()
             throws WcmException
Description copied from interface: IRendererStatus
reloads resources from RF revokes all selections

Specified by:
refresh in interface IRendererStatus
Throws:
WcmException

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

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
Throws:
WcmException

setFilter

public void setFilter(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
Parameters:
filter - the filter instance to use, can be null

setFilterParameters

public void setFilterParameters(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
Parameters:
filterparameters - determine which rules apply to filtering, can be null

setParent

public void setParent(ICollection parent)
               throws WcmException
Description copied from interface: IRendererStatus
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.

Specified by:
setParent in interface IRendererStatus
Throws:
WcmException

setTypedResourceList

public void setTypedResourceList(ITypedResourceList list,
                                 IResourceContext context)
                          throws WcmException
Description copied from interface: IRendererStatus
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.

Specified by:
setTypedResourceList in interface IRendererStatus
Throws:
WcmException

setPropertyColumns

public void setPropertyColumns(IPropertyColumn[] columns)
Description copied from interface: IRendererStatus
TODO what about null? sets the IPropertyColumn[] attribute of the status. Might be null.

Specified by:
setPropertyColumns in interface IRendererStatus

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

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

execute

public StatusInformation execute(IExecutable executable)
                          throws WcmException
Description copied from interface: IControlStatus
carries out the action described by the given parameter.

Specified by:
execute in interface IControlStatus
Parameters:
executable - TBD: Description of the incoming method parameter
Returns:
the status of the execution - can be null.
Throws:
WcmException - Exception raised in failure situation

execute

public StatusInformation execute(String execution)
                          throws WcmException
Description copied from interface: IControlStatus
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
Parameters:
execution - TBD: Description of the incoming method parameter
Returns:
TBD: Description of the outgoing return value
Throws:
WcmException - Exception raised in failure situation

getAction

public IExecutable getAction(FieldIdentifier ident)
Description copied from interface: IControlStatus
returns the IExecutable with the given ident-parameter or null , if no such instance could be found.

Specified by:
getAction in interface IControlStatus
Parameters:
ident - TBD: Description of the incoming method parameter
Returns:
action

getActions

public List getActions()
Description copied from interface: IControlStatus
returns a list with all IExecutable s defined by the implementing class

Specified by:
getActions in interface IControlStatus
Returns:
actions

getField

public IField getField(FieldIdentifier ident)
Description copied from interface: IControlStatus
returns the field with the given ident-parameter or null , if no such instance could be found.

Specified by:
getField in interface IControlStatus
Parameters:
ident - TBD: Description of the incoming method parameter
Returns:
field

getFields

public List getFields()
Description copied from interface: IControlStatus
returns a list with all fields defined by the implementing class

Specified by:
getFields in interface IControlStatus
Returns:
fields

getID

public 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
Returns:
iD

getStatusInformation

public StatusInformation getStatusInformation()
Description copied from interface: IControlStatus
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
Returns:
statusInformation

setID

public void setID(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
Parameters:
id - iD to be set

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
Returns:
entrySize

getMassFields

public 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
Returns:
massFields

isVolatile

public boolean isVolatile()
Specified by:
isVolatile in interface IVolatileStatus
Returns:
flag stating if the status might be deleted after the first click or not. return true, if it might be deleted.
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/nonwduideprecated api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice