Home Manual Reference Source Test
import ConfigTransformer from 'atscm/src/lib/transform/ConfigTransformer.ts'
public class | source

ConfigTransformer

Extends:

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

Method Summary

Public Methods
public

nonEmptyConfig(input: C): *

Returns an object containing all non-empty properties of the input object.

public

writeConfigFile(config: C, node: undefined, context: undefined): *

Writes the config file to disk if needed.

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>, context: any)

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

async transformFromDB(node: BrowsedNode, context: any)

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]}, context: any)

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.

Public Methods

public nonEmptyConfig(input: C): * source

Returns an object containing all non-empty properties of the input object. Returns null if no properties are non-empty.

Params:

NameTypeAttributeDescription
input C

Return:

*

public writeConfigFile(config: C, node: undefined, context: undefined): * source

Writes the config file to disk if needed.

Params:

NameTypeAttributeDescription
config C
node undefined
context undefined

Return:

*