public abstract class AbstractRequest extends Object implements Request
Request
implementations.PROPERTY_CONTEXT, PROPERTY_INTERACTIVE, PROPERTY_REMOTE
Constructor and Description |
---|
AbstractRequest()
Default constructor.
|
AbstractRequest(Request request) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsProperty(String key) |
boolean |
equals(Object o) |
Map<String,Serializable> |
getContext() |
List<String> |
getId() |
Map<String,Object> |
getProperties() |
<T> T |
getProperty(String key) |
<T> T |
getProperty(String key,
T def) |
Collection<String> |
getPropertyNames() |
int |
hashCode() |
boolean |
isInteractive() |
boolean |
isRemote() |
Boolean |
isStatusLogIsolated() |
Boolean |
isStatusSerialized() |
boolean |
isVerbose() |
<T> T |
removeProperty(String key) |
void |
setContext(Map<String,Serializable> context) |
void |
setId(List<String> id) |
void |
setId(String... id) |
void |
setId(String id) |
void |
setInteractive(boolean interactive) |
void |
setProperty(String key,
Object value) |
void |
setRemote(boolean remote) |
void |
setStatusLogIsolated(Boolean statusLogIsolated) |
void |
setStatusSerialized(Boolean statusSerialized) |
void |
setVerbose(boolean verbose) |
public AbstractRequest()
public AbstractRequest(Request request)
request
- the request to copypublic void setId(List<String> id)
id
- the identifier used to access the jobpublic void setId(String id)
id
- the identifier used to access the jobpublic void setId(String... id)
id
- the id elementspublic boolean isRemote()
public void setRemote(boolean remote)
remote
- indicate if the job has been triggered by a remote eventpublic boolean isInteractive()
isInteractive
in interface Request
public void setInteractive(boolean interactive)
interactive
- indicate if the job is allowed to ask questions if it it should be fully automated (i.e. use
default answers)public void setProperty(String key, Object value)
key
- the name of the propertyvalue
- the value of the propertypublic <T> T removeProperty(String key)
T
- the type of the valuekey
- the name of the propertypublic <T> T getProperty(String key)
getProperty
in interface Request
T
- the type of the valuekey
- the name of the propertypublic <T> T getProperty(String key, T def)
getProperty
in interface Request
T
- the type of the valuekey
- the name of the propertydef
- the default value of the propertypublic Collection<String> getPropertyNames()
getPropertyNames
in interface Request
public boolean containsProperty(String key)
containsProperty
in interface Request
key
- the name of the propertypublic boolean isVerbose()
public void setVerbose(boolean verbose)
verbose
- true if the job should log informations about what is going on.public Boolean isStatusLogIsolated()
isStatusLogIsolated
in interface Request
JobStatus.isIsolated()
public void setStatusLogIsolated(Boolean statusLogIsolated)
statusLogIsolated
- true if the log should be isolated from standard output, null to fallback on
JobStatus.isIsolated()
public Boolean isStatusSerialized()
isStatusSerialized
in interface Request
JobStatus.isSerialized()
public void setStatusSerialized(Boolean statusSerialized)
statusSerialized
- true if the job status should be serialized, null to fallback on
JobStatus.isSerialized()
public Map<String,Serializable> getContext()
getContext
in interface Request
public void setContext(Map<String,Serializable> context)
setContext
in interface Request
context
- the context to restore in the job thread.public Map<String,Object> getProperties()
Copyright © 2004–2021 XWiki. All rights reserved.