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."); } }
public Locale getInstance(Class<Locale> type, Annotation... qualifiers) { return PortletHelper.getRequest().getLocale(); }
public PortletRequest getInstance(Class<PortletRequest> type, Annotation... qualifiers) { return PortletHelper.getRequest(); }