/*
 *  Licensed to the Apache Software Foundation (ASF) under one
 *  or more contributor license agreements.  See the NOTICE file
 *  distributed with this work for additional information
 *  regarding copyright ownership.  The ASF licenses this file
 *  to you under the Apache License, Version 2.0 (the
 *  "License"); you may not use this file except in compliance
 *  with the License.  You may obtain a copy of the License at
 * 
 *  http://www.apache.org/licenses/LICENSE-2.0
 * 
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an
 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *  KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations
 *  under the License.
 */
package org.apache.myfaces.custom.transform;

import javax.faces.component.UIComponent;
import javax.faces.el.ValueBinding;
import javax.faces.context.FacesContext;


// Generated from class org.apache.myfaces.custom.transform.AbstractXmlTransform.
//
// WARNING: This file was automatically generated. Do not edit it directly,
//          or you will lose your changes.
public class XmlTransform extends org.apache.myfaces.custom.transform.AbstractXmlTransform
{

    static public final String COMPONENT_FAMILY =
        "org.apache.myfaces.tomahawk.Transform";
    static public final String COMPONENT_TYPE =
        "org.apache.myfaces.tomahawk.XmlTransform";


    public XmlTransform()
    {
        setRendererType(null);
    }

    public String getFamily()
    {
        return COMPONENT_FAMILY;
    }
    

    // Property: content
    private String _content;
    
    public String getContent()
    {
        if (_content != null)
        {
            return _content;
        }
        ValueBinding vb = getValueBinding("content");
        if (vb != null)
        {
            Object value = vb.getValue(getFacesContext());
            if (value == null)
            {
                return null;
            }
            else
            {
                return (String) value.toString();
            }
        }
        return null;
    }

    public void setContent(String content)
    {
        this._content = content;
    }
    // Property: contentLocation
    private String _contentLocation;
    
    public String getContentLocation()
    {
        if (_contentLocation != null)
        {
            return _contentLocation;
        }
        ValueBinding vb = getValueBinding("contentLocation");
        if (vb != null)
        {
            Object value = vb.getValue(getFacesContext());
            if (value == null)
            {
                return null;
            }
            else
            {
                return (String) value.toString();
            }
        }
        return null;
    }

    public void setContentLocation(String contentLocation)
    {
        this._contentLocation = contentLocation;
    }
    // Property: stylesheet
    private String _stylesheet;
    
    public String getStylesheet()
    {
        if (_stylesheet != null)
        {
            return _stylesheet;
        }
        ValueBinding vb = getValueBinding("stylesheet");
        if (vb != null)
        {
            Object value = vb.getValue(getFacesContext());
            if (value == null)
            {
                return null;
            }
            else
            {
                return (String) value.toString();
            }
        }
        return null;
    }

    public void setStylesheet(String stylesheet)
    {
        this._stylesheet = stylesheet;
    }
    // Property: stylesheetLocation
    private String _stylesheetLocation;
    
    public String getStylesheetLocation()
    {
        if (_stylesheetLocation != null)
        {
            return _stylesheetLocation;
        }
        ValueBinding vb = getValueBinding("stylesheetLocation");
        if (vb != null)
        {
            Object value = vb.getValue(getFacesContext());
            if (value == null)
            {
                return null;
            }
            else
            {
                return (String) value.toString();
            }
        }
        return null;
    }

    public void setStylesheetLocation(String stylesheetLocation)
    {
        this._stylesheetLocation = stylesheetLocation;
    }

    public Object saveState(FacesContext facesContext)
    {
        Object[] values = new Object[5];
        values[0] = super.saveState(facesContext);
        values[1] = _content;
        values[2] = _contentLocation;
        values[3] = _stylesheet;
        values[4] = _stylesheetLocation;
        return values; 
    }

    public void restoreState(FacesContext facesContext, Object state)
    {
        Object[] values = (Object[])state;
        super.restoreState(facesContext,values[0]);
        _content = (java.lang.String) values[1];
        _contentLocation = (java.lang.String) values[2];
        _stylesheet = (java.lang.String) values[3];
        _stylesheetLocation = (java.lang.String) values[4];
    }
}
