1 7 package org.ejtools.management.browser.state.rules; 8 9 import java.util.Map ; 10 11 import org.ejtools.graph.service.GraphConsumer; 12 import org.ejtools.graph.service.GraphConsumerSelector; 13 import org.ejtools.management.browser.model.ManagedObject; 14 import org.ejtools.util.state.DefaultRule; 15 import org.xml.sax.Attributes ; 16 17 21 public class ManagementGraphRule extends DefaultRule 22 { 23 28 public void loadEnter(Map context) 29 { 30 ManagedObject resource = (ManagedObject) context.get("MANAGED-OBJECT"); 31 if (resource != null) 32 { 33 Attributes attrs = (Attributes ) context.get("ATTRIBUTES"); 34 35 String attribute = attrs.getValue("attribute"); 36 String target = attrs.getValue("target"); 37 38 GraphConsumer consumer = GraphConsumerSelector.select(resource, target); 39 resource.registerForGraph(consumer, attribute, null); 40 } 41 } 42 } 43 | Popular Tags |