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