Changeset 445 for gssim_ui/branches
- Timestamp:
- 09/06/12 14:52:38 (13 years ago)
- Location:
- gssim_ui/branches/vine/gssimstudio/src/web/ui/flex
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/views/WorkloadEditor.mxml
r442 r445 129 129 <mx:HBox> 130 130 <mx:Label text="{resourceManager.getString('WorkloadEditor', 'WorkloadFileName')}" width="150"/> 131 <mx:TextInput text="{workloadFileName}"/>131 <mx:TextInput id="workloadFileNameInput" change="{workloadFileName = workloadFileNameInput.text}"/> 132 132 </mx:HBox> 133 133 <mx:HBox> 134 134 <mx:Label text="{resourceManager.getString('WorkloadEditor', 'ResourceDescription')}"/> 135 <mx:ComboBox text="{resourcesFileName}" id="resourceDescriptionFile" labelField="fileName" dataProvider="{parentApplication.experimentEditor.workspaceResourcesFileList}" width="250"/>135 <mx:ComboBox change="{resourcesFileName = resourceDescriptionFile.text}" id="resourceDescriptionFile" labelField="fileName" dataProvider="{parentApplication.experimentEditor.workspaceResourcesFileList}" width="250"/> 136 136 </mx:HBox> 137 137 <mx:HBox> -
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudio.java
r444 r445 1947 1947 } 1948 1948 1949 public GSSimStudioModel uploadTextFile(String destFileName, String destFolder, String fileContent ) throws IOException {1949 public GSSimStudioModel uploadTextFile(String destFileName, String destFolder, String fileContent, FileManager manager) throws IOException { 1950 1950 1951 1951 log.debug("FILELISTCOM all files uploaded"); … … 1965 1965 FileResourceManager fileResourceManager = getFileResourceManager(serviceContext); 1966 1966 Location resourceLocation = new Location((String) fileListComModel.getCurrentLocationItem().get("url")); 1967 FileManager fileManager = fileResourceManager.createFileManager(resourceLocation); 1967 FileManager fileManager = manager; 1968 if (fileManager == null) fileManager = fileResourceManager.createFileManager(resourceLocation); 1968 1969 fileManager.changeDirectory((String) fileListComModel.getCurrentLocationItem().get("real_path")); 1969 1970 … … 2055 2056 @BlazeDsMethod() 2056 2057 public GSSimStudioModel uploadPropertyFile(String destFileName, String fileContent) throws IOException { 2057 return uploadTextFile(destFileName, "", fileContent );2058 return uploadTextFile(destFileName, "", fileContent, null); 2058 2059 } 2059 2060 2060 2061 @BlazeDsMethod() 2061 2062 public GSSimStudioModel uploadNetworkTopologyFile(String destFileName, String fileContent) throws IOException { 2062 return uploadTextFile(destFileName, "topologies/", fileContent );2063 return uploadTextFile(destFileName, "topologies/", fileContent, null); 2063 2064 } 2064 2065 2065 2066 @BlazeDsMethod() 2066 2067 public GSSimStudioModel uploadResourceFile(String destFileName, String fileContent) throws IOException { 2067 return uploadTextFile(destFileName, "resources/", fileContent );2068 return uploadTextFile(destFileName, "resources/", fileContent, null); 2068 2069 } 2069 2070 … … 2074 2075 String gssimInput = null; 2075 2076 Connection connection = null; 2077 FileManager fileManager = null; 2076 2078 try { 2077 2079 connection = factory().createDBConnection(dbAddress, dbUser, … … 2088 2090 FileResourceManager fileResourceManager = getFileResourceManager(serviceContext); 2089 2091 FileLocation parentLocation = new FileLocation(gssimInput + "?filetype=directory"); 2090 FileManagerfileManager = fileResourceManager.createFileManager(parentLocation);2092 fileManager = fileResourceManager.createFileManager(parentLocation); 2091 2093 TaskMonitor taskMonitor = fileManager.makeDirectory(uniqueFolderName, TaskOptions.block()); 2092 2094 if (taskMonitor.completed()) { … … 2114 2116 } 2115 2117 2116 model = uploadTextFile("generator.xml", "generator/" + uniqueFolderName, fileContent );2118 model = uploadTextFile("generator.xml", "generator/" + uniqueFolderName, fileContent, fileManager); 2117 2119 String properties = "resdesc=../../resources/" + resourceFileName + "\n"; 2118 2120 properties += "createscenario.tasksdesc=generator.xml\n"; … … 2120 2122 properties += "createscenario.workloadfilename=" + workloadFileName + "\n"; 2121 2123 properties += "createscenario.overwrite_files=true\n"; 2122 model = uploadTextFile("generator.properties", "generator/" + uniqueFolderName, properties );2124 model = uploadTextFile("generator.properties", "generator/" + uniqueFolderName, properties, fileManager); 2123 2125 model.setMessageCode("GenerateWorkloadSucces"); 2124 2126 return model;
Note: See TracChangeset
for help on using the changeset viewer.