Package: UserRegistrationDSComponent

UserRegistrationDSComponent

nameinstructionbranchcomplexitylinemethod
UserRegistrationDSComponent()
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%
activate(ComponentContext)
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%
deactivate(ComponentContext)
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%
getRealmService()
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%
getRegistryService()
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%
setRealmService(RealmService)
M: 9 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
setRegistryService(RegistryService)
M: 9 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
unsetRealmService(RealmService)
M: 9 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
unsetRegistryService(RegistryService)
M: 9 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * Copyright (c) 2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3: *
4: * WSO2 Inc. licenses this file to you under the Apache License,
5: * Version 2.0 (the "License"); you may not use this file except
6: * in compliance with the License.
7: * You may obtain a copy of the License at
8: *
9: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing,
12: * software distributed under the License is distributed on an
13: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14: * KIND, either express or implied. See the License for the
15: * specific language governing permissions and limitations
16: * under the License.
17: */
18:
19: package org.wso2.carbon.identity.user.registration.internal;
20:
21: import org.apache.commons.logging.Log;
22: import org.apache.commons.logging.LogFactory;
23: import org.osgi.service.component.ComponentContext;
24: import org.wso2.carbon.registry.core.service.RegistryService;
25: import org.wso2.carbon.user.core.service.RealmService;
26:
27:
28: /**
29: * @scr.component name="usermgt.component"" immediate="true"
30: * @scr.reference name="registry.service"
31: * interface="org.wso2.carbon.registry.core.service.RegistryService"
32: * cardinality="1..1" policy="dynamic" bind="setRegistryService"
33: * unbind="unsetRegistryService"
34: * @scr.reference name="user.realmservice.default"
35: * interface="org.wso2.carbon.user.core.service.RealmService"
36: * cardinality="1..1" policy="dynamic" bind="setRealmService"
37: * unbind="unsetRealmService"
38: */
39: public class UserRegistrationDSComponent {
40:
41: private static final Log log = LogFactory.getLog(UserRegistrationDSComponent.class);
42:
43: private static RegistryService registryService = null;
44: private static RealmService realmService = null;
45:
46: public static RegistryService getRegistryService() {
47: return registryService;
48: }
49:
50: protected void setRegistryService(RegistryService registryService) {
51:• if (log.isDebugEnabled()) {
52: log.info("Setting the Registry Service");
53: }
54: UserRegistrationDSComponent.registryService = registryService;
55: }
56:
57: public static RealmService getRealmService() {
58: return realmService;
59: }
60:
61: protected void setRealmService(RealmService realmService) {
62:• if (log.isDebugEnabled()) {
63: log.info("Setting the Realm Service");
64: }
65: UserRegistrationDSComponent.realmService = realmService;
66: }
67:
68: protected void activate(ComponentContext ctxt) {
69: log.debug("UserRegistration bundle is activated ");
70: }
71:
72: protected void deactivate(ComponentContext ctxt) {
73: log.debug("UserRegistration bundle is deactivated ");
74: }
75:
76: protected void unsetRegistryService(RegistryService registryService) {
77:• if (log.isDebugEnabled()) {
78: log.info("Unsetting the Registry Service");
79: }
80: UserRegistrationDSComponent.registryService = null;
81: }
82:
83: protected void unsetRealmService(RealmService realmService) {
84:• if (log.isDebugEnabled()) {
85: log.info("Unsetting the Realm Service");
86: }
87: UserRegistrationDSComponent.realmService = null;
88: }
89:
90: }