Skip to content

Package: TriggerDefinition

TriggerDefinition

nameinstructionbranchcomplexitylinemethod
getType()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

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.KapuaNamedEntity;
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 KapuaNamedEntity} definition.
25: *
26: * @since 1.1.0
27: */
28: @XmlRootElement(name = "triggerDefinition")
29: @XmlAccessorType(XmlAccessType.PROPERTY)
30: @XmlType(factoryClass = TriggerDefinitionXmlRegistry.class, factoryMethod = "newEntity")
31: public interface TriggerDefinition extends KapuaNamedEntity {
32:
33: String TYPE = "triggerDefinition";
34:
35: @Override
36: default String getType() {
37: return TYPE;
38: }
39:
40: /**
41: * Gets the {@link TriggerType}.
42: *
43: * @return The {@link TriggerType}.
44: * @since 1.1.0
45: */
46: TriggerType getTriggerType();
47:
48: /**
49: * Sets the {@link TriggerType}.
50: *
51: * @param triggerType The {@link TriggerType}.
52: * @since 1.1.0
53: */
54: void setTriggerType(TriggerType triggerType);
55:
56: /**
57: * Sets the processor name.
58: *
59: * @return The processor name.
60: * @since 1.1.0
61: */
62: String getProcessorName();
63:
64: /**
65: * Sets the processor name.
66: *
67: * @param processorName The processor name.
68: * @since 1.1.0
69: */
70: void setProcessorName(String processorName);
71:
72: /**
73: * Gets the {@link TriggerProperty}s.
74: *
75: * @return The {@link TriggerProperty}s.
76: * @since 1.1.0
77: */
78: List<TriggerProperty> getTriggerProperties();
79:
80: /**
81: * Gets the {@link TriggerProperty} by the name.
82: *
83: * @param name The {@link TriggerProperty#getName()} to look for.
84: * @return The found {@link TriggerProperty} or {@code null}.
85: * @since 1.5.0
86: */
87: TriggerProperty getTriggerProperty(String name);
88:
89: /**
90: * Sets the {@link TriggerProperty}s.
91: *
92: * @param triggerProperties The {@link TriggerProperty}s.
93: * @since 1.1.0
94: */
95: void setTriggerProperties(List<TriggerProperty> triggerProperties);
96:
97: }