Changeset 7548
- Timestamp:
- 03/24/09 14:53:32 (16 months ago)
- Location:
- head/ambra
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
head/ambra/libs/otm-models/src/main/java/org/topazproject/ambra/models/Issue.java
r7467 r7548 2 2 * $Id$ 3 3 * 4 * Copyright (c) 2006-200 8by Topaz, Inc.4 * Copyright (c) 2006-2009 by Topaz, Inc. 5 5 * http://topazproject.org 6 6 * … … 126 126 */ 127 127 public List<URI> getArticleList() { 128 if (articleList.isEmpty() && !super.getSimpleCollection().isEmpty())129 this.articleList = super.getSimpleCollection();130 131 128 return this.articleList; 132 129 } -
head/ambra/webapp/src/main/java/org/topazproject/ambra/admin/action/IssueManagementAction.java
r7545 r7548 33 33 import java.util.List; 34 34 import java.util.ArrayList; 35 import java.util.Iterator;36 35 import java.net.URI; 37 36 import java.net.URISyntaxException; … … 144 143 * are ordering. 145 144 */ 146 if (validateCSV(issue , issueURIs))145 if (validateCSV(issueURIs, browseService.getArticleList(issue))) 147 146 issue = adminService.updateIssue(issueURI,imageURI,displayName,issueURIs,respectOrder); 148 147 … … 222 221 /** 223 222 * 224 * @param issue 225 * @param issueURIs223 * @param issueURIs List of issue URI's 224 * @param articleList List of article URI's 226 225 * @return 227 226 * @throws URISyntaxException 228 227 */ 229 public Boolean validateCSV(Issue issue, List<URI> issueURIs) throws URISyntaxException { 230 List<URI> curList = issue.getArticleList(); 231 232 if (issueURIs.size() != curList.size()) { 228 private Boolean validateCSV(List<URI> issueURIs, List<URI> articleList) throws URISyntaxException { 229 230 if (issueURIs.size() != articleList.size()) { 233 231 addActionMessage("Issue not updated due to the following error."); 234 232 addActionMessage("There has been an addition or deletion in the Article URI List."); … … 237 235 } 238 236 239 for(URI uri : curList) {237 for(URI uri : articleList) { 240 238 if (!issueURIs.contains(uri)) { 241 239 addActionMessage("Issue not updated due to the following error."); -
head/ambra/webapp/src/main/java/org/topazproject/ambra/article/service/BrowseService.java
r7484 r7548 342 342 nextIssueURI, imageArticle, description, 343 343 parentVolume == null ? null : parentVolume.getId()); 344 issueInfo.setArticleUriList( issue.getArticleList());344 issueInfo.setArticleUriList(getArticleList(issue)); 345 345 return issueInfo; 346 346 } … … 862 862 return articleGroups; 863 863 } 864 865 /** 866 * Get ordered list of articles. Either from articleList or from 867 * simpleCollection if articleList is empty. 868 * @param issue 869 * @return List of article URI's 870 */ 871 public List<URI> getArticleList(Issue issue) { 872 List<URI> articleList = issue.getArticleList(); 873 if (articleList.isEmpty() && !issue.getSimpleCollection().isEmpty()) 874 return new ArrayList<URI>(issue.getSimpleCollection()); 875 876 return articleList; 877 } 878 864 879 }
