public class GeneratedTextResourceDocumentService extends ResourceDocumentServiceBase<GeneratedTextResource,com.threecrickets.prudence.internal.attributes.GeneratedTextResourceAttributes,GeneratedTextResourceConversationService>
cachingUtil, conversationService, resource
attributes, documentDescriptorStack
Constructor and Description |
---|
GeneratedTextResourceDocumentService(GeneratedTextResourceDocumentService documentService)
Construction by cloning, with new execution context (for deferred
execution).
|
GeneratedTextResourceDocumentService(GeneratedTextResource resource,
ExecutionContext executionContext,
Representation entity,
Variant preferences,
com.threecrickets.prudence.internal.CachingUtil<GeneratedTextResource,com.threecrickets.prudence.internal.attributes.GeneratedTextResourceAttributes> cachingUtil)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
endCapture()
Ends a capture started with
startCapture(String) , storing the
captured text in a conversation.local, as well as returning it. |
protected DocumentDescriptor<Executable> |
getDocumentDescriptor(String documentName)
Finds a document.
|
Representation |
include(String documentName)
Includes a text document into the current location.
|
Representation |
include(String documentName,
boolean includeExtraSources)
Includes a text document into the current location.
|
void |
startCapture(String name)
Start capturing the generated text output, until
endCapture() is
called. |
getPassThroughDocuments
addDependency, addFileDependency, execute, executeOnce, external, getCache, getDescriptor, getSource, internal, internalOther, invalidate, invalidateCurrent, markExecuted, popDocumentDescriptor, pushDocumentDescriptor, require
public GeneratedTextResourceDocumentService(GeneratedTextResource resource, ExecutionContext executionContext, Representation entity, Variant preferences, com.threecrickets.prudence.internal.CachingUtil<GeneratedTextResource,com.threecrickets.prudence.internal.attributes.GeneratedTextResourceAttributes> cachingUtil)
resource
- The resourceexecutionContext
- The execution contextentity
- The entitypreferences
- The negotiated client preferences or nullcachingUtil
- The caching utilitiespublic GeneratedTextResourceDocumentService(GeneratedTextResourceDocumentService documentService)
documentService
- The document service to clonepublic Representation include(String documentName) throws ParsingException, ExecutionException, DocumentException, IOException
documentName
- The document nameParsingException
- In case of a Scripturian parsing errorExecutionException
- In case of a Scripturian execution errorDocumentException
- In case of a Scripturian document retrieval errorIOException
- In case of a Scripturian writing or cache entry compression errorpublic Representation include(String documentName, boolean includeExtraSources) throws ParsingException, ExecutionException, DocumentException, IOException
documentName
- The document nameincludeExtraSources
- Whether to force looking for the document in the extra document
sources (otherwise is only allowed for non-initial documents)ParsingException
- In case of a Scripturian parsing errorExecutionException
- In case of a Scripturian execution errorDocumentException
- In case of a Scripturian document retrieval errorIOException
- In case of a Scripturian writing or cache entry compression errorpublic void startCapture(String name)
endCapture()
is
called. The captured text will automatically be stored as a string in a
conversation.local.
Note that captures can be nested, but you do need to call endCapture as many times as you called startCapture if you want the regular output to continue.
name
- The name of the conversation.local into which the captured text
will goPrudenceScriptletPlugin
public String endCapture()
startCapture(String)
, storing the
captured text in a conversation.local, as well as returning it.
Note that captures can be nested, but you do need to call endCapture as many times as you called startCapture if you want the regular output to continue.
PrudenceScriptletPlugin
protected DocumentDescriptor<Executable> getDocumentDescriptor(String documentName) throws ParsingException, DocumentException
DocumentService
getDocumentDescriptor
in class DocumentService<com.threecrickets.prudence.internal.attributes.GeneratedTextResourceAttributes>
documentName
- The document nameParsingException
- In case of a Scripturian parsing errorDocumentException
- In case of a Scripturian document retrieval errorCopyright © 2009-2016 Three Crickets LLC.