1Lemonldap::NG::Manager:U:sBeurilCdo(n3t)ributed Perl DocLuemmeonntladtaipo:n:NG::Manager::Build(3)
2
3
4

NAME

6       Lemonldap::NG::Manager::Build - Static files generator of Lemonldap::NG
7       Web-SSO system.
8

SYNOPSIS

10         use Lemonldap::NG::Manager::Build;
11
12         Lemonldap::NG::Manager::Build->run(
13           structFile            => "site/htdocs/static/struct.json",
14           confTreeFile          => "site/htdocs/static/js/conftree.js",
15           managerConstantsFile  => "lib/Lemonldap/NG/Common/Conf/ReConstants.pm",
16           managerAttributesFile => 'lib/Lemonldap/NG/Manager/Attributes.pm',
17           defaultValuesFile     => "lib/Lemonldap/NG/Common/Conf/DefaultValues.pm",
18           firstLmConfFile       => "_example/conf/lmConf-1.json",
19           reverseTreeFile       => "site/htdocs/static/reverseTree.json",
20         );
21

DESCRIPTION

23       Lemonldap::NG::Manager::Build is only used to build javascript files
24       and Lemonldap::NG constants Perl files. It must be launched after each
25       change.
26
27   DEVELOPER CORNER
28       To add a new parameter, you have to:
29
30       declare it in Manager/Build/Attributes.pm;
31       declare its position in the tree in Manager/Build/Tree.pm (or
32       Manager/Build/CTrees.pm for complex nodes);
33       refresh files by using this (or launch any build makefile target at the
34       root of the Lemonldap::NG project sources).
35
36       See below for details.
37
38       Files generated
39
40       `scripts/jsongenerator.pl` file uses
41       Lemonldap::NG::Manager::Build::Attributes,
42       Lemonldap::NG::Manager::Build::Tree and
43       Lemonldap::NG::Manager::Build::CTrees to generate
44
45       `site/htdocs/static/struct.json`:
46           Main file containing the tree view;
47
48       `site/htdocs/static/js/conftree.js`:
49           generates Virtualhosts, SAML and OpenID-Connect partners sub-trees;
50
51       `site/htdocs/static/reverseTree.json`:
52           map used by manager diff to find attribute position in the tree;
53
54       `Lemonldap::NG::Manager::Constants`:
55           constants used by all Perl manager components;
56
57       `Lemonldap::NG::Common::Conf::DefaultValues`:
58           constants used to read configuration;
59
60       `Lemonldap::NG::Manager::Attributes`:
61           parameters attributes used by the manager during configuration
62           upload;
63
64       lmConf-1.json:
65           first configuration in file format;
66
67       Attribute declaration
68
69       set your new attribute as a key of attributes() function that points to
70       a hash ref containing:
71
72       type (required):
73           content type must be declared in sub types() in the same file
74           (except if attribute embeds its own tests) and must match to a form
75           stored in static/forms/ directory;
76
77       help (optional):
78           Relative HTML path to help page (relative to
79           /doc/pages/documentation/<version>/);
80
81       default (recommended):
82           default value to set if not defined;
83
84       select (optional):
85           required only if type is `select`. In this case, it must contain an
86           array of { k => <keyName>, v => <display name> } hashref
87
88       documentation (recommended):
89           some words for other developers
90
91       test (optional):
92           if test is not defined for this type or if test must be more
93           restrictive, set here a regular expression or a subroutine.
94           Arguments passed to subroutine are (keyValue, newConf, currentKey).
95           It returns 2 arguments: a boolean result and a message (if non
96           empty message will be displayed as warning or error depending of
97           result);
98
99       msgFail (optional):
100           for regexp based tests, message to display in case of error. Words
101           to translate have to be written as so: __toTranslate__;
102
103       keyTest (optional):
104           for keys/values attributes, test to be applied on key;
105
106       keyMsgFail (optional):
107           for regexp based key tests, same as msgFail for keys test;
108
109       If you want to declare a new type, you have to declare following
110       properties:
111
112       test, msgFail, keyTest, keyMsgFail as shown above,
113       form: form to use if it doesn't have the same name.
114
115       Tree location
116
117       The tree is now very simple: it contains nodes and leaves. Leaves are
118       designed only by their attribute name. All description must be done in
119       the file described above. Nodes are array member designed as this:
120
121         {
122           title => 'titleToTranslate',
123           help  => 'helpUrl',
124           form  => 'relativeUrl',
125           nodes => [
126             ... nodes or leaf ...
127           ]
128         }
129
130       Explanations:
131
132       title (required):
133           it must contain an entry of static/languages/lang.json
134
135       help (recommended):
136           as above, the relative HTML path to the help page (relative to
137           /doc/pages/documentation/<version>/);
138
139       form (optional):
140           the name of a static/forms/<name>.html file
141
142       nodes:
143           array of sub nodes and leaf attached to this node
144
145       group:
146           must never be used in conjunction with nodes. Array of leaves only
147           to be displayed in the same form
148
149       nodes_cond:
150           array of sub nodes that will be displayed with a filter. Not yet
151           documented here, see the source code of
152           site/htdocs/static/js/filterFunctions.js.
153
154       nodes_filter:
155           filter entry in site/htdocs/static/js/filterFunctions.js for the
156           same feature.
157

SEE ALSO

159       <http://lemonldap-ng.org/>
160

AUTHORS

162       LemonLDAP::NG team <http://lemonldap-ng.org/team>
163

BUG REPORT

165       Use OW2 system to report bug or ask for features:
166       <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>
167
168       Note that if you want to post a ticket for a conf upload problem,
169       please see Lemonldap::NG::Manager::Conf::Parser before.
170

DOWNLOAD

172       Lemonldap::NG is available at <https://lemonldap-ng.org/download>
173
175       See COPYING file for details.
176
177       This library is free software; you can redistribute it and/or modify it
178       under the terms of the GNU General Public License as published by the
179       Free Software Foundation; either version 2, or (at your option) any
180       later version.
181
182       This program is distributed in the hope that it will be useful, but
183       WITHOUT ANY WARRANTY; without even the implied warranty of
184       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
185       General Public License for more details.
186
187       You should have received a copy of the GNU General Public License along
188       with this program.  If not, see <http://www.gnu.org/licenses/>.
189
190
191
192perl v5.38.0                      2023-11-14  Lemonldap::NG::Manager::Build(3)
Impressum