Provided by: liblemonldap-ng-manager-perl_2.0.5+ds-2_all bug


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


         use Lemonldap::NG::Manager::Build;

           structFile            => "site/htdocs/static/struct.json",
           confTreeFile          => "site/htdocs/static/js/conftree.js",
           managerConstantsFile  => "lib/Lemonldap/NG/Common/Conf/",
           managerAttributesFile => 'lib/Lemonldap/NG/Manager/',
           defaultValuesFile     => "lib/Lemonldap/NG/Common/Conf/",
           firstLmConfFile       => "_example/conf/lmConf-1.json",
           reverseTreeFile       => "site/htdocs/static/reverseTree.json",


       Lemonldap::NG::Manager::Build is only used to build javascript files and Lemonldap::NG
       constants Perl files. It must be launched after each change.

       To add a new parameter, you have to:

       declare it in Manager/Build/;
       declare its position in the tree in Manager/Build/ (or Manager/Build/ for
       complex nodes);
       refresh files by using this (or launch any build makefile target at the root of the
       Lemonldap::NG project sources).

       See below for details.

       Files generated

       `scripts/` file uses Lemonldap::NG::Manager::Build::Attributes,
       Lemonldap::NG::Manager::Build::Tree and Lemonldap::NG::Manager::Build::CTrees to generate

           Main file containing the tree view;

           generates Virtualhosts, SAML and OpenID-Connect partners sub-trees;

           map used by manager diff to find attribute position in the tree;

           constants used by all Perl manager components;

           constants used to read configuration;

           parameters attributes used by the manager during configuration upload;

           first configuration in file format;

       Attribute declaration

       set your new attribute as a key of attributes() function that points to a hash ref

       type (required):
           content type must be declared in sub types() in the same file (except if attribute
           embeds its own tests) and must match to a form stored in static/forms/ directory;

       help (optional):
           Relative HTML path to help page (relative to /doc/pages/documentation/<version>/);

       default (recommended):
           default value to set if not defined;

       select (optional):
           required only if type is `select`. In this case, it must contain an array of { k =>
           <keyName>, v => <display name> } hashref

       documentation (recommended):
           some words for other developpers

       test (optional):
           if test is not defined for this type or if test must be more restrictive, set here a
           regular expression or a subroutine. Arguments passed to subroutine are (keyValue,
           newConf, currentKey). It returns 2 arguments: a boolean result and a message (if non
           empty message will be displayed as warning or error depending of result);

       msgFail (optional):
           for regexp based tests, message to display in case of error. Words to translate have
           to be written as so: __toTranslate__;

       keyTest (optional):
           for keys/values attributes, test to be applied on key;

       keyMsgFail (optional):
           for regexp based key tests, same as msgFail for keys test;

       If you want to declare a new type, you have to declare following properties:

       test, msgFail, keyTest, keyMsgFail as shown above,
       form: form to use if it doesn't have the same name.

       Tree location

       The tree is now very simple: it contains nodes and leaves. Leaves are designed only by
       their attribute name. All description must be done in the file described above. Nodes are
       array member designed as this:

           title => 'titleToTranslate',
           help  => 'helpUrl',
           form  => 'relativeUrl',
           nodes => [
             ... nodes or leaf ...


       title (required):
           it must contain an entry of static/languages/lang.json

       help (recommended):
           as above, the relative HTML path to the help page (relative to

       form (optional):
           the name of a static/forms/<name>.html file

           array of sub nodes and leaf attached to this node

           must never be used in conjunction with nodes. Array of leaves only to be displayed in
           the same form

           array of sub nodes that will be displayed with a filter. Not yet documented here, see
           the source code of site/htdocs/static/js/filterFunctions.js.

           filter entry in site/htdocs/static/js/filterFunctions.js for the same feature.




       LemonLDAP::NG team <>


       Use OW2 system to report bug or ask for features:

       Note that if you want to post a ticket for a conf upload problem, please see
       Lemonldap::NG::Manager::Conf::Parser before.


       Lemonldap::NG is available at


       See COPYING file for details.

       This library is free software; you can redistribute it and/or modify it under the terms of
       the GNU General Public License as published by the Free Software Foundation; either
       version 2, or (at your option) any later version.

       This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
       without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
       See the GNU General Public License for more details.

       You should have received a copy of the GNU General Public License along with this program.
       If not, see <>.