 // ============================================================== MENU ITEM==============================================================
    /*	JMenuBar menuBar;
    	JMenu menu, settingsMenu;
    	menuBar = new JMenuBar();
    	menu = new JMenu("File");
    	settingsMenu = new JMenu("Server Settings");
    	
    	menuBar.add(menu);
    	JMenuItem sameMenuItem = new JMenuItem("Save server configuration");
    	sameMenuItem.addActionListener(this);
    	JMenuItem loadMenuItem = new JMenuItem("Load server configuration");
    	loadMenuItem.addActionListener(this);
    	
    	JMenuItem configureLocalServerMenutItem = new JMenuItem("Configure your local server");
    	configureLocalServerMenutItem.setToolTipText("Deploy the web services on your local network. \n " +
    														"You need to install first the framework before you can use this functionality");
    	
    	
    	JMenuItem userNactemsServerMenutItem = new JMenuItem("Use NaCTeM's server (default)");
    	userNactemsServerMenutItem.setToolTipText("Deploy the web services on NaCTeM's server.");
    	
    	
    	
    	
    	configureLocalServerMenutItem.addActionListener(this);
    	userNactemsServerMenutItem.addActionListener(this);
     
    	
    	
    	menu.add(sameMenuItem);
    	menu.add(loadMenuItem);
    	
    	settingsMenu.add(userNactemsServerMenutItem);
    	settingsMenu.add(configureLocalServerMenutItem);
    	
    	menuBar.add(menu);
    	menuBar.add(settingsMenu);*/
    	
// ============================================================== MENU ITEM==============================================================
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 // ====================================================SERVER CONFIGURATION SAVE/LOAD FILE/====================================================	
    	
 	    	/*JMenuItem sameMenuItem = new JMenuItem("Save server configuration");
	    	sameMenuItem.addActionListener(this);
	    	JMenuItem loadMenuItem = new JMenuItem("Load server configuration");*/
	    	/*else if (actionCommand.equals("Save server configuration")){
	    		usernameStr = usernameTextField.getText();
		        hostnameStr = hostNameField.getText();
		        pathToFrameworkStr = pathToFrameworkField.getText();
		        if(webServiceFormControls.checkServerConfigurationFile(usernameStr,hostnameStr,pathToFrameworkStr)){
		        	JFileChooser jFileChooser = new JFileChooser();
		        	int returnVal = jFileChooser.showSaveDialog(CreateWebServiceForm.this);
		        	 
		            if (returnVal == JFileChooser.APPROVE_OPTION) {
		                File file = jFileChooser.getSelectedFile();
		                PrintWriter writer = null;
						try {
							writer = new PrintWriter(new FileWriter(file));
							writer.println(usernameStr);
			                writer.println(hostnameStr);
			                writer.println(pathToFrameworkStr);
			                writer.close();
						} catch (IOException e1) {
							// TODO Auto-generated catch block
							e1.printStackTrace();
						}
		               
		            }
		        	 
		        	
		        }
	    		 
	    		
	    		
	    		
	    	}*/
	    	/*else if (actionCommand.equals("Load server configuration")){
	    		 JFileChooser jFileChooser = new JFileChooser();
		        	int returnVal = jFileChooser.showOpenDialog(CreateWebServiceForm.this);
		        	 
		            if (returnVal == JFileChooser.APPROVE_OPTION) {
		            	 File file = jFileChooser.getSelectedFile();
		            	 try {
							BufferedReader reader = new BufferedReader(new FileReader(file));
							usernameTextField.setText(reader.readLine());
							hostNameField.setText(reader.readLine());
							pathToFrameworkField.setText(reader.readLine());
							reader.close();
						} catch (Exception e1) {
							// TODO Auto-generated catch block
							e1.printStackTrace();
						}
		            	 
		            	 
		            }
	    		
	    		
	    	}*/
    	
    // ====================================================SERVER CONFIGURATION SAVE/LOAD FILE/====================================================
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    //======================================== ACTION FOR HIDING/SHOWING LOCAL SERVER CONFIGURATION========================================
	    	/*else if (actionCommand.equals("Configure your local server")){
 	    		serverConfigurationPanel.setVisible(true);
 	    		
	    		frame.repaint();
	    		frame.pack();
	    	}
    	
	    	else if (actionCommand.equals("Use NaCTeM's server (default)")){
 	    		serverConfigurationPanel.setVisible(false);
 	    		
	    		frame.repaint();
	    		frame.pack();
	    	}*/
    	//======================================== ACTION FOR HIDING/SHOWING LOCAL SERVER CONFIGURATION========================================
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	    			
//==================================================SSH FUNCTIONALITY FOR TRANSFERING FILE TO SERVER==================================================
    			/*//ssh
    			SSHFunctionalities sSHFunctionalities = new SSHFunctionalities(usernameStr,passwordStr,hostnameStr);
    			
    			System.out.println("Transfering documentation file to remote server");
    			sSHFunctionalities.transferFile(webServiceDocumentation.getAbsolutePath()+"/"+nameForTheWebService+".xml", pathToFrameworkStr+"/templates/Descriptors/");
    			System.out.println("Transfer is complete");
    			
    			System.out.println("Transfering pear package to library of resources in remote server");
    			sSHFunctionalities.transferFile(webServicePearFile.getAbsolutePath()+"/"+nameForTheWebService+".pear", pathToFrameworkStr+"/WEB-INF/resources/");
    			System.out.println("Transfer is complete");
    			
				 System.out.println("created documentation && descriptor xml file for web service: "+nameForTheWebService);
				 
				 System.out.println("Getting web.xml from remote server");
				 sSHFunctionalities.getFile(pathToFrameworkStr+"/WEB-INF/web.xml",webServiceRootPath+"/"+nameForTheWebService);
				 System.out.println("web.xml was succesfuly tranfered!");
				 
				 System.out.println("Adding new servlet entry to web.xml");
				 pearOperations.addServletEntryToWEBXML(webServiceRootPath+"/"+nameForTheWebService, nameForTheWebService);
				 System.out.println("DONE");
				 
				 System.out.println("Transfering new web.xml to remote server");
				 sSHFunctionalities.transferFile(webServiceRootPath+"/"+nameForTheWebService+"/newWeb.xml", pathToFrameworkStr+"/WEB-INF/web.xml");
				 System.out.println("web.xml was succesfully tranferred to remote server");
				*/	
//==================================================SSH FUNCTIONALITY FOR TRANSFERING FILE TO SERVER==================================================				































    
    

 
    
//===========================================================REMOTE SERVER CONFIGURATION PARAMETERS===========================================================    
 
			
 
    
//===============================================USERNAME=============================================== 
/*		JLabel usernameLabel = new JLabel("username: ");
		usernameTextField = new JTextField(10); 
		usernameTextField.setToolTipText("ssh user having read/write permissions to the framework");
 
	    if (shouldWeightX) {
	    	gridBagConstraints.weightx = 0.5;
	    }
	    
	    gridBagConstraints.insets = new Insets(10,10,0,10);  //top padding
	    gridBagConstraints.gridx = 0;
	    gridBagConstraints.gridy = 5;
	    serverConfigurationPanel.add(usernameLabel, gridBagConstraints);
	    
	    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
	    gridBagConstraints.gridx = 1;
	    gridBagConstraints.gridy = 5;
	    serverConfigurationPanel.add(usernameTextField, gridBagConstraints);*/
 
	     
//===============================================USERNAME===============================================   
	    
	    
	    
//===============================================PASSWORD=============================================== 
/*		JLabel passwordLabel = new JLabel("password: ");
		passwordJPasswordField = new JPasswordField(20); 
		passwordJPasswordField.setToolTipText("password of the user");
		 
			    if (shouldWeightX) {
			    	gridBagConstraints.weightx = 0.5;
			    }
			    
	    gridBagConstraints.insets = new Insets(10,10,0,10);  //top padding
		gridBagConstraints.gridx = 0;
		gridBagConstraints.gridy = 6;
		serverConfigurationPanel.add(passwordLabel, gridBagConstraints);
		
 
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
		gridBagConstraints.gridx = 1;
		gridBagConstraints.gridy = 6;
		serverConfigurationPanel.add(passwordJPasswordField, gridBagConstraints);*/
//===============================================PASSWORD===============================================   




			
			
			
//===============================================FILE PATH=============================================== 
/*			JLabel pathToFrameworkLabel = new JLabel("remote path: ");
			pathToFrameworkField= new JTextField(40); 
			pathToFrameworkField.setToolTipText("e.g. /var/lib/tomcat/webapps/UCompareRestServices");
			 
				    if (shouldWeightX) {
				    	gridBagConstraints.weightx = 0.5;
				    }
				    
		    gridBagConstraints.insets = new Insets(10,10,10,10);  //top padding
			gridBagConstraints.gridx = 0;
			gridBagConstraints.gridy = 8;
			serverConfigurationPanel.add(pathToFrameworkLabel, gridBagConstraints);
			
			gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
			gridBagConstraints.gridx = 1;
			gridBagConstraints.gridy = 8;
			serverConfigurationPanel.add(pathToFrameworkField, gridBagConstraints);*/
			
 
//===============================================FILE PATH===============================================  
//===========================================================REMOTE SERVER CONFIGURATION PARAMETERS===========================================================			




//========================================================BORDER======================================================== 
			Border blackline = BorderFactory.createLineBorder(Color.black);
			TitledBorder title = BorderFactory.createTitledBorder(
                    blackline, "Server Configuration");
			
			TitledBorder title2 = BorderFactory.createTitledBorder(
                    blackline, "Web service documentation");
			
			serverConfigurationPanel.setBorder(title);
			webServiceDocumentationPanel.setBorder(title2);
			serverConfigurationPanel.setVisible(false);
//========================================================BORDER========================================================



    	
    	