doc
 All Classes Functions Variables Properties
Public Member Functions | Properties
<EMGlobalConfiguration> Protocol Reference

List of all members.

Public Member Functions

(NSString *) - detailEndpointForRecord:
(Class) - recordClass
(Class) - storeClass
(EMSearchQueryDataSource *) - searchDataSourceFromQuery:
(EMLocalCartDataSource *) - cartDataSource
(EMTypeaheadDataSource *) - searchTypeaheadDataSource
(EMSearchQueryDataSource *) - storeDataSource:
(UIViewController *) - searchController
(UIViewController *) - searchResultControllerFromDataSource:
(EMSearchQueryFacetsController *) - facetsControllerFromDataSource:
(UIViewController
< EMObjectDetailController > *) 
- detailController
(UIViewController
< EMObjectDetailController > *) 
- storeInfoController
(EMSearchQueryFacetsController *) - storeLocatorFacetsControllerFromDataSource:
(BOOL) - hasControllerForURI:item:
(UIViewController *) - controllerForNavStateItem:
(UIViewController *) - controllerForURI:item:
(UIViewController *) - controllerFromDataSource:
(NSArray *) - sortOptions
(UIViewController *) - controllerForDetailTab1:
(UIViewController *) - controllerForDetailTab2:
(UIViewController *) - controllerForDetailTab3:
(UIViewController *) - controllerForDetailTab4:

Properties

NSString * typeaheadEndpoint
NSString * searchEndpoint
NSString * storesEndpoint
NSString * reviewsEndpoint
NSString * cartEndpoint
NSString * brandsEndpoint
NSString * twitterOAuthConsumerKey
NSString * twitterOAuthConsumerSecret
NSString * facebookAppKey
NSString * bitlyApiKey
NSString * bitlyLogin

Member Function Documentation

[EMCart sharedCart] is initialized from this configuration

This method is used to configure the mapping between contentItem cartridge ids and their corrensponding UIViewControllers. This is similar to templateconfig.properties in the page builder webapp

Returns a new instance of a detail controller. The setObject: method should be called by the calling code on the detail controller that is returned by this method, passing in a EMRecord or EMProduct object

- (NSString *) detailEndpointForRecord: (EMRecord *)  item

Returns the detail endpoint for a given product. Since there could be different fields used on different items to determine the full URL, the entire EMProduct is passed in so that this logic is pushed to the configuration implementation

For example:
Product *p = (Product *)item;
return [NSString stringWithFormat:"http://example.com/detail.do?styleCode=%@&subCode=%@", p.styleCode, p.subCode];

This value can not be nil. The EMDefaultDetailDataSource class uses this endpoint, and expects a json dictionary in the response.

Returns an instance of a EMSearchQueryFacetsController. This method is meant to be used to set default configuration on the facets controller, such as wether to show breadcrumbs, or whether multi-select is enabled

- (Class) recordClass

Specifies the Class name of an object that is a subclass of EMRecord. The EMRecord subclass is populated with an internal dictionary by the data source.

Returns a new search controller. This does not get used by EMlib, but is inteded to provide the search controller for the search tab and to be called by ecommerceAppDelegate.m

This configuration method is used by the EMSearchQueryTransitionController to get an instance of a search results controller. So, for instance, if the user is at a browse controller (i.e. PBCategoryController) and they click on "Top Rated Items", that might add a dimension value (i.e. Rating:5) to the EMSearchQueryDataSource and requery. If no page builder Content Item is returned from the engine, this method is used to get a search results controller.

Supplies the EMSearchQueryInfiniteScrollController with a typeahead data source

- (Class) storeClass

Specifies the Class name of an object that is a subclass of EMRecord. The EMRecord subclass is populated with an internal dictionary by the data source.

Returns a new instance of a store info controller.


Property Documentation

- (NSString*) bitlyApiKey [read, assign]

If the default twitter/facebook/email message for sharing a product is a long url, it can be shortened using the BitlyUtil class. That class requires an api key and a login name to call the bitly api, which it gets through this configuration method and the next one.

- (NSString*) bitlyLogin [read, assign]

See the bitlyApiKey description.

- (NSString*) brandsEndpoint [read, assign]

Returns the endpoint for a list of brand dimensions, used by the EMDynamicBrandController.

For example: "http://example.com/brands.do";

The response must be in the format: [
  { "title": "A", "values" : [
    { "n": "Acer", "i": "4294596263" }, { "n": "Adobe", "i": "4294596538" }
  ]},
  { "title": "B", "values" : [
    { "n": "Bescor", "i": "4294596103" }, { "n": "Belkin", "i": "4294595959" }
  ]},
]

- (NSString*) cartEndpoint [read, assign]

Returns the cart api endpoint that forms the base url for the Endeca Mobile cart API. The EMLocalCartDataSource uses this endpoint to append methods to, for instance "/cart.getList.json"

For example: "http://example.com/mobilecart";

For more detail on the request parameters and the json response format, see the Endeca API specification document.

- (NSString*) facebookAppKey [read, assign]

App Key for facebook App which publishes to users wall.

- (NSString*) reviewsEndpoint [read, assign]

Returns the reviews api endpoint that forms the base url for the Endeca Mobile search API.

For example: "http://example.com/mobile/reviews/api.json";

For more detail on the request parameters and the json response format, see the Endeca API specification document.

- (NSString*) searchEndpoint [read, assign]

Returns the search api endpoint that forms the base url for the Endeca Mobile search API.

For example: "http://example.com/mobile/api.json";

For more detail on the request parameters and the json response format, see the Endeca API specification document.

- (NSString*) storesEndpoint [read, assign]

Returns the stores api endpoint that forms the base url for the Endeca Mobile search API.

For example: "http://example.com/mobile/stores/api.json";

For more detail on the request parameters and the json response format, see the Endeca API specification document.

- (NSString*) twitterOAuthConsumerKey [read, assign]

The twitter integration requires the user to login using the OAuth specification. The twitter message controller will pop up a webview with a login page explaining that application "XYZ" is requesting approval to send twitter posts through your account. This key is tied to the "XYZ" account.

- (NSString*) twitterOAuthConsumerSecret [read, assign]

The secret key part of the OAuth specification that correspond to the key above.

- (NSString*) typeaheadEndpoint [read, assign]

Used by the EMDynamicKeywordsDataSource.

Supplies the typeahead endpoint as a format string with the %@ string format specifier used as a placeholder for the user's search terms at query time.

For example: "http://example.com/typeahead.do?terms=%@";

This value can be nil.

Currently, the typeaheadEndpoint is expected to return results as two nested JSON arrays:

For example: ["foo", ["food", "fool", "footwear", "football", ...]]


The documentation for this protocol was generated from the following file: