Version 1 (modified by sauermann, 19 years ago) (diff) |
---|
To configure your services, you have a folder inside the user's path. The folder is called .gnowsis and inside that you either have config or data.
Suggestion, that is not binding: each service has his web-inf folder, where you make a 'default' folder. During your config api init, you get the ServiceContext object, which has a method like "getServicePath" which returns the folder containing the WEB-INF. ie the "epos_context" path is returned.
you then call ConfigBlubManager.checkAndCopy(folderA, folderB) to check and copy the defaults. the semantic of checkAndCopy is to copy everything that is to copy everything from A to B that is not in B already. if a file in b already exists, don't overwrite it.
example for such an config dir: blubservice/WEB-INF/default/config/setting.xml is copied to .gnowsis/config/blubservice/setting.xml and blubservice/WEB-INF/default/data/setting.xml is copied to .gnowsis/data/blubservice/setting.xml