public final void printClientConfig ( final JSONWriter json ) throws JSONException { json . key ( "layouts" ) ; json . array ( ) ; final Map < String , Template > accessibleTemplates = getTemplates ( ) ; accessibleTemplates . entrySet ( ) . stream ( ) . sorted ( Comparator . comparing ( Map . Entry :: getKey ) ) . forEach ( entry -> { json . object ( ) ; json . key ( "name" ) . value ( entry . getKey ( ) ) ; entry . getValue ( ) . printClientConfig ( json ) ; json . endObject ( ) ; } ) ; json . endArray ( ) ; json . key ( "smtp" ) . object ( ) ; json . key ( "enabled" ) . value ( smtp != null ) ; if ( smtp != null ) { json . key ( "storage" ) . object ( ) ; json . key ( "enabled" ) . value ( smtp . getStorage ( ) != null ) ; json . endObject ( ) ; } json . endObject ( ) ; }
Print out the configuration that the client needs to make a request .