public class JobResource extends BaseResource
Modifier and Type | Field and Description |
---|---|
protected CrawlJob |
cj |
static org.apache.commons.io.filefilter.IOFileFilter |
EDIT_FILTER |
Constructor and Description |
---|
JobResource(org.restlet.Context ctx,
org.restlet.data.Request req,
org.restlet.data.Response res) |
Modifier and Type | Method and Description |
---|---|
void |
acceptRepresentation(org.restlet.resource.Representation entity) |
protected void |
copyJob(String copyTo,
boolean asProfile) |
protected Engine |
getEngine() |
static String |
getHrefPath(File f,
CrawlJob cj)
Get a usable HrefPath, relative to the JobResource, for the given file.
|
freemarker.template.Configuration |
getTemplateConfiguration() |
protected CrawlJobModel |
makeDataModel()
Constructs a nested Map data structure with the information represented
by this Resource.
|
org.restlet.resource.Representation |
represent(org.restlet.resource.Variant variant) |
void |
setTemplateConfiguration(freemarker.template.Configuration tmpltCfg) |
protected void |
writeHtml(Writer writer) |
getPreferredVariant, getStaticRef
allowDelete, allowGet, allowPost, allowPut, delete, getPreferredRepresentation, getRepresentation, getVariants, handleDelete, handleGet, handlePost, handlePut, init, isAvailable, isModifiable, isNegotiateContent, isReadable, post, put, removeRepresentations, represent, setAvailable, setModifiable, setNegotiateContent, setReadable, setVariants, storeRepresentation
public static final org.apache.commons.io.filefilter.IOFileFilter EDIT_FILTER
protected CrawlJob cj
public JobResource(org.restlet.Context ctx, org.restlet.data.Request req, org.restlet.data.Response res) throws org.restlet.resource.ResourceException
org.restlet.resource.ResourceException
public void setTemplateConfiguration(freemarker.template.Configuration tmpltCfg)
public freemarker.template.Configuration getTemplateConfiguration()
public org.restlet.resource.Representation represent(org.restlet.resource.Variant variant) throws org.restlet.resource.ResourceException
represent
in class org.restlet.resource.Resource
org.restlet.resource.ResourceException
protected CrawlJobModel makeDataModel()
XmlMarshaller
.protected void writeHtml(Writer writer)
public static String getHrefPath(File f, CrawlJob cj)
f
- File to provide an href (suitable for clicking or redirection)cj
- CrawlJob for calculating jobdir-relative path if possibleprotected Engine getEngine()
public void acceptRepresentation(org.restlet.resource.Representation entity) throws org.restlet.resource.ResourceException
acceptRepresentation
in class org.restlet.resource.Resource
org.restlet.resource.ResourceException
protected void copyJob(String copyTo, boolean asProfile) throws org.restlet.resource.ResourceException
org.restlet.resource.ResourceException
Copyright © 2003-2014 Internet Archive. All Rights Reserved.