public abstract class AbstractCommand extends Object implements ICommand
IUICommand
s to reduce coding overhead and
to take advantage of some convenience methods for resource bundle handling. It
also holds some implementations for the ISelector
interface. Copyright:
Copyright 2004 SAP AGModifier and Type | Class and Description |
---|---|
protected class |
AbstractCommand.ResourceNotFoundException
Deprecated.
As of NetWeaver 7.1
|
Modifier and Type | Field and Description |
---|---|
protected int |
applicable
Deprecated.
|
protected IResourceContext |
context
Deprecated.
|
String |
layoutSetID
Deprecated.
Layout Set ID
|
AbstractProxyControl |
proxy
Deprecated.
Description of the Field
|
protected IResource |
resource
Deprecated.
Description of the Field
|
APPLICABLE_FALSE, APPLICABLE_TRUE, APPLICABLE_UNKNOWN
ERR_MESSAGE_MISSING_CONFIG_ENTRY, ERR_MESSAGE_WRONG_METHOD_CALL, KEY_INPUT_CONTROL_TEXT, KEY_INPUT_CONTROL_TEXT_2, KEY_INPUT_CONTROL_TEXT_2_DEFAULT_TEXT, KEY_INPUT_CONTROL_TEXT_3, KEY_INPUT_CONTROL_TEXT_DEFAULT_TEXT, KEY_LABEL, KEY_MASS_EMBEDDED_COMMAND_TEXT, KEY_MASS_EMBEDDED_COMMANT_TOOLTIP, KEY_SINGLE_EMBEDDED_COMMAND_TEXT, KEY_SINGLE_EMBEDDED_COMMAND_TOOLTIP, KEY_TOOLTIP, LINE_BREAK, TEXT_KEYS, VALUE_EMPTY_STRING
Constructor and Description |
---|
AbstractCommand()
Deprecated.
As of NetWeaver 7.1
|
AbstractCommand(String keyLabel,
String keyTooltip)
Deprecated.
As of NetWeaver 7.1
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkArchivingStauts(IResource resource)
Deprecated.
Read archiving status for the given resource and check it.
|
protected void |
createResource(IResourceContext context,
RID rid)
Deprecated.
As of NetWeaver 7.1
|
protected IResource |
createResource(String uri)
Deprecated.
As of NetWeaver 7.1
|
RenderingEvent |
execute(ScreenflowData data)
Deprecated.
As of NetWeaver 7.1
|
String |
getAlias()
Deprecated.
As of NetWeaver 7.1
|
protected String |
getBundleString(String key)
Deprecated.
As of NetWeaver 7.1
|
protected String |
getBundleString(String key,
Object obj)
Deprecated.
As of NetWeaver 7.1
|
protected String |
getBundleString(String key,
Object[] obj)
Deprecated.
As of NetWeaver 7.1
|
protected String |
getBundleString(String key,
Object obj1,
Object obj2)
Deprecated.
As of NetWeaver 7.1
|
String |
getButtonLabel()
Deprecated.
As of NetWeaver 7.1
|
com.sapportals.htmlb.Component |
getComponent()
Deprecated.
As of NetWeaver 7.1
|
Properties |
getConfigurationProperties()
Deprecated.
As of NetWeaver 7.1
|
protected String |
getLabel()
Deprecated.
As of NetWeaver 7.1
|
String |
getLayoutSetID()
Deprecated.
As of NetWeaver 7.1
|
LinkAttributes |
getLinkAttributes()
Deprecated.
As of NetWeaver 7.1
|
String |
getLinkLabel()
Deprecated.
As of NetWeaver 7.1
|
protected String |
getOTHDefinedURL(IResource res,
IActionType actiontype)
Deprecated.
As of NetWeaver 7.1
|
Hashtable |
getParameters()
Deprecated.
As of NetWeaver 7.1
|
AbstractProxyControl |
getProxy()
Deprecated.
As of NetWeaver 7.1
|
List |
getReplaceCommands()
Deprecated.
As of NetWeaver 7.1
|
IResource |
getResource()
Deprecated.
As of NetWeaver 7.1
|
protected RID |
getStartUri()
Deprecated.
As of NetWeaver 7.1
|
String |
getText(TextKey key)
Deprecated.
As of NetWeaver 7.1
|
String |
getTextForSecondaryScreen(String key)
Deprecated.
As of NetWeaver 7.1
|
protected Properties |
getTextProperties()
Deprecated.
As of NetWeaver 7.1
|
protected String |
getTooltip()
Deprecated.
As of NetWeaver 7.1
|
protected void |
handleWrongConfiguration()
Deprecated.
As of NetWeaver 7.1
|
protected ICommand |
initNewInstance(ICommand command)
Deprecated.
As of NetWeaver 7.1
|
boolean |
isApplicable()
Deprecated.
As of NetWeaver 7.1
|
protected boolean |
isMatchedPath(String[] paths,
String resourcePath)
Deprecated.
As of NetWeaver 7.1
|
protected boolean |
othAvailable(IResource res,
IActionType actiontype)
Deprecated.
As of NetWeaver 7.1
|
boolean |
raisesEvent()
Deprecated.
As of NetWeaver 7.1
|
protected IResource |
resolveLink()
Deprecated.
As of NetWeaver 7.1
|
void |
setAlias(String alias)
Deprecated.
As of NetWeaver 7.1
|
void |
setConfigurationProperties(Properties properties)
Deprecated.
As of NetWeaver 7.1
|
void |
setLabelBundleKey(String groupLabel)
Deprecated.
As of NetWeaver 7.1
|
void |
setLayoutSetID(String layoutSetID)
Deprecated.
As of NetWeaver 7.1
|
void |
setParameters(Hashtable parameters)
Deprecated.
As of NetWeaver 7.1
|
void |
setProxy(AbstractProxyControl proxy)
Deprecated.
As of NetWeaver 7.1
|
void |
setReplaceCommands(List replaceCommandsList)
Deprecated.
As of NetWeaver 7.1
|
void |
setResource(IResource resource)
Deprecated.
As of NetWeaver 7.1
|
void |
setResourceBundle(ResourceBundles bundleFile)
Deprecated.
As of NetWeaver 7.1
|
void |
setResourceContext(IResourceContext context)
Deprecated.
As of NetWeaver 7.1
|
void |
setTextProperties(Properties properties)
Deprecated.
As of NetWeaver 7.1
|
void |
setTooltipBundleKey(String groupTooltip)
Deprecated.
As of NetWeaver 7.1
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute, getNewInstance
getTargetParameters, isExecutable, setTargetParameters
protected IResource resource
protected int applicable
protected IResourceContext context
public String layoutSetID
public AbstractProxyControl proxy
public AbstractCommand()
UICommandFactory
, when command is
created for the first timepublic AbstractCommand(String keyLabel, String keyTooltip)
keyLabel
- the labelkey for the resourcebundle of the command, it is
only set if it is not null
keyTooltip
- the tooltipkey for the resourcebundle of the command, it
is only set if it is not null
public void setResource(IResource resource)
setResource
in interface IUIBaseCommand
resource
- resource the command shall operate on. Must not be null
public IResource getResource()
getResource
in interface ICommand
null
.protected String getTooltip()
protected String getLabel()
public String getText(TextKey key)
getText
in interface IUIBaseCommand
key
- Description of the parampublic void setTextProperties(Properties properties)
setTextProperties
in interface ICommand
setTextProperties
in interface IExecCommand
properties
- should hold key-value pairs with keys defined in IUIBaseCommand.TEXT_KEYS
. Other key-value pairs will not be used.protected Properties getTextProperties()
null
, but may return
an empty Properties-object.public void setResourceBundle(ResourceBundles bundleFile)
setResourceBundle
in interface IUIBaseCommand
bundleFile
- the bundle the command uses to retrieve its texts.public void setLabelBundleKey(String groupLabel)
setLabelBundleKey
in interface IUIBaseCommand
groupLabel
- The new labelBundleKey valuepublic void setTooltipBundleKey(String groupTooltip)
setTooltipBundleKey
in interface IUIBaseCommand
groupTooltip
- The new tooltipBundleKey valuepublic void setConfigurationProperties(Properties properties)
setConfigurationProperties
in interface IUIBaseCommand
properties
- free properties bag to be used by a command.public Properties getConfigurationProperties()
getConfigurationProperties
in interface IUIBaseCommand
null
, but may return an empty properties-object.public com.sapportals.htmlb.Component getComponent()
getComponent
in interface IUIBaseCommand
null
;protected void createResource(IResourceContext context, RID rid) throws WcmException
IResource
from the given parameters and sets it as the
member variable.context
- the current context of the sessionrid
- the identifier of the resource to createWcmException
- if the resource could not be created.protected IResource createResource(String uri) throws ResourceException, WcmException
IResource
from the given parameters and returns it. Does not
set it as a member variable.uri
- WcmException
- if the resource could not be created.ResourceException
public boolean raisesEvent()
raisesEvent
in interface IExecCommand
protected final ICommand initNewInstance(ICommand command)
getNewInstance
method like this
public getNewInstance() {
return this.initNewInstance(new MyCommand());
}
this abstract class' method will copy all of the member-attributes.
Comparable to the deep-clone approach.command
- Description of the parampublic LinkAttributes getLinkAttributes()
getLinkAttributes
in interface IExecCommand
public void setProxy(AbstractProxyControl proxy)
setProxy
in interface IUIBaseCommand
proxy
- The new proxy valuepublic AbstractProxyControl getProxy()
public String getTextForSecondaryScreen(String key)
key
- Description of the parampublic String getLayoutSetID()
public void setLayoutSetID(String layoutSetID)
layoutSetID
- The new layoutSetID valuepublic String getAlias()
getAlias
in interface IExecCommand
public void setAlias(String alias)
setAlias
in interface IExecCommand
alias
- The new alias valuepublic RenderingEvent execute(ScreenflowData data) throws WcmException
WcmException
public void setResourceContext(IResourceContext context)
setResourceContext
in interface IUIBaseCommand
context
- The new resourceContext valueprotected String getBundleString(String key, Object[] obj)
key
- the key of the text to return - must not be
null
obj
- the variables to fill the place holders in
the resource bundle, can be null
MissingResourceException
- if the IResourceContext
is not
set for the commandprotected String getBundleString(String key)
key
- the key of the text to return - must not be
null
MissingResourceException
- if the IResourceContext
is not
set for the commandprotected String getBundleString(String key, Object obj)
key
- the key of the text to return - must not be
null
obj
- the variable to fill the place holder in the
resource bundle, can be null
MissingResourceException
- if the IResourceContext
is not
set for the commandprotected String getBundleString(String key, Object obj1, Object obj2)
key
- the key of the text to return - must not be
null
obj1
- the variable to fill the first place holder
in the resource bundle, can be null
obj2
- the variable to fill the second place holder
in the resource bundle, can be null
*MissingResourceException
- if the IResourceContext
is not
set for the commandprotected void handleWrongConfiguration() throws InvalidConfigurationException
InvalidConfigurationException
that will be displayed
on the screen and give further information what was invalid for the given configurationInvalidConfigurationException
- Exception raised in failure situationpublic List getReplaceCommands()
getReplaceCommands
in interface IUIBaseCommand
public void setReplaceCommands(List replaceCommandsList)
setReplaceCommands
in interface IUIBaseCommand
replaceCommandsList
- The new replaceCommands valuepublic boolean isApplicable()
isApplicable
in interface IExecCommand
protected RID getStartUri()
public String getLinkLabel()
public String getButtonLabel()
protected boolean isMatchedPath(String[] paths, String resourcePath)
protected boolean othAvailable(IResource res, IActionType actiontype)
protected String getOTHDefinedURL(IResource res, IActionType actiontype)
public void setParameters(Hashtable parameters)
setParameters
in interface IUIBaseCommand
parameters
- The new parameters valuepublic Hashtable getParameters()
getParameters
in interface IUIBaseCommand
protected final IResource resolveLink() throws ResourceException
getResource()
. If this resource is an
internal link: this.getResource().getLinkType().equals(LinkType.INTERNAL)
, the
target of this resource is returned.ResourceException
- is thrown by the RepositoryFramework and not caught by this methodprotected boolean checkArchivingStauts(IResource resource)
Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com]
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice