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 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. |
void |
performAfterActions(U operation,
Session session,
S component,
Map<String,Object> requestParameters)
perform all after actions supplied by the added operations extensions for a given operation.
|
void |
performBeforeActions(U operation,
Session session,
Resource resource,
Map<String,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 void performBeforeActions(U operation, Session session, Resource resource, Map<String,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, Map<String,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 © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"