Refine search
public LevelFactory resolve() { if(factory.isUnsatisfied()){ return defFactory; }else{ return factory.get(); } } }
public LevelFactory resolve() { if(factory.isUnsatisfied()){ return defFactory; }else{ return factory.get(); } } }
@Inject public SSHKeyAuthenticatorImpl(final SSHKeyStoreService keyStoreService, final Instance<WorkbenchUserManager> workbenchUserManagerInstance) { this.keyStoreService = keyStoreService; if (!workbenchUserManagerInstance.isUnsatisfied() && !workbenchUserManagerInstance.isAmbiguous()) { this.userManager = workbenchUserManagerInstance.get(); } else { LOGGER.warn("Cannot find any implementation of 'WorkbenchUserManager'. Loading default implementation on SSH module"); this.userManager = this::getUser; } }
private CacheContainer getCacheContainer(Set<Annotation> qualifiers) { Instance<EmbeddedCacheManager> cacheContainer = cacheManagers.select(qualifiers.toArray(Reflections.EMPTY_ANNOTATION_ARRAY)); if (cacheContainer.isUnsatisfied()) { return defaultCacheContainer; } else { return cacheContainer.get(); } }
@Override public String getId() { if( delegate.isUnsatisfied() ) { return UNKNOWN_SESSION_ID; } // default try { return delegate.get().getId(); } catch ( Exception e ) { return UNKNOWN_SESSION_ID; } }
@Inject public void setExecutorService(Instance<ExecutorService> executorService) { if (!executorService.isUnsatisfied()) { super.setExecutorService(executorService.get()); } }
@Override public boolean hasRole(String role) { if (request.isUnsatisfied()) { return request.get().isUserInRole(role); } return getRoles().contains(role); }
private Authenticator getAuthenticator() throws AuthenticationException { Authenticator authenticator = authenticatorInstance.isUnsatisfied() ? idmAuthenticatorInstance.get() : authenticatorInstance.get(); if (authenticator == null) { throw new AuthenticationException("No Authenticator has been configured."); } return authenticator; }
@Override public boolean hasRole(String role) { if (request.isUnsatisfied()) { return request.get().isUserInRole(role); } return getRoles().contains(role); }
@PostConstruct private void init() { if (authService.isUnsatisfied()) { instance = new DummyAuthenticationService(); } else { instance = authService.get(); } }
private String getIdentifier() { if (identity.isUnsatisfied()) { return "system"; } try { return identity.get().getIdentifier(); } catch (ContextNotActiveException e) { return "system"; } } }
private Authenticator getAuthenticator() throws AuthenticationException { Authenticator authenticator = authenticatorInstance.isUnsatisfied() ? idmAuthenticatorInstance.get() : authenticatorInstance.get(); if (authenticator == null) { throw new AuthenticationException("No Authenticator has been configured."); } return authenticator; }
@Produces @Customizable public PreferenceScopeTypes preferenceScopeTypesProducer() { if (this.preferenceScopeTypes.isUnsatisfied()) { return defaultPreferenceScopeTypes; } return this.preferenceScopeTypes.get(); } }
@Produces @RequestScoped public PermissionManager producePermissionManager() { if (this.defaultPartition.isUnsatisfied() || this.defaultPartition.get() == null) { return this.partitionManager.createPermissionManager(); } return this.partitionManager.createPermissionManager(this.defaultPartition.get()); }
@Test(dataProvider = ARQUILLIAN_DATA_PROVIDER) @SpecAssertion(section = Sections.PROCESS_BEAN_ATTRIBUTES, id = "bf") public void testAppDeployedAndBeanIsAvailable(Instance<Qux> quxInstance) { Assert.assertFalse(quxInstance.isUnsatisfied()); Assert.assertTrue(quxInstance.get().ping()); }
@Inject public void init() { if (levelInstance.isUnsatisfied()) { defaultSecurityLevel = lfr.resolve().createLevel(DEFAULT_SECURITY_LEVEL); } else { defaultSecurityLevel = levelInstance.get(); } }
protected Provider getTokenProvider() { if (this.tokenProvider.isAmbiguous()) { throw new AuthenticationException("You must provide exactly one " + Provider.class.getName() + " implementation."); } if (!this.tokenProvider.isUnsatisfied()) { return this.tokenProvider.get(); } return null; }
protected Consumer getTokenConsumer() { if (this.tokenConsumer.isAmbiguous()) { throw new AuthenticationException("You must provide exactly one " + Consumer.class.getName() + " implementation."); } if (!this.tokenConsumer.isUnsatisfied()) { return this.tokenConsumer.get(); } return null; }
@Inject public void init() { if (levelInstance.isUnsatisfied()) { defaultSecurityLevel = lfr.resolve().createLevel(DEFAULT_SECURITY_LEVEL); } else { defaultSecurityLevel = levelInstance.get(); } }
public Messages getMessages() { if (instanceMessage.isUnsatisfied() || instanceMessage.isAmbiguous()) { return new Messages(); } return instanceMessage.get(); } }