@Override public Object getAttribute(String name) { return wrapped.getAttribute(name); }
/** {@inheritDoc} */ public Collection<Object> values() { List<Object> list = new ArrayList<Object>(); Enumeration<String> keys = context.getAttributeNames(); while (keys.hasMoreElements()) { list.add(context.getAttribute(keys.nextElement())); } return (list); }
@Override public ServletConfig getServletConfig( PortletConfig portletConfig, PortletRequest portletRequest) { PortletContext portletContext = portletConfig.getPortletContext(); Object servletConfig = portletContext.getAttribute( _PORTLET_CONTAINER_SERVLET_CONFIG); if (servletConfig == null) { servletConfig = portletRequest.getAttribute( PortletServlet.PORTLET_SERVLET_CONFIG); } return (ServletConfig)servletConfig; }
public Collection values() { List list = new ArrayList(); Enumeration keys = context.getAttributeNames(); while (keys.hasMoreElements()) { list.add(context.getAttribute((String) keys.nextElement())); } return (list); }
/** * Gets the nuxeo command service. * * @param ctx the ctx * @return the nuxeo command service * @throws Exception the exception */ public static INuxeoCommandService getNuxeoCommandService(PortletContext ctx) throws Exception { INuxeoCommandService nuxeoService = (INuxeoCommandService) ctx.getAttribute("nuxeoCommandService"); return nuxeoService; }
public Set entrySet() { Set set = new HashSet(); Enumeration keys = context.getAttributeNames(); String key; while (keys.hasMoreElements()) { key = (String)keys.nextElement(); set.add(new MapEntry(key, context.getAttribute(key), true)); } return (set); }
/** * Get bean manager from portlet context. * * @param ctx the portlet context * @return bean manager if found */ public static BeanManager getBeanManager(Object ctx) { return (BeanManager) javax.portlet.PortletContext.class.cast(ctx).getAttribute(WeldServletLifecycle.BEAN_MANAGER_ATTRIBUTE_NAME); } }
/** * Get bean manager from portlet context. * * @param ctx the portlet context * @return bean manager if found */ public static BeanManager getBeanManager(Object ctx) { return (BeanManager) javax.portlet.PortletContext.class.cast(ctx).getAttribute(WeldServletLifecycle.BEAN_MANAGER_ATTRIBUTE_NAME); } }
/** * Return the temporary directory for the current web application, * as provided by the portlet container. * @param portletContext the portlet context of the web application * @return the File representing the temporary directory */ public static File getTempDir(PortletContext portletContext) { Assert.notNull(portletContext, "PortletContext must not be null"); return (File) portletContext.getAttribute(WebUtils.TEMP_DIR_CONTEXT_ATTRIBUTE); }
@Override public Object remove(String name) { Object scopedObject = this.portletContext.getAttribute(name); if (scopedObject != null) { this.portletContext.removeAttribute(name); this.destructionCallbacks.remove(name); return scopedObject; } else { return null; } }
/** * Init method. */ @Create public void init() { PortletContext portletContext = (PortletContext) FacesContext.getCurrentInstance().getExternalContext().getContext(); this.internationalizationService = (IInternationalizationService) portletContext.getAttribute(AdministrationConstants.INTERNATIONALIZATION_SERVICE_NAME); this.locale = FacesContext.getCurrentInstance().getExternalContext().getRequestLocale(); }
/** Returns the layout servlet. */ private final WebManager getWebManager() throws PortletException { final WebManager webman = (WebManager) getPortletContext().getAttribute(WebManager.ATTR_WEB_MANAGER); if (webman == null) throw new PortletException("The Layout Servlet not found. Make sure <load-on-startup> is specified for " + DHtmlLayoutServlet.class.getName()); return webman; }
/** {@inheritDoc} */ public Object remove(Object key) { String skey = key(key); Object previous = context.getAttribute(skey); context.removeAttribute(skey); return (previous); }
@Override @SuppressWarnings("unchecked") public Map<String, String> getDefaultViewIdMap() { if (defaultViewIdMap == null) { String portletName = portletConfig.getPortletName(); String attrNameDefaultViewIdMap = Bridge.BRIDGE_PACKAGE_PREFIX + portletName + "." + Bridge.DEFAULT_VIEWID_MAP; defaultViewIdMap = (Map<String, String>) portletConfig.getPortletContext().getAttribute( attrNameDefaultViewIdMap); } return defaultViewIdMap; }
public Object remove(Object key) { String skey = key(key); Object previous = context.getAttribute(skey); context.removeAttribute(skey); return (previous); }
/** * Start nuxeo command service. * * @param ctx the ctx * @throws Exception the exception */ public static void startNuxeoCommandService(PortletContext ctx) throws Exception { INuxeoService nuxeoService = (INuxeoService)ctx.getAttribute("NuxeoService"); INuxeoCommandService nuxeoCommandService = nuxeoService.startNuxeoCommandService(ctx); ctx.setAttribute("nuxeoCommandService", nuxeoCommandService); }
@Override @SuppressWarnings("unchecked") public Map<String, String> getDefaultViewIdMap() { if (defaultViewIdMap == null) { String portletName = portletConfig.getPortletName(); String attrNameDefaultViewIdMap = Bridge.BRIDGE_PACKAGE_PREFIX + portletName + "." + Bridge.DEFAULT_VIEWID_MAP; defaultViewIdMap = (Map<String, String>) portletConfig.getPortletContext().getAttribute( attrNameDefaultViewIdMap); } return defaultViewIdMap; }
/** * {@inheritDoc} */ @Create @Override public void init() { super.init(); PortletContext context = (PortletContext) FacesContext.getCurrentInstance().getExternalContext().getContext(); this.cacheService = (ICacheService) Locator.findMBean(ICacheService.class, "osivia:service=Cache"); this.portalObjectContainer = (PortalObjectContainer) context.getAttribute(AdministrationConstants.PORTAL_OBJECT_CONTAINER_NAME); }
/** {@inheritDoc} */ public Object put(String key, Object value) { if (value == null) { return (remove(key)); } String skey = key(key); Object previous = context.getAttribute(skey); context.setAttribute(skey, value); return (previous); }
public Object put(Object key, Object value) { if (value == null) { return (remove(key)); } String skey = key(key); Object previous = context.getAttribute(skey); context.setAttribute(skey, value); return (previous); }