1 23 package org.infoglue.cms.applications.workflowtool.function.email; 24 25 import java.util.ArrayList ; 26 import java.util.Collection ; 27 28 import org.infoglue.cms.controllers.kernel.impl.simple.GroupControllerProxy; 29 30 import com.opensymphony.workflow.WorkflowException; 31 32 35 public class GroupAddressProvider extends UsersAddressProvider 36 { 37 40 private static final String GROUP_ARGUMENT = "group"; 41 42 45 private String groupName; 46 47 50 public GroupAddressProvider() 51 { 52 super(); 53 } 54 55 60 protected Collection getPrincipals() throws WorkflowException 61 { 62 try 63 { 64 return GroupControllerProxy.getController(getDatabase()).getInfoGluePrincipals(groupName); 65 } 66 catch(Exception e) 67 { 68 throwException(e); 69 } 70 return new ArrayList (); 71 } 72 73 79 protected void initialize() throws WorkflowException 80 { 81 super.initialize(); 82 groupName = getArgument(GROUP_ARGUMENT); 83 } 84 } 85 | Popular Tags |