Merge branch 'feature/Restart-requestUrl' into 'develop'

Feature/restart request url

### Summary

Changes are to add requestURL param to restart action object.

### JIRA Ticket

Brand 3.0 - Multi user screen - [ONEAPP-2784](https://onejira.verizon.com/browse/ONEAPP-2784)

Co-authored-by: Sumanth Nadigadda <sumanth.nadigadda@verizon.com>

See merge request https://gitlab.verizon.com/BPHV_MIPS/mvm_core/-/merge_requests/234
This commit is contained in:
Pfeil, Scott Robert 2022-10-25 15:03:37 +00:00
commit 9aaeb1d266
4 changed files with 7 additions and 4 deletions

View File

@ -26,7 +26,7 @@ open class ActionRestartHandler: MVMCoreActionHandlerProtocol {
continuation.resume(throwing: MVMCoreError.errorObject(error))
} else {
// Restarts the app (forcing any passed in page types).
MVMCoreSessionObject.sharedGlobal()?.restartSession(withPageType: model.pageType, parameters: model.extraParameters.toJSON(), clearAllVariables: true)
MVMCoreSessionObject.sharedGlobal()?.restartSession(withPageType: model.pageType, request: model.requestURL, parameters: model.extraParameters?.toJSON(), clearAllVariables: true)
continuation.resume()
}
})

View File

@ -6,6 +6,7 @@
// Copyright © 2020 myverizon. All rights reserved.
//
import Foundation
public struct ActionRestartModel: ActionModelProtocol {
//--------------------------------------------------
@ -14,6 +15,7 @@ public struct ActionRestartModel: ActionModelProtocol {
public static var identifier: String = "restart"
public var actionType: String = ActionRestartModel.identifier
public var requestURL: URL?
public var extraParameters: JSONValueDictionary?
public var analyticsData: JSONValueDictionary?
@ -24,8 +26,9 @@ public struct ActionRestartModel: ActionModelProtocol {
// MARK: - Initializer
//--------------------------------------------------
public init(_ pageType: String? = nil, _ extraParameters: JSONValueDictionary? = nil, _ analyticsData: JSONValueDictionary? = nil) {
public init(_ pageType: String? = nil, _ requestUrl: URL? = nil, _ extraParameters: JSONValueDictionary? = nil, _ analyticsData: JSONValueDictionary? = nil) {
self.pageType = pageType
self.requestURL = requestUrl
self.extraParameters = extraParameters
self.analyticsData = analyticsData
}

View File

@ -36,7 +36,7 @@
- (nullable NSDictionary *)getInitialParametersExcludingSections:(nullable NSSet<NSString *> *)excludeSections;
/// Restarts the application session state. Can clear variables and pass a page type if needed.
- (void)restartSessionWithPageType:(nullable NSString *)pageType parameters:(nullable NSDictionary *)parameters clearAllVariables:(BOOL)clearAllVariables;
- (void)restartSessionWithPageType:(nullable NSString *)pageType requestUrl:(nullable NSURL *)requestUrl parameters:(nullable NSDictionary *)parameters clearAllVariables:(BOOL)clearAllVariables;
/// Redirect, leaving the current app experience.
- (void)redirectWithInfo:(nullable NSDictionary *)dictionary;

View File

@ -36,7 +36,7 @@
return nil;
}
- (void)restartSessionWithPageType:(nullable NSString *)pageType parameters:(nullable NSDictionary *)parameters clearAllVariables:(BOOL)clearAllVariables {
- (void)restartSessionWithPageType:(nullable NSString *)pageType requestUrl:(nullable NSURL *)requestUrl parameters:(nullable NSDictionary *)parameters clearAllVariables:(BOOL)clearAllVariables {
// Clears the singletons of any session related data.
if (clearAllVariables) {
[self clearSessionObject];