branch feature/GIT updated (95bd40c -> 2c8c9a8)
This is an automated email from the git hooks/post-receive script. New change to branch feature/GIT in repository scmwebeditor. See http://git.nuiton.org/scmwebeditor.git from 95bd40c Made ScmWebEditorBaseAction abstract, added a new action class for the edit page (EditAction) new 2c8c9a8 Added a DTO for the browse action The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 2c8c9a83e96efe3499fa8e5410825b0e42c5a607 Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Mon May 4 12:16:18 2015 +0200 Added a DTO for the browse action Summary of changes: .../org/nuiton/scmwebeditor/GitConnection.java | 79 ++++++++-------- .../org/nuiton/scmwebeditor/ScmConnection.java | 11 ++- .../org/nuiton/scmwebeditor/SvnConnection.java | 87 ++++++++++-------- .../nuiton/scmwebeditor/actions/BrowseAction.java | 67 +++++++++----- .../org/nuiton/scmwebeditor/dto/BrowseDto.java | 61 +++++++++++++ .../nuiton/scmwebeditor/dto/BrowseResultDto.java | 100 +++++++++++++++++++++ src/main/resources/struts.xml | 2 +- src/main/webapp/WEB-INF/content/browse.jsp | 1 + src/main/webapp/WEB-INF/content/loginBrowse.jsp | 2 +- ...ivateSvnRedirect.jsp => privateScmRedirect.jsp} | 4 +- .../org/nuiton/scmwebeditor/BaseActionTest.java | 4 + 11 files changed, 311 insertions(+), 107 deletions(-) create mode 100644 src/main/java/org/nuiton/scmwebeditor/dto/BrowseDto.java create mode 100644 src/main/java/org/nuiton/scmwebeditor/dto/BrowseResultDto.java rename src/main/webapp/WEB-INF/content/{privateSvnRedirect.jsp => privateScmRedirect.jsp} (96%) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/GIT in repository scmwebeditor. See http://git.nuiton.org/scmwebeditor.git commit 2c8c9a83e96efe3499fa8e5410825b0e42c5a607 Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Mon May 4 12:16:18 2015 +0200 Added a DTO for the browse action --- .../org/nuiton/scmwebeditor/GitConnection.java | 79 ++++++++-------- .../org/nuiton/scmwebeditor/ScmConnection.java | 11 ++- .../org/nuiton/scmwebeditor/SvnConnection.java | 87 ++++++++++-------- .../nuiton/scmwebeditor/actions/BrowseAction.java | 67 +++++++++----- .../org/nuiton/scmwebeditor/dto/BrowseDto.java | 61 +++++++++++++ .../nuiton/scmwebeditor/dto/BrowseResultDto.java | 100 +++++++++++++++++++++ src/main/resources/struts.xml | 2 +- src/main/webapp/WEB-INF/content/browse.jsp | 1 + src/main/webapp/WEB-INF/content/loginBrowse.jsp | 2 +- ...ivateSvnRedirect.jsp => privateScmRedirect.jsp} | 4 +- .../org/nuiton/scmwebeditor/BaseActionTest.java | 4 + 11 files changed, 311 insertions(+), 107 deletions(-) diff --git a/src/main/java/org/nuiton/scmwebeditor/GitConnection.java b/src/main/java/org/nuiton/scmwebeditor/GitConnection.java index feab836..9b8213e 100644 --- a/src/main/java/org/nuiton/scmwebeditor/GitConnection.java +++ b/src/main/java/org/nuiton/scmwebeditor/GitConnection.java @@ -43,6 +43,8 @@ import org.eclipse.jgit.treewalk.TreeWalk; import org.nuiton.scmwebeditor.actions.BrowseAction; import org.nuiton.scmwebeditor.actions.ScmWebEditorCommitAction; import org.nuiton.scmwebeditor.actions.UploadAction; +import org.nuiton.scmwebeditor.dto.BrowseDto; +import org.nuiton.scmwebeditor.dto.BrowseResultDto; import javax.naming.AuthenticationException; import java.io.File; @@ -107,32 +109,35 @@ public class GitConnection implements ScmConnection { @Override - public String browse(BrowseAction action) { + public BrowseResultDto browse(BrowseDto dto) { + + BrowseResultDto resultDto = new BrowseResultDto(); try { - cloneRepository(action.getUsername(), action.getPw()); + cloneRepository(dto.getUsername(), dto.getPassword()); } catch (ScmNotFoundException e) { if (log.isErrorEnabled()) { log.error("Error while cloning the repository", e); } - action.setError(true); - return action.ROOT; + resultDto.setError(BrowseResultDto.ERROR); + return resultDto; } catch (IOException e) { if (log.isErrorEnabled()) { log.error("Error while cloning the repository", e); } - action.setError(true); - return action.ROOT; + resultDto.setError(BrowseResultDto.ERROR); + return resultDto; } catch (AuthenticationException e) { if (log.isErrorEnabled()) { log.error("Error while cloning the repository", e); } - return action.AUTH_ERROR; + resultDto.setError(BrowseResultDto.AUTH_ERROR); + return resultDto; } String url; @@ -144,13 +149,13 @@ public class GitConnection implements ScmConnection { if (log.isErrorEnabled()) { log.error("Error while getting the head branch name", e); } - action.setError(true); - return BrowseAction.ROOT; + resultDto.setError(BrowseResultDto.ERROR); + return resultDto; } - action.setHeadBranchName(headBranchName); + resultDto.setHeadBranchName(headBranchName); - action.setFiles(new LinkedList<String>()); - action.setDirectories(new HashMap<String, String>()); + resultDto.setFiles(new LinkedList<String>()); + resultDto.setDirectories(new HashMap<String, String>()); ObjectId commitId = null; @@ -158,7 +163,7 @@ public class GitConnection implements ScmConnection { try { commitId = gitRepo.resolve(Constants.HEAD); - String selectedBranch = action.getSelectedBranch(); + String selectedBranch = dto.getSelectedBranch(); if (selectedBranch != null) { if (!selectedBranch.equals("")) { @@ -170,10 +175,10 @@ public class GitConnection implements ScmConnection { if (commitId == null) { if (log.isDebugEnabled()) { - log.debug("Branch " + selectedBranch + " was not found, using " + MASTER_BRANCH + "instead"); + log.debug("Branch " + selectedBranch + " was not found, using " + MASTER_BRANCH + " instead"); } - action.setSelectedBranch(MASTER_BRANCH); + resultDto.setSelectedBranch(MASTER_BRANCH); changeBranch(MASTER_BRANCH); commitId = gitRepo.resolve(MASTER_BRANCH); } @@ -183,16 +188,17 @@ public class GitConnection implements ScmConnection { if (log.isErrorEnabled()) { log.error("Can't access to the repository", e); } - action.setError(true); - return BrowseAction.ROOT; + resultDto.setError(BrowseResultDto.ERROR); + return resultDto; } - String id = action.getId(); - String address = action.getAddress(); + String id = dto.getId(); + String address = dto.getAddress(); // if the id parameter is not given, we look for the root if (id.equals("")) { - return BrowseAction.ROOT; + resultDto.setError(BrowseResultDto.ROOT); + return resultDto; } else if (id.equals("0")) { url = address; } else { @@ -205,8 +211,8 @@ public class GitConnection implements ScmConnection { if (!gitRepo.getObjectDatabase().exists()) { - action.setError(true); - return BrowseAction.ROOT; + resultDto.setError(BrowseResultDto.ERROR); + return resultDto; } RevCommit commit = null; @@ -219,9 +225,8 @@ public class GitConnection implements ScmConnection { if (log.isDebugEnabled()) { log.debug("Can not access to repository " + url); } - action.setError(true); - - return BrowseAction.ROOT; + resultDto.setError(BrowseResultDto.ERROR); + return resultDto; } RevTree tree = commit.getTree(); @@ -251,10 +256,10 @@ public class GitConnection implements ScmConnection { if (dirs.contains(currentDir)) { treeWalk.enterSubtree(); } else { - action.getDirectories().put(fileName, fileName); + resultDto.getDirectories().put(fileName, fileName); } } else { - action.getFiles().add(fileName); + resultDto.getFiles().add(fileName); } } } @@ -263,26 +268,26 @@ public class GitConnection implements ScmConnection { if (log.isErrorEnabled()) { log.error("Can't access to the repository", e); } - action.setError(true); - return BrowseAction.ROOT; + resultDto.setError(BrowseResultDto.ERROR); + return resultDto; } - action.setError(false); + resultDto.setError(null); // building the tree - if (action.getFiles() != null) { - for (String file : action.getFiles()) { + if (resultDto.getFiles() != null) { + for (String file : resultDto.getFiles()) { TreeNode node = new TreeNode(); node.setId(file); node.setTitle(file.substring(file.lastIndexOf("/") + 1)); node.setState(TreeNode.NODE_STATE_LEAF); node.setIcon("ui-icon-document"); - action.getNodes().add(node); + resultDto.getNodes().add(node); } } - if (action.getDirectories() != null) { - for (Map.Entry<String, String> entry : action.getDirectories().entrySet()) { + if (resultDto.getDirectories() != null) { + for (Map.Entry<String, String> entry : resultDto.getDirectories().entrySet()) { String value = entry.getValue(); @@ -290,11 +295,11 @@ public class GitConnection implements ScmConnection { node.setId(value); node.setTitle(value.substring(value.lastIndexOf("/"))); - action.getNodes().add(node); + resultDto.getNodes().add(node); } } - return BrowseAction.SUCCESS; + return resultDto; } diff --git a/src/main/java/org/nuiton/scmwebeditor/ScmConnection.java b/src/main/java/org/nuiton/scmwebeditor/ScmConnection.java index f56d97e..1eb4a3b 100644 --- a/src/main/java/org/nuiton/scmwebeditor/ScmConnection.java +++ b/src/main/java/org/nuiton/scmwebeditor/ScmConnection.java @@ -3,6 +3,8 @@ package org.nuiton.scmwebeditor; import org.nuiton.scmwebeditor.actions.ScmWebEditorCommitAction; import org.nuiton.scmwebeditor.actions.BrowseAction; import org.nuiton.scmwebeditor.actions.UploadAction; +import org.nuiton.scmwebeditor.dto.BrowseDto; +import org.nuiton.scmwebeditor.dto.BrowseResultDto; import javax.naming.AuthenticationException; @@ -13,13 +15,10 @@ public interface ScmConnection { /** * Searches the repository's files to make a list of them - * @param action the BrowseAction which contains the parameters (repository's address, username, password...) - * and which will contain the result (a list of TreeNode for example) - * @return BrowseAction.AUTH_ERROR if there has been a problem during the authentication - * BrowseAction.ROOT if the result is the root of the repository - * BrowseAction.SUCCESS otherwise + * @param dto the DTO which contains all the parameters + * @return a DTO which contains all the results */ - public String browse(BrowseAction action); + public BrowseResultDto browse(BrowseDto dto); /** diff --git a/src/main/java/org/nuiton/scmwebeditor/SvnConnection.java b/src/main/java/org/nuiton/scmwebeditor/SvnConnection.java index 6932f94..8156666 100644 --- a/src/main/java/org/nuiton/scmwebeditor/SvnConnection.java +++ b/src/main/java/org/nuiton/scmwebeditor/SvnConnection.java @@ -28,6 +28,8 @@ import org.apache.commons.logging.LogFactory; import org.nuiton.scmwebeditor.actions.BrowseAction; import org.nuiton.scmwebeditor.actions.ScmWebEditorCommitAction; import org.nuiton.scmwebeditor.actions.UploadAction; +import org.nuiton.scmwebeditor.dto.BrowseDto; +import org.nuiton.scmwebeditor.dto.BrowseResultDto; import org.nuiton.util.FileUtil; import org.tmatesoft.svn.core.*; import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager; @@ -100,7 +102,9 @@ public class SvnConnection implements ScmConnection { @Override - public String browse(BrowseAction action) { + public BrowseResultDto browse(BrowseDto dto) { + + BrowseResultDto resultDto = new BrowseResultDto(); String url; @@ -109,18 +113,18 @@ public class SvnConnection implements ScmConnection { SVNRepository repository; ISVNAuthenticationManager authManager; - String name = action.getUsername(); - String password = action.getPw(); + String name = dto.getUsername(); + String password = dto.getPassword(); - if (action.getId().equals("")) { + if (dto.getId().equals("")) { try { if (log.isDebugEnabled()) { - log.debug("Address svn : " + action.getAddress()); + log.debug("Address svn : " + dto.getAddress()); } - repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(action.getAddress())); + repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(dto.getAddress())); authManager = SVNWCUtil.createDefaultAuthenticationManager(name, password); repository.setAuthenticationManager(authManager); @@ -130,20 +134,22 @@ public class SvnConnection implements ScmConnection { if (log.isErrorEnabled()) { log.error("Can't access to the repository : Auth Problem", e); } - return BrowseAction.AUTH_ERROR; + resultDto.setError(BrowseResultDto.AUTH_ERROR); + return resultDto; } catch (SVNException e) { if (log.isErrorEnabled()) { log.error("Can't access to the repository", e); } - action.setError(true); + resultDto.setError(BrowseResultDto.ROOT); } - return BrowseAction.ROOT; - } else if (action.getId().equals("0")) { - url = action.getAddress(); + resultDto.setError(BrowseResultDto.ROOT); + return resultDto; + } else if (dto.getId().equals("0")) { + url = dto.getAddress(); } else { - url = action.getId(); - action.setAddress(action.getId()); + url = dto.getId(); + dto.setAddress(dto.getId()); } @@ -163,8 +169,8 @@ public class SvnConnection implements ScmConnection { if (log.isWarnEnabled()) { log.warn("There is no entry at '" + url + "'."); } - action.setError(true); - return BrowseAction.SUCCESS; + resultDto.setError(BrowseResultDto.ERROR); + return resultDto; } else if (nodeKind == SVNNodeKind.FILE) { if (log.isDebugEnabled()) { log.debug("The entry at '" + url + "' is a file."); @@ -174,13 +180,13 @@ public class SvnConnection implements ScmConnection { node.setTitle(url.substring(url.lastIndexOf("/") + 1)); node.setState(TreeNode.NODE_STATE_LEAF); node.setIcon("ui-icon-document"); - action.getNodes().add(node); - return BrowseAction.SUCCESS; + resultDto.getNodes().add(node); + return resultDto; } - action.setNumberOfFile(0); - listEntries(repository, "", action); + resultDto.setNumberOfFiles(0); + listEntries(repository, "", dto.getAddress(), resultDto); if (log.isDebugEnabled()) { - log.debug("Number of file : " + action.getFiles().size()); + log.debug("Number of file : " + resultDto.getFiles().size()); } @@ -188,45 +194,47 @@ public class SvnConnection implements ScmConnection { if (log.isErrorEnabled()) { log.error("Can't access to the repository : Auth Problem"); } - return BrowseAction.AUTH_ERROR; + resultDto.setError(BrowseResultDto.AUTH_ERROR); + return resultDto; } catch (SVNException svne) { if (log.isErrorEnabled()) { log.error("Can't access to the repository"); } - action.setError(true); + resultDto.setError(BrowseResultDto.ERROR); + return resultDto; } if (log.isDebugEnabled()) { log.debug("Search success"); } - action.setError(false); + resultDto.setError(null); - if (action.getFiles() != null) { - for (String file : action.getFiles()) { + if (resultDto.getFiles() != null) { + for (String file : resultDto.getFiles()) { TreeNode node = new TreeNode(); node.setId(file); node.setTitle(file.substring(file.lastIndexOf("/") + 1)); node.setState(TreeNode.NODE_STATE_LEAF); node.setIcon("ui-icon-document"); - action.getNodes().add(node); + resultDto.getNodes().add(node); } } - if (action.getDirectories() != null) { - for (Map.Entry<String, String> entry : action.getDirectories().entrySet()) { + if (resultDto.getDirectories() != null) { + for (Map.Entry<String, String> entry : resultDto.getDirectories().entrySet()) { String value = entry.getValue(); TreeNode node = new TreeNode(); node.setId(value); node.setTitle(value.substring(value.lastIndexOf("/"))); - action.getNodes().add(node); + resultDto.getNodes().add(node); } } - return BrowseAction.SUCCESS; + return resultDto; } @@ -879,10 +887,7 @@ public class SvnConnection implements ScmConnection { - public static void listEntries(SVNRepository repository, String path, BrowseAction action) { - - action.setFiles(new LinkedList<String>()); - action.setDirectories(new HashMap<String, String>()); + public void listEntries(SVNRepository repository, String path, String address, BrowseResultDto resultDto) { Collection<?> entries = null; try { @@ -900,19 +905,27 @@ public class SvnConnection implements ScmConnection { if (log.isDebugEnabled()) { log.debug("/" + (path.equals("") ? "" : path + "/") + entry.getName() + "\n"); } - String fichier = action.getAddress() + "/" + (path.equals("") ? "" : path + "/") + entry.getName(); + String fichier = address + "/" + (path.equals("") ? "" : path + "/") + entry.getName(); if (entry.getKind() == SVNNodeKind.DIR) { - action.getDirectories().put(action.getAddressUnique(fichier), fichier); + resultDto.getDirectories().put(getAddressUnique(fichier), fichier); } else { // only adding the files to the files list and not the directories - action.getFiles().add(fichier); + resultDto.getFiles().add(fichier); } } } + public String getAddressUnique(String leFichier) { + String result = leFichier.replaceAll("/|:", ""); + if (log.isDebugEnabled()) { + log.debug("Result of getAddressUnique : " + result + " ; " + leFichier); + } + return result; + } + } diff --git a/src/main/java/org/nuiton/scmwebeditor/actions/BrowseAction.java b/src/main/java/org/nuiton/scmwebeditor/actions/BrowseAction.java index dd8b298..3351f5c 100644 --- a/src/main/java/org/nuiton/scmwebeditor/actions/BrowseAction.java +++ b/src/main/java/org/nuiton/scmwebeditor/actions/BrowseAction.java @@ -25,6 +25,8 @@ import com.jgeppert.struts2.jquery.tree.result.TreeNode; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.scmwebeditor.*; +import org.nuiton.scmwebeditor.dto.BrowseDto; +import org.nuiton.scmwebeditor.dto.BrowseResultDto; import javax.servlet.http.HttpSession; import java.util.ArrayList; @@ -52,7 +54,7 @@ public class BrowseAction extends AbstractScmWebEditorAction { protected boolean error; - protected int numberOfFile; + protected int numberOfFiles; protected String info; @@ -88,7 +90,7 @@ public class BrowseAction extends AbstractScmWebEditorAction { public String getAddress() { return address; } - public void setNumberOfFile(int numberOfFile) { this.numberOfFile = numberOfFile; } + public void setNumberOfFiles(int numberOfFiles) { this.numberOfFiles = numberOfFiles; } public void setAddress(String address) { this.address = address; } @@ -102,7 +104,7 @@ public class BrowseAction extends AbstractScmWebEditorAction { public String getId() { return id; } - public int getNumberOfFile() { return numberOfFile; } + public int getNumberOfFiles() { return numberOfFiles; } public List<String> getBranches() { return branches; } @@ -146,32 +148,60 @@ public class BrowseAction extends AbstractScmWebEditorAction { return SUCCESS; } - String returnCode; - // getting the files and directories if (scmConn == null) { error = true; return ROOT; } - returnCode = scmConn.browse(this); + // putting all the parameters into a DTO + BrowseDto dto = new BrowseDto(); + dto.setUsername(username); + dto.setPassword(pw); + dto.setId(id); + dto.setAddress(address); + dto.setSelectedBranch(selectedBranch); - /* - BrowseDto totto = new BrowseDto(); - totto.setUrl(address); - returnCode = scmConn.browse(totto); - */ + BrowseResultDto resultDto = scmConn.browse(dto); - if (files == null && directories == null) { - return returnCode; + // getting the results from the DTO + if (resultDto.getHeadBranchName() != null) { + headBranchName = resultDto.getHeadBranchName(); + } + if (resultDto.getFiles() != null) { + files = resultDto.getFiles(); + } + if (resultDto.getDirectories() != null) { + directories = resultDto.getDirectories(); + } + if (resultDto.getSelectedBranch() != null) { + selectedBranch = resultDto.getSelectedBranch(); } + if (resultDto.getNodes() != null) { + nodes = resultDto.getNodes(); + } + numberOfFiles = resultDto.getNumberOfFiles(); + + String dtoError = resultDto.getError(); + if (dtoError != null) { + if (!dtoError.equals(BrowseResultDto.ROOT)) { + error = true; + } - return returnCode; + if (dtoError.equals(BrowseResultDto.AUTH_ERROR)) { + return AUTH_ERROR; + } else if (dtoError.equals(BrowseResultDto.ROOT) || dtoError.equals(BrowseResultDto.ERROR)) { + return ROOT; + } + } + + return SUCCESS; } + // FIXME rendre indépendant de Git public String getBranchesJSON() { if (username == null) { @@ -215,15 +245,6 @@ public class BrowseAction extends AbstractScmWebEditorAction { } - public String getAddressUnique(String leFichier) { - String result = leFichier.replaceAll("/|:", ""); - if (log.isDebugEnabled()) { - log.debug("Result of getAddressUnique : " + result); - } - return result; - } - - public static String replaceLast(String string, String toReplace, String replacement) { int pos = string.lastIndexOf(toReplace); if (pos > -1) { diff --git a/src/main/java/org/nuiton/scmwebeditor/dto/BrowseDto.java b/src/main/java/org/nuiton/scmwebeditor/dto/BrowseDto.java new file mode 100644 index 0000000..9226901 --- /dev/null +++ b/src/main/java/org/nuiton/scmwebeditor/dto/BrowseDto.java @@ -0,0 +1,61 @@ +package org.nuiton.scmwebeditor.dto; + + +public class BrowseDto { + + /** the username used to connect to the SCM */ + protected String username; + + /** the password used to connect to the SCM */ + protected String password; + + /** the selected branch on the SCM */ + protected String selectedBranch; + + /** the SCM's identifier */ + protected String id; + + /** the SCM's adddress */ + protected String address; + + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getSelectedBranch() { + return selectedBranch; + } + + public void setSelectedBranch(String selectedBranch) { + this.selectedBranch = selectedBranch; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } +} diff --git a/src/main/java/org/nuiton/scmwebeditor/dto/BrowseResultDto.java b/src/main/java/org/nuiton/scmwebeditor/dto/BrowseResultDto.java new file mode 100644 index 0000000..1c153e7 --- /dev/null +++ b/src/main/java/org/nuiton/scmwebeditor/dto/BrowseResultDto.java @@ -0,0 +1,100 @@ +package org.nuiton.scmwebeditor.dto; + + +import com.jgeppert.struts2.jquery.tree.result.TreeNode; + +import java.util.*; + +public class BrowseResultDto { + + public static String ERROR = "error"; + + public static String AUTH_ERROR = "auth error"; + + public static String ROOT = "root"; + + + /** gives a message about the error if one occured */ + protected String error; + + /** the name of the head branch on the SCM */ + protected String headBranchName; + + /** the list of files found on the SCM */ + protected List<String> files; + + /** the list of directories found on the SCM */ + protected Map<String, String> directories; + + /** the name of the selected branch on the SCM */ + protected String selectedBranch; + + /** the nodes for the tree that displays the files and directories */ + protected List<TreeNode> nodes; + + /** the number of files in the current folder */ + protected int numberOfFiles; + + + public BrowseResultDto() { + files = new LinkedList<String>(); + directories = new HashMap<String, String>(); + nodes = new ArrayList<TreeNode>(); + } + + public int getNumberOfFiles() { + return numberOfFiles; + } + + public void setNumberOfFiles(int numberOfFiles) { + this.numberOfFiles = numberOfFiles; + } + + public String getError() { + return error; + } + + public void setError(String error) { + this.error = error; + } + + public String getHeadBranchName() { + return headBranchName; + } + + public void setHeadBranchName(String headBranchName) { + this.headBranchName = headBranchName; + } + + public List<String> getFiles() { + return files; + } + + public void setFiles(List<String> files) { + this.files = files; + } + + public Map<String, String> getDirectories() { + return directories; + } + + public void setDirectories(Map<String, String> directories) { + this.directories = directories; + } + + public String getSelectedBranch() { + return selectedBranch; + } + + public void setSelectedBranch(String selectedBranch) { + this.selectedBranch = selectedBranch; + } + + public List<TreeNode> getNodes() { + return nodes; + } + + public void setNodes(List<TreeNode> nodes) { + this.nodes = nodes; + } +} diff --git a/src/main/resources/struts.xml b/src/main/resources/struts.xml index a0ef2f3..d052f4c 100644 --- a/src/main/resources/struts.xml +++ b/src/main/resources/struts.xml @@ -71,7 +71,7 @@ <action name="edit" class="org.nuiton.scmwebeditor.actions.EditAction" method="edit"> <result name="noParameter" >/WEB-INF/content/outConnection.jsp</result> - <result name="login" >/WEB-INF/content/privateSvnRedirect.jsp</result> + <result name="login" >/WEB-INF/content/privateScmRedirect.jsp</result> <result name="errorPath" >/WEB-INF/content/badFileRedirect.jsp</result> <result name="editPage" >/WEB-INF/content/modificationViewer.jsp</result> </action> diff --git a/src/main/webapp/WEB-INF/content/browse.jsp b/src/main/webapp/WEB-INF/content/browse.jsp index 3b4a082..929b99b 100644 --- a/src/main/webapp/WEB-INF/content/browse.jsp +++ b/src/main/webapp/WEB-INF/content/browse.jsp @@ -61,6 +61,7 @@ <script src="js/pictureUpload.js" type="text/javascript"></script> +<!-- FIXME dépendant de Git --> <s:if test="scmType.equals('Git') && !error"> <s:text name="scm.outConnection.headBranch"/> <s:if test="selectedBranch != null"> diff --git a/src/main/webapp/WEB-INF/content/loginBrowse.jsp b/src/main/webapp/WEB-INF/content/loginBrowse.jsp index a14c76f..31c2547 100644 --- a/src/main/webapp/WEB-INF/content/loginBrowse.jsp +++ b/src/main/webapp/WEB-INF/content/loginBrowse.jsp @@ -53,7 +53,7 @@ <label><s:text name="scm.password"/> : <input type="password" name="pw" id="pw"></input></label><br/> - <s:url id="ajaxSearchLogin" value="search.action"/> + <s:url id="ajaxSearchLogin" value="browse.action"/> <s:set id="scm.loginButton"> <s:text name="scm.loginButton"/> diff --git a/src/main/webapp/WEB-INF/content/privateSvnRedirect.jsp b/src/main/webapp/WEB-INF/content/privateScmRedirect.jsp similarity index 96% rename from src/main/webapp/WEB-INF/content/privateSvnRedirect.jsp rename to src/main/webapp/WEB-INF/content/privateScmRedirect.jsp index bc9dd0c..6b8c57e 100644 --- a/src/main/webapp/WEB-INF/content/privateSvnRedirect.jsp +++ b/src/main/webapp/WEB-INF/content/privateScmRedirect.jsp @@ -19,7 +19,7 @@ <http://www.gnu.org/licenses/lgpl-3.0.html>. #L% --%> -<%-- Document : PrivateSvnRedirect Created on : 30 sept. 2009, 14:05:43 +<%-- Document : PrivateScmRedirect Created on : 30 sept. 2009, 14:05:43 Author : glorieux --%> <%@page contentType="text/html" pageEncoding="UTF-8" %> @@ -38,7 +38,7 @@ Author : glorieux --%> <a target="_blank" href="http://maven-site.nuiton.org/scmwebeditor/"><img src="img/ScmWebEditor_main.png" alt="$alt"/></a> -<form method="post" action="checkout.action"> +<form method="post" action="edit.action"> <input type="hidden" name="address" value="<%=request.getAttribute("address")%>"/> <input type="hidden" name="fromLoginPage" value="true"> diff --git a/src/test/java/org/nuiton/scmwebeditor/BaseActionTest.java b/src/test/java/org/nuiton/scmwebeditor/BaseActionTest.java index a6c2edd..982ec6b 100644 --- a/src/test/java/org/nuiton/scmwebeditor/BaseActionTest.java +++ b/src/test/java/org/nuiton/scmwebeditor/BaseActionTest.java @@ -52,6 +52,8 @@ import static org.junit.Assert.assertTrue; public class BaseActionTest { + /* + private static final Log log = LogFactory.getLog(BaseActionTest.class); public ISVNAuthenticationManager authManager; @@ -163,5 +165,7 @@ public class BaseActionTest { } } + + */ } -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm