public final class OperationContext extends CRUDOperationContext
| Constructor and Description |
|---|
OperationContext(Request request,
CRUDOperation op,
OperationContext ctx)
Construct operation context based on an existing one, with a different
request and operation
|
OperationContext(Request request,
Metadata metadata,
Factory factory,
CRUDOperation CRUDOperation)
Construct operation context
|
OperationContext(Request request,
Metadata metadata,
Factory factory,
CRUDOperation CRUDOperation,
DefaultMetadataResolver resolver,
List<DocCtx> docs,
Set<String> callerRoles,
HookManager hookManager)
Construct an operation context drived from another operation context
|
| Modifier and Type | Method and Description |
|---|---|
OperationContext |
getDerivedOperationContext(String entityName,
CRUDFindRequest req) |
EntityMetadata |
getEntityMetadata(String entityName)
Returns the entity metadata with the version used in this call
|
Metadata |
getMetadata()
Returns the metadata manager
|
Request |
getRequest()
Returns the top level request
|
OperationStatus |
getStatus()
The operation status
|
CompositeMetadata |
getTopLevelEntityMetadata()
Returns the top level entity metadata
|
String |
getTopLevelEntityName()
Returns the top level entity name
|
String |
getTopLevelEntityVersion()
Returns the top level entity version
|
boolean |
isSimple()
Returns true if the operation context is for a simple entity, an entity
with no associations
|
void |
setStatus(OperationStatus status)
The operation status
|
addCallerRoles, addDocument, addDocuments, addError, addErrors, getCallerRoles, getCRUDOperation, getDataErrors, getDocuments, getDocumentsWithoutErrors, getEntityName, getErrors, getExecutionOptions, getFactory, getHookManager, getOutputDocumentsWithoutErrors, getProperty, hasDocumentErrors, hasDocumentsWithoutErrors, hasErrors, reset, setDocuments, setPropertypublic OperationContext(Request request, Metadata metadata, Factory factory, CRUDOperation CRUDOperation)
request - The top-level requestmetadata - Metadata managerfactory - The factory to get validators and controllersCRUDOperation - The operation in progresspublic OperationContext(Request request, CRUDOperation op, OperationContext ctx)
public OperationContext(Request request, Metadata metadata, Factory factory, CRUDOperation CRUDOperation, DefaultMetadataResolver resolver, List<DocCtx> docs, Set<String> callerRoles, HookManager hookManager)
request - The top-level requestmetadata - Metadata managerfactory - The factory to get validators and controllersCRUDOperation - The operation in progressresolver - the resolver instance to usedocs - The documents in the call. Can be nullcallerRoles - Roles of the current callerhookManager - the hook managerpublic OperationContext getDerivedOperationContext(String entityName, CRUDFindRequest req)
public String getTopLevelEntityName()
public String getTopLevelEntityVersion()
public CompositeMetadata getTopLevelEntityMetadata()
public Metadata getMetadata()
public Request getRequest()
public boolean isSimple()
public EntityMetadata getEntityMetadata(String entityName)
public OperationStatus getStatus()
public void setStatus(OperationStatus status)
Copyright © 2016. All rights reserved.