RKMapperOperationDelegate Protocol Reference
Conforms to | NSObject |
Declared in | RKMapperOperation.h |
Overview
Objects wishing to act as the delegate for RKMapperOperation
objects must adopt the RKMapperOperationDelegate
protocol. The protocol provides a rich set of optional callback methods that provides insight into the lifecycle of a mapper operation.
Tasks
Tracking Mapper Status
-
– mapperWillStartMapping:
Tells the delegate that the mapper operation is about to start mapping.
-
– mapperDidFinishMapping:
Tells the delegate that the mapper has finished.
-
– mapperDidCancelMapping:
Tells the delegate that the mapper has been cancelled.
Key Path Search Messages
-
– mapper:didFindRepresentationOrArrayOfRepresentations:atKeyPath:
Tells the delegate that the mapper has found one or more mappable object representations at a key path specified in the
mappingsDictionary
. -
– mapper:didNotFindRepresentationOrArrayOfRepresentationsAtKeyPath:
Tells the delegate that the mapper failed to find any mappable object representations at a key path specified in the
mappingsDictionary
.
Tracking Child Mapping Operation Status
-
– mapper:willStartMappingOperation:forKeyPath:
Tells the delegate that the mapper is about to start a mapping operation to map a representation found in the
representation
. -
– mapper:didFinishMappingOperation:forKeyPath:
Tells the delegate that a mapping operation that was started by the mapper has finished executing.
-
– mapper:didFailMappingOperation:forKeyPath:withError:
Tells the delegate that a mapping operation that was started by the mapper has failed with an error.
Instance Methods
mapper:didFailMappingOperation:forKeyPath:withError:
Tells the delegate that a mapping operation that was started by the mapper has failed with an error.
- (void)mapper:(RKMapperOperation *)mapper didFailMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath withError:(NSError *)error
Parameters
- mapper
The mapper operation performing the mapping.
- mappingOperation
The mapping operation that has failed.
- keyPath
The key path that was mapped. A
nil
key path indicates that the mapping matched the entirerepresentation
.
- error
The error that occurred during the execution of the mapping operation.
Declared In
RKMapperOperation.h
mapper:didFindRepresentationOrArrayOfRepresentations:atKeyPath:
Tells the delegate that the mapper has found one or more mappable object representations at a key path specified in the mappingsDictionary
.
- (void)mapper:(RKMapperOperation *)mapper didFindRepresentationOrArrayOfRepresentations:(id)dictionaryOrArrayOfDictionaries atKeyPath:(NSString *)keyPath
Parameters
- mapper
The mapper operation performing the mapping.
- dictionaryOrArrayOfDictionaries
The
NSDictictionary
orNSArray
ofNSDictionary
object representations that was found at thekeyPath
.
- keyPath
The key path that the representation was read from in the
representation
. If thekeyPath
was[NSNull null]
in themappingsDictionary
, it will be given asnil
to the delegate.
Declared In
RKMapperOperation.h
mapper:didFinishMappingOperation:forKeyPath:
Tells the delegate that a mapping operation that was started by the mapper has finished executing.
- (void)mapper:(RKMapperOperation *)mapper didFinishMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath
Parameters
- mapper
The mapper operation performing the mapping.
- mappingOperation
The mapping operation that has finished.
- keyPath
The key path that was mapped. A
nil
key path indicates that the mapping matched the entirerepresentation
.
Declared In
RKMapperOperation.h
mapper:didNotFindRepresentationOrArrayOfRepresentationsAtKeyPath:
Tells the delegate that the mapper failed to find any mappable object representations at a key path specified in the mappingsDictionary
.
- (void)mapper:(RKMapperOperation *)mapper didNotFindRepresentationOrArrayOfRepresentationsAtKeyPath:(NSString *)keyPath
Parameters
- mapper
The mapper operation performing the mapping.
- keyPath
The key path that was searched for a mappable object representation.
Declared In
RKMapperOperation.h
mapper:willStartMappingOperation:forKeyPath:
Tells the delegate that the mapper is about to start a mapping operation to map a representation found in the representation
.
- (void)mapper:(RKMapperOperation *)mapper willStartMappingOperation:(RKMappingOperation *)mappingOperation forKeyPath:(NSString *)keyPath
Parameters
- mapper
The mapper operation performing the mapping.
- mappingOperation
The mapping operation that is about to be started.
- keyPath
The key path that was mapped. A
nil
key path indicates that the mapping matched the entirerepresentation
.
Declared In
RKMapperOperation.h
mapperDidCancelMapping:
Tells the delegate that the mapper has been cancelled.
- (void)mapperDidCancelMapping:(RKMapperOperation *)mapper
Parameters
- mapper
The mapper operation that was cancelled.
Declared In
RKMapperOperation.h