@Test public void testResolveOriginDjupintegration() { String res = webcertUserOrigin.resolveOrigin(buildRequest("/visa/intyg/luse/99aaa4f1-d862-4750-a628-f7dcb9c8bac0")); assertEquals("DJUPINTEGRATION", res); }
@Override public String resolveOrigin(HttpServletRequest request) { Assert.notNull(request, "Request required"); DefaultSavedRequest savedRequest = getSavedRequest(request); if (savedRequest == null) { savedRequest = (DefaultSavedRequest) redisSavedRequestCache.getRequest(request, null); if (savedRequest == null) { return UserOriginType.NORMAL.name(); } } String uri = savedRequest.getRequestURI(); if (uri.matches(REGEXP_REQUESTURI_READONLY)) { return UserOriginType.READONLY.name(); } else if (uri.matches(REGEXP_REQUESTURI_DJUPINTEGRATION)) { return UserOriginType.DJUPINTEGRATION.name(); } else if (uri.matches(REGEXP_REQUESTURI_UTHOPP)) { return UserOriginType.UTHOPP.name(); } return UserOriginType.NORMAL.name(); }
WebCertUserOrigin implements UserOrigin { @Override public String resolveOrigin(HttpServletRequest request) { Assert.notNull(request, "Request required"); DefaultSavedRequest savedRequest = getSavedRequest(request); if (savedRequest == null) { savedRequest = (DefaultSavedRequest) redisSavedRequestCache.getRequest(request, null); if (savedRequest == null) { return UserOriginType.NORMAL.name(); } } String uri = savedRequest.getRequestURI(); if (uri.matches(REGEXP_REQUESTURI_READONLY)) { return UserOriginType.READONLY.name(); } else if (uri.matches(REGEXP_REQUESTURI_DJUPINTEGRATION)) { return UserOriginType.DJUPINTEGRATION.name(); } else if (uri.matches(REGEXP_REQUESTURI_UTHOPP)) { return UserOriginType.UTHOPP.name(); } return UserOriginType.NORMAL.name(); } }
WebCertUserOrigin implements UserOrigin { @Override public String resolveOrigin(HttpServletRequest request) { Assert.notNull(request, "Request required"); DefaultSavedRequest savedRequest = getSavedRequest(request); if (savedRequest == null) { savedRequest = (DefaultSavedRequest) redisSavedRequestCache.getRequest(request, null); if (savedRequest == null) { return UserOriginType.NORMAL.name(); } } String uri = savedRequest.getRequestURI(); if (uri.matches(REGEXP_REQUESTURI_READONLY)) { return UserOriginType.READONLY.name(); } else if (uri.matches(REGEXP_REQUESTURI_DJUPINTEGRATION)) { return UserOriginType.DJUPINTEGRATION.name(); } else if (uri.matches(REGEXP_REQUESTURI_UTHOPP)) { return UserOriginType.UTHOPP.name(); } return UserOriginType.NORMAL.name(); }  }
WebCertUserOrigin implements UserOrigin { @Override public String resolveOrigin(HttpServletRequest request) { Assert.notNull(request, "Request required"); DefaultSavedRequest savedRequest = getSavedRequest(request); if (savedRequest == null) { savedRequest = (DefaultSavedRequest) redisSavedRequestCache.getRequest(request, null); if (savedRequest == null) { return UserOriginType.NORMAL.name(); } } String uri = savedRequest.getRequestURI(); if (uri.matches(REGEXP_REQUESTURI_READONLY)) { return UserOriginType.READONLY.name(); } else if (uri.matches(REGEXP_REQUESTURI_DJUPINTEGRATION)) { return UserOriginType.DJUPINTEGRATION.name(); } else if (uri.matches(REGEXP_REQUESTURI_UTHOPP)) { return UserOriginType.UTHOPP.name(); } return UserOriginType.NORMAL.name(); }  @Override String resolveOrigin(HttpServletRequest request); }
WebCertUserOrigin implements UserOrigin { @Override public String resolveOrigin(HttpServletRequest request) { Assert.notNull(request, "Request required"); DefaultSavedRequest savedRequest = getSavedRequest(request); if (savedRequest == null) { savedRequest = (DefaultSavedRequest) redisSavedRequestCache.getRequest(request, null); if (savedRequest == null) { return UserOriginType.NORMAL.name(); } } String uri = savedRequest.getRequestURI(); if (uri.matches(REGEXP_REQUESTURI_READONLY)) { return UserOriginType.READONLY.name(); } else if (uri.matches(REGEXP_REQUESTURI_DJUPINTEGRATION)) { return UserOriginType.DJUPINTEGRATION.name(); } else if (uri.matches(REGEXP_REQUESTURI_UTHOPP)) { return UserOriginType.UTHOPP.name(); } return UserOriginType.NORMAL.name(); }  @Override String resolveOrigin(HttpServletRequest request); static final String REGEXP_REQUESTURI_READONLY; static final String REGEXP_REQUESTURI_DJUPINTEGRATION; static final String REGEXP_REQUESTURI_UTHOPP; }