Package com.levigo.jadice.server.html
Class HTMLRendererNode
- java.lang.Object
-
- com.levigo.jadice.server.internal.NodeInternal
-
- com.levigo.jadice.server.Node
-
- com.levigo.jadice.server.html.HTMLRendererNode
-
public class HTMLRendererNode extends Node
This node renders HTML pages into other formats. The only target format currently supported is 'application/pdf', though. This functionality is currently backed by the cobra toolkit, but the backing implementation may change in the future.Its worker respects
PageCountLimit
s.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HTMLRendererNode.PageSize
Predefined values for the size of the resulting PDF document-
Nested classes/interfaces inherited from class com.levigo.jadice.server.Node
Node.Cardinality
-
-
Constructor Summary
Constructors Constructor Description HTMLRendererNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Insets
getMargin()
HTMLRendererNode.PageSize
getPageSize()
String
getTargetMimeType()
String
getWorkerClassName()
Return the node's associatedcom.levigo.jadice.server.core.NodeWorker
full qualified class's name.boolean
isAllowHTTPResources()
boolean
isGenerateHyperlinks()
void
setAllowHTTPResources(boolean allowHTTPResources)
Set totrue
if HTTP request (e.g.void
setGenerateHyperlinks(boolean generate)
Determine if the resulting PDF document shall have hyperlinks to external locations.void
setMargin(Insets margin)
Set the page margin of the resulting document.void
setPageSize(HTMLRendererNode.PageSize pageSize)
Set the desiredHTMLRendererNode.PageSize
for the resulting PDF document.void
setTargetMimeType(String targetMimeType)
Set the desired target MIME-type.-
Methods inherited from class com.levigo.jadice.server.Node
addTransportReceiver, appendSuccessor, apply, equals, getInputCardinality, getJob, getOutputCardinality, getPredecessors, getSubsidiaryNodes, getSuccessors, getTransportSender, getUUID, hashCode, initialize, prependPredecessor, remove, validateConfiguration
-
-
-
-
Method Detail
-
getWorkerClassName
public String getWorkerClassName()
Description copied from class:Node
Return the node's associatedcom.levigo.jadice.server.core.NodeWorker
full qualified class's name. By default, the worker class name is- The same as the node name with the trailing "Node" replaced by "Worker" if the node name ends in "Node"
- The node class name with an appended "Worker" otherwise.
This behavior can be overridden in concrete subclasses.
- Overrides:
getWorkerClassName
in classNode
- Returns:
- the full qualified class name of the worker of this node.
-
getTargetMimeType
public String getTargetMimeType()
- Returns:
- the desired target MIME-type
-
setTargetMimeType
public void setTargetMimeType(String targetMimeType)
Set the desired target MIME-type.- Parameters:
targetMimeType
- the desired target MIME-type
-
isAllowHTTPResources
public boolean isAllowHTTPResources()
-
setAllowHTTPResources
public void setAllowHTTPResources(boolean allowHTTPResources)
Set totrue
if HTTP request (e.g. for images) are allowed. (default:false
)- Parameters:
allowHTTPResources
-true
if resolving resources from external URLs shall be allowed.false
otherwise
-
getMargin
public Insets getMargin()
- Returns:
- The page margins to use
-
setMargin
public void setMargin(Insets margin)
Set the page margin of the resulting document.The margin is measured in user space units (see ISO-32000-1). In short: 1 inch = 2.54 cm = 72 user units
Default value is: 43 user unit (about 15 mm) on each side
- Parameters:
margin
- The page margins to use- Throws:
IllegalArgumentException
- If parameter is null or one of the sizes is negative.
-
getPageSize
public HTMLRendererNode.PageSize getPageSize()
-
setPageSize
public void setPageSize(HTMLRendererNode.PageSize pageSize)
Set the desiredHTMLRendererNode.PageSize
for the resulting PDF document.Default value: DIN A4 (
HTMLRendererNode.PageSize.A4
)- Parameters:
pageSize
- the desired page size
-
isGenerateHyperlinks
public boolean isGenerateHyperlinks()
-
setGenerateHyperlinks
public void setGenerateHyperlinks(boolean generate)
Determine if the resulting PDF document shall have hyperlinks to external locations. (default:true
- Parameters:
generate
- iftrue
hyperlinks will be embedded in the resulting PDF document- Since:
- jadice server 5.2.3.0
-
-