1 23 24 package org.infoglue.cms.applications.managementtool.actions; 25 26 import java.util.List ; 27 28 import org.infoglue.cms.applications.common.actions.InfoGlueAbstractAction; 29 import org.infoglue.cms.controllers.kernel.impl.simple.LanguageController; 30 import org.infoglue.cms.controllers.kernel.impl.simple.RepositoryController; 31 import org.infoglue.cms.controllers.kernel.impl.simple.RepositoryLanguageController; 32 import org.infoglue.cms.entities.management.LanguageVO; 33 import org.infoglue.cms.entities.management.RepositoryVO; 34 35 41 42 public class ViewRepositoryAction extends InfoGlueAbstractAction 43 { 44 private static final long serialVersionUID = 1L; 45 46 private RepositoryVO repositoryVO; 47 48 private List repositoryLanguageVOList; 49 private List allRemainingLanguageVOList; 50 51 54 public ViewRepositoryAction() 55 { 56 this(new RepositoryVO()); 57 } 58 59 public ViewRepositoryAction(RepositoryVO repositoryVO) 60 { 61 this.repositoryVO = repositoryVO; 62 } 63 64 protected void initialize(Integer repositoryId) throws Exception 65 { 66 repositoryVO = RepositoryController.getController().getRepositoryVOWithId(repositoryId); 67 68 this.repositoryLanguageVOList = RepositoryLanguageController.getController().getRepositoryLanguageVOListWithRepositoryId(repositoryId); 69 this.allRemainingLanguageVOList = RepositoryLanguageController.getController().getRemainingLanguages(repositoryId); 70 71 } 74 75 78 79 public String doExecute() throws Exception 80 { 81 this.initialize(getRepositoryId()); 82 83 return "success"; 84 } 85 86 89 90 public String doLocalView() throws Exception 91 { 92 this.initialize(getRepositoryId()); 93 94 return "successLocal"; 95 } 96 97 public java.lang.Integer getRepositoryId() 98 { 99 return this.repositoryVO.getRepositoryId(); 100 } 101 102 public void setRepositoryId(java.lang.Integer repositoryId) throws Exception 103 { 104 this.repositoryVO.setRepositoryId(repositoryId); 105 } 106 107 public java.lang.String getName() 108 { 109 return this.repositoryVO.getName(); 110 } 111 112 public java.lang.String getDescription() 113 { 114 return this.repositoryVO.getDescription(); 115 } 116 117 public java.lang.String getDnsName() 118 { 119 return this.repositoryVO.getDnsName(); 120 } 121 122 133 134 139 public List getAllRemainingLanguageVOList() 140 { 141 return allRemainingLanguageVOList; 142 } 143 144 public List getRepositoryLanguageVOList() 145 { 146 return repositoryLanguageVOList; 147 } 148 149 public LanguageVO getLanguage(Integer repositoryLanguageId) throws Exception 150 { 151 return LanguageController.getController().getLanguageVOWithRepositoryLanguageId(repositoryLanguageId); 152 } 153 154 } 155 | Popular Tags |