1 16 17 package org.apache.jetspeed.services; 18 19 import org.apache.jetspeed.om.profile.Profile; 20 import org.apache.jetspeed.om.profile.ProfileLocator; 21 import org.apache.jetspeed.om.profile.QueryLocator; 22 import org.apache.jetspeed.om.profile.ProfileException; 23 import org.apache.jetspeed.om.profile.Portlets; 24 import org.apache.jetspeed.services.profiler.ProfilerService; 25 import org.apache.turbine.services.TurbineServices; 26 import org.apache.turbine.util.RunData; 27 import org.apache.turbine.util.DynamicURI; 28 import org.apache.jetspeed.capability.CapabilityMap; 29 import org.apache.jetspeed.util.MimeType; 30 import java.util.Iterator ; 31 32 42 public class Profiler 43 { 44 public final static String PARAM_MEDIA_TYPE = "media-type"; 45 public final static String PARAM_ROLE = "role"; 46 public final static String PARAM_GROUP = "group"; 47 public final static String PARAM_PAGE = "page"; 48 public final static String PARAM_USER = "user"; 49 public final static String PARAM_ANON = "anon"; 50 public final static String PARAM_LANGUAGE = "language"; 51 public final static String PARAM_COUNTRY = "country"; 52 public final static String DEFAULT_PROFILE = "default"; 53 public final static String FULL_DEFAULT_PROFILE = "default.psml"; 54 public final static String DEFAULT_EXTENSION = ".psml"; 55 56 60 private static ProfilerService getService() 61 { 62 return (ProfilerService)TurbineServices 63 .getInstance() 64 .getService(ProfilerService.SERVICE_NAME); 65 } 66 67 75 public static Profile getProfile(RunData rundata, CapabilityMap cm) 76 throws ProfileException 77 { 78 return getService().getProfile( rundata, cm ); 79 } 80 81 84 public static Profile getProfile(RunData rundata) 85 throws ProfileException 86 { 87 return getService().getProfile( rundata ); 88 } 89 90 94 public static Profile getProfile(RunData data, MimeType mt) 95 throws ProfileException 96 { 97 return getService().getProfile( data, mt ); 98 } 99 100 106 public static Profile getProfile(ProfileLocator locator) 107 throws ProfileException 108 { 109 return getService().getProfile( locator ); 110 } 111 112 113 116 public static DynamicURI makeDynamicURI( RunData data, ProfileLocator locator ) 117 throws ProfileException 118 { 119 return getService().makeDynamicURI( data, locator ); 120 } 121 122 125 public static Profile createProfile() 126 { 127 return getService().createProfile(); 128 } 129 130 133 public static Profile createProfile(ProfileLocator locator) 134 { 135 return getService().createProfile(locator); 136 } 137 138 141 public static ProfileLocator createLocator() 142 { 143 return getService().createLocator(); 144 } 145 146 149 public static Profile createProfile( RunData data, Profile profile ) 150 throws ProfileException 151 { 152 return getService().createProfile( data, profile ); 153 } 154 155 158 public static Profile createProfile( RunData data, Profile profile, MimeType mt ) 159 throws ProfileException 160 { 161 return getService().createProfile( data, profile, mt ); 162 } 163 164 167 public static Profile createProfile(ProfileLocator locator, Portlets portlets) 168 throws ProfileException 169 { 170 return getService().createProfile(locator, portlets); 171 } 172 173 176 public static void removeProfile(ProfileLocator locator) 177 throws ProfileException 178 { 179 getService().removeProfile( locator ); 180 } 181 182 185 public static Iterator query( QueryLocator locator ) 186 { 187 return getService().query( locator ); 188 } 189 190 193 public static boolean useRoleProfileMerging() 194 { 195 return getService().useRoleProfileMerging(); 196 } 197 198 } 199 | Popular Tags |