|
SAP NetWeaver 7.30 SP01 KMC | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sapportals.wcm.rendering.collection.cm.CollectionTreeRenderer2
public class CollectionTreeRenderer2
This abstract class can be used when implementing new CollectionRenderer-Classes
It provides persistence of selections (when mass actions are enabled), takes care
of ResourceProperties, offers method to create sorting box in Control
Persistence is realized by using IUMPrincipal.setTransientAttribute. This
can lead to errounous behavior when the user hasn't worked for some time in
the browser and the cache has expired.
| Field Summary | |
|---|---|
static String |
BASE_BUNDLE
|
static String |
BLANK
|
static String |
NBSP
|
static String |
ON_NAVIGATE
|
static String |
ON_SELECT_FILTER
|
static String |
ON_SELECT_SORT
|
static String |
ON_TOGGLE_FILTER
|
static String |
ON_TOGGLE_SORT
|
static String |
RES_CONTENTSOF
|
static String |
RES_FILESOF
|
static String |
RES_FOLDERSOF
|
static String |
RES_SELECTRESOURCE
|
static String |
RES_SORTASCENDING
|
static String |
RES_SORTBY
|
static String |
RES_SORTDESCENDING
|
| Fields inherited from interface com.sapportals.wcm.rendering.collection.ICollectionRenderer |
|---|
ORDERED_COLLECTION, SORTED, UNSORTED |
| Fields inherited from interface com.sapportals.wcm.rendering.base.ILayoutObject |
|---|
DEF_VALUE, KEY, LINE_BREAK |
| Constructor Summary | |
|---|---|
CollectionTreeRenderer2()
|
|
| Method Summary | |
|---|---|
protected void |
filterResourceList(IResource resource,
IResourceList list)
|
String |
getAlias()
|
IResourceList |
getChildren(IResource resource)
Implementation of ICollectionInfo |
IResourceList |
getChildren(IResource resource,
boolean visible,
boolean collections,
boolean links)
|
int |
getChildrenCount(IResource resource,
boolean visible,
boolean collections,
boolean links)
|
protected ComponentValueMap |
getComponentValueMap()
|
String |
getConfiguration(String format)
returns the supported parameters and the default values the class uses |
IFlavor |
getFlavor()
|
String |
getID()
|
ILayoutObject |
getNewInstance()
|
String |
getParameter(IParameterName key)
|
IParameters |
getParameters()
returns all parameters used in this layout object. |
ICollection |
getParentCollection()
|
protected IProxy |
getProxy()
|
IResourceContext |
getResourceContext()
|
String |
getResourceListID()
|
IResourceList |
getSelectedResources()
|
IParameterName[] |
getSupportedParameters()
returns all parameters which are used in this layout object. |
boolean |
hasChildren(IResource resource)
|
boolean |
is508enabled()
|
boolean |
isAncestorOf(IResource parent,
IResource child)
|
boolean |
isCollection(IResource resource)
|
IRenderingEvent |
onEvent(com.sapportals.htmlb.event.Event event)
|
void |
readInputData(com.sapportals.htmlb.page.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. |
com.sapportals.htmlb.Component |
render()
|
com.sapportals.htmlb.Component |
renderAll()
|
protected com.sapportals.htmlb.Component |
renderDecorations(com.sapportals.htmlb.Component comp)
|
com.sapportals.htmlb.Component |
renderNodeComponent(IResource resource)
|
void |
resetSelection()
clears the list of selected resources |
protected void |
set508enabled(boolean imp508)
|
void |
setAlias(String alias)
set the alias |
void |
setFlavor(IFlavor impFlavor)
is called from the factory after instantiating a new layout object to set the flavor information coming from the Control or ILayoutController ,
asking for special instances of the IResourceRenderer used by the implementing class |
String |
setParameter(IParameterName key,
String value)
|
void |
setParameters(IParameters parameters)
is called from the factory after initializing this layout object. |
void |
setParentCollection(ICollection parent)
is called from the factory after instantiating a new collection renderer to set the collection which has to be rendered. |
void |
setProxy(IProxy proxy)
is called from the factory after instantiating a new layout object to set the proxy which is needed as possible target for actions. |
void |
setResourceContext(IResourceContext context)
sets the context-attribute for the renderer. |
void |
setResourceListID(String value)
|
void |
setSortDefinition(SortDefinition sd)
sets the sort-definition attribute for the implementing class. |
void |
setStartUri(String startUri)
|
void |
setSupportedParameters(IParameterName[] impKeys)
|
void |
setTypedResourceList(ITypedResourceList typedresourcelist)
is called from the factory after instantiating a new collection renderer to set the resourceList which has to be rendered. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String RES_CONTENTSOF
public static final String RES_FILESOF
public static final String RES_FOLDERSOF
public static final String RES_SORTBY
public static final String RES_SORTDESCENDING
public static final String RES_SORTASCENDING
public static final String RES_SELECTRESOURCE
public static final String BASE_BUNDLE
public static final String ON_SELECT_SORT
public static final String ON_TOGGLE_SORT
public static final String ON_SELECT_FILTER
public static final String ON_TOGGLE_FILTER
public static final String ON_NAVIGATE
public static final String NBSP
public static final String BLANK
| Constructor Detail |
|---|
public CollectionTreeRenderer2()
| Method Detail |
|---|
public ILayoutObject getNewInstance()
getNewInstance in interface ILayoutObjectpublic void setStartUri(String startUri)
setStartUri in interface IStartUriReceiver
public com.sapportals.htmlb.Component renderAll()
throws com.sapportals.wcm.WcmException
renderAll in interface ICollectionRenderercom.sapportals.wcm.WcmException
public com.sapportals.htmlb.Component render()
throws com.sapportals.wcm.WcmException
com.sapportals.wcm.WcmException
protected com.sapportals.htmlb.Component renderDecorations(com.sapportals.htmlb.Component comp)
throws com.sapportals.wcm.WcmException
com.sapportals.wcm.WcmException
protected ComponentValueMap getComponentValueMap()
throws com.sapportals.wcm.WcmException
com.sapportals.wcm.WcmExceptionpublic final void setProxy(IProxy proxy)
ILayoutObjectICollectionRenderer
can use IResourceRenderer and IUICommand to render the
given resource. These classes need the proxy for the rendering of their links. The
implementing class needs the proxy to retrieve these classes using the respecting
factory-classes ResourceRendererFactory and UICommandFactory
setProxy in interface ILayoutObjectproxy - the WdfPfoxy that acts as an outer container for the renderingprotected final IProxy getProxy()
public final void setFlavor(IFlavor impFlavor)
ILayoutObjectControl or ILayoutController ,
asking for special instances of the IResourceRenderer used by the implementing class
setFlavor in interface ILayoutObjectpublic final IFlavor getFlavor()
getFlavor in interface ILayoutObjectpublic final boolean is508enabled()
is508enabled in interface ILayoutObjectprotected final void set508enabled(boolean imp508)
public final String getConfiguration(String format)
ILayoutObject
getConfiguration in interface ILayoutObjectpublic void setParentCollection(ICollection parent)
ICollectionRenderersetTypedResourceList(ITypedResourceList resourcelist)
method is called, i.e. when a search result has to be rendered.
setParentCollection in interface ICollectionRendererparent - the collection to render (and whose chidren to render)public final ICollection getParentCollection()
public final void setTypedResourceList(ITypedResourceList typedresourcelist)
ICollectionRenderersetParentCollection(ICollection collection)
method is called, i.e. when a folder has to be rendered
setTypedResourceList in interface ICollectionRenderertypedresourcelist - the resourcelist to render (and whose members to render)public final String getParameter(IParameterName key)
getParameter in interface ILayoutObjectnull. Note: a
returned null does not indicate, that the ILayoutObject
does not support this parameter!public final IParameterName[] getSupportedParameters()
ILayoutObject
getSupportedParameters in interface ILayoutObjectILayoutObject.setParameters(com.sapportals.wcm.repository.service.layout.customizing.IParameters)public final void setSupportedParameters(IParameterName[] impKeys)
public final IParameters getParameters()
ILayoutObject
getParameters in interface ILayoutObjectpublic final void resetSelection()
IResourceListProvider
resetSelection in interface IResourceListProviderpublic final void setParameters(IParameters parameters)
ILayoutObject IParameterName[] getSupportedParameters()
are set by the factory.
With this method the rendering of the implementing class can be influenced. Classes
can - but do not have to - react on the parameters supplied in this method
setParameters in interface ILayoutObjectparameters - - the parameters retrieved from different sources (iView, OTH...)
that influence the way the implementing class renders its output. If the parameter is not found in the
class' getSupportedParameters, the value will not be set as parameter for this class.
If for a certain key, no value is found in the given IParameters, the default value set in the class will
not be overwritten.
Example:
The class returns as supported parameters the keys "A", "B".
It has set the default parameters, so we find the key-value pairs:
"A" -> a
"B" -> b
This method is called, with the following hashtable entries:
"A" -> aa
"C" -> cc
After the method is called, the class holds following key-vlaue pairs:
"A" -> aa (overwritten by passed hashtable values)
"B" -> b (not overwritten, because the hashtable returned null for this key
The key-value pair "C" -> cc is not used in the class, because the key was not found in its
getSupportedParameters
public final String setParameter(IParameterName key,
String value)
setParameter in interface ILayoutObjectkey - - the key of the parametervalue - - the value of the parameter
Overwrites an existing entry of the parameters or adds it, if it is not set.
Note: The Layout Object may not act on this parameter. To retrieve a list
of supported parameters from an ILayoutObject instancepublic final IResourceList getSelectedResources()
getSelectedResources in interface IResourceListProvidernullpublic final void setResourceListID(String value)
public final String getResourceListID()
public com.sapportals.htmlb.Component renderNodeComponent(IResource resource)
throws com.sapportals.wcm.WcmException
renderNodeComponent in interface INodeRenderercom.sapportals.wcm.WcmException
protected final void filterResourceList(IResource resource,
IResourceList list)
throws com.sapportals.wcm.WcmException
com.sapportals.wcm.WcmExceptionpublic String getAlias()
getAlias in interface ILayoutObjectpublic void setAlias(String alias)
setAlias in interface ILayoutObject
public IResourceList getChildren(IResource resource)
throws ResourceException,
AccessDeniedException
getChildren in interface ICollectionInfoResourceException
AccessDeniedException
public IResourceList getChildren(IResource resource,
boolean visible,
boolean collections,
boolean links)
throws ResourceException,
AccessDeniedException
getChildren in interface ICollectionInfoResourceException
AccessDeniedException
public int getChildrenCount(IResource resource,
boolean visible,
boolean collections,
boolean links)
throws ResourceException,
AccessDeniedException
getChildrenCount in interface ICollectionInfoResourceException
AccessDeniedException
public boolean hasChildren(IResource resource)
throws ResourceException
hasChildren in interface ICollectionInfoResourceExceptionpublic boolean isCollection(IResource resource)
isCollection in interface ICollectionInfo
public boolean isAncestorOf(IResource parent,
IResource child)
throws ResourceException
isAncestorOf in interface ICollectionInfoResourceExceptionpublic void setSortDefinition(SortDefinition sd)
ICollectionRenderer
setSortDefinition in interface ICollectionRendererpublic IRenderingEvent onEvent(com.sapportals.htmlb.event.Event event)
onEvent in interface IDelegatedReceiverpublic void readInputData(com.sapportals.htmlb.page.DynPage page)
ICollectionRendererComponents rendered by
the implementing class.
readInputData in interface ICollectionRendererpublic void refresh()
ICollectionRendererIResource 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.
refresh in interface ICollectionRendererpublic void setResourceContext(IResourceContext context)
ICollectionRenderernull
setResourceContext in interface ICollectionRendererpublic IResourceContext getResourceContext()
getResourceContext in interface ICollectionRenderernullpublic String getID()
getID in interface IResourceListProvidergetID in interface ICollectionRendererIProxy's method register. This ID will be stable
over http-requests.
|
SAP NetWeaver 7.30 SP01 KMC | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||