private void registerQuickStartSecurityRegistryConfiguration ( ) { if ( bc == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "BundleContext is null, we must be deactivated." ) ; } return ; } if ( urConfigReg != null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "QuickStartSecurityRegistry configuration is already registered." ) ; } return ; } if ( isStringValueUndefined ( config . userName ( ) ) || isStringValueUndefined ( config . userPassword ( ) ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Incomplete configuration. This should already have been reported. Will not register QuickStartSecurityRegistry configuration." ) ; } return ; } if ( config . UserRegistry ( ) != null && config . UserRegistry ( ) . length > 0 ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Other UserRegistryConfiguration are present, will not register the QuickStartSecurityRegistry configuration." ) ; } return ; } if ( ! managementRoles . isEmpty ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Other ManagementRole are present, will not register the QuickStartSecurityRegistry configuration." ) ; } return ; } Dictionary < String , Object > props = buildUserRegistryConfigProps ( ) ; quickStartRegistry = new QuickStartSecurityRegistry ( config . userName ( ) , Password . create ( config . userPassword ( ) ) ) ; urConfigReg = bc . registerService ( UserRegistry . class , quickStartRegistry , props ) ; }
Create register and return the ServiceRegistration for the quick start security UserRegistryConfiguration .