Beispiel #1
0
 public T getInstance(Class<T> type, Annotation... qualifiers) {
   PortletResponse response = PortletHelper.getResponse();
   if (type.isInstance(response)) {
     return type.cast(response);
   } else {
     throw new ChellException(
         "Can not inject object of class '"
             + type.getName()
             + "' during "
             + PortletHelper.getPhase()
             + " phase.");
   }
 }
Beispiel #2
0
 public Locale getInstance(Class<Locale> type, Annotation... qualifiers) {
   return PortletHelper.getRequest().getLocale();
 }
Beispiel #3
0
 public PortletPreferences getInstance(
     Class<PortletPreferences> type, Annotation... qualifiers) {
   return PortletHelper.getPreferences();
 }
Beispiel #4
0
 public PortletSession getInstance(Class<PortletSession> type, Annotation... qualifiers) {
   return PortletHelper.getSession();
 }
Beispiel #5
0
 public PortletResponse getInstance(Class<PortletResponse> type, Annotation... qualifiers) {
   return PortletHelper.getResponse();
 }
Beispiel #6
0
 public PortletRequest getInstance(Class<PortletRequest> type, Annotation... qualifiers) {
   return PortletHelper.getRequest();
 }
Beispiel #7
0
 public PortletConfig getInstance(Class<PortletConfig> type, Annotation... qualifiers) {
   return PortletHelper.getPortletConfig();
 }
Beispiel #8
0
 public Model getInstance(Class<Model> type, Annotation... qualifiers) {
   return PortletHelper.getModel();
 }