Skip to end of metadata
Go to start of metadata

Scenario

YADE provides an API that allows to use the YADE Engine in any application that can execute Java .jar files, e.g. Scala, Java, etc.

Using YADE with options from a settings file

An example how to include YADE as a component in your application, using the configuration form a YADE settings file:

 JadeEngine objJadeEngine = new JadeEngine();
 JADEOptions objOptions = objJadeEngine.Options()
 
 objOptions.settings.Value(strSettingsFile); // settings file name
 objOptions.profile.Value(pstrProfileName);  // name of transfer profile
 objOptions.ReadSettingsFile();
  	
 objJadeEngine.Execute();  // start transfer
 objJadeEngine.Logout();   // logout and disconnect

Using YADE with options programmatically

A different example that configures YADE options programmaticaly:

 public void testRenameMultipleFilesLocal() throws Exception {
    JadeEngine objJadeEngine = new JadeEngine();
    JADEOptions objOptions = objJadeEngine.Options()

    objOptions.getConnectionOptions().Source().protocol.Value("local");
    objOptions.file_spec.Value("^.*\\.txt$");
    objOptions.local_dir.Value(strTestPathName + "/JADE/");
    objOptions.operation.Value("rename");
   
    objOptions.replacing.Value("(.*)(.txt)");
    objOptions.replacement.Value("\\1_[date:yyyyMMddHHmm];\\2");

    objJadeEngine.Execute();
    objJadeEngine.Logout();
 }

See also

 

Write a comment…