1 package org.apache.turbine.services.intake; 2 3 18 19 import java.beans.IntrospectionException ; 20 21 import java.lang.reflect.Method ; 22 23 import org.apache.turbine.services.TurbineServices; 24 import org.apache.turbine.services.intake.model.Group; 25 26 37 public abstract class TurbineIntake 38 { 39 47 public static Group getGroup(String groupName) 48 throws IntakeException 49 { 50 if (groupName == null) 51 { 52 throw new IntakeException( 53 "TurbineIntake.getGroup(groupName) is null"); 54 } 55 return getService().getGroup(groupName); 56 } 57 58 63 public static void releaseGroup(Group instance) 64 throws IntakeException 65 { 66 getService().releaseGroup(instance); 67 } 68 69 76 public static int getSize(String groupName) 77 throws IntakeException 78 { 79 return getService().getSize(groupName); 80 } 81 82 87 public static String [] getGroupNames() 88 { 89 return getService().getGroupNames(); 90 } 91 92 98 public static String getGroupKey(String groupName) 99 { 100 return getService().getGroupKey(groupName); 101 } 102 103 109 public static String getGroupName(String groupKey) 110 { 111 return getService().getGroupName(groupKey); 112 } 113 114 123 public static Method getFieldSetter(String className, String propName) 124 throws IntrospectionException , ClassNotFoundException 125 { 126 return getService().getFieldSetter(className, propName); 127 } 128 129 138 public static Method getFieldGetter(String className, String propName) 139 throws IntrospectionException , ClassNotFoundException 140 { 141 return getService().getFieldGetter(className, propName); 142 } 143 144 150 private static IntakeService getService() 151 { 152 return (IntakeService) TurbineServices 153 .getInstance().getService(IntakeService.SERVICE_NAME); 154 } 155 156 } 157 158 159 160 161 162 163 164 165 166 167 | Popular Tags |