Since: API Level v2
public final class

BAPlugin

com.webmbt.plugin.BAPlugin

Class Overview

provides mscript functions to generate process (state/transition) annotation as model executes. This is useful to demonstrate the process flow and workflow animation. Use these mscript function to customize and make modification to the state/transition annotations.

Copyright © 2008 - 2017 TestOptimal LLC. All Rights Reserved.

since 5.0.5

Summary

Public Constructors
BAPlugin()
Public Methods
int addLine(String... pList_p)
adds a line to the end of the specified section.
void clearAllSections()
clears all sections from the current state/transition annotation page

Example: $clearAllSections()

void clearSection(String... pList_p)
clears the specified annotation section in the current state/transition.
int insertLine(String... pList_p)
inserts a line to the section at the specified line index.
boolean removeLineByIndex(String... pList_p)
removes the line specified by the line index within a specific section.
int removeLineByRange(String... pList_p)
removes a range of lines specified from the specific annotation section identified.
int removeLineByRegExpr(String... pList_p)
remove lines from the specified section that matches the regular expression.
int replaceByRegExpr(String... pList_p)
performs string replacement on the lines within the specified section using regular expression

Example: $replaceByRegExpr('[0-9]','*'), $replaceByRegExpr('[0-9','*','sec5') or $replaceByRegExpr('[0-9','*','*')

int replaceText(String... pList_p)
performs string replacement on the lines within the specified section.

Public Constructors

public BAPlugin ()

Since: API Level v2

Public Methods

public int addLine (String... pList_p)

Since: API Level v2

adds a line to the end of the specified section.

Example: $addLine ('new line text') or $addLine('new line text','sect2')

Returns
  • line index for the newly added line

public void clearAllSections ()

Since: API Level v2

clears all sections from the current state/transition annotation page

Example: $clearAllSections()

See Also
  • clearSection()

public void clearSection (String... pList_p)

Since: API Level v2

clears the specified annotation section in the current state/transition.

Example: $clearSection(), $clearSection('sec2'), $clearSection('*')

See Also
  • clearAllSections()

public int insertLine (String... pList_p)

Since: API Level v2

inserts a line to the section at the specified line index.

Example: $insertLine ('5','line 5 text') or $insertLine('5','line 5 text', 'mySect2')

Returns
  • line index of the newly inserted line. It should be equal to atLineIdx_p if insert is successful.

public boolean removeLineByIndex (String... pList_p)

Since: API Level v2

removes the line specified by the line index within a specific section.

Example: $removeLineByIndex('5'), $removeLineByIndex('5','sec2')

Returns
  • - true if the line has been removed, false otherwise

public int removeLineByRange (String... pList_p)

Since: API Level v2

removes a range of lines specified from the specific annotation section identified.

Example: $removeLineByRange ('2','5'), $removeLineRange('2','5','sec2')

Returns
  • - number of lines removed

public int removeLineByRegExpr (String... pList_p)

Since: API Level v2

remove lines from the specified section that matches the regular expression.

Example: $removeLineByRegExpr('Loan Request'), $removeLineByRegExpr('Load Request','sec2') or $removeLineByRegExpr('Loan Request','*')

Returns
  • - number of lines removed

public int replaceByRegExpr (String... pList_p)

Since: API Level v2

performs string replacement on the lines within the specified section using regular expression

Example: $replaceByRegExpr('[0-9]','*'), $replaceByRegExpr('[0-9','*','sec5') or $replaceByRegExpr('[0-9','*','*')

Returns
  • - number of lines the replacement was performed

public int replaceText (String... pList_p)

Since: API Level v2

performs string replacement on the lines within the specified section.

Example: $replaceText('old','new'), $replaceText('old','new','sec2'), or $replaceText('old','new','*')

Returns
  • - number of lines the replacement was performed