All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.richfaces.cdk.xmlconfig.model.FacesConfigBean Maven / Gradle / Ivy

The newest version!
/*
 * $Id$
 *
 * License Agreement.
 *
 * Rich Faces - Natural Ajax for Java Server Faces (JSF)
 *
 * Copyright (C) 2007 Exadel, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License version 2.1 as published by the Free Software Foundation.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 */
package org.richfaces.cdk.xmlconfig.model;

import java.util.List;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.richfaces.cdk.model.BehaviorModel;
import org.richfaces.cdk.model.ComponentLibrary;
import org.richfaces.cdk.model.ComponentModel;
import org.richfaces.cdk.model.ConfigExtension;
import org.richfaces.cdk.model.ConverterModel;
import org.richfaces.cdk.model.EventModel;
import org.richfaces.cdk.model.Extensible;
import org.richfaces.cdk.model.FunctionModel;
import org.richfaces.cdk.model.RenderKitModel;
import org.richfaces.cdk.model.Taglib;
import org.richfaces.cdk.model.ValidatorModel;

import com.google.common.collect.Lists;

/**
 * 

*

* * @author [email protected] */ @XmlRootElement(name = "faces-config", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE) @XmlType(name = "faces-configType", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE) @XmlAccessorType(XmlAccessType.NONE) public class FacesConfigBean implements Extensible { @XmlElement(name = "component", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE) @XmlJavaTypeAdapter(ComponentAdapter.class) private List components = Lists.newArrayList(); @XmlElement(name = "render-kit", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE) @XmlJavaTypeAdapter(RenderKitAdapter.class) private List renderKits = Lists.newArrayList(); @XmlElement(name = "converter", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE) @XmlJavaTypeAdapter(ConverterAdapter.class) private List converters = Lists.newArrayList(); @XmlElement(name = "validator", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE) @XmlJavaTypeAdapter(ValidatorAdapter.class) private List validators = Lists.newArrayList(); @XmlElement(name = "behavior", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE) @XmlJavaTypeAdapter(BehaviorAdapter.class) private List behaviors = Lists.newArrayList(); @XmlAttribute private String version = "2.0"; @XmlAttribute(name = "metadata-complete") private Boolean metadataComplete; @XmlElement(name = "faces-config-extension", namespace = ComponentLibrary.FACES_CONFIG_NAMESPACE) private FacesConfigExtension extension; /** *

*

* * @return the version */ public String getVersion() { return version; } /** *

*

* * @param version the version to set */ public void setVersion(String version) { this.version = version; } /** *

*

* * @return the metadataComplete */ public Boolean getMetadataComplete() { return this.metadataComplete; } /** *

*

* * @param metadataComplete the metadataComplete to set */ public void setMetadataComplete(Boolean metadataComplete) { this.metadataComplete = metadataComplete; } /** *

*

* * @return the components */ public List getComponents() { return components; } /** *

*

* * @param components the components to set */ public void setComponents(List components) { this.components = components; } /** *

*

* * @return the renderKits */ public List getRenderKits() { return renderKits; } /** *

*

* * @param renderKits the renderKits to set */ public void setRenderKits(List renderKits) { this.renderKits = renderKits; } public List getConverters() { return converters; } public void setConverters(List converters) { this.converters = converters; } public List getValidators() { return validators; } public void setValidators(List validators) { this.validators = validators; } public List getBehaviors() { return behaviors; } public void setBehaviors(List behaviors) { this.behaviors = behaviors; } /** *

*

* * @return the extension */ public FacesConfigExtension getExtension() { return extension; } /** *

*

* * @param extension the extension to set */ public void setExtension(FacesConfigExtension extension) { this.extension = extension; } public static final class FacesConfigExtension extends ConfigExtension { private String prefix; private Taglib taglib; private List events = Lists.newArrayList(); private List functions = Lists.newArrayList(); @XmlElement(name = "faces-event", namespace = ComponentLibrary.CDK_EXTENSIONS_NAMESPACE) @XmlJavaTypeAdapter(EventAdapter.class) public List getEvents() { return events; } /** *

*

* * @param events the events to set */ public void setEvents(List events) { this.events = events; } @XmlElement(name = "prefix", namespace = ComponentLibrary.CDK_EXTENSIONS_NAMESPACE) public void setPrefix(String prefix) { this.prefix = prefix; } public String getPrefix() { return prefix; } @XmlElement(name = "taglib", namespace = ComponentLibrary.CDK_EXTENSIONS_NAMESPACE) public void setTaglib(Taglib taglib) { this.taglib = taglib; } public Taglib getTaglib() { return taglib; } /** *

*

* * @return the functions */ @XmlElement(name = "function", namespace = ComponentLibrary.CDK_EXTENSIONS_NAMESPACE) @XmlJavaTypeAdapter(FunctionAdapter.class) public List getFunctions() { return this.functions; } /** *

*

* * @param functions the functions to set */ public void setFunctions(List functions) { this.functions = functions; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy