Top Method Summary
Options Name Purpose
CopyWithFileIndentation (character, character) Copies a formatted JSON file, re-indented to the indentation of the button definition files
Progress.Json.ObjectModel.JsonObject GetButtonDefinitions (RepositoryFrontendEnum) Returns the merged button definitions of a frontend
Progress.Json.ObjectModel.JsonObject GetButtonsSection (JsonObject) Returns the member of a definition document that holds the buttons
Progress.Json.ObjectModel.JsonObject GetDefinitionDocument (character) Returns the parsed document of a single button definition file
CHARACTER GetDefinitionFileNames (RepositoryFrontendEnum) Returns the file names of the button definition files of a frontend
Consultingwerk.SmartFramework.Repository.RepositoryFrontendEnum GetFrontend (character) Returns the frontend a button definition file is registered for
Progress.Json.ObjectModel.JsonObject GetRibbonGroups (RepositoryFrontendEnum) Returns the merged ribbon group definitions of a frontend
CHARACTER GetSettingsPrefixes (RepositoryFrontendEnum) Returns the configuration entry prefixes of a frontend
SaveDefinitionDocument (character, JsonObject) Writes the document of a button definition file back to its file
CHARACTER UnescapeSolidus (character) Replaces the escaped solidus sequences of a JSON line by a solidus

Top Constructor Summary
Options Name Purpose
ToolbarButtonDefinitionService () Constructor for the ToolbarButtonDefinitionService class


Method Detail
Top

CopyWithFileIndentation (character, character)

Purpose: Copies a formatted JSON file, re-indented to the indentation of
the button definition files
Notes: SCL-5682 - JsonObject:WriteFile writes one indentation step as
two spaces while the button definition files in the repository
are indented with four, so writing a file with WriteFile alone
would reformat every line of it. The indentation step of the
source file is taken from its first indented line rather than
assumed, so a different step does not silently multiply

Parameters:
pcSourceFileName CHARACTER
The name of the formatted JSON file to copy
pcTargetFileName CHARACTER
The name of the button definition file to write
Top

Progress.Json.ObjectModel.JsonObject GetButtonDefinitions (RepositoryFrontendEnum)

Purpose: Returns the merged button definitions of a frontend
Notes: The definition files are merged in the order of the configuration
entries and the first file defining a button name wins - the same
way the toolbar renderers of the two frontends resolve a button

Parameters:
poFrontend Consultingwerk.SmartFramework.Repository.RepositoryFrontendEnum
The frontend to return the button definitions for
Returns Progress.Json.ObjectModel.JsonObject
The JsonObject with one property per button name
Top

Progress.Json.ObjectModel.JsonObject GetButtonsSection (JsonObject)

Purpose: Returns the member of a definition document that holds the buttons
Notes: SCL-5682 - answers the "tools" member of the document when the
file has one (the shape of the Desktop definition files) and the
document itself otherwise (the shape of the Web definition files).
The returned object is the one of the document, so adding a button
to it adds the button to the document

Parameters:
poDocument Progress.Json.ObjectModel.JsonObject
The document of a button definition file
Returns Progress.Json.ObjectModel.JsonObject
The JsonObject with one property per button name
Top

Progress.Json.ObjectModel.JsonObject GetDefinitionDocument (character)

Purpose: Returns the parsed document of a single button definition file
Notes: SCL-5682 - unlike GetButtonDefinitions the document is returned
unmerged and complete, so that the sections a button definition
file carries besides its buttons survive an edit.
Throws a FileNotFoundException when the file is not on the PROPATH

Parameters:
pcFileName CHARACTER
The relative file name of the button definition file
Returns Progress.Json.ObjectModel.JsonObject
The JsonObject with the document of the button definition file
Top

CHARACTER GetDefinitionFileNames (RepositoryFrontendEnum)

Purpose: Returns the file names of the button definition files of a frontend
Notes: The file names are returned in the order of the configuration
entries, Desktop before Web for RepositoryFrontendEnum:Any.
Returns an indeterminate array when nothing is configured

Parameters:
poFrontend Consultingwerk.SmartFramework.Repository.RepositoryFrontendEnum
The frontend to return the button definition files for
Returns CHARACTER
The relative file names of the button definition files
Top

Consultingwerk.SmartFramework.Repository.RepositoryFrontendEnum GetFrontend (character)

Purpose: Returns the frontend a button definition file is registered for
Notes: SCL-5682 - the frontend of a definition file follows from the
configuration entry it is registered under, not from its content

Parameters:
pcFileName CHARACTER
The relative file name of the button definition file
Returns Consultingwerk.SmartFramework.Repository.RepositoryFrontendEnum
The frontend of the definition file or ? when the file is not registered
Top

Progress.Json.ObjectModel.JsonObject GetRibbonGroups (RepositoryFrontendEnum)

Purpose: Returns the merged ribbon group definitions of a frontend
Notes: SCL-5682 - the "group" of a button is resolved against every
definition file of the frontend, so the groups a button may
reference are the merged groups of all of them. Only the Desktop
definition files carry a "groups" section

Parameters:
poFrontend Consultingwerk.SmartFramework.Repository.RepositoryFrontendEnum
The frontend to return the ribbon groups for
Returns Progress.Json.ObjectModel.JsonObject
The JsonObject with one property per ribbon group name
Top

CHARACTER GetSettingsPrefixes (RepositoryFrontendEnum)

Purpose: Returns the configuration entry prefixes of a frontend
Notes: The Desktop prefix comes first, so that the definition files of
the Any frontend are returned Desktop before Web

Parameters:
poFrontend Consultingwerk.SmartFramework.Repository.RepositoryFrontendEnum
The frontend to return the configuration prefixes for
Returns CHARACTER
The prefixes of the configuration entries
Top

SaveDefinitionDocument (character, JsonObject)

Purpose: Writes the document of a button definition file back to its file
Notes: SCL-5682 - the document is written with the indentation the button
definition files in the repository use, so that changing a single
button does not rewrite the whole file

Parameters:
pcFileName CHARACTER
The relative file name of the button definition file
poDocument Progress.Json.ObjectModel.JsonObject
The document to write to the button definition file
Top

CHARACTER UnescapeSolidus (character)

Purpose: Replaces the escaped solidus sequences of a JSON line by a solidus
Notes: SCL-5682 - JsonObject:WriteFile escapes every forward slash as
"~\/". JSON allows that (it is one of the escape sequences of RFC
8259) and a parser reads it as a plain slash, but it is the one
escape sequence JSON does not need, and it turns every image path
and every schema URL of a button definition file into something
a plain text search no longer finds.
The replacement walks the escape sequences rather than replacing
the two characters everywhere, because the slash of an escaped
backslash followed by a slash ("~\~\/") must be left alone - a
blind replace would swallow the backslash

Parameters:
pcLine CHARACTER
The line of the formatted JSON file
Returns CHARACTER
The line with the escaped solidus sequences replaced


Constructor Detail
Top

ToolbarButtonDefinitionService ()

Purpose: Constructor for the ToolbarButtonDefinitionService class
Notes:



©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       19.09.2026 10:14:50