Project

General

Profile

Revision 1e201891

ID1e201891e9782ba8768f01e3f908467d9832219e
Parent e3f9b0ed
Child 18754eca

Added by Patrick Plitzner over 4 years ago

Renaming #5458

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/model/LazyLoadedContainer.java
33 33
	
34 34
	@Override
35 35
	public int size(){
36
		return listener.getSizeOfClassification();
36
		return listener.getSizeOfTaxonNode();
37 37
	}
38 38
	
39 39
	@Override
src/main/java/eu/etaxonomy/cdm/vaadin/presenter/dbstatus/DistributionSelectionPresenter.java
34 34
	}
35 35

  
36 36
	@Override
37
	public void buttonClick(TaxonNode classification, TermVocabulary<DefinedTermBase> term) throws SQLException {
38
	    VaadinSession.getCurrent().setAttribute("classificationUUID", classification.getUuid());
37
	public void buttonClick(TaxonNode taxonNode, TermVocabulary<DefinedTermBase> term) throws SQLException {
38
	    VaadinSession.getCurrent().setAttribute("taxonNodeUUID", taxonNode.getUuid());
39 39
	    VaadinSession.getCurrent().setAttribute("selectedTerm", term.getUuid());
40 40

  
41 41
	    DistributionTableView dtv = new DistributionTableView();
......
46 46
	}
47 47

  
48 48
	@Override
49
	public List<TaxonNode> getClassificationList() {
49
	public List<TaxonNode> getTaxonNodeList() {
50 50
		IClassificationService classificationService = CdmSpringContextHelper.getClassificationService();
51 51
		ITaxonNodeService taxonNodeService = CdmSpringContextHelper.getTaxonNodeService();
52 52
		List<Classification> classificationList = classificationService.listClassifications(null, null, null, NODE_INIT_STRATEGY());
src/main/java/eu/etaxonomy/cdm/vaadin/presenter/dbstatus/DistributionTablePresenter.java
175 175

  
176 176
	@Override
177 177
	public List<TaxonNode> getAllNodes(int start, int end){
178
		TaxonNode taxonNode = getChosenClassification();
178
		TaxonNode taxonNode = getChosenTaxonNode();
179 179
		List<TaxonNode> nodes = new ArrayList<TaxonNode>();
180 180
		if(taxonNode.getTaxon()!=null){
181 181
			nodes.add(taxonNode);
......
186 186

  
187 187

  
188 188
	@Override
189
	public TaxonNode getChosenClassification() {
189
	public TaxonNode getChosenTaxonNode() {
190 190
		VaadinSession session = VaadinSession.getCurrent();
191
		UUID classificationUUID = (UUID) session.getAttribute("classificationUUID");
192
		TaxonNode classificationNode = taxonNodeService.load(classificationUUID);
191
		UUID taxonNodeUUID = (UUID) session.getAttribute("taxonNodeUUID");
192
		TaxonNode classificationNode = taxonNodeService.load(taxonNodeUUID);
193 193
		return classificationNode;
194 194
	}
195 195

  
196 196
	@Override
197
	public int getSizeOfClassification(){
198
		TaxonNode taxonNode = getChosenClassification();
197
	public int getSizeOfTaxonNode(){
198
		TaxonNode taxonNode = getChosenTaxonNode();
199 199
		return taxonNodeService.loadChildNodesOfTaxonNode(taxonNode, null, true, null).size();
200 200
	}
201 201

  
src/main/java/eu/etaxonomy/cdm/vaadin/presenter/dbstatus/settings/SettingsPresenter.java
53 53
     *
54 54
     */
55 55
    private void init() {
56
        clUUID = UUID.fromString(VaadinSession.getCurrent().getAttribute("classificationUUID").toString());
56
        clUUID = UUID.fromString(VaadinSession.getCurrent().getAttribute("taxonNodeUUID").toString());
57 57
        termUUID = UUID.fromString(VaadinSession.getCurrent().getAttribute("selectedTerm").toString());
58 58
        classificationContainer = new IndexedContainer(getClassificationList());
59 59
        distributionContainer = new IndexedContainer(getNamedAreaList());
src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/DistributionSelectionView.java
83 83
	}
84 84

  
85 85
	public void dataBinding(){
86
		List<TaxonNode> classificationList = distListener.getClassificationList();
86
		List<TaxonNode> classificationList = distListener.getTaxonNodeList();
87 87
		List<TermVocabulary<DefinedTermBase>> namedAreaList = distListener.getNamedAreaList();
88 88
		Container c = new IndexedContainer(classificationList);
89 89
		classificationBox.setContainerDataSource(c);
src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/IDistributionSelectionComponent.java
12 12
	public interface DistributionSelectionComponentListener{
13 13
		void buttonClick(TaxonNode classification, TermVocabulary<DefinedTermBase> term) throws SQLException;
14 14
		
15
		List<TaxonNode> getClassificationList();
15
		List<TaxonNode> getTaxonNodeList();
16 16
		
17 17
		List<TermVocabulary<DefinedTermBase>> getNamedAreaList();
18 18
		
src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/IDistributionTableComponent.java
35 35

  
36 36
		LazyLoadedContainer getTableContainer();
37 37

  
38
		int getSizeOfClassification();
38
		int getSizeOfTaxonNode();
39 39

  
40 40
		List<Distribution> getDistribution(Taxon taxon);
41 41

  
......
54 54
		List<DescriptionElementBase> listDescriptionElementsForTaxon(
55 55
				Taxon taxon, Set<Feature> setFeature);
56 56

  
57
		TaxonNode getChosenClassification();
57
		TaxonNode getChosenTaxonNode();
58 58

  
59 59
		List<TaxonNode> getAllNodes(int start, int end);
60 60

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)