1 package org.apache.fulcrum.intake; 2 3 56 57 import java.lang.reflect.Method ; 58 import org.apache.fulcrum.intake.model.Group; 59 import org.apache.fulcrum.ServiceException; 60 import org.apache.fulcrum.TurbineServices; 61 62 72 public abstract class TurbineIntake 73 { 74 82 public static Group getGroup(String groupName) 83 throws ServiceException 84 { 85 if (groupName == null) 86 { 87 throw new ServiceException ( 88 "TurbineIntake.getGroup(groupName) is null"); 89 } 90 return getService().getGroup(groupName); 91 } 92 93 127 128 133 public static void releaseGroup(Group instance) 134 { 135 getService().releaseGroup(instance); 136 } 137 138 143 public static int getSize(String groupName) 144 { 145 return getService().getSize(groupName); 146 } 147 148 153 public static String [] getGroupNames() 154 { 155 return getService().getGroupNames(); 156 } 157 158 164 public static String getGroupKey(String groupName) 165 { 166 return getService().getGroupKey(groupName); 167 } 168 169 175 public static String getGroupName(String groupKey) 176 { 177 return getService().getGroupName(groupKey); 178 } 179 180 187 public static Method getFieldSetter(String className, String propName) 188 { 189 return getService().getFieldSetter(className, propName); 190 } 191 192 199 public static Method getFieldGetter(String className, String propName) 200 { 201 return getService().getFieldGetter(className, propName); 202 } 203 204 210 private static IntakeService getService() 211 { 212 return (IntakeService)TurbineServices 213 .getInstance().getService(IntakeService.SERVICE_NAME); 214 } 215 216 } 217 218 219 220 221 222 223 224 225 226 227 | Popular Tags |