001/*
002 * (C) Copyright 2006-2007 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a>
018 *
019 * $Id: ValueBindingDescriptor.java 21462 2007-06-26 21:16:36Z sfermigier $
020 */
021
022package org.nuxeo.ecm.platform.ui.web.rest.descriptors;
023
024import org.nuxeo.common.xmap.annotation.XNode;
025import org.nuxeo.common.xmap.annotation.XObject;
026
027/**
028 * Descriptor for a value binding.
029 *
030 * @author <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a>
031 */
032@XObject("binding")
033public class ValueBindingDescriptor {
034
035    @XNode("@name")
036    protected String name;
037
038    @XNode("")
039    protected String expression;
040
041    /**
042     * If set to false, the binding will not be called to get the value (and use it to preserve it in the redirect URL
043     * after a POST)
044     *
045     * @since 5.4.2
046     */
047    @XNode("@callGetter")
048    protected boolean callGetter = true;
049
050    /**
051     * If set to false, the binding will not be called to set the value
052     *
053     * @since 5.4.2
054     */
055    @XNode("@callSetter")
056    protected boolean callSetter = true;
057
058    public String getExpression() {
059        return expression;
060    }
061
062    public String getName() {
063        return name;
064    }
065
066    public boolean getCallGetter() {
067        return callGetter;
068    }
069
070    public boolean getCallSetter() {
071        return callSetter;
072    }
073
074}