{@inheritDoc}

@throws NullPointerException {@inheritDoc}
@throws FacesException       {@inheritDoc}
@since 1.2
971568
public boolean invokeOnComponent(FacesContext context, String clientId,
                                     ContextCallback callback)
            throws FacesException {
        return super.invokeOnComponent(context, clientId, callback);
    }
1043471
@Override public void onBindViewHolder(RendererViewHolder viewHolder, int position) {
    T content = getItem(position);
    Renderer<T> renderer = viewHolder.getRenderer();
    if (renderer == null) {
      throw new NullRendererBuiltException("RendererBuilder have to return a not null renderer");
    }
    renderer.setContent(content);
    updateRendererExtraValues(content, renderer, position);
    renderer.render();
  }
1183760
@java.lang.SuppressWarnings({ "ConstantConditions" })
    public void setDescriptor(@NotNull TagDescriptor descriptor)
    {
        if (descriptor == null)
            throw new NullPointerException("cannot set a null descriptor");
        _descriptor = descriptor;
    }
251575
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException,
            ELException
    {
        AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
        FaceletCompositionContext fcc = FaceletCompositionContext.getCurrentInstance(ctx);
        String path;
        boolean markInitialState = false;
        if (!src.isLiteral())
        {
            String uniqueId = actx.generateUniqueFaceletTagId(fcc.startComponentUniqueIdSection(), tagId);
            //path = getSrcValue(actx, fcc, parent, uniqueId);
            String restoredPath = (String) ComponentSupport.restoreInitialTagState(ctx, fcc, parent, uniqueId);
            if (restoredPath != null)
            {
                // If is not restore view phase, the path value should be
                // evaluated and if is not equals, trigger markInitialState stuff.
                if (!PhaseId.RESTORE_VIEW.equals(ctx.getFacesContext().getCurrentPhaseId()))
                {
                    path = this.src.getValue(ctx);
                    if (path == null || path.length() == 0)
                    {
                        return;
                    }
                    if (!path.equals(restoredPath))
                    {
                        markInitialState = true;
                    }
                }
                else
                {
                    path = restoredPath;
                }
            }
            else
            {
                //No state restored, calculate path
                path = this.src.getValue(ctx);
            }
            ComponentSupport.saveInitialTagState(ctx, fcc, parent, uniqueId, path);
        }
        else
        {
            path = this.src.getValue(ctx);
        }
        try
        {
            if (path == null || path.length() == 0)
            {
                return;
            }
            VariableMapper orig = ctx.getVariableMapper();
            ctx.setVariableMapper(new VariableMapperWrapper(orig));
            try
            {
                //Only ui:param could be inside ui:include.
                //this.nextHandler.apply(ctx, null);
                
                URL url = null;
                boolean oldMarkInitialState = false;
                Boolean isBuildingInitialState = null;
                // if we are in ProjectStage Development and the path equals "javax.faces.error.xhtml"
                // we should include the default error page
                if (ctx.getFacesContext().isProjectStage(ProjectStage.Development) 
                        && ERROR_PAGE_INCLUDE_PATH.equals(path))
                {
                    url =ClassUtils.getResource(ERROR_FACELET);
                }
                if (markInitialState)
                {
                    //set markInitialState flag
                    oldMarkInitialState = fcc.isMarkInitialState();
                    fcc.setMarkInitialState(true);
                    isBuildingInitialState = (Boolean) ctx.getFacesContext().getAttributes().put(
                            StateManager.IS_BUILDING_INITIAL_STATE, Boolean.TRUE);
                }
                try
                {
                    if (_params != null)
                    {
                        // ui:include defines a new TemplateContext, but ui:param EL expressions
                        // defined inside should be built before the new context is setup, to
                        // apply then after. The final effect is EL expressions will be resolved
                        // correctly when nested ui:params with the same name or based on other
                        // ui:params are used.
                        
                        String[] names = new String[_params.length];
                        ValueExpression[] values = new ValueExpression[_params.length];
                        
                        for (int i = 0; i < _params.length; i++)
                        {
                            names[i] = _params[i].getName(ctx);
                            values[i] = _params[i].getValue(ctx);
                        }
                        
                        //actx.pushTemplateContext(new TemplateContextImpl());
                        
                        for (int i = 0; i < _params.length; i++)
                        {
                            _params[i].apply(ctx, parent, names[i], values[i]);
                        }
                    }
                    else
                    {
                        //actx.pushTemplateContext(new TemplateContextImpl());
                    }
                    if (url == null)
                    {
                        ctx.includeFacelet(parent, path);
                    }
                    else
                    {
                        ctx.includeFacelet(parent, url);
                    }
                }
                finally
                {
                    if (markInitialState)
                    {
                        //unset markInitialState flag
                        if (isBuildingInitialState == null)
                        {
                            ctx.getFacesContext().getAttributes().remove(
                                    StateManager.IS_BUILDING_INITIAL_STATE);
                        }
                        else
                        {
                            ctx.getFacesContext().getAttributes().put(
                                    StateManager.IS_BUILDING_INITIAL_STATE, isBuildingInitialState);
                        }
                        fcc.setMarkInitialState(oldMarkInitialState);
                    }
                    //actx.popTemplateContext();
                }
            }
            finally
            {
                ctx.setVariableMapper(orig);
            }
        }
        finally
        {
            if (!src.isLiteral())
            {
                fcc.endComponentUniqueIdSection();
            }
        }
        if (!src.isLiteral() && fcc.isUsingPSSOnThisView() && fcc.isRefreshTransientBuildOnPSS() &&
            !fcc.isRefreshingTransientBuild())
        {
            //Mark the parent component to be saved and restored fully.
            ComponentSupport.markComponentToRestoreFully(ctx.getFacesContext(), parent);
        }
        if (!src.isLiteral() && fcc.isDynamicComponentSection())
        {
            ComponentSupport.markComponentToRefreshDynamically(ctx.getFacesContext(), parent);
        }
    }
470518
@SuppressWarnings("unchecked")
	@Override
	public final <T extends SolrDataQuery> T setFacetOptions(@Nullable FacetOptions facetOptions) {

		if (facetOptions != null) {
			Assert.isTrue(facetOptions.hasFacets(), "Cannot set facet options having neither fields nor queries.");
		}
		this.facetOptions = facetOptions;
		return (T) this;
	}
1244032
void init() throws SocialLoginException {
        if (sslSupport != null) {
            Properties sslProps = null;
            this.jsseHelper = sslSupport.getJSSEHelper();
            if (this.jsseHelper != null) {
                try {
                    if (sslRef != null) {
                        sslProps = this.jsseHelper.getProperties(sslRef); // SSLConfig
                    } else {
                        Map<String, Object> connectionInfo = new HashMap<String, Object>();
                        connectionInfo.put(Constants.CONNECTION_INFO_DIRECTION, Constants.DIRECTION_INBOUND);
                        sslProps = this.jsseHelper.getProperties(null, connectionInfo, null, true); // default
                        // SSL
                    }
                } catch (SSLException e) {
                    throw new SocialLoginException("ERROR_LOADING_SSL_PROPS", e, new Object[] { e.getLocalizedMessage() });
                }
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "sslConfig (" + sslRef + ") get: " + sslProps);
                }
                if (sslProps != null) {
                    this.sslKeyStoreName = sslProps.getProperty(com.ibm.websphere.ssl.Constants.SSLPROP_KEY_STORE_NAME);
                    this.sslTrustStoreName = sslProps.getProperty(com.ibm.websphere.ssl.Constants.SSLPROP_TRUST_STORE_NAME);
                }
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "sslTrustStoreName: " + this.sslTrustStoreName);
                }
            }
        }
    }
400975
public void setFaceDescriptors(Map faceDescriptors) {
		Assert.notNull(faceDescriptors);
		Iterator it = faceDescriptors.entrySet().iterator();
		while (it.hasNext()) {
			Map.Entry entry = (Map.Entry) it.next();
			String faceDescriptorId = (String) entry.getKey();
			CommandFaceDescriptor faceDescriptor = (CommandFaceDescriptor) entry.getValue();
			setFaceDescriptor(faceDescriptorId, faceDescriptor);
		}
	}
1054730
public void addTangoInterfaceChangeListener(ITangoInterfaceChangeListener listener, String attrName)
            throws DevFailed {
        addTangoInterfaceChangeListener(listener, attrName, false);
    }
1199139
@Override
    public void keep(String key)
    {
        _checkFlashScopeDisabled();
        FacesContext facesContext = FacesContext.getCurrentInstance();
        Map<String, Object> requestMap = facesContext.getExternalContext().getRequestMap();
        Object value = requestMap.get(key);
        
        // if the key does not exist in the requestMap,
        // try to get it from the execute FlashMap
        if (value == null)
        {
            Map<String, Object> executeMap = _getExecuteFlashMap(facesContext);
            // Null-check, because in the GET request of a POST-REDIRECT-GET 
            // pattern there is no execute map
            if (executeMap != null)
            {
                value = executeMap.get(key);
                // Store it on request map so we can get it later. For example, 
                // this is used by org.apache.myfaces.el.FlashELResolver to return
                // the value that has been promoted.
                requestMap.put(key, value);
            }
        }
        
        // put it in the render FlashMap
        _getRenderFlashMap(facesContext).put(key, value);
        
        facesContext.getApplication().publishEvent(facesContext,
                PostKeepFlashValueEvent.class, key);
    }
1030397
public void update(FacesContext facesContext, String events) {
        Components.render(facesContext, map.getSeparate(events));
    }
398016
@SuppressWarnings("unchecked")
	public void init() throws ServletException {
		Map<String, Object> config = null;
		String type = getServletConfig().getInitParameter("type");

		ServletContext servletContext = getServletContext();
		configHash = (Integer) servletContext
				.getAttribute(JawrGrailsConstant.JAWR_GRAILS_CONFIG_HASH);

		if (JawrConstant.CSS_TYPE.equals(type))
			config = (Map<String, Object>) servletContext
					.getAttribute(JawrGrailsConstant.JAWR_GRAILS_CSS_CONFIG);
		else if (JawrConstant.BINARY_TYPE.equals(type))
			config = (Map<String, Object>) servletContext
					.getAttribute(JawrGrailsConstant.JAWR_GRAILS_BINARY_CONFIG);
		else
			config = (Map<String, Object>) servletContext
					.getAttribute(JawrGrailsConstant.JAWR_GRAILS_JS_CONFIG);

		Properties jawrProps = (Properties) config
				.get(JawrGrailsConstant.JAWR_GRAILS_CONFIG_PROPERTIES_KEY);
		try {
			if (JawrConstant.BINARY_TYPE.equals(type)) {
				this.requestHandler = new JawrBinaryResourceRequestHandler(
						servletContext, config, jawrProps);
			} else {
				this.requestHandler = new JawrRequestHandler(servletContext,
						config, jawrProps);
			}

			if (JawrConstant.JS_TYPE.equals(type)) {
				servletContext.setAttribute(
						JawrGrailsConstant.JAWR_GRAILS_JS_REQUEST_HANDLER,
						requestHandler);
			} else if (JawrConstant.CSS_TYPE.equals(type)) {
				servletContext.setAttribute(
						JawrGrailsConstant.JAWR_GRAILS_CSS_REQUEST_HANDLER,
						requestHandler);
			} else if (JawrConstant.BINARY_TYPE.equals(type)) {
				servletContext.setAttribute(
						JawrGrailsConstant.JAWR_GRAILS_BINARY_CONFIG,
						requestHandler);
			}
		} catch (ServletException e) {
			LOGGER.error("Jawr servlet with name"
					+ getServletConfig().getServletName()
					+ " failed to initialize properly. ");
			LOGGER.error("Cause:");
			LOGGER.error(e.getMessage(), e);
			throw e;
		} catch (RuntimeException e) {
			LOGGER.error("Jawr servlet with name"
					+ getServletConfig().getServletName()
					+ " failed to initialize properly. ");
			LOGGER.error("Cause: ");
			LOGGER.error(e.getMessage(), e);
			throw new ServletException(e);
		}
	}
626728
final void add(Message message)
        throws NullPointerException {

        if (message == null) {
            throw new NullPointerException("Message can't be null");
        }

        this.messages.get(message.getLevel()).add(message);
    }
984264
@Override
	public void updateBeanValue() {
		List<?> beanList = this.getBeanList();
		WComponent renderer = getRepeatedComponent();

		for (int i = 0; i < beanList.size(); i++) {
			Object rowData = beanList.get(i);
			UIContext rowContext = getRowContext(rowData, i);

			UIContextHolder.pushContext(rowContext);

			try {
				WebUtilities.updateBeanValue(renderer);
			} finally {
				UIContextHolder.popContext();
			}
		}
	}
1070988
@Override
    public void nullSafeSet(PreparedStatement preparedStatement, Object value, int i, SharedSessionContractImplementor sessionImplementor) throws HibernateException, SQLException {
        // use JDBC array type, which is fairly new, so tread carefully
        if (value == null) {
			preparedStatement.setNull(i, java.sql.Types.ARRAY);
		} else if(value instanceof Integer[]){
		    Integer[] myArray = (Integer[]) value;
            Array inArray = preparedStatement.getConnection().createArrayOf("integer", myArray);
            preparedStatement.setArray(i, inArray);
		} else if(value instanceof int[]) {
			int[] myArray = (int[]) value;
            Array inArray = preparedStatement.getConnection().createArrayOf("integer", wrap(myArray));
			preparedStatement.setArray(i, inArray);
		} else {
		    throw new IllegalArgumentException("Invalid type of input: " + value.getClass().getName());
		}
906859
@Override
    public Object saveView(FacesContext facesContext)
    {
        UIViewRoot uiViewRoot = facesContext.getViewRoot();
        
        if (uiViewRoot.isTransient())
        {
            return null;
        }
        
        Object serializedView = null;
        ResponseStateManager responseStateManager = facesContext.getRenderKit().getResponseStateManager();
        
        String viewId = uiViewRoot.getViewId();
        ViewDeclarationLanguage vdl = facesContext.getApplication().
            getViewHandler().getViewDeclarationLanguage(facesContext,viewId);
        
        try
        {
            facesContext.getAttributes().put(StateManager.IS_SAVING_STATE, Boolean.TRUE);
            if (vdl != null)
            {
                StateManagementStrategy sms = vdl.getStateManagementStrategy(facesContext, viewId);
                
                if (sms != null)
                {
                    if (log.isLoggable(Level.FINEST))
                    {
                        log.finest("Calling saveView of StateManagementStrategy: " + sms.getClass().getName());
                    }
                    
                    serializedView = sms.saveView(facesContext);
                    
                    // If MyfacesResponseStateManager is used, give the option to do
                    // additional operations for save the state if is necessary.
                    if (StateCacheUtils.isMyFacesResponseStateManager(responseStateManager))
                    {
                        StateCacheUtils.getMyFacesResponseStateManager(responseStateManager).
                                saveState(facesContext, serializedView);
                    }
                    
                    return serializedView; 
                }
            }
    
            // In StateManagementStrategy.saveView there is a check for transient at
            // start, but the same applies for VDL without StateManagementStrategy,
            // so this should be checked before call parent (note that parent method
            // does not do this check).
            if (uiViewRoot.isTransient())
            {
                return null;
            }
    
            if (log.isLoggable(Level.FINEST))
            {
                log.finest("Entering saveSerializedView");
            }
    
            checkForDuplicateIds(facesContext, facesContext.getViewRoot(), new HashSet<String>());
    
            if (log.isLoggable(Level.FINEST))
            {
                log.finest("Processing saveSerializedView - Checked for duplicate Ids");
            }
    
            // SerializedView already created before within this request?
            serializedView = facesContext.getAttributes().get(SERIALIZED_VIEW_REQUEST_ATTR);
            if (serializedView == null)
            {
                if (log.isLoggable(Level.FINEST))
                {
                    log.finest("Processing saveSerializedView - create new serialized view");
                }
    
                // first call to saveSerializedView --> create SerializedView
                Object treeStruct = getTreeStructureToSave(facesContext);
                Object compStates = getComponentStateToSave(facesContext);
                Object rlcStates = !facesContext.getResourceLibraryContracts().isEmpty() ? 
                    UIComponentBase.saveAttachedState(facesContext, 
                                new ArrayList<String>(facesContext.getResourceLibraryContracts())) : null;
                serializedView = new Object[] {
                        new Object[]{treeStruct, rlcStates} ,
                        compStates};
                facesContext.getAttributes().put(SERIALIZED_VIEW_REQUEST_ATTR,
                                                    serializedView);
    
                if (log.isLoggable(Level.FINEST))
                {
                    log.finest("Processing saveSerializedView - new serialized view created");
                }
            }
            
            // If MyfacesResponseStateManager is used, give the option to do
            // additional operations for save the state if is necessary.
            if (StateCacheUtils.isMyFacesResponseStateManager(responseStateManager))
            {
                StateCacheUtils.getMyFacesResponseStateManager(responseStateManager).
                        saveState(facesContext, serializedView);
            }
    
            if (log.isLoggable(Level.FINEST))
            {
                log.finest("Exiting saveView");
            }
        }
        finally
        {
            facesContext.getAttributes().remove(StateManager.IS_SAVING_STATE);
        }

        return serializedView;
    }
66308
protected void bindInterfaces(NameSpaceBinder<?> binder, BeanMetaData bmd) throws Exception {
        HomeWrapperSet homeSet = null;
        EJSHome home = bmd.homeRecord.getHome();
        if (home != null) {
            homeSet = home.getWrapperSet();
        }

        int numRemoteInterfaces = countInterfaces(bmd, false);
        int numLocalInterfaces = countInterfaces(bmd, true);
        boolean singleGlobalInterface = (numRemoteInterfaces + numLocalInterfaces) == 1;

        bindInterfaces(binder, bmd, homeSet, false, numRemoteInterfaces, singleGlobalInterface);
        bindInterfaces(binder, bmd, homeSet, true, numLocalInterfaces, singleGlobalInterface);
    }
382628
@Override
    public Facelet getViewMetadataFacelet(FacesContext facesContext, String uri) 
        throws IOException
    {
        URL url = (URL) _relativeLocations.get(uri);
        if (url == null)
        {
            url = resolveURL(facesContext, getBaseUrl(), uri);
            ViewResource viewResource = (ViewResource) facesContext.getAttributes().get(
                FaceletFactory.LAST_RESOURCE_RESOLVED);
            if (url != null)
            {
                if (viewResource != null)
                {
                    // If a view resource has been used to resolve a resource, the cache is in
                    // the ResourceHandler implementation. No need to cache in _relativeLocations.
                }
                else
                {
                    Map<String, URL> newLoc = new HashMap<String, URL>(_relativeLocations);
                    newLoc.put(uri, url);
                    _relativeLocations = newLoc;
                }
            }
            else
            {
                throw new IOException("'" + uri + "' not found.");
            }
        }
        return this.getViewMetadataFacelet(url);
    }