Skip to content

Package: ScratchCodeCreatorImpl

ScratchCodeCreatorImpl

nameinstructionbranchcomplexitylinemethod
ScratchCodeCreatorImpl(KapuaId)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
ScratchCodeCreatorImpl(KapuaId, KapuaId, String)
M: 10 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
getCode()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getMfaOptionId()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
setCode(String)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setMfaOptionId(KapuaId)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2020, 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.authentication.credential.mfa.shiro;
14:
15: import org.eclipse.kapua.commons.model.AbstractKapuaEntityCreator;
16: import org.eclipse.kapua.model.id.KapuaId;
17: import org.eclipse.kapua.service.authentication.credential.mfa.ScratchCode;
18: import org.eclipse.kapua.service.authentication.credential.mfa.ScratchCodeCreator;
19:
20: /**
21: * {@link ScratchCode} creator implementation.
22: */
23: public class ScratchCodeCreatorImpl extends AbstractKapuaEntityCreator<ScratchCode> implements ScratchCodeCreator {
24:
25: private static final long serialVersionUID = 3925204275937566004L;
26:
27: private String code;
28: private KapuaId mfaOptionId;
29:
30: /**
31: * Constructor
32: *
33: * @param scopeId scope identifier
34: * @param mfaOptionId MfaOption identifier
35: * @param code
36: */
37: public ScratchCodeCreatorImpl(KapuaId scopeId, KapuaId mfaOptionId, String code) {
38: super(scopeId);
39: this.mfaOptionId = mfaOptionId;
40: this.code = code;
41: }
42:
43: public ScratchCodeCreatorImpl(KapuaId scopeId) {
44: super(scopeId);
45: }
46:
47: @Override
48: public KapuaId getMfaOptionId() {
49: return this.mfaOptionId;
50: }
51:
52: @Override
53: public void setMfaOptionId(KapuaId mfaOptionId) {
54: this.mfaOptionId = mfaOptionId;
55: }
56:
57: public String getCode() {
58: return code;
59: }
60:
61: public void setCode(String code) {
62: this.code = code;
63: }
64: }