1 6 package org.netbeans.test.subversion.operators; 7 8 import org.netbeans.jellytools.WizardOperator; 9 import org.netbeans.jellytools.nodes.Node; 10 import org.netbeans.jemmy.JemmyException; 11 import org.netbeans.test.subversion.operators.actions.ImportAction; 12 13 20 public class ImportWizardOperator extends WizardOperator { 21 22 25 public ImportWizardOperator() { 26 super("Import"); 27 } 28 29 32 public static ImportWizardOperator invoke() { 33 new ImportAction().perform(); 34 return new ImportWizardOperator(); 35 } 36 37 41 public static ImportWizardOperator invoke(Node node) { 42 new ImportAction().perform(node); 43 return new ImportWizardOperator(); 44 } 45 46 50 58 public void doImport(String repositoryURL, String password, String importMessage, String repositoryFolder) { 59 if(repositoryURL == null) { 60 throw new JemmyException("CVS root must not be null."); } 62 if(importMessage == null) { 63 throw new JemmyException("Import message must not be null."); } 65 if(repositoryFolder == null) { 66 throw new JemmyException("Repository Folder must not be null."); } 68 ImportWizardOperator.invoke(); 69 RepositoryStepOperator rso = new RepositoryStepOperator(); 70 if(password != null) { 71 rso.setPassword(password); 72 } 73 rso.setRepositoryURL(repositoryURL); 74 rso.next(); 75 FolderToImportStepOperator folderToImportOper = new FolderToImportStepOperator(); 76 folderToImportOper.setImportMessage(importMessage); 77 folderToImportOper.setRepositoryFolder(repositoryFolder); 78 folderToImportOper.finish(); 79 } 80 } 81 82 | Popular Tags |