java - How do I compile code for an OpenNTF customization? -


our bosses want use fileexplorer widget openntf can drag emails file system in order share them others. had treasure trove of such messages in different system, using shared notes mail file determined unacceptable solution. fileexplorer, disappointed emails named subject line. they've requested mod prepend filename , date values.

i've written modification use in copyfilejob.java file , think following line in copy method of copyfilesjob class handle renaming.

if (source.isfile()) {     // check modifying filename if it's file copy     final file dest = new file(fdest.getabsolutepath() + file.separator  + modifyemailfilename(source.getname())); ... 

the code calls relatively simple, since email file formatted text.

    public static string modifyemailfilename( string filename ) {     try {          int extensioncheck = filename.indexof(".eml");         if ( extensioncheck >= 0 ) {               string fromresult = "";             string dateresult = "";             string fromstring = "from:";             string datestring = "date:";              scanner sc = new scanner (new file (filename));              while (sc.hasnextline()) {                 string nextline = sc.nextline();                 int searchindex = nextline.indexof(fromstring);                 if ( searchindex == 0 ) {                     int startindex = nextline.indexof(":") + 2;                     int endindex = nextline.indexof("@");                     fromresult = nextline.tostring().substring(startindex,endindex);                 }                 searchindex = nextline.indexof(datestring);                 if ( searchindex == 0 ) {                     int startindex = nextline.indexof(",") + 2;                     int endindex = nextline.lastindexof(" ");                     dateresult = nextline.tostring().substring(startindex,endindex).replace(" ","_").replace(":","");                 }                            }              return fromresult + "_" + dateresult + "_" + filename;         }         // when eml not in filename, return filename         return filename;      } catch (exception e) {         system.out.println("error: " + e.getmessage() );         return "error";     }     return "finished"; } 

what can't figure out how i'd re-compile implement custom code , deploy it. of course, haven't been able test in place, because can't figure out steps compile when there many components openntf project.

david, sidebar plug-in in notes client has 2-3 eclipse projects:

  • a plug-in project
  • a feature project
  • an update site project

features contain 1 or more plugins. plugins can appear in more 1 feature. update sites contain 1 or more features. features can appear in more 1 update site.

it confusing @ best. that's eclipse way. openntf project contains source, download , import domino designer ( or eclipse) 2-3 projects. mikkel heisterberg , nathan freeman have articles how setup eclipse notes plugin development.

for general tutorials plugin development check lars vogalla's tutorials.

let know how goes.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -