1 package org.sapia.soto.aop; 2 3 import org.sapia.soto.ConfigurationException; 4 5 import java.util.List ; 6 import java.util.Map ; 7 8 9 21 public class GroupRef { 22 private String _id; 23 24 27 public GroupRef() { 28 super(); 29 } 30 31 37 public void setId(String id) { 38 _id = id; 39 } 40 41 48 public List resolve(Map defs) throws ConfigurationException { 49 if (_id == null) { 50 throw new ConfigurationException( 51 "'id' attribute not set on advice group reference"); 52 } 53 54 Group group = (Group) defs.get(_id); 55 56 if (group == null) { 57 throw new ConfigurationException("No advice group matches ID: " + _id); 58 } 59 60 return group.getAdvices(); 61 } 62 } 63 | Popular Tags |