From a7a9f7d17fa93b3cfc0e7839727ae27c464f8733 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Sun, 16 Oct 2011 14:29:33 -0400
Subject: [PATCH] Documentation for Gitblit Manager.

---
 docs/02_rpc.mkd                                    |    6 ++-
 docs/04_releases.mkd                               |    4 +-
 src/com/gitblit/client/GitblitPanel.java           |   12 ------
 src/com/gitblit/client/GitblitManagerLauncher.java |   10 ++--
 build.xml                                          |   36 +++++++++---------
 src/com/gitblit/client/GitblitManager.java         |   12 +++---
 docs/00_index.mkd                                  |    6 +-
 src/com/gitblit/build/Build.java                   |   17 +++-----
 8 files changed, 45 insertions(+), 58 deletions(-)

diff --git a/build.xml b/build.xml
index 97df46c..720bf90 100644
--- a/build.xml
+++ b/build.xml
@@ -85,7 +85,7 @@
 		<property name="distribution.zipfile" value="gitblit-${gb.version}.zip" />
 		<property name="distribution.warfile" value="gitblit-${gb.version}.war" />
 		<property name="fedclient.zipfile" value="fedclient-${gb.version}.zip" />
-		<property name="rpcclient.zipfile" value="rpcclient-${gb.version}.zip" />
+		<property name="manager.zipfile" value="manager-${gb.version}.zip" />
 	</target>
 	
 	
@@ -267,7 +267,7 @@
 				<arg value="%FEDCLIENT%=${fedclient.zipfile}" />
 
 				<arg value="--substitute" />
-				<arg value="%RPCCLIENT%=${rpcclient.zipfile}" />
+				<arg value="%MANAGER%=${manager.zipfile}" />
 
 				<arg value="--substitute" />
 				<arg value="%BUILDDATE%=${gb.versionDate}" />
@@ -417,13 +417,13 @@
 
 	<!-- 
 		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-		Build the stand-alone, Gitblit RPC Client
+		Build the stand-alone, Gitblit Manager
 		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 	-->
-	<target name="buildRpcClient" depends="compile" description="Builds the stand-alone Gitblit RPC client">
-		<echo>Building Gitblit RPC Client ${gb.version}</echo>
+	<target name="buildManager" depends="compile" description="Builds the stand-alone Gitblit Manager">
+		<echo>Building Gitblit Manager ${gb.version}</echo>
 	
-		<genjar jarfile="rpcclient.jar">
+		<genjar jarfile="manager.jar">
 			<resource file="${basedir}/src/com/gitblit/client/splash.png" />
 			<resource file="${basedir}/resources/gitblt-favicon.png" />
 			<resource file="${basedir}/resources/lock_go_16x16.png" />
@@ -436,7 +436,7 @@
 			<resource file="${basedir}/resources/blank.png" />
 			<resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp.properties" />
 				
-			<class name="com.gitblit.client.GitblitClientLauncher" />
+			<class name="com.gitblit.client.GitblitManagerLauncher" />
 			<classfilter>
 				<exclude name="org.apache." />
 				<exclude name="org.bouncycastle." />
@@ -447,17 +447,17 @@
 			</classfilter>
 			<classpath refid="master-classpath" />
 			<manifest>
-				<attribute name="Main-Class" value="com.gitblit.client.GitblitClientLauncher" />
+				<attribute name="Main-Class" value="com.gitblit.client.GitblitManagerLauncher" />
 				<attribute name="SplashScreen-Image" value="splash.png" />
 				<attribute name="Specification-Version" value="${gb.version}" />				
 				<attribute name="Release-Date" value="${gb.versionDate}" />
 			</manifest>
 		</genjar>
 		
-		<!-- Build the rpc client zip file -->
-		<zip destfile="${rpcclient.zipfile}">
+		<!-- Build the Manager zip file -->
+		<zip destfile="${manager.zipfile}">
 			<fileset dir="${basedir}">
-				<include name="rpcclient.jar" />				
+				<include name="manager.jar" />				
 			</fileset>			
 		</zip>
 	</target>
@@ -579,7 +579,7 @@
 			<arg value="%FEDCLIENT%=${fedclient.zipfile}" />
 
 			<arg value="--substitute" />
-			<arg value="%RPCCLIENT%=${rpcclient.zipfile}" />
+			<arg value="%MANAGER%=${manager.zipfile}" />
 
 			<arg value="--substitute" />
 			<arg value="%BUILDDATE%=${gb.versionDate}" />
@@ -611,7 +611,7 @@
 		Compile from source, publish binaries, and build & deploy site
 		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 	-->
-	<target name="buildAll" depends="buildGO,buildWAR,buildFederationClient,buildRpcClient,buildSite">		
+	<target name="buildAll" depends="buildGO,buildWAR,buildFederationClient,buildManager,buildSite">		
 		<!-- Cleanup -->
 		<delete dir="${project.build.dir}" />
 		<delete dir="${project.war.dir}" />
@@ -624,7 +624,7 @@
 		Publish binaries to Google Code
 		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 	-->
-	<target name="publishBinaries" depends="buildGO,buildWAR,buildFederationClient,buildRpcClient" description="Publish the Gitblit binaries to Google Code">
+	<target name="publishBinaries" depends="buildGO,buildWAR,buildFederationClient,buildManager" description="Publish the Gitblit binaries to Google Code">
 		
 		<echo>Uploading Gitblit ${gb.version} binaries</echo>
 		
@@ -658,14 +658,14 @@
 			summary="Gitblit Federation Client v${gb.version} (command-line tool to clone data from federated Gitblit instances)"
 			labels="Featured, Type-Package, OpSys-All" />
 
-		<!-- Upload RpcClient -->
+		<!-- Upload Manager -->
 		<gcupload 
 			username="${googlecode.user}" 
 			password="${googlecode.password}" 
 			projectname="gitblit" 
-			filename="${rpcclient.zipfile}" 
-			targetfilename="rpcclient-${gb.version}.zip"
-			summary="Gitblit RPC Client v${gb.version} (Swing tool to clone repositories and remotely administer a Gitblit server)"
+			filename="${manager.zipfile}" 
+			targetfilename="manager-${gb.version}.zip"
+			summary="Gitblit Manager v${gb.version} (Swing tool to remotely administer a Gitblit server)"
 			labels="Featured, Type-Package, OpSys-All" />
 	</target>
 
diff --git a/docs/00_index.mkd b/docs/00_index.mkd
index 943dd0e..e323e6e 100644
--- a/docs/00_index.mkd
+++ b/docs/00_index.mkd
@@ -18,7 +18,7 @@
 
 ### Tools
 
-- *Gitblit RPC Client* - a Java Swing tool to clone repositories and remotely administer a Gitblit server
+- *Gitblit Manager* - a Java/Swing application for remote administration of a Gitblit server
 - *Gitblit Federation Client* - a command line tool to clone/pull groups of repositories and optionally users and settings
 
 ### Java Runtime Requirement
@@ -27,7 +27,7 @@
 
 ### Current Release
 
-**%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%)|[war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%)|[fedclient](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%)|[rpcclient](http://code.google.com/p/gitblit/downloads/detail?name=%RPCCLIENT%)) based on [%JGIT%][jgit] &nbsp; *released %BUILDDATE%*
+**%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%)|[war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%)|[fedclient](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%)|[manager](http://code.google.com/p/gitblit/downloads/detail?name=%MANAGER%)) based on [%JGIT%][jgit] &nbsp; *released %BUILDDATE%*
 
 - improved: updated ui with Twitter's Bootstrap CSS toolkit  
     **New:** *web.loginMessage = gitblit*
@@ -35,7 +35,7 @@
     **New:** *web.enableRpcServlet = true*  
     **New:** *web.enableRpcAdministration = false*
 - added: reusable JSON RPC client class
-- added: Swing RPC Client application for cloning and administration of repositories, users, & federation proposals.
+- added: Gitblit Manager (Java/Swing Application) for remote administration of a Gitblit server.
 - fixed: federation protocol timestamps.  dates are now serialized to the [iso8601](http://en.wikipedia.org/wiki/ISO_8601) standard.  
     **This breaks 0.6.0 federation clients/servers.**
 - fixed: Gitblit now runs on Servlet 3.0 webservers (e.g. Tomcat 7, Jetty 8)
diff --git a/docs/02_rpc.mkd b/docs/02_rpc.mkd
index 4a547d0..017dd7d 100644
--- a/docs/02_rpc.mkd
+++ b/docs/02_rpc.mkd
@@ -33,9 +33,11 @@
 <tr><td>LIST_SETTINGS</td><td>-</td><td><em>admin</em></td><td>-</td><td>Properties</td></tr>
 </table>
 
-### RPC Client
+### Result Codes
 
-An example Java Swing [RPC Client application](http://code.google.com/p/gitblit/downloads/detail?name=rpcclient-%VERSION%.zip) is available and allows remote administration of repositories and users.  
+### Gitblit Manager
+
+[Gitblit Manager](http://code.google.com/p/gitblit/downloads/detail?name=%MANAGER%) is an example Java/Swing application that allows remote administration of a Gitblit server.  
 This application exercises most methods from the utility class `com.gitblit.utils.RpcUtils`.
 
 ### EGit "Import from Gitblit" Feature (Planning)
diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd
index 35dd188..d71e5b1 100644
--- a/docs/04_releases.mkd
+++ b/docs/04_releases.mkd
@@ -1,7 +1,7 @@
 ## Release History
 
 ### Current Release
-**%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%)|[war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%)|[fedclient](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%)|[rpcclient](http://code.google.com/p/gitblit/downloads/detail?name=%RPCCLIENT%)) based on [%JGIT%][jgit] &nbsp; *released %BUILDDATE%*
+**%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%)|[war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%)|[fedclient](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%)|[manager](http://code.google.com/p/gitblit/downloads/detail?name=%MANAGER%)) based on [%JGIT%][jgit] &nbsp; *released %BUILDDATE%*
 
 - improved: updated ui with Twitter's Bootstrap CSS toolkit  
     **New:** *web.loginMessage = gitblit*
@@ -9,7 +9,7 @@
     **New:** *web.enableRpcServlet = true*  
     **New:** *web.enableRpcAdministration = false*
 - added: reusable JSON RPC client class
-- added: Swing RPC Client application for cloning and administration of repositories, users, & federation proposals.
+- added: Gitblit Manager (Java/Swing Application) for remote administration of a Gitblit server.
 - fixed: federation protocol timestamps.  dates are now serialized to the [iso8601](http://en.wikipedia.org/wiki/ISO_8601) standard.  
     **This breaks 0.6.0 federation clients/servers.**
 - fixed: Gitblit now runs on Servlet 3.0 webservers (e.g. Tomcat 7, Jetty 8)
diff --git a/src/com/gitblit/build/Build.java b/src/com/gitblit/build/Build.java
index 1f6642d..0a44963 100644
--- a/src/com/gitblit/build/Build.java
+++ b/src/com/gitblit/build/Build.java
@@ -48,11 +48,11 @@
  * 
  */
 public class Build {
-	
+
 	public interface DownloadListener {
 		public void downloading(String name);
 	}
-	
+
 	/**
 	 * BuildType enumeration representing compile-time or runtime. This is used
 	 * to download dependencies either for Gitblit GO runtime or for setting up
@@ -61,7 +61,7 @@
 	public static enum BuildType {
 		RUNTIME, COMPILETIME;
 	}
-	
+
 	private static DownloadListener downloadListener;
 
 	public static void main(String... args) {
@@ -121,7 +121,7 @@
 		// needed for site publishing
 		downloadFromApache(MavenObject.COMMONSNET, BuildType.RUNTIME);
 	}
-	
+
 	public static void federationClient() {
 		downloadFromApache(MavenObject.JCOMMANDER, BuildType.RUNTIME);
 		downloadFromApache(MavenObject.SERVLET, BuildType.RUNTIME);
@@ -131,18 +131,15 @@
 		downloadFromApache(MavenObject.LOG4J, BuildType.RUNTIME);
 		downloadFromApache(MavenObject.GSON, BuildType.RUNTIME);
 		downloadFromApache(MavenObject.JSCH, BuildType.RUNTIME);
-		
+
 		downloadFromEclipse(MavenObject.JGIT, BuildType.RUNTIME);
 	}
-	
-	public static void rpcClient(DownloadListener listener) {
+
+	public static void manager(DownloadListener listener) {
 		downloadListener = listener;
 		downloadFromApache(MavenObject.GSON, BuildType.RUNTIME);
-		downloadFromApache(MavenObject.JSCH, BuildType.RUNTIME);
 		downloadFromApache(MavenObject.SLF4JAPI, BuildType.RUNTIME);
 		downloadFromApache(MavenObject.SLF4JNOP, BuildType.RUNTIME);
-		
-		downloadFromEclipse(MavenObject.JGIT, BuildType.RUNTIME);
 	}
 
 	/**
diff --git a/src/com/gitblit/client/GitblitClient.java b/src/com/gitblit/client/GitblitManager.java
similarity index 93%
rename from src/com/gitblit/client/GitblitClient.java
rename to src/com/gitblit/client/GitblitManager.java
index ed6c161..f777fdb 100644
--- a/src/com/gitblit/client/GitblitClient.java
+++ b/src/com/gitblit/client/GitblitManager.java
@@ -50,7 +50,7 @@
  * @author James Moger
  * 
  */
-public class GitblitClient extends JFrame {
+public class GitblitManager extends JFrame {
 
 	private static final long serialVersionUID = 1L;
 	private JTabbedPane serverTabs;
@@ -60,7 +60,7 @@
 	private List<GitblitRegistration> registrations = new ArrayList<GitblitRegistration>();
 	private JMenu recentMenu;
 
-	private GitblitClient() {
+	private GitblitManager() {
 		super();
 	}
 
@@ -68,7 +68,7 @@
 		setContentPane(getCenterPanel());
 		setIconImage(new ImageIcon(getClass().getResource("/gitblt-favicon.png")).getImage());
 
-		setTitle("Gitblit RPC Client v" + Constants.VERSION + " (" + Constants.VERSION_DATE + ")");
+		setTitle("Gitblit Manager v" + Constants.VERSION + " (" + Constants.VERSION_DATE + ")");
 		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 		setSize(800, 500);
 	}
@@ -135,7 +135,7 @@
 		panel.add(newLabelPanel(Translation.get("gb.username"), accountField));
 		panel.add(newLabelPanel(Translation.get("gb.password"), passwordField));
 
-		int result = JOptionPane.showConfirmDialog(GitblitClient.this, panel,
+		int result = JOptionPane.showConfirmDialog(GitblitManager.this, panel,
 				Translation.get("gb.login"), JOptionPane.OK_CANCEL_OPTION);
 		if (result != JOptionPane.OK_OPTION) {
 			return false;
@@ -163,7 +163,7 @@
 					panel));
 			return true;
 		} catch (IOException e) {
-			JOptionPane.showMessageDialog(GitblitClient.this, e.getMessage(),
+			JOptionPane.showMessageDialog(GitblitManager.this, e.getMessage(),
 					Translation.get("gb.error"), JOptionPane.ERROR_MESSAGE);
 		}
 		return false;
@@ -189,7 +189,7 @@
 					UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
 				} catch (Exception e) {
 				}
-				GitblitClient frame = new GitblitClient();
+				GitblitManager frame = new GitblitManager();
 				frame.initialize();
 				frame.setVisible(true);
 			}
diff --git a/src/com/gitblit/client/GitblitClientLauncher.java b/src/com/gitblit/client/GitblitManagerLauncher.java
similarity index 94%
rename from src/com/gitblit/client/GitblitClientLauncher.java
rename to src/com/gitblit/client/GitblitManagerLauncher.java
index 463dc96..1d4670d 100644
--- a/src/com/gitblit/client/GitblitClientLauncher.java
+++ b/src/com/gitblit/client/GitblitManagerLauncher.java
@@ -31,12 +31,12 @@
 import com.gitblit.build.Build.DownloadListener;
 
 /**
- * Downloads dependencies and launches RPC client.
+ * Downloads dependencies and launches Gitblit Manager.
  * 
  * @author James Moger
  * 
  */
-public class GitblitClientLauncher {
+public class GitblitManagerLauncher {
 
 	public static void main(String[] args) {
 		final SplashScreen splash = SplashScreen.getSplashScreen();
@@ -49,7 +49,7 @@
 		};
 		
 		// download rpc client runtime dependencies
-		Build.rpcClient(downloadListener);
+		Build.manager(downloadListener);
 
 		File libFolder = new File("ext");
 		List<File> jars = Launcher.findJars(libFolder.getAbsoluteFile());
@@ -67,8 +67,8 @@
 			}
 		}
 		
-		updateSplash(splash, Translation.get("gb.starting") + " Gitblit RPC Client...");
-		GitblitClient.main(args);
+		updateSplash(splash, Translation.get("gb.starting") + " Gitblit Manager...");
+		GitblitManager.main(args);
 	}
 
 	private static void updateSplash(final SplashScreen splash, final String string) {
diff --git a/src/com/gitblit/client/GitblitPanel.java b/src/com/gitblit/client/GitblitPanel.java
index 9e10d2d..2c1c5a6 100644
--- a/src/com/gitblit/client/GitblitPanel.java
+++ b/src/com/gitblit/client/GitblitPanel.java
@@ -149,16 +149,6 @@
 			}
 		});
 
-		final JButton cloneRepository = new JButton(Translation.get("gb.clone"));
-		cloneRepository.setEnabled(false);
-		cloneRepository.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				for (RepositoryModel model : getSelectedRepositories()) {
-					System.out.println("TODO Clone " + model);
-				}
-			}
-		});
-
 		nameRenderer = new NameRenderer();
 		typeRenderer = new IndicatorsRenderer();
 
@@ -192,7 +182,6 @@
 				boolean selected = repositoriesTable.getSelectedRow() > -1;
 				browseRepository.setEnabled(singleSelection);
 				delRepository.setEnabled(selected);
-				cloneRepository.setEnabled(selected);
 				if (selected) {
 					int viewRow = repositoriesTable.getSelectedRow();
 					int modelRow = repositoriesTable.convertRowIndexToModel(viewRow);
@@ -224,7 +213,6 @@
 		JPanel repositoryControls = new JPanel();
 		repositoryControls.add(refreshRepositories);
 		repositoryControls.add(browseRepository);
-		repositoryControls.add(cloneRepository);
 		repositoryControls.add(createRepository);
 		repositoryControls.add(editRepository);
 		repositoryControls.add(delRepository);

--
Gitblit v1.9.1