• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hazendaz / scriptable-dataset / #19

27 Aug 2023 02:10AM UTC coverage: 90.291%. Remained the same
#19

push

github

hazendaz
[pom] Override dbunit usage of ojdbc8 with latest 19.20.0.0

old one has a lot of extra junk

93 of 103 relevant lines covered (90.29%)

0.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.33
/src/main/java/de/gmorling/scriptabledataset/ScriptableDataSetConfig.java
1
/*
2
 * scriptable-dataset (https://github.com/hazendaz/scriptable-dataset)
3
 *
4
 * Copyright 2011-2023 Hazendaz.
5
 *
6
 * All rights reserved. This program and the accompanying materials
7
 * are made available under the terms of The Apache Software License,
8
 * Version 2.0 which accompanies this distribution, and is available at
9
 * https://www.apache.org/licenses/LICENSE-2.0.txt
10
 *
11
 * Contributors:
12
 *     Gunnar Morling
13
 *     Hazendaz (Jeremy Landis).
14
 */
15
package de.gmorling.scriptabledataset;
16

17
import de.gmorling.scriptabledataset.handlers.ScriptInvocationHandler;
18

19
import java.util.ArrayList;
20
import java.util.List;
21
import java.util.Objects;
22

23
import lombok.ToString;
24

25
/**
26
 * Configures the usage of one scripting language with a prefix and a list of invocation handlers.
27
 *
28
 * @author Gunnar Morling
29
 */
30
@ToString
×
31
public class ScriptableDataSetConfig {
32

33
    /** The prefix. */
34
    private final String prefix;
35

36
    /** The language name. */
37
    private final String languageName;
38

39
    /** The handlers. */
40
    private final List<ScriptInvocationHandler> handlers = new ArrayList<>();
1✔
41

42
    /**
43
     * Creates a new ScriptableDataSetConfig.
44
     *
45
     * @param languageName
46
     *            The name of the language as expected by the JSR 223 scripting engine manager, e.g. "jruby". May not be
47
     *            null.
48
     * @param prefix
49
     *            A prefix, which shall precede fields in a ScriptableDataSet in that language, e.g. "jruby:". May not
50
     *            be null.
51
     */
52
    public ScriptableDataSetConfig(String languageName, String prefix) {
53
        this(languageName, prefix, null);
1✔
54
    }
1✔
55

56
    /**
57
     * Creates a new ScriptableDataSetConfig.
58
     *
59
     * @param languageName
60
     *            The name of the language as expected by the JSR 223 scripting engine manager, e.g. "jruby". May not be
61
     *            null.
62
     * @param prefix
63
     *            A prefix, which shall precede fields in a ScriptableDataSet in that language, e.g. "jruby:". May not
64
     *            be null.
65
     * @param handlers
66
     *            An optional list with handlers to be applied for fields with the given prefix.
67
     */
68
    public ScriptableDataSetConfig(String languageName, String prefix, List<ScriptInvocationHandler> handlers) {
69

70
        super();
1✔
71

72
        Objects.requireNonNull(languageName);
1✔
73
        Objects.requireNonNull(prefix);
1✔
74

75
        this.prefix = prefix;
1✔
76
        this.languageName = languageName;
1✔
77

78
        if (handlers != null) {
1✔
79
            this.handlers.addAll(handlers);
1✔
80
        }
81
    }
1✔
82

83
    /**
84
     * Gets the prefix.
85
     *
86
     * @return the prefix
87
     */
88
    public String getPrefix() {
89
        return prefix;
1✔
90
    }
91

92
    /**
93
     * Gets the language name.
94
     *
95
     * @return the language name
96
     */
97
    public String getLanguageName() {
98
        return languageName;
1✔
99
    }
100

101
    /**
102
     * Gets the handlers.
103
     *
104
     * @return the handlers
105
     */
106
    public List<ScriptInvocationHandler> getHandlers() {
107
        return handlers;
1✔
108
    }
109

110
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc