com.sapportals.wcm.command

Class ResourceCommand

java.lang.Object
  extended by com.sapportals.wcm.command.Command
      extended by com.sapportals.wcm.command.ResourceCommand
Direct Known Subclasses:
AddPropertyCommand, AddToFavoritesCommand, AttachmentCommand, CommentCommand, CopyResourceCommand, CreateCollectionCommand, CreateDocumentOrUpdateContentCommand, CreateOrEditLinkCommand, CreatePropertyCommand, CreateResourceOrUpdateContentCommand, CreateScheduledReportCommand, DeletePropertiesCommand, DeleteResourceCommand, DetailsResourceCommand, DiscussionCommand, FeedbackCommand, LinkResourceCommand, LockResourceCommand, ModifyDescriptionCommand, ModifyDisplayNameCommand, ModifyPropertiesCommand, ModifyPropertyCommand, MoveResourceCommand, PersonalNotesCommand, RatingCommand, RenameCommand, RestoreResourceCommand, RunReportCommand, SeeAlsoCommand, ShoppingBasketClearCommand, ShoppingBasketCommand, ShoppingBasketRemoveCommand, StopReportCommand, SubscriptionCreateCommand, SubscriptionDeleteCommand, SubscriptionUpdateCommand, SubscriptionUpdateOrCreateCommand, UpdateScheduledReportCommand

public abstract class ResourceCommand
extends Command

Implements a default error handling for commands working on resources.

Copyright 2004 SAP AG


Field Summary
static String MSG_ACCESSDENIED
           
static String MSG_AUTHORIZATIONFAILED
           
static String MSG_AUTHORIZATIONREQUIRED
           
static String MSG_CHILDRESOURCELOCKED
           
static String MSG_DATEVALIDATIONERROR
           
static String MSG_DOUBLENAMEVALIDATIONERROR
           
static String MSG_INVALID_CHANGED_TARGET
           
static String MSG_INVALID_TARGET
           
static String MSG_INVALIDNAME
           
static String MSG_INVALIDRECIPIENT
           
static String MSG_IOERROR
           
static String MSG_IPN
           
static String MSG_IPN_2
           
static String MSG_NAMEALREADYEXISTS
           
static String MSG_NAMETOOLONG
           
static String MSG_NOACCESSFORRESOURCE
           
static String MSG_NORECIPIENTGIVEN
           
static String MSG_OPERATIONNOTSUPPORTED
           
static String MSG_PARENTFOLDERLOCKED
           
static String MSG_RESOURCECHECKEDOUT
           
static String MSG_RESOURCELOCKED
           
static String MSG_RESOURCENOTCHECKEDOUT
           
static String MSG_RESOURCEREADONLY
           
static String MSG_SYSTEMERROR
           
static String MSG_UNKNOWNERROR
           
static String MSG_VALIDATIONERROR
           
 
Constructor Summary
ResourceCommand()
           
 
Method Summary
protected  void executeImpl()
          Implements the default error handling of all resource commands.
protected abstract  void executeResourceImpl()
          Re-Implementation of resource command execute method.
protected  String getDuplicateName(RID rid)
           
 IResource getResource()
           
protected  boolean isLockedByMeAndSupported()
           
protected  boolean isNotLockedByOtherUser()
           
protected  boolean isNotVersionedOrCheckedOutByMe()
           
 boolean isResourceLockedByOther()
           
 void setResource(IResource resource)
           
protected  void validateImpl()
          Implementation of validation which is called before a command is executed.
protected abstract  void validateResourceImpl()
          Re-Implementation of resource command validate method.
 
Methods inherited from class com.sapportals.wcm.command.Command
canExecute, canExecuteDefaultImpl, canExecuteImpl, execute, failed, getMessage, getMessageKey, getRootCauseException, isAccessible, isAccessibleImpl, isSupported, isSupportedImpl, isSystemError, setMessage, setMessageKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSG_OPERATIONNOTSUPPORTED

public static final String MSG_OPERATIONNOTSUPPORTED
See Also:
Constant Field Values

MSG_AUTHORIZATIONREQUIRED

public static final String MSG_AUTHORIZATIONREQUIRED
See Also:
Constant Field Values

MSG_AUTHORIZATIONFAILED

public static final String MSG_AUTHORIZATIONFAILED
See Also:
Constant Field Values

MSG_ACCESSDENIED

public static final String MSG_ACCESSDENIED
See Also:
Constant Field Values

MSG_RESOURCELOCKED

public static final String MSG_RESOURCELOCKED
See Also:
Constant Field Values

MSG_PARENTFOLDERLOCKED

public static final String MSG_PARENTFOLDERLOCKED
See Also:
Constant Field Values

MSG_CHILDRESOURCELOCKED

public static final String MSG_CHILDRESOURCELOCKED
See Also:
Constant Field Values

MSG_NAMEALREADYEXISTS

public static final String MSG_NAMEALREADYEXISTS
See Also:
Constant Field Values

MSG_UNKNOWNERROR

public static final String MSG_UNKNOWNERROR
See Also:
Constant Field Values

MSG_SYSTEMERROR

public static final String MSG_SYSTEMERROR
See Also:
Constant Field Values

MSG_VALIDATIONERROR

public static final String MSG_VALIDATIONERROR
See Also:
Constant Field Values

MSG_DATEVALIDATIONERROR

public static final String MSG_DATEVALIDATIONERROR
See Also:
Constant Field Values

MSG_INVALIDNAME

public static final String MSG_INVALIDNAME
See Also:
Constant Field Values

MSG_INVALID_TARGET

public static final String MSG_INVALID_TARGET
See Also:
Constant Field Values

MSG_NAMETOOLONG

public static final String MSG_NAMETOOLONG
See Also:
Constant Field Values

MSG_INVALIDRECIPIENT

public static final String MSG_INVALIDRECIPIENT
See Also:
Constant Field Values

MSG_NORECIPIENTGIVEN

public static final String MSG_NORECIPIENTGIVEN
See Also:
Constant Field Values

MSG_RESOURCECHECKEDOUT

public static final String MSG_RESOURCECHECKEDOUT
See Also:
Constant Field Values

MSG_RESOURCENOTCHECKEDOUT

public static final String MSG_RESOURCENOTCHECKEDOUT
See Also:
Constant Field Values

MSG_RESOURCEREADONLY

public static final String MSG_RESOURCEREADONLY
See Also:
Constant Field Values

MSG_DOUBLENAMEVALIDATIONERROR

public static final String MSG_DOUBLENAMEVALIDATIONERROR
See Also:
Constant Field Values

MSG_NOACCESSFORRESOURCE

public static final String MSG_NOACCESSFORRESOURCE
See Also:
Constant Field Values

MSG_IOERROR

public static final String MSG_IOERROR
See Also:
Constant Field Values

MSG_INVALID_CHANGED_TARGET

public static final String MSG_INVALID_CHANGED_TARGET
See Also:
Constant Field Values

MSG_IPN

public static final String MSG_IPN
See Also:
Constant Field Values

MSG_IPN_2

public static final String MSG_IPN_2
See Also:
Constant Field Values
Constructor Detail

ResourceCommand

public ResourceCommand()
Method Detail

getResource

public IResource getResource()

setResource

public void setResource(IResource resource)

executeImpl

protected final void executeImpl()
                          throws Exception
Implements the default error handling of all resource commands. Calls

Specified by:
executeImpl in class Command
Throws:
Exception

isNotLockedByOtherUser

protected boolean isNotLockedByOtherUser()
                                  throws WcmException
Throws:
WcmException

isLockedByMeAndSupported

protected boolean isLockedByMeAndSupported()
                                    throws WcmException
Throws:
WcmException

isNotVersionedOrCheckedOutByMe

protected boolean isNotVersionedOrCheckedOutByMe()
                                          throws WcmException
Throws:
WcmException

executeResourceImpl

protected abstract void executeResourceImpl()
                                     throws Exception
Re-Implementation of resource command execute method.

Throws:
Exception

validateResourceImpl

protected abstract void validateResourceImpl()
                                      throws ValidationException
Re-Implementation of resource command validate method.

Throws:
ValidationException - Only this kind of exceptions are allowed

isResourceLockedByOther

public boolean isResourceLockedByOther()
                                throws ResourceException
Throws:
ResourceException

validateImpl

protected void validateImpl()
                     throws ValidationException
Implementation of validation which is called before a command is executed.

Specified by:
validateImpl in class Command
Throws:
ValidationException

getDuplicateName

protected String getDuplicateName(RID rid)
                           throws ResourceException
Throws:
ResourceException
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