001/* 002 * (C) Copyright 2006-2007 Nuxeo SAS (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * Nuxeo - initial API and implementation 016 * 017 * $Id: URLPatternDescriptor.java 22097 2007-07-06 12:38:20Z atchertchian $ 018 */ 019 020package org.nuxeo.ecm.platform.ui.web.rest.descriptors; 021 022import java.util.ArrayList; 023import java.util.List; 024 025import org.nuxeo.common.xmap.annotation.XNode; 026import org.nuxeo.common.xmap.annotation.XNodeList; 027import org.nuxeo.common.xmap.annotation.XObject; 028 029@XObject(value = "urlPattern") 030public class URLPatternDescriptor { 031 032 @XNode("@name") 033 private String name; 034 035 @XNode("@enabled") 036 private boolean enabled = true; 037 038 @XNode("defaultURLPolicy") 039 private boolean defaultURLPolicy = false; 040 041 @XNode("needBaseURL") 042 private boolean needBaseURL = false; 043 044 @XNode("needFilterPreprocessing") 045 private boolean needFilterPreprocessing = false; 046 047 @XNode("needRedirectFilter") 048 private boolean needRedirectFilter = false; 049 050 @XNode("actionBinding") 051 private String actionBinding; 052 053 /** 054 * EL expression resolving to a boolean value, and determines if {@link #documentViewBinding} and 055 * {@link #newDocumentViewBinding} will attempt to be resolved using this descriptor 056 */ 057 @XNode("documentViewBindingApplies") 058 private String documentViewBindingApplies; 059 060 @XNode("documentViewBinding") 061 private String documentViewBinding; 062 063 @XNode("newDocumentViewBinding") 064 private String newDocumentViewBinding; 065 066 @XNodeList(value = "bindings/binding", type = ValueBindingDescriptor[].class, componentType = ValueBindingDescriptor.class) 067 private ValueBindingDescriptor[] valueBindings; 068 069 /** 070 * @deprecated since 5.5: use {@link #documentViewBindingApplies} binding instead 071 */ 072 @Deprecated 073 @XNodeList(value = "viewIds/viewId", type = ArrayList.class, componentType = String.class) 074 List<String> viewIds; 075 076 @XNode("codecName") 077 private String documentViewCodecName; 078 079 public String getActionBinding() { 080 return actionBinding; 081 } 082 083 public void setActionBinding(String actionBinding) { 084 this.actionBinding = actionBinding; 085 } 086 087 public boolean getDefaultURLPolicy() { 088 return defaultURLPolicy; 089 } 090 091 public void setDefaultURLPolicy(boolean defaultURLPolicy) { 092 this.defaultURLPolicy = defaultURLPolicy; 093 } 094 095 public boolean getEnabled() { 096 return enabled; 097 } 098 099 public void setEnabled(boolean enabled) { 100 this.enabled = enabled; 101 } 102 103 public String getName() { 104 return name; 105 } 106 107 public void setName(String name) { 108 this.name = name; 109 } 110 111 public boolean getNeedBaseURL() { 112 return needBaseURL; 113 } 114 115 public void setNeedBaseURL(boolean needBaseURL) { 116 this.needBaseURL = needBaseURL; 117 } 118 119 public boolean getNeedFilterPreprocessing() { 120 return needFilterPreprocessing; 121 } 122 123 public void setNeedFilterPreprocessing(boolean needFilterPreprocessing) { 124 this.needFilterPreprocessing = needFilterPreprocessing; 125 } 126 127 public boolean getNeedRedirectFilter() { 128 return needRedirectFilter; 129 } 130 131 public void setNeedRedirectFilter(boolean needRedirectFilter) { 132 this.needRedirectFilter = needRedirectFilter; 133 } 134 135 public String getDocumentViewCodecName() { 136 return documentViewCodecName; 137 } 138 139 public void setDocumentViewCodecName(String documentViewCodecName) { 140 this.documentViewCodecName = documentViewCodecName; 141 } 142 143 public ValueBindingDescriptor[] getValueBindings() { 144 return valueBindings; 145 } 146 147 public void setValueBindings(ValueBindingDescriptor[] valueBindings) { 148 this.valueBindings = valueBindings; 149 } 150 151 public String getDocumentViewBindingApplies() { 152 return documentViewBindingApplies; 153 } 154 155 public void setDocumentViewApplies(String documentViewBindingApplies) { 156 this.documentViewBindingApplies = documentViewBindingApplies; 157 } 158 159 public String getDocumentViewBinding() { 160 return documentViewBinding; 161 } 162 163 public void setDocumentViewBinding(String documentViewBinding) { 164 this.documentViewBinding = documentViewBinding; 165 } 166 167 public String getNewDocumentViewBinding() { 168 return newDocumentViewBinding; 169 } 170 171 public void setNewDocumentViewBinding(String newDocumentViewBinding) { 172 this.newDocumentViewBinding = newDocumentViewBinding; 173 } 174 175 /** 176 * @deprecated since 5.5: use {@link #getDocumentViewBindingApplies()} binding instead 177 */ 178 @Deprecated 179 public List<String> getViewIds() { 180 return viewIds; 181 } 182 183}