Merge branch 'develop' of gitlab.verizon.com:BPHV_MIPS/mvm_core into develop
This commit is contained in:
commit
6a8ea528d3
@ -13,6 +13,4 @@ import Foundation
|
||||
public var actionType: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
// Temporary fix till server changes
|
||||
public var title: String?
|
||||
}
|
||||
|
||||
@ -15,8 +15,6 @@ import Foundation
|
||||
public var callNumber: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
// Temporary fix till server changes
|
||||
public var title: String?
|
||||
|
||||
public init(callNumber: String) {
|
||||
self.callNumber = callNumber
|
||||
|
||||
@ -13,5 +13,4 @@ import UIKit
|
||||
public var actionType: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public var title: String?
|
||||
}
|
||||
|
||||
@ -13,9 +13,6 @@ public protocol ActionModelProtocol: ModelProtocol {
|
||||
var actionType: String { get }
|
||||
var extraParameters: JSONValueDictionary? { get set }
|
||||
var analyticsData: JSONValueDictionary? { get set }
|
||||
|
||||
// Temporary fix till server changes
|
||||
var title: String? { get set }
|
||||
}
|
||||
|
||||
public extension ActionModelProtocol {
|
||||
|
||||
@ -15,8 +15,6 @@ import Foundation
|
||||
public var appURL: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
// Temporary fix till server changes
|
||||
public var title: String?
|
||||
|
||||
public init(appURL: String) {
|
||||
self.appURL = appURL
|
||||
|
||||
@ -16,9 +16,6 @@ import Foundation
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public var presentationStyle: String?
|
||||
|
||||
// Temporary fix till server changes
|
||||
public var title: String?
|
||||
|
||||
public init(pageType: String) {
|
||||
self.pageType = pageType
|
||||
}
|
||||
|
||||
@ -15,9 +15,6 @@ import Foundation
|
||||
public var browserUrl: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
// Temporary fix till server changes
|
||||
public var title: String?
|
||||
|
||||
|
||||
//TODO: Should be removed in future releases. This should be MF specific.
|
||||
//Missing params
|
||||
|
||||
@ -11,7 +11,6 @@ import Foundation
|
||||
@objcMembers public class ActionPopupModel: ActionModelProtocol {
|
||||
public static var identifier: String = "popup"
|
||||
public var actionType: String = ActionPopupModel.identifier
|
||||
public var title: String?
|
||||
public var pageType: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
|
||||
@ -13,5 +13,4 @@ import UIKit
|
||||
public var actionType: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public var title: String?
|
||||
}
|
||||
|
||||
@ -13,7 +13,6 @@ import UIKit
|
||||
public var actionType: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public var title: String?
|
||||
|
||||
///Optional pageType, if pageType is nil, will start with pageType launchApp
|
||||
public var pageType: String?
|
||||
|
||||
@ -13,5 +13,4 @@ import UIKit
|
||||
public var actionType: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public var title: String?
|
||||
}
|
||||
|
||||
@ -16,7 +16,6 @@ import UIKit
|
||||
public static var identifier: String = "share"
|
||||
|
||||
public var actionType: String = ActionShareModel.identifier
|
||||
public var title: String?
|
||||
public var sharedType: String
|
||||
public var sharedText: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
|
||||
@ -205,19 +205,18 @@ public extension UnkeyedDecodingContainer {
|
||||
// Iterate and decode each.
|
||||
while !containerCopy.isAtEnd {
|
||||
let nestedContainer = try containerCopy.nestedContainer(keyedBy: AnyCodingKey.self)
|
||||
if let identifier = try nestedContainer.decodeIfPresent(String.self, forKey: typeCodingKey) {
|
||||
guard let type = ModelRegistry.getType(for: identifier, with: T.self) else {
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "ModelRegistry Error decoderErrorModelNotMapped: \(identifier)")
|
||||
throw ModelRegistry.Error.decoderErrorModelNotMapped
|
||||
}
|
||||
// Now get the decoder to use for the type
|
||||
let decoder = try self.superDecoder()
|
||||
if let model = try type.init(from: decoder) as? T {
|
||||
models.append(model)
|
||||
} else {
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "ModelRegistry Error decoderError: \(typeCodingKey)")
|
||||
throw ModelRegistry.Error.decoderError
|
||||
}
|
||||
let identifier = try nestedContainer.decode(String.self, forKey: typeCodingKey)
|
||||
guard let type = ModelRegistry.getType(for: identifier, with: T.self) else {
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "ModelRegistry Error decoderErrorModelNotMapped: \(identifier)")
|
||||
throw ModelRegistry.Error.decoderErrorModelNotMapped
|
||||
}
|
||||
// Now get the decoder to use for the type
|
||||
let decoder = try self.superDecoder()
|
||||
if let model = try type.init(from: decoder) as? T {
|
||||
models.append(model)
|
||||
} else {
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "ModelRegistry Error decoderError: \(typeCodingKey)")
|
||||
throw ModelRegistry.Error.decoderError
|
||||
}
|
||||
}
|
||||
return models
|
||||
|
||||
Loading…
Reference in New Issue
Block a user