SAP NetWeaver '04

com.sapportals.wcm.rendering.resource
Interface IResourceRenderer

[contained in: com.sap.km.cm.ui.flex.par - km.shared.ui.flex.resource_api.jar]
All Superinterfaces:
ILayoutObject
All Known Implementing Classes:
AbstractResourceRenderer

public interface IResourceRenderer
extends ILayoutObject

This interface is used to render a single IResource and its Properties. It is usually instantiated by the ResourceRendererFactory . The interface has two kind of methods: either set/get methods to access the member variables of the classes or methods that return an htmlb Component - the actual rendering. Check also the ILayoutObject that implements the functionality to communicate with the configuration of the rendering framework.


Field Summary
static int LINK_CONTENT
           
static int LINK_CONTENT_ONLY_FOLDERS
           
static int LINK_DETAILS
           
static int LINK_OFF
           
 
Fields inherited from interface com.sapportals.wcm.rendering.base.ILayoutObject
DEF_VALUE, KEY, LINE_BREAK
 
Method Summary
 java.util.Map getPropertyBag()
           
 ResourceStateType getResourceState()
           
 com.sapportals.htmlb.Component render()
          renders the current IResource depending on the configuration available for this resource and on the implementation of the rendering class.
 com.sapportals.htmlb.Component render(IProperty property)
          Deprecated. since EP6, SP2_CP
 com.sapportals.htmlb.Component render(IProperty property, int linktype)
          Deprecated. since EP6, SP2_CP
 com.sapportals.htmlb.Component render(IProperty property, java.lang.String target)
          Deprecated. since EP6, SP2_CP
 com.sapportals.htmlb.Component render(java.lang.String displayname, int linktype)
          Deprecated. since EP6, SP2_CP. Instead of this method, use
 com.sapportals.htmlb.Component renderAction()
          Deprecated. since EP6, SP2_CP
 com.sapportals.htmlb.Component renderIcon()
          Deprecated. since EP6, SP2_CP
 com.sapportals.htmlb.Component renderIconContentlink()
          Deprecated. since EP6, SP2_CP
 com.sapportals.htmlb.Component renderImage()
          Deprecated. since EP6, SP2_CP
 com.sapportals.htmlb.Component renderImageContentlink()
          Deprecated. since EP6, SP2_CP
 com.sapportals.htmlb.Component renderMetaProperty(IMetaName metaName, boolean hasContentLink)
          renders the given metaName of the current IResource
 void setPropertyBag(java.util.Map propertyBag)
          Set a property bag for the resource.
 void setPropertyNameList(IPropertyNameList propnamelist)
           
 void setResource(IResource resource)
          the resource to work with.
 void setResourceState(ResourceStateType type)
          flag to tell the resource renderer that its IResource is in a certain state.
 
Methods inherited from interface com.sapportals.wcm.rendering.base.ILayoutObject
getAlias, getConfiguration, getFlavor, getNewInstance, getParameter, getParameters, getSupportedParameters, is508enabled, setAlias, setFlavor, setParameter, setParameters, setProxy
 

Field Detail

LINK_CONTENT_ONLY_FOLDERS

public static final int LINK_CONTENT_ONLY_FOLDERS

LINK_CONTENT

public static final int LINK_CONTENT

LINK_DETAILS

public static final int LINK_DETAILS

LINK_OFF

public static final int LINK_OFF
Method Detail

setPropertyNameList

public void setPropertyNameList(IPropertyNameList propnamelist)
Parameters:
propnamelist - The new propertyNameList value

setResource

public void setResource(IResource resource)
the resource to work with. Must not be null
Parameters:
resource - The new resource value

render

public com.sapportals.htmlb.Component render()
                                      throws WcmException
renders the current IResource depending on the configuration available for this resource and on the implementation of the rendering class. This might lead to very different layouts and available functionality. If a calling class (e.g. an ICollectionRenderer requires a more uniform rendering, it can call the different render-methods that allow the rendering of single attributes of the current IResource .
Returns:
a renderable htmlb-Component. Must not return null
Throws:
WcmException - Description of the Exception

render

public com.sapportals.htmlb.Component render(IProperty property)
                                      throws WcmException
Deprecated. since EP6, SP2_CP

Parameters:
property - Description of the Parameter
Returns:
a single property of the resource
Throws:
WcmException - Description of the Exception

render

public com.sapportals.htmlb.Component render(IProperty property,
                                             int linktype)
                                      throws WcmException
Deprecated. since EP6, SP2_CP

renders the specified property of the current IResource.
Parameters:
property - the property to render
linktype - Description of the Parameter
Returns:
a single property of the IResource as clickable link. Must not return null.
Throws:
WcmException - Description of the Exception

render

public com.sapportals.htmlb.Component render(java.lang.String displayname,
                                             int linktype)
                                      throws WcmException
Deprecated. since EP6, SP2_CP. Instead of this method, use

renders the given displayname with the given linktype-attribute.
Parameters:
displayname - the name to render. If the value is null or "".equals(displayname) or " ".equals(displayname , the link will be rendered, but is not accesible, as html cannot render empty Strings or Strings containing only " ".
linktype - Description of the Parameter
Returns:
a single htmlb Component. Must not return null
Throws:
WcmException - Description of the Exception

render

public com.sapportals.htmlb.Component render(IProperty property,
                                             java.lang.String target)
                                      throws WcmException
Deprecated. since EP6, SP2_CP

renders the given property of the current IResource as a link to the given target.
Parameters:
property - the property to render
target - Description of the Parameter
Returns:
a single property of the resource as clickable link
Throws:
WcmException - Description of the Exception

renderMetaProperty

public com.sapportals.htmlb.Component renderMetaProperty(IMetaName metaName,
                                                         boolean hasContentLink)
                                                  throws WcmException
renders the given metaName of the current IResource
Parameters:
metaName - Description of the Parameter
hasContentLink - Description of the Parameter
Returns:
a single htmlb Component. Must not return null
Throws:
WcmException - Description of the Exception

renderIcon

public com.sapportals.htmlb.Component renderIcon()
                                          throws WcmException
Deprecated. since EP6, SP2_CP

Returns:
an htmlb Component that shows the icon for the resource
Throws:
WcmException - Description of the Exception

renderAction

public com.sapportals.htmlb.Component renderAction()
                                            throws WcmException
Deprecated. since EP6, SP2_CP

Returns:
an htmlb Component that shows all the actions defined for the current IResource
Throws:
WcmException - Description of the Exception

renderIconContentlink

public com.sapportals.htmlb.Component renderIconContentlink()
                                                     throws WcmException
Deprecated. since EP6, SP2_CP

Returns:
an htmlb Component that shows the Icon for the resource. The icon is a link to the content of the IResource . Link behavior can vary for resources, links and folders
Throws:
WcmException - Description of the Exception

renderImage

public com.sapportals.htmlb.Component renderImage()
                                           throws WcmException
Deprecated. since EP6, SP2_CP

Returns:
an htmlb Component that shows the image for the resource
Throws:
WcmException - Description of the Exception

renderImageContentlink

public com.sapportals.htmlb.Component renderImageContentlink()
                                                      throws WcmException
Deprecated. since EP6, SP2_CP

Returns:
an htmlb Component that shows the image for the resource The icon is a link to the content of the IResource . Link behavior can vary for resources, links and folders
Throws:
WcmException - Description of the Exception

setResourceState

public void setResourceState(ResourceStateType type)
flag to tell the resource renderer that its IResource is in a certain state. The renderer can decide, if the resource is displayed differently, depending on parameters given and the paramters that are supported by this renderer
Parameters:
type - The new resourceState value

getResourceState

public ResourceStateType getResourceState()
Returns:
the state of the IResource member variable of the renderer.

getPropertyBag

public java.util.Map getPropertyBag()
Returns:
Returns a property bag for a resource contained in the list. Returns null if the specified resource is not contained in the list or no property bag is associated with the resource.

setPropertyBag

public void setPropertyBag(java.util.Map propertyBag)
                    throws WcmException
Set a property bag for the resource.
Parameters:
propertyBag - Properties to store.
Throws:
WcmException - If the specified resource is not contained in the list.

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.