001/* 002 * Copyright (c) 2006-2011 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 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 * bstefanescu 011 */ 012package org.nuxeo.ecm.automation.core; 013 014import java.util.ArrayList; 015import java.util.List; 016 017import org.nuxeo.common.xmap.annotation.XNode; 018import org.nuxeo.common.xmap.annotation.XNodeList; 019import org.nuxeo.common.xmap.annotation.XObject; 020import org.nuxeo.ecm.automation.core.annotations.Operation; 021import org.nuxeo.ecm.platform.forms.layout.descriptors.WidgetDescriptor; 022 023/** 024 * @author <a href="mailto:bs@nuxeo.com">Bogdan Stefanescu</a> 025 * @author <a href="mailto:grenard@nuxeo.com">Guillaume Renard</a> 026 */ 027@XObject("operation") 028public class OperationContribution { 029 030 /** 031 * The operation class that must be annotated using {@link Operation} annotation. 032 */ 033 @XNode("@class") 034 public Class<?> type; 035 036 /** 037 * Put it to true to override an existing contribution having the same ID. By default overriding is not permitted 038 * and an exception is thrown when this flag is on false. 039 */ 040 @XNode("@replace") 041 public boolean replace; 042 043 /** 044 * The widget descriptor for the operation parameters. 045 * 046 * @since 5.9.5 047 */ 048 @XNodeList(componentType = WidgetDescriptor.class, type = ArrayList.class, value = "widgets/widget") 049 public List<WidgetDescriptor> widgets; 050 051}