From the ncs.conf man page in 5.2.1.1 I see that there is an option to have a callback for /ncs-config/hide-group as /ncs-config/hide-group/callback.
I was trying to see if there are any examples in java code for this? How to define this callback, what packages to include, how does it get called etc?
### BEGIN
/ncs-config/hide-group
Hide groups that can be unhidden must be listed here. There can be zero, one or many hide-group entries in the configuraion. If a hide group does not have a hide-group entry, then it cannot be unhidden using the CLI 'unhide' command. However, it is possible to add a hide-group entry to the ncs.conf file and then use ncs --reload to make it available in the CLI. This may be useful to enable for example a diagnostics hide groups that you do not even want accessible using a password.
/ncs-config/hide-group/name (string)
Name of hide group. This name should correspond to a hide group name defined in some YANG module with 'tailf:hidden'. /ncs-config/hide-group/password (tailf:md5-digest-string) [] A password can optionally be specified for a hide group. If no password or callback is given then the hide group can be unhidden without giving a password. If a password is specified then the hide group cannot be enabled unless the password is entered. To completely disable a hide group, ie make it impossible to unhide it, remove the entire hide-group container for that hide group.
/ncs-config/hide-group/callback (string)
A callback can optionally be specified for a hide group. If no callback or password is given then the hide group can be unhidden without giving a password. If a callback is specified then the hide group cannot be enabled unless a password is entered and the successfully verifies the password. The callback receives both the name of the hide group, the name of the user issuing the unhide command, and the password. Using a callback it is possible to have short lived unhide passwords and per-user unhide passwords.
### END