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 *     Nuxeo - initial API and implementation
018 *
019 * $Id: URLPatternDescriptor.java 22097 2007-07-06 12:38:20Z atchertchian $
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.XNodeList;
026import org.nuxeo.common.xmap.annotation.XObject;
027
028@XObject(value = "urlPattern")
029public class URLPatternDescriptor {
030
031    @XNode("@name")
032    private String name;
033
034    @XNode("@enabled")
035    private boolean enabled = true;
036
037    @XNode("defaultURLPolicy")
038    private boolean defaultURLPolicy = false;
039
040    @XNode("needBaseURL")
041    private boolean needBaseURL = false;
042
043    @XNode("needFilterPreprocessing")
044    private boolean needFilterPreprocessing = false;
045
046    @XNode("needRedirectFilter")
047    private boolean needRedirectFilter = false;
048
049    @XNode("actionBinding")
050    private String actionBinding;
051
052    /**
053     * EL expression resolving to a boolean value, and determines if {@link #documentViewBinding} and
054     * {@link #newDocumentViewBinding} will attempt to be resolved using this descriptor
055     */
056    @XNode("documentViewBindingApplies")
057    private String documentViewBindingApplies;
058
059    @XNode("documentViewBinding")
060    private String documentViewBinding;
061
062    @XNode("newDocumentViewBinding")
063    private String newDocumentViewBinding;
064
065    @XNodeList(value = "bindings/binding", type = ValueBindingDescriptor[].class, componentType = ValueBindingDescriptor.class)
066    private ValueBindingDescriptor[] valueBindings;
067
068    @XNode("codecName")
069    private String documentViewCodecName;
070
071    public String getActionBinding() {
072        return actionBinding;
073    }
074
075    public void setActionBinding(String actionBinding) {
076        this.actionBinding = actionBinding;
077    }
078
079    public boolean getDefaultURLPolicy() {
080        return defaultURLPolicy;
081    }
082
083    public void setDefaultURLPolicy(boolean defaultURLPolicy) {
084        this.defaultURLPolicy = defaultURLPolicy;
085    }
086
087    public boolean getEnabled() {
088        return enabled;
089    }
090
091    public void setEnabled(boolean enabled) {
092        this.enabled = enabled;
093    }
094
095    public String getName() {
096        return name;
097    }
098
099    public void setName(String name) {
100        this.name = name;
101    }
102
103    public boolean getNeedBaseURL() {
104        return needBaseURL;
105    }
106
107    public void setNeedBaseURL(boolean needBaseURL) {
108        this.needBaseURL = needBaseURL;
109    }
110
111    public boolean getNeedFilterPreprocessing() {
112        return needFilterPreprocessing;
113    }
114
115    public void setNeedFilterPreprocessing(boolean needFilterPreprocessing) {
116        this.needFilterPreprocessing = needFilterPreprocessing;
117    }
118
119    public boolean getNeedRedirectFilter() {
120        return needRedirectFilter;
121    }
122
123    public void setNeedRedirectFilter(boolean needRedirectFilter) {
124        this.needRedirectFilter = needRedirectFilter;
125    }
126
127    public String getDocumentViewCodecName() {
128        return documentViewCodecName;
129    }
130
131    public void setDocumentViewCodecName(String documentViewCodecName) {
132        this.documentViewCodecName = documentViewCodecName;
133    }
134
135    public ValueBindingDescriptor[] getValueBindings() {
136        return valueBindings;
137    }
138
139    public void setValueBindings(ValueBindingDescriptor[] valueBindings) {
140        this.valueBindings = valueBindings;
141    }
142
143    public String getDocumentViewBindingApplies() {
144        return documentViewBindingApplies;
145    }
146
147    public void setDocumentViewApplies(String documentViewBindingApplies) {
148        this.documentViewBindingApplies = documentViewBindingApplies;
149    }
150
151    public String getDocumentViewBinding() {
152        return documentViewBinding;
153    }
154
155    public void setDocumentViewBinding(String documentViewBinding) {
156        this.documentViewBinding = documentViewBinding;
157    }
158
159    public String getNewDocumentViewBinding() {
160        return newDocumentViewBinding;
161    }
162
163    public void setNewDocumentViewBinding(String newDocumentViewBinding) {
164        this.newDocumentViewBinding = newDocumentViewBinding;
165    }
166
167}