T
- the specific type of OperationExtension
supported by this service.U
- the specific set of operations supported by this service.S
- the object representing the resource/component that the service was performed on.public abstract class AbstractOperationService<T extends OperationExtension,U extends Operation,S> extends java.lang.Object implements OperationService<T,U,S>
OperationService
. This class provides the necessary functionality to
bind/unbind OperationExtentions and to perform before and after actions.Constructor and Description |
---|
AbstractOperationService() |
Modifier and Type | Method and Description |
---|---|
void |
addOperationExtension(T extension)
add an
OperationExtension to the list of operation extensions used by this service. |
InheritedOperationExtensionManager |
getInheritedOperationExtensionManager()
Get the
InheritedOperationExtensionManager which allows parent extension to be executed as part of the
operation. |
void |
performAfterActions(U operation,
Session session,
S component,
java.util.Map<java.lang.String,java.lang.Object> requestParameters)
perform all after actions supplied by the added operations extensions for a given operation.
|
void |
performBeforeActions(U operation,
Session session,
Resource resource,
java.util.Map<java.lang.String,java.lang.Object> requestParameters)
perform all before actions supplied by the added operations extensions for a given operation.
|
void |
removeOperationExtension(T extension)
remove an
OperationExtension from the list of operation extensions used by this service. |
public void addOperationExtension(T extension)
OperationService
OperationExtension
to the list of operation extensions used by this service.addOperationExtension
in interface OperationService<T extends OperationExtension,U extends Operation,S>
extension
- an OperationExtension that will be called before and after operations are performed.public void removeOperationExtension(T extension)
OperationService
OperationExtension
from the list of operation extensions used by this service.removeOperationExtension
in interface OperationService<T extends OperationExtension,U extends Operation,S>
extension
- the OperationExtension that should be removed from the list of operation extenstions used by
this service.public InheritedOperationExtensionManager getInheritedOperationExtensionManager()
OperationService
InheritedOperationExtensionManager
which allows parent extension to be executed as part of the
operation.getInheritedOperationExtensionManager
in interface OperationService<T extends OperationExtension,U extends Operation,S>
public void performBeforeActions(U operation, Session session, Resource resource, java.util.Map<java.lang.String,java.lang.Object> requestParameters) throws OperationException
OperationService
performBeforeActions
in interface OperationService<T extends OperationExtension,U extends Operation,S>
operation
- the operation for which before actions needs to be performed.session
- the session that is being used to perform the operation.resource
- the resource on which the operation is being performed.requestParameters
- the parameters that have been passed as part of the request to perform the operation.OperationException
- thrown if any one of the operations extensions throws an exception. This aborts the
operations.public void performAfterActions(U operation, Session session, S component, java.util.Map<java.lang.String,java.lang.Object> requestParameters) throws OperationException
OperationService
performAfterActions
in interface OperationService<T extends OperationExtension,U extends Operation,S>
operation
- the operation for which after actions needs to be performed.session
- the session that is being used to perform the operation.component
- the resource on which the operation is being performed.requestParameters
- the parameters that have been passed as part of the request to perform the operation.OperationException
- thrown if any one of the operations extensions throws an exception.Copyright © 2010 - 2023 Adobe. All Rights Reserved