comparison flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java @ 3817:804088c2e23a

Prevent follow-up errors. flys-artifacts/tags/pre2.7-2012-03-16@4162 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 19 Mar 2012 14:14:53 +0000
parents a71fc8f2030c
children 3aec5a42696a
comparison
equal deleted inserted replaced
3816:3b6bb1cbf741 3817:804088c2e23a
477 /** 477 /**
478 * Show blackboard (context) to each facet and create a list of 478 * Show blackboard (context) to each facet and create a list of
479 * ArtifactAndFacets on the fly (with the same ordering as the passed 479 * ArtifactAndFacets on the fly (with the same ordering as the passed
480 * ThemeList). 480 * ThemeList).
481 * @param themeList ThemeList to create a ArtifactAndFacetList along. 481 * @param themeList ThemeList to create a ArtifactAndFacetList along.
482 * @param contect The "Blackboard". 482 * @param context The "Blackboard".
483 */ 483 */
484 protected List<ArtifactAndFacet> doBlackboardPass( 484 protected List<ArtifactAndFacet> doBlackboardPass(
485 ThemeList themeList, CallContext context 485 ThemeList themeList, CallContext context
486 ) { 486 ) {
487 ArrayList<ArtifactAndFacet> dataProviders = 487 ArrayList<ArtifactAndFacet> dataProviders =
488 new ArrayList<ArtifactAndFacet>(); 488 new ArrayList<ArtifactAndFacet>();
489 int size = themeList.size(); 489 int size = themeList.size();
490 490
491 try { 491 try {
492 // Collect all ArtifactAndFacets for blackboard pass. 492 // Collect all ArtifactAndFacets for blackboard pass.
493 int pivot = 0;
493 for (int i = 0; i < size; i++) { 494 for (int i = 0; i < size; i++) {
494 ManagedFacet theme = themeList.get(i); 495 ManagedFacet theme = themeList.get(i);
495 if (theme == null) { 496 if (theme == null) {
496 log.warn("A ManagedFacet in ThemeList is null."); 497 log.warn("A ManagedFacet in ThemeList is null.");
497 continue; 498 continue;
509 510
510 // Show blackboard to facet. 511 // Show blackboard to facet.
511 artifactAndFacet.register(context); 512 artifactAndFacet.register(context);
512 513
513 // Add to themes. 514 // Add to themes.
514 dataProviders.add(i, artifactAndFacet); 515 dataProviders.add(pivot, artifactAndFacet);
516 pivot += 1;
515 } 517 }
516 } 518 }
517 catch (ArtifactDatabaseException ade) { 519 catch (ArtifactDatabaseException ade) {
518 log.error("ArtifactDatabaseException!", ade); 520 log.error("ArtifactDatabaseException!", ade);
519 } 521 }

http://dive4elements.wald.intevation.org