Skip to content

Package: TriggerDefinitionCreator

TriggerDefinitionCreator

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2019, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.scheduler.trigger.definition;
14:
15: import org.eclipse.kapua.model.KapuaNamedEntityCreator;
16:
17: import javax.xml.bind.annotation.XmlAccessType;
18: import javax.xml.bind.annotation.XmlAccessorType;
19: import javax.xml.bind.annotation.XmlRootElement;
20: import javax.xml.bind.annotation.XmlType;
21: import java.util.List;
22:
23: /**
24: * {@link TriggerDefinition} {@link org.eclipse.kapua.model.KapuaEntityCreator} definition.
25: *
26: * @since 1.0.0
27: */
28: @XmlRootElement(name = "triggerDefinitionCreator")
29: @XmlAccessorType(XmlAccessType.PROPERTY)
30: @XmlType(factoryClass = TriggerDefinitionXmlRegistry.class, factoryMethod = "newCreator")
31: public interface TriggerDefinitionCreator extends KapuaNamedEntityCreator<TriggerDefinition> {
32:
33: /**
34: * Gets the {@link TriggerType}.
35: *
36: * @return The {@link TriggerType}.
37: * @since 1.1.0
38: */
39: TriggerType getTriggerType();
40:
41: /**
42: * Sets the {@link TriggerType}.
43: *
44: * @param triggerType The {@link TriggerType}.
45: * @since 1.1.0
46: */
47: void setTriggerType(TriggerType triggerType);
48:
49: /**
50: * Sets the processor name.
51: *
52: * @return The processor name.
53: * @since 1.1.0
54: */
55: String getProcessorName();
56:
57: /**
58: * Sets the processor name.
59: *
60: * @param processorName The processor name.
61: * @since 1.1.0
62: */
63: void setProcessorName(String processorName);
64:
65: /**
66: * Gets the {@link TriggerProperty}s.
67: *
68: * @return The {@link TriggerProperty}s.
69: * @since 1.1.0
70: */
71: List<TriggerProperty> getTriggerProperties();
72:
73: /**
74: * Gets the {@link TriggerProperty} by the name.
75: *
76: * @param name The {@link TriggerProperty#getName()} to look for.
77: * @return The found {@link TriggerProperty} or {@code null}.
78: * @since 1.5.0
79: */
80: TriggerProperty getTriggerProperty(String name);
81:
82: /**
83: * Sets the {@link TriggerProperty}s.
84: *
85: * @param triggerProperties The {@link TriggerProperty}s.
86: * @since 1.1.0
87: */
88: void setTriggerProperties(List<TriggerProperty> triggerProperties);
89: }