001/* 002 * (C) Copyright 2015 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 * Thierry Delprat <tdelprat@nuxeo.com> 018 */ 019package org.nuxeo.automation.scripting.internals; 020 021import org.nuxeo.common.xmap.annotation.XNode; 022import org.nuxeo.common.xmap.annotation.XNodeList; 023import org.nuxeo.common.xmap.annotation.XObject; 024import org.nuxeo.ecm.automation.OperationDocumentation; 025 026/** 027 * @since 7.2 028 */ 029@XObject("scriptedOperation") 030public class ScriptingOperationDescriptor { 031 032 @XNode("@id") 033 protected String id; 034 035 @XNode("inputType") 036 protected String inputType; 037 038 @XNode("outputType") 039 protected String outputType; 040 041 @XNode("description") 042 protected String description; 043 044 @XNode("category") 045 protected String category; 046 047 @XNodeList(value = "aliases/alias", type = String[].class, componentType = String.class) 048 protected String[] aliases; 049 050 @XNodeList(value = "param", type = OperationDocumentation.Param[].class, componentType = OperationDocumentation.Param.class) 051 protected OperationDocumentation.Param[] params = new OperationDocumentation.Param[0]; 052 053 @XNode("script") 054 protected String source; 055 056 /** 057 * Information setup at registration according to registering component name. 058 * 059 * @since 11.1 060 */ 061 protected String contributingComponent; 062 063 public String[] getAliases() { 064 return aliases; 065 } 066 067 public String getInputType() { 068 return inputType; 069 } 070 071 public String getOutputType() { 072 return outputType; 073 } 074 075 public String getId() { 076 return id; 077 } 078 079 public String getDescription() { 080 return description; 081 } 082 083 public String getCategory() { 084 return category; 085 } 086 087 public OperationDocumentation.Param[] getParams() { 088 return params; 089 } 090 091 /** 092 * @since 11.1 093 */ 094 public String getContributingComponent() { 095 return contributingComponent; 096 } 097 098 /** 099 * @since 11.1 100 */ 101 public void setContributingComponent(String contributingComponent) { 102 this.contributingComponent = contributingComponent; 103 } 104 105}