Package: MfaOptionFactoryImpl
MfaOptionFactoryImpl
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MfaOptionFactoryImpl() |
|
|
|
|
|
||||||||||||||||||||
clone(MfaOption) |
|
|
|
|
|
||||||||||||||||||||
newCreator(KapuaId) |
|
|
|
|
|
||||||||||||||||||||
newCreator(KapuaId, KapuaId, String) |
|
|
|
|
|
||||||||||||||||||||
newEntity(KapuaId) |
|
|
|
|
|
||||||||||||||||||||
newListResult() |
|
|
|
|
|
||||||||||||||||||||
newMfaOption(KapuaId, KapuaId, String) |
|
|
|
|
|
||||||||||||||||||||
newQuery(KapuaId) |
|
|
|
|
|
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.KapuaEntityCloneException;
16: import org.eclipse.kapua.locator.KapuaProvider;
17: import org.eclipse.kapua.model.id.KapuaId;
18: import org.eclipse.kapua.service.authentication.credential.mfa.MfaOption;
19: import org.eclipse.kapua.service.authentication.credential.mfa.MfaOptionCreator;
20: import org.eclipse.kapua.service.authentication.credential.mfa.MfaOptionFactory;
21: import org.eclipse.kapua.service.authentication.credential.mfa.MfaOptionListResult;
22: import org.eclipse.kapua.service.authentication.credential.mfa.MfaOptionQuery;
23:
24: /**
25: * {@link MfaOptionFactory} implementation.
26: */
27: @KapuaProvider
28: public class MfaOptionFactoryImpl implements MfaOptionFactory {
29:
30: @Override
31: public MfaOptionCreatorImpl newCreator(KapuaId scopeId, KapuaId userId, String mfaSecretKey) {
32: return new MfaOptionCreatorImpl(scopeId, userId, mfaSecretKey);
33: }
34:
35: @Override
36: public MfaOptionListResult newListResult() {
37: return new MfaOptionListResultImpl();
38: }
39:
40: @Override
41: public MfaOption newEntity(KapuaId scopeId) {
42: return new MfaOptionImpl(scopeId);
43: }
44:
45: @Override
46: public MfaOption newMfaOption(KapuaId scopeId, KapuaId userId, String mfaSecretKey) {
47: return new MfaOptionImpl(scopeId, userId, mfaSecretKey);
48: }
49:
50: @Override
51: public MfaOptionQuery newQuery(KapuaId scopeId) {
52: return new MfaOptionQueryImpl(scopeId);
53: }
54:
55: @Override
56: public MfaOptionCreator newCreator(KapuaId scopeId) {
57: return new MfaOptionCreatorImpl(scopeId);
58: }
59:
60: @Override
61: public MfaOption clone(MfaOption mfaOption) {
62: try {
63: return new MfaOptionImpl(mfaOption);
64: } catch (Exception e) {
65: throw new KapuaEntityCloneException(e, MfaOption.TYPE, mfaOption);
66: }
67: }
68: }