Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Download the sample plugin.
  2. Extract the downloaded plugin in to a folder and delete jar file. Eg. os-sample-plugin

    Code Block
    languagebash
    $ jar -xvf os-sample-plugin.jar


  3. 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
    languagejs
    {
    "dp" : {
        "short_title": "Request ID"
      }
    }


  4. Save and exit  en.js the file.
  5. 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.

  6. 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
    languagebash
    dp_short_title = Short Title 

    Replace Short Title with Request ID.

    Code Block
    languagebash
    dp_short_title = Request ID


  7. Save and exit message.properties
  8. Create new plugin using given command:  

    Code Block
    languagebash
    $jar -cf os-sample-plugin.jar META-INF/ pluginContext.xml errors/ pluginApiContext.xml pluginContext.xml
    


  9. Copy the newly created plugin to $OS_HOME/plugins/  and restart OpenSpecimen service.

...