예제 #1
0
 public T getInstance(Class<T> type, Annotation... qualifiers) {
   PortletRequest request = PortletHelper.getRequest();
   if (type.isInstance(request)) {
     return type.cast(request);
   } else {
     throw new ChellException(
         "Can not inject object of class '"
             + type.getName()
             + "' during "
             + PortletHelper.getPhase()
             + " phase.");
   }
 }
예제 #2
0
 public Locale getInstance(Class<Locale> type, Annotation... qualifiers) {
   return PortletHelper.getRequest().getLocale();
 }
예제 #3
0
 public PortletRequest getInstance(Class<PortletRequest> type, Annotation... qualifiers) {
   return PortletHelper.getRequest();
 }