In package com.eden.orchid.api.resources.resource

public final class ExternalResource extends FreeableResource

public final

An ExternalResource acts either as a placeholder for URL reference, or can be a full resource when set to download. When an ExternalResource is set to download, the file at the original URL will be downloaded and cached when its contents are requested, so that external pages or assets can be requested at build-time from a CDN or other external location, but served locally so your output site has no dependency on that external service. By default, ExternalResources are set to not download, and instead just point to the desired resource.

Constructors

ExternalResource(OrchidReference reference) public

Parameters:

Methods

void setDownload(boolean download) public

Parameters:
  • download
void free() public
Method Annotations:
@Override

void shouldPrecompile() public
Method Annotations:
@Override

void shouldRender() public
Method Annotations:
@Override

void setRawContent(String rawContent) public
Method Annotations:
@Override

Parameters:
  • String rawContent
void setContent(String content) public
Method Annotations:
@Override

Parameters:
  • String content
void loadContent() protected
Method Annotations:
@Override

InputStream getContentStream() public
Method Annotations:
@Override

String getContent() public
Method Annotations:
@Override

String getRawContent() public
Method Annotations:
@Override

JSONElement getEmbeddedData() public
Method Annotations:
@Override

JSONElement queryEmbeddedData(String pointer) public
Method Annotations:
@Override

Parameters:
  • String pointer