Skip to content

Package: Bid

Bid

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2018 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * jonas - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.bazaar;
15:
16: import java.lang.annotation.ElementType;
17: import java.lang.annotation.Retention;
18: import java.lang.annotation.RetentionPolicy;
19: import java.lang.annotation.Target;
20:
21: /**
22: * <p>
23: * Marks a method in a {@link Vendor} doing the {@link Bid} for creating a product on a {@link Bazaar}. The methode can
24: * request arbitrary parameters from the {@link BazaarContext} or provided by {@link BazaarContextFunction}s.
25: * The method will only be called if all specified parameters can be resolved. The method must to return a
26: * {@code double}
27: * indicating the priority. The {@link Vendor} with the highest priority on a Bazaar will finally create the product.
28: * see also {@link Bazaar}.
29: * </p>
30: * <p>
31: * A vendor may dynamically opt not to bid. In such case, the bid method must declare its return type
32: * as the {@link Double} wrapper and return a {@code null} bid to opt out of the bazaar.
33: * </p>
34: *
35: * @author jonas
36: *
37: */
38: @Retention(RetentionPolicy.RUNTIME)
39: @Target(ElementType.METHOD)
40: public @interface Bid {
41:
42: }