Home Manual Reference Source Test
import {AtviseScriptTransformer} from 'atscm/src/transform/ScriptTransformer.js'
public class | source

AtviseScriptTransformer

Extends:

src/lib/transform/PartialTransformer.js~PartialTransformerSplittingTransformerXMLTransformer → AtviseScriptTransformer

A transformer that splits atvise scripts and quick dynamics into a code file and a .json file containing parameters and metadata.

Static Member Summary

Static Public Members
public static get

The source file extension to allow for scripts.

public static get

The source file extensions to allow.

Method Summary

Public Methods
public

combineNodes(node: Node, sources: {[ext: string]})

Inlines the passed source nodes to the given container node.

public

Extracts a script's metadata.

public

Extracts a script's parameters.

public

async transformFromDB(node: Node, context: Object): *

Splits a node into multiple source nodes.

Inherited Summary

From class SplittingTransformer
public static get abstract

The extension to add to container node names when they are pulled.

public static get abstract

The source file extensions to allow.

public static

splitFile(node: Node, newExtension: string): Node

Splits a Node: The resulting is a clone of the input file, with a different path.

public abstract

combineNodes(node: BrowsedNode, sourceNodes: Map<string, BrowsedNode>)

Combines the container node and the source nodes to one single node.

public

Returns false for all container nodes, so they don't get read.

public

Renames a container node, should be called by all subclasses.

public

async transformFromFilesystem(node: BrowsedNode, context: Object)

Reads a given container nodes source nodes and combines them.

private

_combineNodes(node: BrowsedNode, sourceNodes: {[extension: string]})

Combines the container node and the source nodes to one single node by calling SplittingTransformer#combineNodes.

From class XMLTransformer
public get

Returns the XML builder to use based on the current Transformer#direction.

private

The builder to use with direction TransformDirection.FromDB.

private

The builder to use with direction TransformDirection.FromFilesystem.

public

decodeContents(node: Node): *

Parses XML in a node's contents.

public

encodeContents(object: Object): *

Builds an XML string from an object.

Static Public Members

public static get scriptSourceExtension: string source

The source file extension to allow for scripts.

public static get sourceExtensions: string[] source

The source file extensions to allow.

Override:

SplittingTransformer#sourceExtensions

Public Methods

public combineNodes(node: Node, sources: {[ext: string]}) source

Inlines the passed source nodes to the given container node.

Override:

SplittingTransformer#combineNodes

Params:

NameTypeAttributeDescription
node Node

The container node.

sources {[ext: string]}

The source nodes to inline.

public processMetadata(document: Object): Object source

Extracts a script's metadata.

Params:

NameTypeAttributeDescription
document Object

The parsed xml document to process.

Return:

Object

The metadata found.

public processParameters(document: Object): Object[] source

Extracts a script's parameters.

Params:

NameTypeAttributeDescription
document Object

The parsed xml document to process.

Return:

Object[]

The parameters found.

public async transformFromDB(node: Node, context: Object): * source

Splits a node into multiple source nodes.

Override:

SplittingTransformer#transformFromDB

Params:

NameTypeAttributeDescription
node Node

A server node.

context Object

The current transform context.

Return:

*