Commit Graph

46 Commits

Author SHA1 Message Date
Blake Watters
b1a2677937 Eliminate NSData and NSArray additions categories. Kill date formatter wrapper class 2012-09-04 21:43:37 -04:00
Jawwad Ahmad
c70ab49457 Delete @synthesize statements that are no longer needed. (Works with current 4.4.1 release of Xcode). 2012-09-02 12:28:45 -04:00
Blake Watters
2cf16be6cb Add support for performing object mapping with type transformations across relationships defined with keyPaths 2012-08-31 17:47:44 -04:00
Jawwad Ahmad
6f2db23566 Add NSAssert to check the self.mutablePropertyMappings variable. 2012-08-30 18:56:33 -04:00
Blake Watters
eabfd748b6 Update designated initializer for RKObjectMapping 2012-08-29 18:59:51 -04:00
Blake Watters
ce6b0829e4 Convert RestKit to ARC 2012-08-28 17:34:58 -04:00
Blake Watters
2228cb01bb Drop more mapping convenience methods 2012-08-28 14:23:30 -04:00
Blake Watters
b333e62488 Eliminate and/or depecate numerous mapping API's in favor of simpler usage of attribute, relationship, and connection mappings 2012-08-28 14:14:33 -04:00
Blake Watters
d0df342093 Eliminate modern Objective-C dictionary access in favor of method call 2012-08-22 20:08:01 -04:00
Blake Watters
0ff963161f Add addAttributeMappingsFromDictionary: 2012-08-14 09:57:28 -04:00
Blake Watters
a8f64e7982 Continued cleanup related to managed object context work 2012-07-17 13:44:50 -04:00
Blake Watters
b25a1833b3 Ported RestKit to using managed object contexts with concurrency types. Numerous cleanups and API updates. 2012-07-16 22:47:06 -04:00
Blake Watters
f18f9337f3 Added support for comparison of attribute, relationship, and object mappings via isEqualToMapping:. closes #803 2012-07-11 16:16:27 -04:00
Jawwad Ahmad
abb46c382c Ensure the stars for all pointers belong to the variable rather than the type. Refs #614 2012-06-04 22:47:30 -04:00
Jawwad Ahmad
eaa5484b01 Placing opening braces on a new line for methods to match Apple convention. Refs #614
Used uncrustify's "nl_fdef_brace = add" option to detect issues.
2012-06-04 00:36:19 -04:00
Blake Watters
016f13dad0 Convert all tabs to four spaces. refs #743 2012-05-17 18:10:59 -04:00
Blake Watters
fcb973056b Cleanup trailing whitespace. refs #743 2012-05-17 18:00:16 -04:00
Blake Watters
457a6126cf Refresh copyright notices for all source files 2012-04-04 09:08:54 -04:00
Blake Watters
887b4a4743 Added support for configuring objectClass using the class name instead of Class object. 2012-04-03 23:39:43 -04:00
Brian Morton
80103bb6b3 Change test for allowing newly added date formatters priority so that it uses the updated fixture and reversable favoriteDate. Rearrange order of defaultDateFormatters to match their order before changing defaultDateFormatters to being prepended. 2012-03-13 09:43:37 -07:00
Scott Penrose
5b8f1c34d6 Always add default date formatters to start of array to be tried first. RKISO8601DateFormatter will match a lot of different dates and most likely your default date formatter was not getting hit since it was last in the list. 2012-03-01 22:51:13 -05:00
Blake Watters
4d48ef4729 Fixed breakage in OS X support 2012-02-15 17:48:59 -05:00
Blake Watters
3d0f0ab39e Introduced the RKTableController component for iOS.
RKTableController provides a flexible, integrated system for driving iOS table views using
the RestKit object mapping engine. Local domain objects can be mapped into table cells within a
collection or presented for editing as part of a form. There are three flavors of table controllers
available:

* Static Tables: RKTableController can be used to render simple static tables that are composed of RKTableItems
presented in RKTableSections. Table items can quickly be built and added to a table without a backing model
or can have content object mapped into them for presentation.
* Network Tables: RKTableController can also render a table with the results of a network load. The typical use
case here is to have RestKit retrieve a JSON/XML payload from your remote system and then render the content into
a table.
* Core Data Tables: RKFetchedResultsTableController can efficiently drive a table view using objects pulled from a
Core Data managed object context. Typical use-cases here are for the presentation of large collections that are
pulled from a remote system, offering offline access, or speeding up a UI by using Core Data as a fast local cache.

RKTableController supports a number of bells and whistles including integrated searching/filtering and pull to refresh.
2012-02-10 16:30:54 -05:00
Christopher Swasey
886ec75283 Import http://boredzo.org/iso8601parser/ and add it as a defaultDateFormatter for parsing ISO8601 strings. Fixes #438 2012-01-20 15:13:45 -05:00
Blake Watters
6abbb34ef0 Introduced mapping contexts support.
Extended RKObjectMappingProvider to store collections of object mappings for different use cases. The framework
now stores object mappings, serialization mappings, an error mapping and a pagination mapping using the context
support. Contexts can be added to the provider via method calls or extension via a category.
2012-01-20 10:21:19 -05:00
Blake Watters
563f5e909b Updated all example projects to build against the new project. Cleaned up header imports for flattened project structure 2011-12-02 09:26:36 -05:00
Aaron Crespo
6b8ab373ac Update Code/ObjectMapping/RKObjectMapping.m 2011-11-03 16:26:50 -03:00
Blake Watters
586034bae4 Add support for the use of nesting key attributes as the primaryKey in managed mappings.
This bug was causing duplication of objects in the store due to failed lookup of
existing objects. Added fix and test coverage for the use-case.
2011-10-05 10:50:52 -04:00
Blake Watters
91a6e9423e Added convenience methods and docs for mapping NSSet and NSArray attribute collections. fixes #285 2011-09-19 21:03:02 -04:00
Greg Combs
62d7042ebc Merge pull request #334 from parkerboundy/add-apache-license
Add the Apache License to headers (Issue #145) Closes #145.  Thanks @parkerboundy.
2011-09-14 21:56:15 -07:00
Blake Watters
12bacf9be4 Removed references to sharedQueue from Advanced Tutorial sources 2011-09-08 09:38:26 -04:00
Parker
99250475ad added Apache License headers to all files in ObjectMapping directory 2011-09-07 11:31:01 -04:00
Blake Watters
2ccc44954a Configured default locale to en_US_POSIX for default date formatters. closes #273 2011-09-05 17:54:07 -04:00
Blake Watters
54007c78d4 Reworked Brendan Ribera's contributions around time zone handling to eliminate the use of transient
NSDateFormatters, added a preferredDateFormatter for use when serializing dates to strings,
replaced the use of the description method for date encoding to strings with invocation of the
preferredDateFormatter, added new attribute transformation strategy from NSDate -> NSString properties
(also using the preferred date formatter), and provided customization support for date handling globally
and on a per-mapping basis. closes #200, closes #313, closes #309, closes #308
2011-09-05 17:25:43 -04:00
Blake Watters
2e430644d9 Added support for using NSEntityDescription to lookup property types for NSManagedObject attribute and relationships. This enables mapping type transformations on mappings defined against Core Data entities instead of concrete subclasses. fixes #233 2011-08-14 23:21:51 -04:00
Blake Watters
4e03ba7bef Renamed Polymorphic mapping to dynamic mapping after consulting with the community. Dropped abstract superclass in favor of a RKObjectMappingDefinition protocol. Caught missing cases with dynamic object mapping + targetObject. Updated docs and method signatures to reflect the updates. 2011-07-31 19:37:42 -04:00
Blake Watters
670234b775 Added support for polymorphic object mapping (Github #105, #244). This enables you to dynamically map objects to different destination classes or using different mapping strategies via configuration or callbacks. See Docs/Object Mapping.md for details.
Other changes include:
* Eliminated the RKObjectFactory protocol and implementations. Object mapping instances themselves are
now responsible for instantiating target objects for mapping.
* Introduced RKObjectAbstractMapping superclass for RKObjectMapping and RKObjectPolymorphicMapping.
* Updated example applications to use block object loaders (RKTwitter and RKTwitterCoreData)
* Refactored method signatures of RKObjectMapper, RKObjectMapping, and RKObjectMappingProvider to reflect the
existence of abstract mapping types. This was necessary to make polymorphic mappings integrate cleanly.
* Fixed overlap in RestKit error domains between network and object mapping. fixes #208
2011-07-30 16:00:36 -04:00
Blake Watters
e6e528fcf1 Improved the flexibility of the block loaders significantly by allowing them to override the object mapping and routing selection. Made sendObject:method:delegate:block private and introduced public sendObject:delegate:block method instead. Wrote some basic specs for overriding the router. 2011-07-28 13:56:16 -04:00
Blake Watters
6e87cd5ffd Add missing release for rootKeyPath ivar 2011-07-27 07:59:08 -04:00
Blake Watters
570b13ca07 Updated Object Mapping documentation, added support for inferring object mappings based off of the type of the object used in postObject:, putObject:, etc. Made KVC validation optional. 2011-07-23 23:47:03 -04:00
Blake Watters
80366afa84 Added Object Mapping block helpers to RKObjectManager and RKObjectMapping. These enable you to perform ad-hoc object mapping very easily. Extended RKObjectRouter to match on superclasses if no specific route is found. This is helpful when using mocked objects with frameworks like Kiwi. fixes #238 2011-07-23 23:04:16 -04:00
Blake Watters
3dfbaf1810 Updated to support setting default value instead of nil when an attribute is missing in the payload. For Core Data backed models, we consult the entity definition to obtain the default value. closes #117 2011-06-28 15:22:04 -04:00
Blake Watters
64db97ce60 Helper methods for retrieving attribute and relationship mappings by attribute/relationship keyPath. Useful for customizing serialization mappings that were built using inverseMapping. 2011-06-22 10:43:42 -04:00
Blake Watters
3bf4b7bc0f Implemented nested mapping for structures similar to the BuildBot JSON structure. fixes #112 2011-06-17 15:36:28 -04:00
Ed McManus
ecf808af1a Added boolean "reversible" property to RKObjectRelationshipMapping. This can be used to break cyclical
relationships in the object mapping graph. Relationships can be optionally included in an inverse mapping
generation for serialization purposes.
2011-06-11 20:25:28 -04:00
Blake Watters
f3c0995d5e Implementation of Object Mapping 2.0 design:
* Removed RestKit from inheritance hierarchy
  * Mappings are implemented as concrete classes
  * Mapper is much more flexible & powerful
  * Much more robust error handling
  * Serialization is reimplemented as an object mapping operation
  * Added ability to serialize to JSON natively
  * Reworked Core Data integration
  * Simplified the codebase substantially
2011-06-11 19:26:56 -04:00