Home Reference Source
import SimpleString from './gui/data-items/SimpleString.jsx'
public class | source

SimpleString

Extends:

gui/data-items/DataItemWithValue.js~DataItemWithValue → SimpleString

The purpose of SimpleString is to store an arbitrary string of text. It will write to your tool's XML configuration the text as assigned to the value. The default value is a blank string.

Constructor Summary

Public Constructor
public

constructor(dataName: string, dataItemProps: object)

Constructor

Member Summary

Public Members
public

Function that returns the current encryptionMode setting.

public

Function that returns whether or not the data item is a passsword, and should be encrypted as such.

public

setEncryptionMode(encryptionMode: string): *

Function that changes the current encryptionMode setting.

public

setPassword(password: boolean): *

Function that changes whether or not the data item is a password, and should be encrypted as such.

Public Constructors

public constructor(dataName: string, dataItemProps: object) source

Constructor

Params:

NameTypeAttributeDescription
dataName string

The name of the data item.

dataItemProps object
  • optional

An object of properties such as hidden, disabled, suppressed etc.

dataItemProps.password boolean
  • optional
  • default: false

A boolean to dictate whether the string being stored is a password and should thusly be encrypted, or not.

dataItemProps.encryptionMode string
  • optional
  • default: 'obfuscation'

Allows control over which encryption method is employed.

Avalailable options:

  • 'obfuscation' (default) - not encrypted, anyone could view with minimal effort
  • 'machine' - only current machine will be able to decrypt
  • 'user' - only current user will be able to decrypt

Public Members

public getEncryptionMode: string: * source

Function that returns the current encryptionMode setting.

Return:

string

The current encryptionMode state.

public getPassword: boolean: * source

Function that returns whether or not the data item is a passsword, and should be encrypted as such.

Return:

boolean

The current password state.

public setEncryptionMode(encryptionMode: string): * source

Function that changes the current encryptionMode setting.

public setPassword(password: boolean): * source

Function that changes whether or not the data item is a password, and should be encrypted as such.