1 16 package org.apache.cocoon.portal.aspect.impl; 17 18 import java.util.ArrayList ; 19 import java.util.Iterator ; 20 import java.util.List ; 21 22 import org.apache.cocoon.portal.aspect.AspectDescription; 23 import org.apache.cocoon.portal.aspect.AspectalizableDescription; 24 25 26 33 public abstract class AbstractAspectalizableDescription 34 implements AspectalizableDescription { 35 36 protected List aspects = new ArrayList (); 37 38 public List getAspectDescriptions() { 39 return this.aspects; 40 } 41 42 public void addAspectDescription(AspectDescription aspect) { 43 this.aspects.add(aspect); 44 } 45 46 49 public AspectDescription getAspectDescription(String name) { 50 if ( name == null ) return null; 51 AspectDescription desc = null; 52 Iterator i = this.aspects.iterator(); 53 while (desc == null && i.hasNext() ) { 54 AspectDescription current = (AspectDescription)i.next(); 55 if ( name.equals(current.getName())) { 56 desc = current; 57 } 58 } 59 return desc; 60 } 61 62 } 63 | Popular Tags |