com.sap.portal.admin.wizard
Interface IWizardComponentFactory


public interface IWizardComponentFactory

IWizardComponentFactory provides a mechanism to get synchronization between the wizard UI and the property editor UI. It is achieved by using the same mechanism that the PropertyEditor uses in order to decide about the UI for each attribute, and the captions that are displayed. Actually it is all done using the PropertyEditor API.
It is important to keep in mind that not for every attribute there is an implementation in the PropertyEditor, so the wizard developer must protect these kind of situations in order to achieve full robustness.


Field Summary
static java.lang.String KEY
          Service key.
 
Method Summary
 java.lang.String getAttributeCaption(java.lang.String objectId, java.lang.String attributeId, com.sapportals.portal.prt.component.IPortalComponentRequest request)
          Gets the caption (translated string) for the given attributeId.
 java.lang.String getAttributeTooltip(java.lang.String objectId, java.lang.String attributeId, com.sapportals.portal.prt.component.IPortalComponentRequest request)
          Gets the tooltip (translated string) for the given attributeId.
 AbstractInputComponent getControlForAttribute(java.lang.String objectId, java.lang.String attributeId, com.sapportals.portal.prt.component.IPortalComponentRequest request)
          Gets the appropriate UI control for the given attributeId.
 

Field Detail

KEY

public static final java.lang.String KEY
Service key.
Method Detail

getControlForAttribute

public AbstractInputComponent getControlForAttribute(java.lang.String objectId,
                                                     java.lang.String attributeId,
                                                     com.sapportals.portal.prt.component.IPortalComponentRequest request)
Gets the appropriate UI control for the given attributeId. The logic is based on loading the template/par object and getting all the information from it (e.g. caption, tooltip, etc).
Parameters:
objectId - the id of the template/par that the new object is based on.
attributeId - the attributeId to get the UI control for.
request - the portal component request.
Returns:
wizard component that is a UI control, or NULL if failed to determine the control for any reason.

getAttributeCaption

public java.lang.String getAttributeCaption(java.lang.String objectId,
                                            java.lang.String attributeId,
                                            com.sapportals.portal.prt.component.IPortalComponentRequest request)
Gets the caption (translated string) for the given attributeId.
Parameters:
objectId - the id of the template/par that the new object is based on.
attributeId - the attributeId to get the caption for.
request - the portal component request.
Returns:
the caption for that attribute, i.e. "nice name" that is already translated, or NULL if the failed to get the caption for any reason.

getAttributeTooltip

public java.lang.String getAttributeTooltip(java.lang.String objectId,
                                            java.lang.String attributeId,
                                            com.sapportals.portal.prt.component.IPortalComponentRequest request)
Gets the tooltip (translated string) for the given attributeId.
Parameters:
objectIdthe - id of the template/par that the new object is based on.
attributeId - the attributeId to get the tooltip for.
request - the portal component request.
Returns:
the tooltip for that attribute, i.e. attribute's description that is already translated, or NULL if the failed to get the tooltip for any reason.