org.xwiki.job
Class AbstractRequest
java.lang.Object
org.xwiki.job.AbstractRequest
- All Implemented Interfaces:
- Serializable, Request
- Direct Known Subclasses:
- DefaultRequest
public abstract class AbstractRequest
- extends Object
- implements Request
Base class for Request
implementations.
- Since:
- 4.0M1
- Version:
- $Id$
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRequest
public AbstractRequest()
- Default constructor.
AbstractRequest
public AbstractRequest(Request request)
- Parameters:
request
- the request to copy
getId
public String getId()
- Specified by:
getId
in interface Request
- Returns:
- identifier used to access the job. If none is provided the job will not be accessible by id and the
status of the job will not be stored.
setId
public void setId(String id)
- Parameters:
id
- the identifier used to acccess the job
isRemote
public boolean isRemote()
- Specified by:
isRemote
in interface Request
- Returns:
- indicate if the job has been triggered by a remote event
setRemote
public void setRemote(boolean remote)
- Parameters:
remote
- indicate if the job has been triggered by a remote event
setProperty
public void setProperty(String key,
Object value)
- Parameters:
key
- the name of the propertyvalue
- the value of the property
getProperty
public <T> T getProperty(String key)
- Specified by:
getProperty
in interface Request
- Type Parameters:
T
- the type of the value- Parameters:
key
- the name of the property
- Returns:
- the value of the property
getProperty
public <T> T getProperty(String key,
T def)
- Specified by:
getProperty
in interface Request
- Type Parameters:
T
- the type of the value- Parameters:
key
- the name of the propertydef
- the default value of the property
- Returns:
- the value of the property
getPropertyNames
public Collection<String> getPropertyNames()
- Specified by:
getPropertyNames
in interface Request
- Returns:
- the names of all the properties
Copyright © 2004-2012 XWiki. All Rights Reserved.