001/*
002 * (C) Copyright 2006-2007 Nuxeo SAS <http://nuxeo.com> and others
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the Eclipse Public License v1.0
006 * which accompanies this distribution, and is available at
007 * http://www.eclipse.org/legal/epl-v10.html
008 *
009 * Contributors:
010 *     Jean-Marc Orliaguet, Chalmers
011 *
012 * $Id$
013 */
014
015package org.nuxeo.theme.engines;
016
017import java.util.HashMap;
018import java.util.Map;
019
020import org.nuxeo.common.xmap.annotation.XNode;
021import org.nuxeo.common.xmap.annotation.XNodeMap;
022import org.nuxeo.common.xmap.annotation.XObject;
023import org.nuxeo.theme.rendering.RendererType;
024import org.nuxeo.theme.types.Type;
025import org.nuxeo.theme.types.TypeFamily;
026
027@XObject("engine")
028public final class EngineType implements Type {
029
030    @XNode("@name")
031    public String name;
032
033    @XNodeMap(value = "renderer", key = "@element", type = HashMap.class, componentType = RendererType.class)
034    public Map<String, RendererType> renderers;
035
036    public String getTypeName() {
037        return name;
038    }
039
040    public TypeFamily getTypeFamily() {
041        return TypeFamily.ENGINE;
042    }
043
044    public Map<String, RendererType> getRenderers() {
045        return renderers;
046    }
047
048    public void setRenderers(Map<String, RendererType> renderers) {
049        this.renderers = renderers;
050    }
051
052    public String getName() {
053        return name;
054    }
055
056    public void setName(String name) {
057        this.name = name;
058    }
059
060}