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