001/*
002 * (C) Copyright 2015 Nuxeo SA (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 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-2.1.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 *     Thierry Delprat <tdelprat@nuxeo.com>
016 */
017package org.nuxeo.automation.scripting.internals.operation;
018
019import org.nuxeo.common.xmap.annotation.XNode;
020import org.nuxeo.common.xmap.annotation.XNodeList;
021import org.nuxeo.common.xmap.annotation.XObject;
022import org.nuxeo.ecm.automation.OperationDocumentation;
023
024/**
025 * @since 7.2
026 */
027@XObject("scriptedOperation")
028public class ScriptingOperationDescriptor {
029
030    @XNode("@id")
031    protected String id;
032
033    @XNode("inputType")
034    protected String inputType;
035
036    @XNode("outputType")
037    protected String outputType;
038
039    @XNode("description")
040    protected String description;
041
042    @XNode("category")
043    protected String category;
044
045    @XNodeList(value = "aliases/alias", type = String[].class, componentType = String.class)
046    protected String[] aliases;
047
048    @XNodeList(value = "param", type = OperationDocumentation.Param[].class, componentType = OperationDocumentation.Param.class)
049    protected OperationDocumentation.Param[] params = new OperationDocumentation.Param[0];
050
051    @XNode("script")
052    protected String script;
053
054    public String[] getAliases() {
055        return aliases;
056    }
057
058    public String getInputType() {
059        return inputType;
060    }
061
062    public String getOutputType() {
063        return outputType;
064    }
065
066    public String getId() {
067        return id;
068    }
069
070    public String getDescription() {
071        return description;
072    }
073
074    public String getCategory() {
075        return category;
076    }
077
078    public OperationDocumentation.Param[] getParams() {
079        return params;
080    }
081
082    public String getScript() {
083        return script;
084    }
085
086}