An EMAssemblerViewController is a simple controller that is registered as the EMConnectionManagerDelegate. It parses the response object of the Assembler and manages the construction and display of the returned object. Each instance of EMAssemblerViewController maintains an instance of an EMAdaptorManager object that registers as UICollectionViewDataSource and UICollectionViewDelegate. EMAssemblerViewController also exposes an interface for EMContentItemAdaptors to submit actions to the Assembler.

Interface
//Implements <EMConnectionManagerDelegate>
//Basic interface for submitting action
- (void)loadPageForAction:(EMAction *)pAction;

//Basic interface for submitting action with adaptor attributes
- (void)loadPageForAction:(EMAction *)pAction withAttributes:(NSDictionary *)pAttributes;

//Interface for reloading a page and returning to a particular content item
//For instance, from a modal guided nav content item where you want to submit
//the refinement and stay in the modal guided nav view
- (void)reloadPageForAction:(EMAction *)pAction contentsAtPath:(NSString *)pContentPath;

//Reload but also pass through some adaptor attributes
- (void)reloadPageForAction:(EMAction *)pAction contentsAtPath:(NSString *)pContentPath attributes:(NSDictionary *)pAttributes;

//Basic reload interface, reloads don't muck with content offset like loads do
- (void)reloadPageForAction:(EMAction *)pAction;

//Basic reload with additional param for passing through some adaptor attributes
- (void)reloadPageForAction:(EMAction *)pAction withAttributes:(NSDictionary *)pAttributes;

//If you have a content item list already and you want to render it use this interface
//Can be used as an extension point if you dont want to use the dynamic layout stuff

- (void)loadPageForContents:(EMContentItemList *)pContentItemList;

//If you have a content item already and you want to render it use this interface
//Can be used as an extension point if you dont want to us the dynamic layout stuff

- (void)loadPageForContentItem:(EMContentItem *)pContentItem;

//Called after the collection view is ready to be displayed
//extension point for any last minute collection view adjustments
//The dataReadyBlockQueue is emptied in this method

- (void)dataReady;

//The default parser here is the EMJSONParser if you want to use a custom parser
//Subclass and use it here.

- (EMContentItem *)parseResponseObject:(id)pResponseObject;

//Extension point for using a custom EMConnectionManager
- (EMConnectionManager*) connectionManager;

//Extension point for adding your own EMAdaptorManager
@property (nonatomic, strong) EMAdaptorManager *adaptorManager;

//Extension point for adding your own UICollectionView
@property (nonatomic, strong) UICollectionView *collectionView;

//The rootContentItem is useful when going back from a piece of
//renderer subcontent on a modal, you can reload with the rootContentItem

@property (nonatomic, strong) EMContentItem *rootContentItem;

//If you are reloading a page and need to renderer starting from a certain
//Content item use this property to set the content path.
@property (nonatomic, strong) NSString *reloadContentPath;

//The most recent action

@property (nonatomic, strong) EMAction *currentAction;

//A queue of void(^foo)(void) blocks, they will be executed and removed from the
//queue in the viewWillAppear: method

@property (nonatomic, strong) EMBlockQueue *viewWillAppearBlockQueue;

//A queue of void(^foo)(void) blocks, they will be executed and removed from the
//queue in the dataReady method

@property (nonatomic, strong) EMBlockQueue *dataReadyBlockQueue;

Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices