public class DuplicateI extends Duplicate implements IRequest, ome.services.util.ReadOnlyStatus.IsAware, WrappableRequest<Duplicate>
__ids, serialVersionUID, typesToDuplicate, typesToIgnore, typesToReferencechildOptions, dryRuntargetObjects| Constructor and Description |
|---|
DuplicateI(ome.security.ACLVoter aclVoter,
ome.system.Roles securityRoles,
ome.services.graphs.GraphPathBean graphPathBean,
ome.security.basic.LightAdminPrivileges adminPrivileges,
ome.services.delete.Deletion deletionInstance,
java.util.Set<java.lang.Class<? extends ome.model.IObject>> targetClasses,
ome.services.graphs.GraphPolicy graphPolicy,
com.google.common.collect.SetMultimap<java.lang.String,java.lang.String> unnullable,
org.springframework.context.ApplicationContext applicationContext)
Construct a new
duplicaterequest; called from GraphRequestFactory.getRequest(Class). |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustGraphPolicy(java.util.function.Function<ome.services.graphs.GraphPolicy,ome.services.graphs.GraphPolicy> adjuster)
Transform the currently applicable graph policy for this request by the given function.
|
void |
buildResponse(int step,
java.lang.Object object)
Post-transaction chance to map from the return value of
IRequest.step(int) to a Response object. |
void |
copyFieldsTo(Duplicate request)
Copy the fields of this request to that of the given request.
|
void |
finish()
Method within the transaction boundaries after all processing has
occurred.
|
ome.services.graphs.GraphPolicy.Action |
getActionForStarting() |
java.util.Map<java.lang.String,java.lang.String> |
getCallContext()
Returns the desired call context for this request.
|
Response |
getResponse()
Returns the current response value.
|
java.util.Map<java.lang.String,java.util.List<java.lang.Long>> |
getStartFrom(Response response)
From the response of the head-skipping request, determine which model objects are the targets of the operation.
|
int |
getStepProvidingCompleteResponse()
Get the step of this request that suffices for assembling the request's response.
|
void |
init(Helper helper)
Method called within the transaction boundaries before any processing occurs.
|
boolean |
isReadOnly(ome.services.util.ReadOnlyStatus readOnly) |
void |
setOriginalFileRepos()
Use SQL to effect the required
OriginalFile.setRepo(String) operations
since the property was nulled for persisting the duplicate instances. |
java.lang.Object |
step(int step)
Single uncancellable action which will be performed by this IRequest.
|
__readImpl, __writeImpl, clone, ice_factory, ice_id, ice_id, ice_ids, ice_ids, ice_isA, ice_isA, ice_staticIdpublic DuplicateI(ome.security.ACLVoter aclVoter,
ome.system.Roles securityRoles,
ome.services.graphs.GraphPathBean graphPathBean,
ome.security.basic.LightAdminPrivileges adminPrivileges,
ome.services.delete.Deletion deletionInstance,
java.util.Set<java.lang.Class<? extends ome.model.IObject>> targetClasses,
ome.services.graphs.GraphPolicy graphPolicy,
com.google.common.collect.SetMultimap<java.lang.String,java.lang.String> unnullable,
org.springframework.context.ApplicationContext applicationContext)
duplicaterequest; called from
GraphRequestFactory.getRequest(Class).aclVoter - ACL voter for permissions checkingsecurityRoles - the security rolesgraphPathBean - the graph path bean to useadminPrivileges - the light administrator privileges helperdeletionInstance - a deletion instance for deleting filestargetClasses - legal target object classes for duplicategraphPolicy - the graph policy to apply for duplicateunnullable - properties that, while nullable, may not be nulled by a graph traversal operationapplicationContext - the OMERO application context from Springpublic java.util.Map<java.lang.String,java.lang.String> getCallContext()
IRequestMap as desired.getCallContext in interface IRequestpublic void init(Helper helper)
IRequestStatus object by calling Helper.setSteps(int). This count
will define how many times the IRequest.step(int) method will be called.
The Helper instance passed in contains those resources needed by
IRequests to interact with data and should be stored for later use.public void setOriginalFileRepos()
OriginalFile.setRepo(String) operations
since the property was nulled for persisting the duplicate instances.public java.lang.Object step(int step)
throws HandleI.Cancel
IRequestIRequest.buildResponse(int, Object) for conversion and storage.step in interface IRequeststep - the step numberHandleI.Cancel - if this request is cancelledpublic void finish()
IRequestHandleI.Cancel will still rollback the current
transaction.public void buildResponse(int step,
java.lang.Object object)
IRequestIRequest.step(int) to a Response object.buildResponse in interface IRequeststep - the step numberobject - an object to be used in building the responsepublic Response getResponse()
IRequestgetResponse in interface IRequestpublic void copyFieldsTo(Duplicate request)
WrappableRequestcopyFieldsTo in interface WrappableRequest<Duplicate>request - the target of the field copypublic void adjustGraphPolicy(java.util.function.Function<ome.services.graphs.GraphPolicy,ome.services.graphs.GraphPolicy> adjuster)
WrappableRequestIRequest.init(omero.cmd.Helper).adjustGraphPolicy in interface WrappableRequest<Duplicate>adjuster - a transformation function for graph policiespublic int getStepProvidingCompleteResponse()
WrappableRequestgetStepProvidingCompleteResponse in interface WrappableRequest<Duplicate>public ome.services.graphs.GraphPolicy.Action getActionForStarting()
getActionForStarting in interface WrappableRequest<Duplicate>public java.util.Map<java.lang.String,java.util.List<java.lang.Long>> getStartFrom(Response response)
WrappableRequestgetStartFrom in interface WrappableRequest<Duplicate>response - the head-skipping request's responsepublic boolean isReadOnly(ome.services.util.ReadOnlyStatus readOnly)
isReadOnly in interface ome.services.util.ReadOnlyStatus.IsAware