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: JOOoConvertPluginImpl.java 18651 2007-05-13 20:28:53Z sfermigier $ 020 */ 021 022package org.nuxeo.ecm.platform.ui.web.restAPI.service; 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; 030import org.restlet.Restlet; 031 032/** 033 * Descriptor for a Restlet 034 * 035 * @author <a href="mailto:td@nuxeo.com">Thierry Delprat</a> 036 */ 037@XObject(value = "restletPlugin") 038public class RestletPluginDescriptor { 039 040 @XNode("@name") 041 private String name; 042 043 @XNode("@enabled") 044 private Boolean enabled = Boolean.TRUE; 045 046 @XNodeList(value = "urlPatterns/urlPattern", type = ArrayList.class, componentType = String.class) 047 private List<String> urlPatterns = new ArrayList<String>(); 048 049 @XNode("@useSeam") 050 private boolean useSeam; 051 052 @XNode("@useConversation") 053 private boolean useConversation; 054 055 @XNode("@class") 056 private Class<Restlet> className; 057 058 @XNode("@isSingleton") 059 private boolean isSingleton = Boolean.FALSE; 060 061 public Class<Restlet> getClassName() { 062 return className; 063 } 064 065 public void setClassName(Class<Restlet> className) { 066 this.className = className; 067 } 068 069 public Boolean getEnabled() { 070 return enabled; 071 } 072 073 public void setEnabled(Boolean enabled) { 074 this.enabled = enabled; 075 } 076 077 public String getName() { 078 return name; 079 } 080 081 public void setName(String name) { 082 this.name = name; 083 } 084 085 public List<String> getUrlPatterns() { 086 return urlPatterns; 087 } 088 089 public void setUrlPatterns(List<String> urlPatterns) { 090 this.urlPatterns = urlPatterns; 091 } 092 093 public boolean getUseSeam() { 094 return useSeam; 095 } 096 097 public void setUseSeam(boolean useSeam) { 098 this.useSeam = useSeam; 099 } 100 101 public boolean getUseConversation() { 102 return useConversation; 103 } 104 105 public void setUseConversation(boolean useConversation) { 106 this.useConversation = useConversation; 107 } 108 109 public boolean isSingleton() { 110 return isSingleton; 111 } 112 113 public void setIsSingleton(boolean isSingleton) { 114 this.isSingleton = isSingleton; 115 } 116 117}