...
- Download the sample plugin.
Extract the downloaded plugin in to a folder and delete jar file. Eg. os-sample-plugin
Code Block language bash $ jar -xvf os-sample-plugin.jar
To change a field name appearing in UI, edit file os-sample-plugin/test/META-INF/resources/os-plugin/i18n/en.js and add the field which needs to be changed in the key value format. Eg. To change Short Title field in Distribution protocol to appear as Request ID.
Code Block language js { "dp" : { "short_title": "Request ID" } }
- Save and exit en.js the file.
The en.js file will change the value in UI. To change the a field in backend and in Templates message.properties needs to be updated.
Edit os-sample-plugin/os-plugin-jar/errors/message.properties to change the value of field in backend. Search the for the field needs to be changed.
eg. If dp_short_title should be Request ID instead of Short Title.Code Block language bash dp_short_title = Short Title
Replace Short Title with Request ID.
Code Block language bash dp_short_title = Request ID
- Save and exit message.properties
Create new plugin using given command:
Code Block language bash $jar -cf os-sample-plugin.jar META-INF/ pluginContext.xml errors/ pluginApiContext.xml pluginContext.xml
- Copy the newly created plugin to $OS_HOME/plugins/ and restart OpenSpecimen service.
...