Author: tchemit Date: 2008-05-13 13:24:16 +0000 (Tue, 13 May 2008) New Revision: 647 Modified: trunk/lutinvcs/core/src/main/java/org/codelutin/vcs/type/VCSConnexionConfigProperty.java trunk/lutinvcs/core/src/main/java/org/codelutin/vcs/type/VCSConnexionMode.java Log: refactor config Modified: trunk/lutinvcs/core/src/main/java/org/codelutin/vcs/type/VCSConnexionConfigProperty.java =================================================================== --- trunk/lutinvcs/core/src/main/java/org/codelutin/vcs/type/VCSConnexionConfigProperty.java 2008-05-13 12:47:51 UTC (rev 646) +++ trunk/lutinvcs/core/src/main/java/org/codelutin/vcs/type/VCSConnexionConfigProperty.java 2008-05-13 13:24:16 UTC (rev 647) @@ -9,33 +9,34 @@ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You * should have received a copy of the GNU General Public License along with this * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - * - Suite 330, Boston, MA 02111-1307, USA. + * - Suite 330, Boston, MA 02111-1307, USA. * ##% */ package org.codelutin.vcs.type; -import org.codelutin.vcs.VCSConnexionConfig; - /** - * Enumaration of properties useable in a {@link VCSConnexionConfig} + * Enumaration of properties useable in a {@link org.codelutin.vcs.VCSConnexionConfig} * * @author chemit - * @see VCSConnexionConfig + * @see org.codelutin.vcs.VCSConnexionConfig */ public enum VCSConnexionConfigProperty { /** property <code>rootConfig</code>, as a {@link org.codelutin.vcs.VCSRootConfig} */ rootConfig, - /** property <code>connexionMode</code>, as a {@link org.codelutin.vcs.type.VCSConnexionMode} */ - connexionMode, - /** property <code>typeRepo</code>, type of repo to use, as a {@link VCSTypeRepo} */ typeRepo, /** property <code>typeRepoValue</code>, the value associated to typeRepo (eg, branch or tag name, null for a head connexion) */ typeRepoValue, + /** property <code>workingCopyFile</code>, the location of local working copy, it null (no working copy declared) */ + workingCopyFile, + + /** property <code>connexionMode</code>, as a {@link org.codelutin.vcs.type.VCSConnexionMode} */ + connexionMode, + /** property <code>login</code>, login for a password connexion */ login, @@ -49,8 +50,5 @@ sshPassphrase, /** property <code>sshPrivateKey</code>, path of the ssh private key file for a ssh connexion */ - sshPrivateKeyFile, - - /** property <code>localDatabasePath</code>, path of the local working copy */ - localDatabasePath + sshPrivateKeyFile } \ No newline at end of file Modified: trunk/lutinvcs/core/src/main/java/org/codelutin/vcs/type/VCSConnexionMode.java =================================================================== --- trunk/lutinvcs/core/src/main/java/org/codelutin/vcs/type/VCSConnexionMode.java 2008-05-13 12:47:51 UTC (rev 646) +++ trunk/lutinvcs/core/src/main/java/org/codelutin/vcs/type/VCSConnexionMode.java 2008-05-13 13:24:16 UTC (rev 647) @@ -9,20 +9,19 @@ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You * should have received a copy of the GNU General Public License along with this * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - * - Suite 330, Boston, MA 02111-1307, USA. + * - Suite 330, Boston, MA 02111-1307, USA. * ##% */ package org.codelutin.vcs.type; -import org.codelutin.vcs.VCSConnexionConfig; import static org.codelutin.vcs.type.VCSConnexionConfigProperty.login; import static org.codelutin.vcs.type.VCSConnexionConfigProperty.password; import static org.codelutin.vcs.type.VCSConnexionConfigProperty.sshLogin; import static org.codelutin.vcs.type.VCSConnexionConfigProperty.sshPassphrase; import static org.codelutin.vcs.type.VCSConnexionConfigProperty.sshPrivateKeyFile; -import java.util.EnumSet; import java.util.Arrays; +import java.util.EnumSet; /** * Enumaration of connexion mode. @@ -31,7 +30,7 @@ * * @author chemit * @see VCSConnexionConfigProperty - * @see VCSConnexionConfig + * @see org.codelutin.vcs.VCSConnexionConfig */ public enum VCSConnexionMode { ANONYMOUS, @@ -42,10 +41,10 @@ private final EnumSet<VCSConnexionConfigProperty> authenticationProperties; VCSConnexionMode(VCSConnexionConfigProperty... authenticationProperties) { - this.authenticationProperties = EnumSet.copyOf(Arrays.asList(authenticationProperties)); + this.authenticationProperties = authenticationProperties.length == 0 ? EnumSet.noneOf(VCSConnexionConfigProperty.class) : EnumSet.copyOf(Arrays.asList(authenticationProperties)); } public EnumSet<VCSConnexionConfigProperty> getAuthenticationProperties() { return authenticationProperties; } -} +} \ No newline at end of file