|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.sapportals.portal.prt.component.AbstractPortalComponent
|
+--com.sapportals.admin.wizardframework.AbstractDynamicWizard
|
+--com.sapportals.admin.wizardframework.templates.AbstractWizard
|
+--com.sap.portal.admin.wizard.AbstractPCMWizard
AbstractPCMWizard is a default wizard that initiates the common panes and transitions.
Wizards that use this toolkit needs to extend this class.
The wizard adds the common panes and transitions, and the wizard developer needs to add his/her
panes and transitions, or completely override the implementation.
In addition, it provides extension points API for the wizard developer for
finalizing the object before and after save, handling the summaries, and overriding
the common strings of the toolkit.
| Inner Class Summary | |
protected static class |
AbstractPCMWizard.InfoPaneInputKeys
InfoPaneInputKeys holds constants for the keys of the attributes
that are collected by the InfoPane. |
| Field Summary | |
static java.lang.String |
BUNDLE_CUSTOMIZED_KEYS
Session key for the strings that the wizard developer overrides. |
protected static java.lang.String |
END_PANE
Alias that points to the summary pane, which is the end point that the wizard developer connects his/her panes to. |
static java.lang.String |
META_ATTRIBUTE_DELIMITER
Delimeter for meta attribute IDs. |
protected static java.lang.String |
START_PANE
Alias that points to the info pane, which is the starting point that the wizard developer connects his/her panes to. |
| Fields inherited from class com.sapportals.admin.wizardframework.AbstractDynamicWizard |
BACK, CANCEL, FINISH, NEXT, PREV, STEP_NO_OFFSET, WIZARD_PARAMETERS |
| Constructor Summary | |
AbstractPCMWizard()
|
|
| Method Summary | |
protected void |
addDependencies(IConfigurableWizard wizard)
Adds wizard's dependencies, if exist. |
protected void |
addPanes(IConfigurableWizard wizard)
Adds common panes. |
protected void |
addTransitions(IConfigurableWizard wizard)
Adds default transitions among the common panes, except transitions among user panes. |
protected void |
addUserPanes(IConfigurableWizard wizard)
Adds user panes. |
protected void |
addUserTransitions(IConfigurableWizard wizard)
Adds user transitions. |
void |
finalizeDescriptor(java.util.Map attributes,
java.lang.Object descriptor,
IWizardContext context)
Finalizes the descriptor before saving. |
void |
finalizeObject(IWizardContext context)
Finalize the new saved object. |
void |
finalizeSummaries(java.util.Map summaries,
IWizardContext context)
Finalizes the summaries. |
void |
initWizardSession(IWizardContext context)
Checks if there are any strings that the wizard developer has override, by calling setUIStrings(Map), and puts them in the session. |
protected void |
setUIStrings(java.util.Map map)
Override the common strings that are provided by the toolkit with your strings. |
void |
setupWizard(IConfigurableWizard wizard,
com.sapportals.portal.prt.component.IPortalComponentProfile profile,
java.util.Map params,
java.util.ResourceBundle languageResources)
setup your wizard in this function by adding panes, transitions and dependencies. |
| Methods inherited from class com.sapportals.admin.wizardframework.AbstractDynamicWizard |
doContent, processWizardParams |
| Methods inherited from class com.sapportals.portal.prt.component.AbstractPortalComponent |
destroy, doAbout, doAfterContent, doBeforeContent, doComponentEvent, doEdit, doHandleEditData, doHelp, doOnNodeReady, doOnNodeRemove, doOnPOMReady, doPreview, doRefresh, doRequestEvent, getCacheDiscriminant, getCachingLevel, handleEvent, hasExpired, init, init, init, service |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String BUNDLE_CUSTOMIZED_KEYS
public static final java.lang.String META_ATTRIBUTE_DELIMITER
protected static final java.lang.String START_PANE
protected static final java.lang.String END_PANE
| Constructor Detail |
public AbstractPCMWizard()
| Method Detail |
public void initWizardSession(IWizardContext context)
setUIStrings(Map), and puts them in the session.initWizardSession in class AbstractDynamicWizardIWizardConfigurator.initWizardSession(com.sapportals.admin.wizardframework.api.IWizardContext)
public void setupWizard(IConfigurableWizard wizard,
com.sapportals.portal.prt.component.IPortalComponentProfile profile,
java.util.Map params,
java.util.ResourceBundle languageResources)
IDynamicWizardConfiguratorcom.sapportals.admin.wizardframework.api.IDynamicWizardConfiguratorwizard - - the IConfigurableWizard instance used to set up the wizard.profile - - the IPortalComponentProfile of the wizard.params - - the parameters to the initial request to the wizardlanguageResources - - the appropriate resource bundle for the request locale (based on localization*.properties)protected void setUIStrings(java.util.Map map)
Example: In order to override the string that asks the end-user
for the next step after the wizard is finished (this is displayed in the last pane,
after the object is saved). Your resource bundle contains an entry
with key = FINISH_QUESTION_STR, and your string. You need to put
in the map that is passed as a parameter the entry:
key = FinishPane.UiStrings.POST_COMPLETION_CHOICE_CAPTION_BUNDLE_KEY
value = FINISH_QUESTION_STR.
map - the map that needs to be filled with the customized keys (it is passed empty).
public void finalizeSummaries(java.util.Map summaries,
IWizardContext context)
Pair instance as value. The Pair instance holds
the summary caption, and the attribute value. The summaries that are registered by the
user are held as {String, Pair} entries. The SummaryPane looks
for the value's nice name for those entries, using the PropertyEditor API.
The developer can modify the entries or/and add entries:
SummaryPane will look for the value's nice name.
SummaryPane will put the summary entry as is (it assumes that
the developer has put there the final value).
SummaryPane will put an entry with one caption and multiple values without changing (again, it assumes
that the developer put the final values).
Example:
// override the summary value, keeping the entry value as a Pair.
if (summaries.containsKey("MyAttributeId")) {
Pair valPair = (Pair)summaries.get("MyAttributeId");
String caption = (String)valPair.getFirst();
summaries.put("MyAttributeId", new Pair(caption, "MySummaryValue");
}
The summary name can also be modified from the pane, using the service API:
IBasicObjectCreationService.setSummaryCaption(java.lang.String, java.lang.String, com.sapportals.admin.wizardframework.api.IWizardContext)
summaries - summaries map. Holds the following entries: context - wizard contextIBasicObjectCreationService.setComponentAsAttribute(com.sapportals.admin.wizardframework.components.AbstractInputComponent, java.lang.String, boolean, com.sapportals.admin.wizardframework.api.IWizardContext)
public void finalizeDescriptor(java.util.Map attributes,
java.lang.Object descriptor,
IWizardContext context)
IBasicObjectCreationService.setComponentAsAttribute(com.sapportals.admin.wizardframework.components.AbstractInputComponent, java.lang.String, boolean, com.sapportals.admin.wizardframework.api.IWizardContext)
It can be override in order to add or modify attributes. The developer has 2 ways
to add or modify attributes:
super implementation reads everything
from the map. The descriptor can be casted to the semantic descriptor to perform additional actions.
super implementation.
super.finalizeDescriptor for 2 reasons:
automatic copy from the map into the descriptor, and the handling of common attributes,
e.g. title, description, locale etc (registered by the info pane).
The method assumes that the descriptor is an instance of INewObjectDescriptor,
therefore it does not support other types of descriptors.
INewObjectDescriptor
type, the wizard developer needs to take care of this attribute.
descriptor.putAttribute(IAttrPcmGeneral.ATTRIBUTE_IS_TEMPLATE, "false");
descriptor - the pre-created object descriptorattributes - a map that holds the following entries: {attributeId, Pair{summaryCaption, value}}.context - wizard contextDescriptorNotCreatedException - if the descriptor is not an instance of INewObjectDescriptorpublic void finalizeObject(IWizardContext context)
context - wizard contextprotected void addPanes(IConfigurableWizard wizard)
addUserPanes
implementation in his/her wizard. Another option is to completely override this method with all panes.
addUserpanes implementation, and that
would override the previous instance of that pane.wizard - running wizardprotected void addUserPanes(IConfigurableWizard wizard)
wizard - running wizardprotected void addTransitions(IConfigurableWizard wizard)
addUserTransitions implementation,
or completely override this method with a complete set of transitions.wizard - running wizardprotected void addUserTransitions(IConfigurableWizard wizard)
wizard - running wizardprotected void addDependencies(IConfigurableWizard wizard)
wizard - running wizard
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||