|
SAP NetWeaver 7.31 (SP01) KMC | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sapportals.wcm.command.Command
public abstract class Command
Command package is a layer between CM repository layer and the user interface. This class provides a uniform execution interface which is directly coupled to user interface components.
Example: RenameCommand can be combined with a input field and a
button. The input field can ask for command state (isAccessible(),
isSupported(), etc.) and the button action can execute the
command.
Furthermore command layer defines a centralized error handling.
Copyright 2004 SAP AG
| Constructor Summary | |
|---|---|
Command()
|
|
| Method Summary | |
|---|---|
boolean |
canExecute()
Check preconditions to execute a command. |
protected boolean |
canExecuteDefaultImpl()
Default implementation of canExecute() check. |
protected abstract boolean |
canExecuteImpl()
Default implementation of precondition to execute a command. |
boolean |
execute()
Executues a command without throwing exceptions. |
protected abstract void |
executeImpl()
Implementation to execute a command. |
boolean |
failed()
|
String |
getMessage()
|
String |
getMessageKey()
|
Exception |
getRootCauseException()
|
boolean |
isAccessible()
Precondition to execute command (access rights are given to execute command). |
protected abstract boolean |
isAccessibleImpl()
Implementation to check access rights to execute a command. |
boolean |
isSupported()
Precondition to execute command (e.g. supported by repository). |
protected abstract boolean |
isSupportedImpl()
Implementation to check if a system configuration supports the execution of a command. |
boolean |
isSystemError()
If a command can't generate a resource bundle message key, the error was a system error and the message attribute contains the original exception message. |
void |
setMessage(String message)
|
void |
setMessageKey(String messageKey)
|
protected abstract void |
validateImpl()
Implementation of validation which is called before a command is executed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Command()
| Method Detail |
|---|
public boolean failed()
public Exception getRootCauseException()
public String getMessage()
public void setMessage(String message)
public String getMessageKey()
public void setMessageKey(String messageKey)
public final boolean isSystemError()
public final boolean execute()
failed()).
Before execution a validation check is executed.
public final boolean canExecute()
throws com.sapportals.wcm.WcmException
com.sapportals.wcm.WcmException - Must be handled by caller!
public final boolean isSupported()
throws com.sapportals.wcm.WcmException
com.sapportals.wcm.WcmException - Must be handled by caller!
public final boolean isAccessible()
throws com.sapportals.wcm.WcmException
com.sapportals.wcm.WcmException - Must be handled by caller!
protected abstract void executeImpl()
throws Exception
Exception - Exceptions are handled generally by the execute() method.
protected final boolean canExecuteDefaultImpl()
throws com.sapportals.wcm.WcmException
canExecute() check. Can be called
in implementation of canExecuteImpl(). (For convenience purpose).
com.sapportals.wcm.WcmException - Must be handled by caller!
protected abstract boolean canExecuteImpl()
throws com.sapportals.wcm.WcmException
isAccessible() and isSupported() and
others. For convenience the implementation can call canExecuteDefaultImpl().
com.sapportals.wcm.WcmException - Must be handled by caller!
protected abstract boolean isAccessibleImpl()
throws com.sapportals.wcm.WcmException
Example: To rename a file at least read and write access permission have to be set.
com.sapportals.wcm.WcmException - Must be handled by caller!
protected abstract boolean isSupportedImpl()
throws com.sapportals.wcm.WcmException
com.sapportals.wcm.WcmException - Must be handled by caller!
protected abstract void validateImpl()
throws ValidationException
ValidationException| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
[sap.com] KMC-CM
|
[sap.com]
|
api
|
EP-KM-CM
|
|
SAP NetWeaver 7.31 (SP01) KMC | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||