Class EmailConnectionView
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<ViewLayout>
io.jmix.flowui.view.View<ViewLayout>
io.jmix.flowui.view.StandardView
io.jmix.emailflowui.view.emailconnection.EmailConnectionView
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasStyle,com.vaadin.flow.router.AfterNavigationObserver,com.vaadin.flow.router.BeforeEnterObserver,com.vaadin.flow.router.BeforeLeaveObserver,com.vaadin.flow.router.HasDynamicTitle,com.vaadin.flow.router.internal.AfterNavigationHandler,com.vaadin.flow.router.internal.BeforeEnterHandler,com.vaadin.flow.router.internal.BeforeLeaveHandler,FacetOwner,FragmentOwner,Serializable
@Route(value="email/connection",
layout=DefaultMainViewParent.class)
@RouteAlias(value="email/token",
layout=DefaultMainViewParent.class)
@ViewController(id="email_connectionView")
@ViewDescriptor(path="email-connection-view.xml")
public class EmailConnectionView
extends StandardView
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.flowui.view.View
View.AfterCloseEvent, View.BeforeCloseEvent, View.BeforeShowEvent, View.InitEvent, View.PostReadyEvent, View.QueryParametersChangeEvent, View.ReadyEvent, View.RestoreComponentsStateEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JmixDetailsprotected JmixButtonprotected org.springframework.beans.factory.ObjectProvider<OAuth2AuthorizationCodeFlow> protected com.vaadin.flow.component.html.Spanprotected static final intprotected JmixButtonprotected org.springframework.beans.factory.ObjectProvider<OAuth2DeviceCodeFlow> protected Dialogsprotected EmailConnectionTesterprotected EmailerPropertiesprotected EmailRefreshTokenManagerprotected com.vaadin.flow.component.html.Spanprotected org.springframework.boot.mail.autoconfigure.MailPropertiesprotected Messagesprotected Notificationsprotected InstanceLoader<RefreshToken> protected TypedTextField<String> protected SecureRandomprotected com.vaadin.flow.component.html.Spanprotected com.vaadin.flow.component.html.Spanprotected static final Stringprotected static final intprotected static final intprotected com.vaadin.flow.component.html.Span -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected BackgroundTask<Integer, Void> protected Stringprotected voidvoidonAuthCodeConnectButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) voidonDeviceCodeConnectButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) protected voidonDeviceCodePoll(OAuth2DeviceCodeSession session, com.vaadin.flow.component.html.Span status, com.vaadin.flow.component.dialog.Dialog dialog) voidonInit(View.InitEvent event) voidvoidonTestConnectionButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) voidprotected voidprotected com.vaadin.flow.shared.RegistrationregisterPollListener(com.vaadin.flow.component.UI ui, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.PollEvent> listener) protected StringReturns the redirect URI configured by 'jmix.email.oauth2.redirect-uri' or derives it from the current request and the callback view route.protected voidsetStatusBadge(String messageKey, @Nullable String themeVariant) protected voidshowConnectionFailedNotification(String errorMessage) protected StringtokenSuffix(String tokenValue) Returns the last characters of the token for diagnostic identification.Methods inherited from class io.jmix.flowui.view.View
addAfterCloseListener, addApplicationListeners, addBeforeCloseListener, addBeforeShowListener, addInitListener, addQueryParametersChangeListener, addReadyListener, addRestoreComponentsStateEventListener, afterNavigation, beforeEnter, beforeLeave, close, close, closeWithDefaultAction, configureDialogWindowFooter, configureDialogWindowHeader, getApplicationContext, getEventBus, getId, getPageTitle, getReturnParameters, getViewActions, getViewAttributes, getViewData, getViewFacets, getViewSupport, isPreventBrowserTabClosing, onAttach, onAttachInternal, onDetach, onDetachInternal, processBeforeEnterInternal, removeApplicationListeners, removeViewAttributes, setAfterNavigationHandler, setApplicationContext, setId, setPageTitle, setPreventBrowserTabClosing, setViewActions, setViewData, setViewFacets, unregisterBackNavigationMethods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElement, initContentMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, fireEvent, from, get, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setTestId, setVisible, whenAttachedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
DEVICE_CODE_POLL_INTERVAL_MS
protected static final int DEVICE_CODE_POLL_INTERVAL_MS- See Also:
-
TEST_CONNECTION_TIMEOUT_SEC
protected static final int TEST_CONNECTION_TIMEOUT_SEC- See Also:
-
STORED_TOKEN_PLACEHOLDER
- See Also:
-
TOKEN_SUFFIX_LENGTH
protected static final int TOKEN_SUFFIX_LENGTH- See Also:
-
statusBadge
-
typeValue
-
mailboxValue
-
serverValue
-
connectHint
-
advancedDetails
-
refreshTokenValueField
-
deviceCodeConnectButton
-
authCodeConnectButton
-
refreshTokenDl
-
dialogs
-
notifications
-
emailRefreshTokenManager
-
emailConnectionTester
-
messages
-
emailerProperties
-
mailProperties
@Autowired protected org.springframework.boot.mail.autoconfigure.MailProperties mailProperties -
deviceCodeFlows
@Autowired protected org.springframework.beans.factory.ObjectProvider<OAuth2DeviceCodeFlow> deviceCodeFlows -
authorizationCodeFlows
@Autowired protected org.springframework.beans.factory.ObjectProvider<OAuth2AuthorizationCodeFlow> authorizationCodeFlows -
secureRandom
-
-
Constructor Details
-
EmailConnectionView
public EmailConnectionView()
-
-
Method Details
-
onInit
-
initConnectionInfo
protected void initConnectionInfo() -
buildServerInfo
-
setStatusBadge
-
onDeviceCodeConnectButtonClick
@Subscribe("deviceCodeConnectButton") public void onDeviceCodeConnectButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) -
onAuthCodeConnectButtonClick
@Subscribe("authCodeConnectButton") public void onAuthCodeConnectButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) -
onUpdateRefreshTokenAction
@Subscribe("updateRefreshTokenAction") public void onUpdateRefreshTokenAction(ActionPerformedEvent event) -
onTestConnectionButtonClick
@Subscribe("testConnectionButton") public void onTestConnectionButtonClick(com.vaadin.flow.component.ClickEvent<JmixButton> event) -
createTestConnectionTask
-
onRefreshTokenDcItemChange
@Subscribe(id="refreshTokenDc", target=DATA_CONTAINER) public void onRefreshTokenDcItemChange(InstanceContainer.ItemChangeEvent<RefreshToken> event) -
tokenSuffix
Returns the last characters of the token for diagnostic identification. Nothing is revealed for short values so that a manually entered test value is not half-exposed. -
openDeviceCodeDialog
-
onDeviceCodePoll
protected void onDeviceCodePoll(OAuth2DeviceCodeSession session, com.vaadin.flow.component.html.Span status, com.vaadin.flow.component.dialog.Dialog dialog) -
registerPollListener
protected com.vaadin.flow.shared.Registration registerPollListener(com.vaadin.flow.component.UI ui, com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.PollEvent> listener) -
showConnectionFailedNotification
-
generateState
-
resolveRedirectUri
Returns the redirect URI configured by 'jmix.email.oauth2.redirect-uri' or derives it from the current request and the callback view route.
-