Package org.xwiki.job.api
Class AbstractCheckRightsRequest
- java.lang.Object
-
- org.xwiki.job.AbstractRequest
-
- org.xwiki.job.api.AbstractCheckRightsRequest
-
- All Implemented Interfaces:
Serializable
,org.xwiki.job.Request
public abstract class AbstractCheckRightsRequest extends org.xwiki.job.AbstractRequest
Define a request that have rights to check.- Since:
- 10.10RC1, 10.8.2, 9.11.9
- Version:
- $Id: a69974f5270afcc6f1903d41da39bc4c1607bf70 $
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description AbstractCheckRightsRequest()
Default constructor.protected
AbstractCheckRightsRequest(org.xwiki.job.Request request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentReference
getAuthorReference()
DocumentReference
getUserReference()
boolean
isCheckAuthorRights()
boolean
isCheckRights()
void
setAuthorReference(DocumentReference authorReference)
Sets the author of the script which is performing the request.void
setCheckAuthorRights(boolean checkAuthorRights)
Sets whether the job should check or not if the user specified bygetAuthorReference()
is authorized to perform the actions implied by this request.void
setCheckRights(boolean checkRights)
Sets whether the job should check or not if the user specified bygetUserReference()
is authorized to perform the actions implied by this request.void
setUserReference(DocumentReference userReference)
Sets the user that should be used to perform this request.-
Methods inherited from class org.xwiki.job.AbstractRequest
containsProperty, equals, getContext, getId, getProperties, getProperty, getProperty, getPropertyNames, hashCode, isInteractive, isRemote, isStatusLogIsolated, isStatusSerialized, isVerbose, removeProperty, setContext, setId, setId, setId, setInteractive, setProperty, setRemote, setStatusLogIsolated, setStatusSerialized, setVerbose
-
-
-
-
Method Detail
-
isCheckAuthorRights
public boolean isCheckAuthorRights()
- Returns:
true
in case the job should check if the author specified bygetAuthorReference()
is authorized to perform the actions implied by this request,false
otherwise
-
setCheckAuthorRights
public void setCheckAuthorRights(boolean checkAuthorRights)
Sets whether the job should check or not if the user specified bygetAuthorReference()
is authorized to perform the actions implied by this request.- Parameters:
checkAuthorRights
-true
to check ifgetAuthorReference()
is authorized to perform this request,false
to perform this request without checking rights
-
isCheckRights
public boolean isCheckRights()
- Returns:
true
in case the job should check if the user specified bygetUserReference()
is authorized to perform the actions implied by this request,false
otherwise
-
setCheckRights
public void setCheckRights(boolean checkRights)
Sets whether the job should check or not if the user specified bygetUserReference()
is authorized to perform the actions implied by this request.- Parameters:
checkRights
-true
to check ifgetUserReference()
is authorized to perform this request,false
to perform this request without checking rights
-
getUserReference
public DocumentReference getUserReference()
- Returns:
- the user that should be used to perform this request; this user must be authorized to perform the actions
implied by this request if
isCheckRights()
istrue
.
-
setUserReference
public void setUserReference(DocumentReference userReference)
Sets the user that should be used to perform this request. This user must be authorized to perform the actions implied by this request ifisCheckRights()
istrue
.- Parameters:
userReference
- the user reference
-
getAuthorReference
public DocumentReference getAuthorReference()
- Returns:
- the author of the script which is performing the request; this user must be authorized to perform the
actions implied by this request if
isCheckRights()
istrue
.
-
setAuthorReference
public void setAuthorReference(DocumentReference authorReference)
Sets the author of the script which is performing the request. This user must be authorized to perform the actions implied by this request ifisCheckRights()
istrue
.- Parameters:
authorReference
- the author reference
-
-