com.sapportals.wcm.control.util

Class AbstractPropertyRenderer

java.lang.Object
  extended by com.sapportals.wcm.control.util.AbstractPropertyRenderer
All Implemented Interfaces:
IPropertyRenderer, IRenderMetaName, IAccessibilityRenderer, IStructuredPropertyRenderer
Direct Known Subclasses:
PropertyRendererAllowedValuesMultiValued, PropertyRendererBooleanRB, PropertyRendererDefaultBoolean, PropertyRendererDefaultDate, PropertyRendererDefaultHTML, PropertyRendererDefaultInteger, PropertyRendererDefaultLong, PropertyRendererDefaultString, PropertyRendererDefaultText, PropertyRendererDefaultTime, PropertyRendererDefaultTimestamp, PropertyRendererDisplayNameWithLink, PropertyRendererDisplayNameWithLinkTooltip, PropertyRendererDisplayNameWithLinkWithoutExt, PropertyRendererExplorerURL, PropertyRendererExplorerURLShortWithCopy, PropertyRendererExplorerURLWithCopy, PropertyRendererID, PropertyRendererLastPostBy, PropertyRendererLastPostDate, PropertyRendererMultiDependence, PropertyRendererMultiValued, PropertyRendererPath, PropertyRendererRating, PropertyRendererRatingFullText, PropertyRendererRatingText, PropertyRendererReadByMe, PropertyRendererReadFlag, PropertyRendererShortID, PropertyRendererShortIDShortWithCopy, PropertyRendererShortIDWithCopy, PropertyRendererTargetURL, PropertyRendererTargetURLShortWithCopy, PropertyRendererTargetURLWithCopy, PropertyRendererUnreadByMe, PropertyRendererUser, PropertyRendererUserPhoto, ResourceLockByRenderer, ResourceStatusRenderer, ResourceSubscriptionRenderer, ResourceVersionRenderer

Deprecated. As of NetWeaver 7.1

public abstract class AbstractPropertyRenderer
extends Object
implements IPropertyRenderer, IStructuredPropertyRenderer, IAccessibilityRenderer, IRenderMetaName


Field Summary
static String CID_PROPERTY_NAME
          Deprecated.  
static String CID_PROPERTY_ROW
          Deprecated.  
static String CID_PROPERTY_TIME_VALUE
          Deprecated.  
static String CID_PROPERTY_VALUE
          Deprecated.  
static String CM_DESCRIPTION
          Deprecated.  
static String CM_RND_EXPLORER_URL
          Deprecated.  
static String CM_RND_EXTERNAL_LINK
          Deprecated.  
static String CM_RND_PATH
          Deprecated.  
static String CM_RND_TARGET_URL
          Deprecated.  
static String CM_RND_TARGET_URL_COPY
          Deprecated.  
static String CM_RND_WEBDAV_URL
          Deprecated.  
static String CM_RND_WEBDAV_URL_COPY
          Deprecated.  
protected  IMetaName currentMetaName
          Deprecated.  
static String DATE_FORMAT
          Deprecated.  
static String DEFAULT_DATE_FORMAT
          Deprecated.  
static String DEFAULT_DATE_TIME_FORMAT
          Deprecated.  
static String DEFAULT_TIME_FORMAT
          Deprecated.  
protected  PropertyDisplayMode displayMode
          Deprecated. If no display mode is set, the default display mode is undefined.
static String EVENT_ADD_NEW_VALUE
          Deprecated.  
static String EVENT_EDIT_HTML
          Deprecated.  
protected  com.sapportals.htmlb.LabeledComponent labeledComponent
          Deprecated.  
static String METATAG_NO_LABEL
          Deprecated.  
static String RENDER_HTML
          Deprecated.  
static String RES_ADD_NEW_VALUE
          Deprecated.  
static String RES_EDIT_HTML
          Deprecated.  
 
Constructor Summary
AbstractPropertyRenderer()
          Deprecated. As of NetWeaver 7.1
 
Method Summary
static ResourceBundles getBundle(String fileName)
          Deprecated. As of NetWeaver 7.1
 IMetaName getCurrentMetaName()
          Deprecated. Retrieve the current IMetaName
 com.sapportals.htmlb.LabeledComponent getLabeledComponent()
          Deprecated. As of NetWeaver 7.1
 IPropertyMap getProperties(IMetaName metaName, IMetaContext rendererContext, com.sapportals.htmlb.page.DynPage dynPage)
          Deprecated. As of NetWeaver 7.1
 IProperty getProperty(com.sapportals.htmlb.page.DynPage dynPage)
          Deprecated. As of NetWeaver 7.1
 String getPropertyTooltip(IMetaName metaName)
          Deprecated. As of NetWeaver 7.1
protected  PropertyType getPropertyType(IMetaName metaName)
          Deprecated. As of NetWeaver 7.1
 IResourceContext getResourceContext()
          Deprecated. As of NetWeaver 7.1
 boolean is508Required()
          Deprecated. As of NetWeaver 7.1
protected  Boolean isEditable(IMetaName metaName, IMetaContext rendererContext)
          Deprecated. As of NetWeaver 7.1
protected  Boolean isEditable(IMetaName metaName, IMetaContext rendererContext, boolean ignoreVirtual)
          Deprecated. As of NetWeaver 7.1
 String[] processEvent(IMetaName metaName, com.sapportals.htmlb.event.Event event, IMetaContext rendererContext, com.sapportals.htmlb.page.DynPage dynPage)
          Deprecated. As of NetWeaver 7.1
 com.sapportals.htmlb.Component renderMetaNameLabel(IMetaName metaName, IMetaContext rendererContext)
          Deprecated. As of NetWeaver 7.1
 com.sapportals.htmlb.Component renderMetaProperty(IMetaName metaName, IMetaContext rendererContext)
          Deprecated. As of NetWeaver 7.1
 com.sapportals.htmlb.Component renderProperty(IProperty property, IResource resource, int maxLength)
          Deprecated. As of NetWeaver 7.1
 com.sapportals.htmlb.Component renderProperty(IProperty property, IResource resource, int maxLength, com.sapportals.wdf.stack.Control ctrl)
          Deprecated. As of NetWeaver 7.1
 com.sapportals.htmlb.Component renderSpacing()
          Deprecated. As of NetWeaver 7.1
 void set508Required(boolean active)
          Deprecated. As of NetWeaver 7.1
 void setCurrentMetaName(IMetaName metaName)
          Deprecated. Set the IMetaName
 void setDisplayMode(PropertyDisplayMode displayMode)
          Deprecated. As of NetWeaver 7.1
 void setResourceContext(IResourceContext context)
          Deprecated. As of NetWeaver 7.1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVENT_ADD_NEW_VALUE

public static final String EVENT_ADD_NEW_VALUE
Deprecated. 
See Also:
Constant Field Values

EVENT_EDIT_HTML

public static final String EVENT_EDIT_HTML
Deprecated. 
See Also:
Constant Field Values

RES_ADD_NEW_VALUE

public static final String RES_ADD_NEW_VALUE
Deprecated. 
See Also:
Constant Field Values

RES_EDIT_HTML

public static final String RES_EDIT_HTML
Deprecated. 
See Also:
Constant Field Values

RENDER_HTML

public static final String RENDER_HTML
Deprecated. 
See Also:
Constant Field Values

CM_RND_PATH

public static final String CM_RND_PATH
Deprecated. 
See Also:
Constant Field Values

CM_RND_TARGET_URL

public static final String CM_RND_TARGET_URL
Deprecated. 
See Also:
Constant Field Values

CM_RND_EXPLORER_URL

public static final String CM_RND_EXPLORER_URL
Deprecated. 
See Also:
Constant Field Values

CM_RND_WEBDAV_URL

public static final String CM_RND_WEBDAV_URL
Deprecated. 
See Also:
Constant Field Values

CM_RND_WEBDAV_URL_COPY

public static final String CM_RND_WEBDAV_URL_COPY
Deprecated. 
See Also:
Constant Field Values

CM_RND_TARGET_URL_COPY

public static final String CM_RND_TARGET_URL_COPY
Deprecated. 
See Also:
Constant Field Values

CM_RND_EXTERNAL_LINK

public static final String CM_RND_EXTERNAL_LINK
Deprecated. 
See Also:
Constant Field Values

CM_DESCRIPTION

public static final String CM_DESCRIPTION
Deprecated. 
See Also:
Constant Field Values

DATE_FORMAT

public static final String DATE_FORMAT
Deprecated. 
See Also:
Constant Field Values

DEFAULT_DATE_TIME_FORMAT

public static final String DEFAULT_DATE_TIME_FORMAT
Deprecated. 
See Also:
Constant Field Values

DEFAULT_TIME_FORMAT

public static final String DEFAULT_TIME_FORMAT
Deprecated. 
See Also:
Constant Field Values

DEFAULT_DATE_FORMAT

public static final String DEFAULT_DATE_FORMAT
Deprecated. 
See Also:
Constant Field Values

CID_PROPERTY_VALUE

public static final String CID_PROPERTY_VALUE
Deprecated. 
See Also:
Constant Field Values

CID_PROPERTY_TIME_VALUE

public static final String CID_PROPERTY_TIME_VALUE
Deprecated. 
See Also:
Constant Field Values

CID_PROPERTY_NAME

public static final String CID_PROPERTY_NAME
Deprecated. 
See Also:
Constant Field Values

CID_PROPERTY_ROW

public static final String CID_PROPERTY_ROW
Deprecated. 
See Also:
Constant Field Values

METATAG_NO_LABEL

public static final String METATAG_NO_LABEL
Deprecated. 
See Also:
Constant Field Values

labeledComponent

protected com.sapportals.htmlb.LabeledComponent labeledComponent
Deprecated. 

currentMetaName

protected IMetaName currentMetaName
Deprecated. 

displayMode

protected PropertyDisplayMode displayMode
Deprecated. 
If no display mode is set, the default display mode is undefined.

Constructor Detail

AbstractPropertyRenderer

public AbstractPropertyRenderer()
Deprecated. As of NetWeaver 7.1

Method Detail

renderProperty

public com.sapportals.htmlb.Component renderProperty(IProperty property,
                                                     IResource resource,
                                                     int maxLength)
                                              throws WcmException
Deprecated. As of NetWeaver 7.1

renders a property returning an Component

Specified by:
renderProperty in interface IPropertyRenderer
Parameters:
property - to berendered
resource - to which the property belongs
maxLength - Description of the Parameter
Returns:
Description of the Return Value
Throws:
WcmException - Description of the Exception

renderProperty

public com.sapportals.htmlb.Component renderProperty(IProperty property,
                                                     IResource resource,
                                                     int maxLength,
                                                     com.sapportals.wdf.stack.Control ctrl)
                                              throws WcmException
Deprecated. As of NetWeaver 7.1

renders a property returning an Component

Specified by:
renderProperty in interface IPropertyRenderer
Parameters:
property - to berendered
resource - to which the property belongs
ctrl - can be used for callback actions
maxLength - Description of the Parameter
Returns:
Description of the Return Value
Throws:
WcmException - Description of the Exception

setDisplayMode

public void setDisplayMode(PropertyDisplayMode displayMode)
Deprecated. As of NetWeaver 7.1

Specifies the current display mode in which the property should be rendered. Default is PropertyDisplayMode.UNDEFINED.

Specified by:
setDisplayMode in interface IPropertyRenderer
Parameters:
displayMode - current display mode

getProperty

public IProperty getProperty(com.sapportals.htmlb.page.DynPage dynPage)
                      throws WcmException
Deprecated. As of NetWeaver 7.1

Property renderer need to implement this method if the user can enter new values for the rendered property.

Specified by:
getProperty in interface IPropertyRenderer
Parameters:
dynPage - response page
Returns:
property as it was extracted from the response
Throws:
WcmException - Description of the Exception

renderMetaNameLabel

public com.sapportals.htmlb.Component renderMetaNameLabel(IMetaName metaName,
                                                          IMetaContext rendererContext)
Deprecated. As of NetWeaver 7.1

Description copied from interface: IStructuredPropertyRenderer
Renders a htmlb Component for the label for a given IMetaName and a given IMetaContext null as returned component is accepted, if no label is whished.

Specified by:
renderMetaNameLabel in interface IStructuredPropertyRenderer
Parameters:
metaName - the given IMetaName for which the component will be rendered
rendererContext - the given IMetaContext for which the component will be rendered
Returns:
a htmlb Component which will rendered in in UI dialog

getPropertyTooltip

public String getPropertyTooltip(IMetaName metaName)
Deprecated. As of NetWeaver 7.1


renderSpacing

public com.sapportals.htmlb.Component renderSpacing()
Deprecated. As of NetWeaver 7.1


renderMetaProperty

public com.sapportals.htmlb.Component renderMetaProperty(IMetaName metaName,
                                                         IMetaContext rendererContext)
                                                  throws WcmException
Deprecated. As of NetWeaver 7.1

Display only for read-only properties

Specified by:
renderMetaProperty in interface IStructuredPropertyRenderer
Parameters:
rendererContext - Description of the Parameter
metaName - Description of the Parameter
Returns:
Description of the Return Value
Throws:
WcmException - Description of the Exception

isEditable

protected Boolean isEditable(IMetaName metaName,
                             IMetaContext rendererContext)
                      throws WcmException
Deprecated. As of NetWeaver 7.1

Check if the metaName is editable

Parameters:
metaName -
rendererContext -
Returns:
- true - when metaName is editable - false - when metaName is not editable and the property for this exists - null - when metaName is not editable and the property for this does not exists
Throws:
WcmException

isEditable

protected Boolean isEditable(IMetaName metaName,
                             IMetaContext rendererContext,
                             boolean ignoreVirtual)
                      throws WcmException
Deprecated. As of NetWeaver 7.1

Check if the metaName is editable It's editable when: - ignoreVirtual = false & - PropertyDisplayMode.SELECTION IMetaName.

Parameters:
metaName -
rendererContext -
ignoreVirtual - - if the metaName.isVistual() method is ignored or not
Returns:
- true - when metaName is editable - false - when metaName is not editable and the property for this exists - null - when metaName is not editable and the property for this does not exists
Throws:
WcmException

getResourceContext

public IResourceContext getResourceContext()
Deprecated. As of NetWeaver 7.1

might return null


setResourceContext

public void setResourceContext(IResourceContext context)
Deprecated. As of NetWeaver 7.1


processEvent

public String[] processEvent(IMetaName metaName,
                             com.sapportals.htmlb.event.Event event,
                             IMetaContext rendererContext,
                             com.sapportals.htmlb.page.DynPage dynPage)
                      throws WcmException
Deprecated. As of NetWeaver 7.1

Description copied from interface: IStructuredPropertyRenderer
The property renderer can react to events. If this is not whished then this mehode can return null. The Event should be decode using rendererContext.getRendererProxy().decodeValues(event); If the ArrayList is not empty then the first value from it is the action as String. If the action is known by the renderer then the logic should be implemented If something fails then one or more error messages should be returns as String array

Specified by:
processEvent in interface IStructuredPropertyRenderer
Parameters:
metaName - the given IMetaName for which the renderer is called
event - the Event which has encoded the action and other value which will be process by the renderer
rendererContext - context information for the renderer
dynPage - htmlb dynpage that contains the response document
Returns:
localized error messages or null
Throws:
WcmException

getProperties

public IPropertyMap getProperties(IMetaName metaName,
                                  IMetaContext rendererContext,
                                  com.sapportals.htmlb.page.DynPage dynPage)
                           throws WcmException
Deprecated. As of NetWeaver 7.1

Description copied from interface: IStructuredPropertyRenderer
Gets the properties with their entered values after the response has been returned. The method will be call by every summit event and it should read the generated htmlb Component from the DynPage, the the input value, and validate and create a IProperty for this IMetaName. If the input value is invalid then it will created a IProperty with empty value like it follows :
Properties errorProperties = new Properties(); errorProperties.setProperty(metaName.getId(), value); currentProperty = new Property(new PropertyName(metaName.getNamespace(), metaName.getName()), "", errorProperties); This IProperty will be added into a IPropertyMap and it will be shown as invalid input. The returned IPropertyMap could have one or more IProperty according with the property renderer logic.

Specified by:
getProperties in interface IStructuredPropertyRenderer
Parameters:
metaName - the given IMetaName for which the property will be created
rendererContext - - contains the rendering information: which IResourceContext, IResource or PropertyDisplayMode
dynPage - htmlb dynpage that contains the response document
Returns:
map of properties. null is accepted
Throws:
WcmException

getPropertyType

protected PropertyType getPropertyType(IMetaName metaName)
Deprecated. As of NetWeaver 7.1

Retrieves the PropertyType according with meta property type

Parameters:
metaName - Description of the param
Returns:
The propertyType value

getBundle

public static ResourceBundles getBundle(String fileName)
                                 throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Default resource bundle which has to be existing for WcmBaseControl class.

Parameters:
fileName - Description of the Parameter
Returns:
The bundle value
Throws:
MissingResourceException - The default resource bundle must be available!

getLabeledComponent

public com.sapportals.htmlb.LabeledComponent getLabeledComponent()
Deprecated. As of NetWeaver 7.1

Description copied from interface: IAccessibilityRenderer
Gets the LabeledComponent which it'll be attached to the property Label component in 508 mode by rendering the Property Structure

Specified by:
getLabeledComponent in interface IAccessibilityRenderer

is508Required

public boolean is508Required()
Deprecated. As of NetWeaver 7.1

Description copied from interface: IAccessibilityRenderer
Returns a boolean value according to 508 required mode

Specified by:
is508Required in interface IAccessibilityRenderer
Returns:
true if 508 mode is required

set508Required

public void set508Required(boolean active)
Deprecated. As of NetWeaver 7.1

Sets true if the 508 mode is enabled false otherwise

Specified by:
set508Required in interface IAccessibilityRenderer

getCurrentMetaName

public IMetaName getCurrentMetaName()
Deprecated. 
Description copied from interface: IRenderMetaName
Retrieve the current IMetaName

Specified by:
getCurrentMetaName in interface IRenderMetaName
Returns:
current meta name

setCurrentMetaName

public void setCurrentMetaName(IMetaName metaName)
Deprecated. 
Description copied from interface: IRenderMetaName
Set the IMetaName

Specified by:
setCurrentMetaName in interface IRenderMetaName
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