|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OperationFactory
A generic factory for operations.
Operation factories can be registered using the extension point
OperationFactory.EXTENSION_POINT_ID
. Operation factory
implementations must provide a 0-arg constructor.
Only use this plug point if your operation factory implementation needs to
decide dynamically (based on the given request context) if a
SafeOperation
or UnsafeOperation
object is to be created. If
you know the type of your operation a priori, it is strongly recommended to
use one of the specific plug points that are defined in
SafeOperationFactory
or UnsafeOperationFactory
respectively.
Field Summary | |
---|---|
static java.lang.String |
EXTENSION_POINT_ID
Extension point to plug in a custom factory for operations. |
Method Summary | |
---|---|
Operation |
newOperation(java.net.URI resourceURI,
java.util.Map<java.lang.String,java.lang.String[]> operationParams,
java.util.Map<java.lang.String,java.lang.String[]> requestParams,
Context context)
Creates a new operation for the given context. |
OperationURI |
newOperationURI()
Creates a OperationURI object which addresses the operation this
OperationFactory is responsible for. |
OperationURI |
newOperationURI(java.util.Map<java.lang.String,java.lang.String[]> arguments)
Creates a OperationURI object which addresses the operation this
OperationFactory is responsible for. |
OperationURI |
newOperationURI(java.net.URI resourceURI,
java.util.Map<java.lang.String,java.lang.String[]> arguments)
Creates a OperationURI object which addresses the operation this
OperationFactory is responsible for. |
Field Detail |
---|
static final java.lang.String EXTENSION_POINT_ID
Method Detail |
---|
OperationURI newOperationURI(java.net.URI resourceURI, java.util.Map<java.lang.String,java.lang.String[]> arguments) throws java.net.URISyntaxException, java.io.IOException
OperationURI
object which addresses the operation this
OperationFactory
is responsible for.
resourceURI
- The URI
of the resource the operation should be
applied to. Must not be null
.arguments
- Map keeping the operation arguments that should be passed to
the operation at execution time. Must not be null
.
OperationURI
object which addresses the operation.
java.net.URISyntaxException
java.io.IOException
OperationURI newOperationURI(java.util.Map<java.lang.String,java.lang.String[]> arguments) throws java.net.URISyntaxException, java.io.IOException
OperationURI
object which addresses the operation this
OperationFactory
is responsible for.
arguments
- Map keeping the operation arguments that should be passed to
the operation at execution time. Must not be null
.
OperationURI
object which addresses the operation.
java.net.URISyntaxException
java.io.IOException
OperationURI newOperationURI() throws java.net.URISyntaxException, java.io.IOException
OperationURI
object which addresses the operation this
OperationFactory
is responsible for.
OperationURI
object which addresses the operation.
java.net.URISyntaxException
java.io.IOException
Operation newOperation(java.net.URI resourceURI, java.util.Map<java.lang.String,java.lang.String[]> operationParams, java.util.Map<java.lang.String,java.lang.String[]> requestParams, Context context) throws CannotCreateOperationException
resourceURI
- The URI of the resource the operation should be applied to.
May be null
.operationParams
- The parameters of the operation that were part of the
operation URI. Must not be null
.requestParams
- The request parameters. Must not be null
.context
- The current runtime context. Must not be null
.
SafeOperation
object. Never null
.
CannotCreateOperationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |