001/*
002 * (C) Copyright 2006-2008 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 *     troger
018 *
019 * $Id$
020 */
021
022package org.nuxeo.ecm.platform.annotations.configuration.service;
023
024import org.nuxeo.common.xmap.annotation.XNode;
025import org.nuxeo.common.xmap.annotation.XNodeList;
026import org.nuxeo.common.xmap.annotation.XObject;
027
028/**
029 * @author <a href="mailto:troger@nuxeo.com">Thomas Roger</a>
030 */
031@XObject("webAnnotation")
032public class WebAnnotationDefinitionDescriptor {
033
034    @XNode("@uri")
035    private String uri;
036
037    @XNode("@name")
038    private String name;
039
040    @XNode("@icon")
041    private String icon;
042
043    @XNode("@type")
044    private String type;
045
046    @XNode("@enabled")
047    private Boolean enabled = true;
048
049    @XNode("@listIcon")
050    private String listIcon;
051
052    @XNode("@createIcon")
053    private String createIcon;
054
055    @XNode("@inMenu")
056    private Boolean inMenu = false;
057
058    @XNodeList(value = "field", type = WebAnnotationFieldDescriptor[].class, componentType = WebAnnotationFieldDescriptor.class)
059    private WebAnnotationFieldDescriptor[] fields = new WebAnnotationFieldDescriptor[0];
060
061    public String getUri() {
062        return uri;
063    }
064
065    /**
066     * @return the label.
067     */
068    public String getName() {
069        return name;
070    }
071
072    public String getIcon() {
073        return icon;
074    }
075
076    public String getType() {
077        return type;
078    }
079
080    public Boolean isEnabled() {
081        return enabled;
082    }
083
084    public String getListIcon() {
085        return listIcon;
086    }
087
088    public String getCreateIcon() {
089        return createIcon;
090    }
091
092    public Boolean isInMenu() {
093        return inMenu;
094    }
095
096    public WebAnnotationFieldDescriptor[] getFields() {
097        return fields;
098    }
099
100}