@Override public SearchUIConfig getSearchUIConfig() { return SearchUIConfig.getInstance(); }
public boolean requiresLogin() { return uiConfig.requiresLogin(); }
public String getAnalyticsId() { return uiConfig.getAnalyticsId(); }
SearchUIConfig searchUIConfig = SearchUIConfig.getInstance(); boolean wantMetadata = false; // search String harvestView; if ( isCentral || ( !isCentral && !searchUIConfig.hasSystemUser() ) ) { harvestView = RepositoryHttpConfig.PUBLISHED_VIEW; } else { localRepoHttpConfig, localNode, searchUIConfig.hasSystemUser(), searchUIConfig.getSystemUser(), searchUIConfig.getSystemPw(), harvestView, wantMetadata); } catch (EIFileException e) { logger.warn( "Problems loading properties file", e);
if ( searchUIConfig.requiresLogin() ) { try { if ( searchUIConfig.hasSystemUser() ) { if ( sessionId == null ) { return authMgr.logIn( loginUrl, ClassRegistry.TIERED_KEY, institutionId, searchUIConfig.getSystemUser(), searchUIConfig.getSystemPw(), true ); return authMgr.logIn( loginUrl, ClassRegistry.TIERED_KEY, sessionId, institutionId, searchUIConfig.getSystemUser(), searchUIConfig.getSystemPw(), true );
protected boolean isSessionValid(final String sessionId, final boolean shouldThrow) { if (SearchUIConfig.getInstance().requiresLogin()) { return authMgr.isValid(sessionId, shouldThrow); } else { final boolean isValid = authMgr.isValid(sessionId, false); if (!isValid) { if (DEBUG) { logger.debug("SessionId with authentication manager no longer valid, relogging in with no auth."); } authMgr.logIn(); } return true; } }
@Override public void logOut(final String sessionId) { try { final RepositoryHttpConfig rconfig = new RepositoryHttpConfig( localNode.getLocalNodeConfig().getNodeUrlString(), true ); final String logoutUrl = rconfig.getFullRepositoryUrl( RepositoryLocale.LOGOUT_URL ); if ( searchUIConfig.requiresLogin() ) { authMgr.logOut( logoutUrl, sessionId ); } else { if ( searchUIConfig.hasSystemUser() ) { authMgr.logOut( logoutUrl, sessionId ); } else { authMgr.logOut( null, sessionId ); } } } catch (RepositoryProviderException rpe) { if (rpe.getExceptionType() == ExternalServiceExceptionType.UNAUTHORIZED) { logger.warn("Authentication failed. Username and/or password is incorrect for the REPOSITORY."); return; } else { logger.error("Error in logout",rpe); } } }
/** * Retrieve external content for display, i.e. navigation on the topPanel. * * Returns the response or null if it has not been intialized properly. * @param contentType * @return */ public String getExternalData(final EIAppsPropertyKeys contentType) { return uiConfig.getExternalContent(contentType); }
public String getLogoLinkURL() { return uiConfig.getEiLogoLinkUrl(); }
public String getContentSiteURL() { return uiConfig.getContentSiteUrl(); }
public String getCentralSearchLink() { return uiConfig.getCentralSearchUrl(); }
public String getExternalData(EIAppsPropertyKeys uiInstitutionNavbarUrl) { return uiConfig.getExternalContent(uiInstitutionNavbarUrl); }
public String getLogoLinkURL() { return uiConfig.getEiLogoLinkUrl(); }
@Override public Boolean hasSession(final String sessionId) { if ( searchUIConfig.requiresLogin() ) { return Boolean.valueOf( authMgr.isValid( sessionId, false ) ); } return Boolean.TRUE; }
public static synchronized StemCellSearchApplicationState getInstance() { if ( INSTANCE == null ) { initializeStemCellSearchApp(SearchUIConfig.getInstance()); log.warning("Creating context with client side UI config object, this is likely to cause NPEs."); } return INSTANCE; }
@Override public void init() { final WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext( getServletContext() ); nodeRegistry = ctx.getBean(NodeRegistryService.class); requiresLogin = searchUIConfig.requiresLogin(); }
public static SearchApplicationContext getInstance() { if (INSTANCE == null) { INSTANCE = new SearchApplicationContext(SearchUIConfig.getInstance()); log.warning("Creating context with client side UI config object. This is likely to cause NPEs."); } return INSTANCE; }