Package omero.cmd.graphs
Class Chown2I
- java.lang.Object
-
- Ice.ObjectImpl
-
- omero.cmd.Request
-
- omero.cmd.GraphQuery
-
- omero.cmd.GraphModify2
-
- omero.cmd.Chown2
-
- omero.cmd.graphs.Chown2I
-
- All Implemented Interfaces:
Ice.Object,java.io.Serializable,java.lang.Cloneable,ome.services.util.ReadOnlyStatus.IsAware,WrappableRequest<Chown2>,IRequest
public class Chown2I extends Chown2 implements IRequest, ome.services.util.ReadOnlyStatus.IsAware, WrappableRequest<Chown2>
Request to give model objects to a different experimenter.- Since:
- 5.1.0
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class omero.cmd.Chown2
__ids, serialVersionUID, targetUsers, userId
-
Fields inherited from class omero.cmd.GraphModify2
childOptions, dryRun
-
Fields inherited from class omero.cmd.GraphQuery
targetObjects
-
-
Constructor Summary
Constructors Constructor Description Chown2I(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 newchown
request; called fromGraphRequestFactory.getRequest(Class).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadjustGraphPolicy(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.voidbuildResponse(int step, java.lang.Object object)Post-transaction chance to map from the return value ofIRequest.step(int)to aResponseobject.voidcopyFieldsTo(Chown2 request)Copy the fields of this request to that of the given request.voidfinish()Method within the transaction boundaries after all processing has occurred.ome.services.graphs.GraphPolicy.ActiongetActionForStarting()java.util.Map<java.lang.String,java.lang.String>getCallContext()Returns the desired call context for this request.ResponsegetResponse()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.intgetStepProvidingCompleteResponse()Get the step of this request that suffices for assembling the request's response.voidinit(Helper helper)Method called within the transaction boundaries before any processing occurs.booleanisReadOnly(ome.services.util.ReadOnlyStatus readOnly)java.lang.Objectstep(int step)Single uncancellable action which will be performed by this IRequest.-
Methods inherited from class omero.cmd.Chown2
__readImpl, __writeImpl, clone, ice_factory, ice_id, ice_id, ice_ids, ice_ids, ice_isA, ice_isA, ice_staticId
-
-
-
-
Constructor Detail
-
Chown2I
public Chown2I(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 newchown
request; called fromGraphRequestFactory.getRequest(Class).- Parameters:
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 chowngraphPolicy- the graph policy to apply for chownunnullable- properties that, while nullable, may not be nulled by a graph traversal operationapplicationContext- the OMERO application context from Spring
-
-
Method Detail
-
getCallContext
public java.util.Map<java.lang.String,java.lang.String> getCallContext()
Description copied from interface:IRequestReturns the desired call context for this request. Some request implementations will require "omero.group":"-1" for example and will hard-code that value. Others may permit users to pass in the desired values which will be merged into the staticMapas desired.- Specified by:
getCallContextin interfaceIRequest- Returns:
- the call context for this request
-
init
public void init(Helper helper)
Description copied from interface:IRequestMethod called within the transaction boundaries before any processing occurs. Implementations must properly initialize the "step" field of theStatusobject by callingHelper.setSteps(int). This count will define how many times theIRequest.step(int)method will be called. TheHelperinstance passed in contains those resources needed by IRequests to interact with data and should be stored for later use.
-
step
public java.lang.Object step(int step) throws HandleI.CancelDescription copied from interface:IRequestSingle uncancellable action which will be performed by this IRequest. The return value can be an ome.model object that is attached to the current thread and transaction. After processing and detachment from the transaction, the object will be passed toIRequest.buildResponse(int, Object)for conversion and storage.- Specified by:
stepin interfaceIRequest- Parameters:
step- the step number- Returns:
- an object to be used in building the response
- Throws:
HandleI.Cancel- if this request is cancelled
-
finish
public void finish()
Description copied from interface:IRequestMethod within the transaction boundaries after all processing has occurred. A thrownHandleI.Cancelwill still rollback the current transaction.
-
buildResponse
public void buildResponse(int step, java.lang.Object object)Description copied from interface:IRequestPost-transaction chance to map from the return value ofIRequest.step(int)to aResponseobject.- Specified by:
buildResponsein interfaceIRequest- Parameters:
step- the step numberobject- an object to be used in building the response
-
getResponse
public Response getResponse()
Description copied from interface:IRequestReturns the current response value. This method should be protected by synchronization where necessary, and should never raise an exception. It is also guaranteed to be called so that any state cleanup that is necessary can take place here.- Specified by:
getResponsein interfaceIRequest- Returns:
- the response to this request
-
copyFieldsTo
public void copyFieldsTo(Chown2 request)
Description copied from interface:WrappableRequestCopy the fields of this request to that of the given request.- Specified by:
copyFieldsToin interfaceWrappableRequest<Chown2>- Parameters:
request- the target of the field copy
-
adjustGraphPolicy
public void adjustGraphPolicy(java.util.function.Function<ome.services.graphs.GraphPolicy,ome.services.graphs.GraphPolicy> adjuster)
Description copied from interface:WrappableRequestTransform the currently applicable graph policy for this request by the given function. Must be called beforeIRequest.init(omero.cmd.Helper).- Specified by:
adjustGraphPolicyin interfaceWrappableRequest<Chown2>- Parameters:
adjuster- a transformation function for graph policies
-
getStepProvidingCompleteResponse
public int getStepProvidingCompleteResponse()
Description copied from interface:WrappableRequestGet the step of this request that suffices for assembling the request's response. It is presumed that checking the permissibility of the planned operation occurs afterward.- Specified by:
getStepProvidingCompleteResponsein interfaceWrappableRequest<Chown2>- Returns:
- a step number
-
getActionForStarting
public ome.services.graphs.GraphPolicy.Action getActionForStarting()
- Specified by:
getActionForStartingin interfaceWrappableRequest<Chown2>- Returns:
- the action associated with nodes qualifying as start objects
-
getStartFrom
public java.util.Map<java.lang.String,java.util.List<java.lang.Long>> getStartFrom(Response response)
Description copied from interface:WrappableRequestFrom the response of the head-skipping request, determine which model objects are the targets of the operation.- Specified by:
getStartFromin interfaceWrappableRequest<Chown2>- Parameters:
response- the head-skipping request's response- Returns:
- the model objects to target
-
isReadOnly
public boolean isReadOnly(ome.services.util.ReadOnlyStatus readOnly)
- Specified by:
isReadOnlyin interfaceome.services.util.ReadOnlyStatus.IsAware
-
-