@Override public void addDefaultValidatorId(String validatorId) { if (_validatorClassMap.containsKey(validatorId)) { Class<? extends Validator> validatorClass = getObjectFromClassMap(validatorId, _validatorClassMap); // Ensure atomicity between _defaultValidatorsIds and _cachedDefaultValidatorsIds synchronized(_defaultValidatorsIds) { _defaultValidatorsIds.put(validatorId, validatorClass.getName()); _cachedDefaultValidatorsIds = null; } } }
@Override public void addDefaultValidatorId(String validatorId) { if (_validatorClassMap.containsKey(validatorId)) { Object validatorClass = getObjectFromClassMap(validatorId, _validatorClassMap); String className; if (validatorClass instanceof Class) { className = ((Class<?>)validatorClass).getName(); } else { className = validatorClass.toString(); } // Ensure atomicity between _defaultValidatorsIds and _cachedDefaultValidatorsIds synchronized(_defaultValidatorsIds) { _defaultValidatorsIds.put(validatorId, className); _cachedDefaultValidatorsIds = null; } } }
@Override public void addDefaultValidatorId(String validatorId) { if (_validatorClassMap.containsKey(validatorId)) { Object validatorClass = getObjectFromClassMap(validatorId, _validatorClassMap); String className; if (validatorClass instanceof Class) { className = ((Class<?>)validatorClass).getName(); } else { className = validatorClass.toString(); } // Ensure atomicity between _defaultValidatorsIds and _cachedDefaultValidatorsIds synchronized(_defaultValidatorsIds) { _defaultValidatorsIds.put(validatorId, className); _cachedDefaultValidatorsIds = null; } } }
@Override public final UIComponent createComponent(final String componentType) throws FacesException { checkNull(componentType, "componentType"); checkEmpty(componentType, "componentType"); final Class<?> componentClass = getObjectFromClassMap(componentType, _componentClassMap); if (componentClass == null) { log.log(Level.SEVERE, "Undefined component type " + componentType); throw new FacesException("Undefined component type " + componentType); } try { UIComponent component = (UIComponent)componentClass.newInstance(); _handleAnnotations(FacesContext.getCurrentInstance(), component, component); return component; } catch (Exception e) { log.log(Level.SEVERE, "Could not instantiate component componentType = " + componentType, e); throw new FacesException("Could not instantiate component componentType = " + componentType, e); } }
@Override public final UIComponent createComponent(final String componentType) throws FacesException { checkNull(componentType, "componentType"); checkEmpty(componentType, "componentType"); final Class<? extends UIComponent> componentClass = getObjectFromClassMap(componentType, _componentClassMap); if (componentClass == null) { log.log(Level.SEVERE, "Undefined component type " + componentType); throw new FacesException("Undefined component type " + componentType); } try { UIComponent component = componentClass.newInstance(); _handleAnnotations(FacesContext.getCurrentInstance(), component, component); return component; } catch (Exception e) { log.log(Level.SEVERE, "Could not instantiate component componentType = " + componentType, e); throw new FacesException("Could not instantiate component componentType = " + componentType, e); } }
@Override public final UIComponent createComponent(final String componentType) throws FacesException { checkNull(componentType, "componentType"); checkEmpty(componentType, "componentType"); final Class<?> componentClass = getObjectFromClassMap(componentType, _componentClassMap); if (componentClass == null) { log.log(Level.SEVERE, "Undefined component type " + componentType); throw new FacesException("Undefined component type " + componentType); } try { UIComponent component = (UIComponent)componentClass.newInstance(); _handleAnnotations(FacesContext.getCurrentInstance(), component, component); return component; } catch (Exception e) { log.log(Level.SEVERE, "Could not instantiate component componentType = " + componentType, e); throw new FacesException("Could not instantiate component componentType = " + componentType, e); } }
@Override public final Validator createValidator(final String validatorId) throws FacesException { checkNull(validatorId, "validatorId"); checkEmpty(validatorId, "validatorId"); Class<?> validatorClass = getObjectFromClassMap(validatorId, _validatorClassMap); if (validatorClass == null) { String message = "Unknown validator id '" + validatorId + "'."; log.severe(message); throw new FacesException(message); } try { Validator validator = (Validator) validatorClass.newInstance(); _handleAttachedResourceDependencyAnnotations(FacesContext.getCurrentInstance(), validator); return validator; } catch (Exception e) { log.log(Level.SEVERE, "Could not instantiate validator " + validatorClass, e); throw new FacesException("Could not instantiate validator: " + validatorClass, e); } }
@Override public final Validator createValidator(final String validatorId) throws FacesException { checkNull(validatorId, "validatorId"); checkEmpty(validatorId, "validatorId"); Class<?> validatorClass = getObjectFromClassMap(validatorId, _validatorClassMap); if (validatorClass == null) { String message = "Unknown validator id '" + validatorId + "'."; log.severe(message); throw new FacesException(message); } try { Validator validator = (Validator) validatorClass.newInstance(); _handleAttachedResourceDependencyAnnotations(FacesContext.getCurrentInstance(), validator); return validator; } catch (Exception e) { log.log(Level.SEVERE, "Could not instantiate validator " + validatorClass, e); throw new FacesException("Could not instantiate validator: " + validatorClass, e); } }
getObjectFromClassMap(componentType, _componentClassMap); if (componentClass == null)
getObjectFromClassMap(validatorId, _validatorClassMap); if (validatorClass == null)
checkEmpty(converterId, "converterId"); final Class<?> converterClass = getObjectFromClassMap(converterId, _converterIdToClassMap); if (converterClass == null)
checkEmpty(converterId, "converterId"); final Class<?> converterClass = getObjectFromClassMap(converterId, _converterIdToClassMap); if (converterClass == null)
checkEmpty(behaviorId, "behaviorId"); final Class<?> behaviorClass = getObjectFromClassMap(behaviorId, _behaviorClassMap);
checkEmpty(behaviorId, "behaviorId"); final Class<?> behaviorClass = getObjectFromClassMap(behaviorId, _behaviorClassMap);
getObjectFromClassMap(converterId, _converterIdToClassMap); if (converterClass == null)
getObjectFromClassMap(behaviorId, _behaviorClassMap);