Indivo Framework (iOS)
An iOS framework for Apps connecting to Indivo server
 All Classes Functions Variables Properties Pages
Instance Methods | Class Methods | Properties | List of all members
IndivoAppDocument Class Reference

An app- and optionally record specific document with any XML structure. More...

#import <IndivoAppDocument.h>

Inherits IndivoDocument.

Instance Methods

(void) - delete:
 
- Instance Methods inherited from IndivoDocument
(void) - archive:forReason:callback:
 Archive (or unarchive) a document for the given reason. More...
 
(NSString *) - basePostPath
 The base path, e.g. More...
 
(id) - cachedObjectOfType:
 Retrieves the object for a given type from cache. More...
 
(BOOL) - cacheObject:asType:error:
 Caches the object for a given type. More...
 
(NSString *) - documentPath
 The path to this document, i.e. More...
 
(void) - fetchMetaDocumentWithCallback:
 Fetches the meta document for this document. More...
 
(void) - fetchStatusHistoryWithCallback:
 Fetch the document's version history. More...
 
(void) - fetchVersionsWithCallback:
 Fetch the document's version history. More...
 
(BOOL) - hasStatus:
 
(id) - initFromNode:forRecord:withMeta:
 The designated initializer. More...
 
(BOOL) - isLatest
 
(void) - pull:
 
(void) - push:
 This method puts a new document on the server. More...
 
(void) - replace:
 This method updates the receiver's version on the server with new data from the receiver's properties. More...
 
(void) - setLabel:callback:
 Label a document. More...
 
(void) - updateWithMeta:
 This method updates our udid, type and status from the given meta document. More...
 
(void) - void:forReason:callback:
 Void (or unvoid) a document for a given reason. More...
 
- Instance Methods inherited from IndivoAbstractDocument
(NSString *) - documentXML
 Returns an XML representation of the receiver, like "xml" does, but adds namespace information. More...
 
(NSString *) - flatDocumentXML
 Returns the Indivo 2.0 flat XML format for a document. More...
 
(NSString *) - flatXML
 Returns the Indivo 2.0 flat XML format. More...
 
(id) - initFromNode:forRecord:
 The designated initializer, initializes an instance from an XML node. More...
 
- Instance Methods inherited from INServerObject
(void) - forceNotOnServer
 This is provided for subclasses, the fact that onServer is readonly but settable by this and markOnServer underlines the fact that you should only change this property when you know what you're doing. More...
 
(void) - get:callback:
 Shortcut for GETting data. More...
 
(void) - get:parameters:callback:
 Shortcut for GETting data with parameters. More...
 
(id) - initFromNode:withServer:
 The designated initializer. More...
 
(BOOL) - is:
 Shortcut method to test if the document has the given ID. More...
 
(void) - markOnServer
 Sets onServer to YES for the receiver. More...
 
(void) - performMethod:withBody:orParameters:httpMethod:callback:
 The basic method to perform REST methods on the server with App credentials. More...
 
(void) - post:body:callback:
 Shortcut for POSTing body data. More...
 
(void) - post:parameters:callback:
 Shortcut for POSTing parameters. More...
 
(void) - put:body:callback:
 Shortcut for PUTting data. More...
 

Class Methods

(id) + newOnServer:
 
- Class Methods inherited from IndivoDocument
(id) + cachedObjectOfType:forId:
 Retrieves the cached object of a given type for a given document udid. More...
 
(BOOL) + cacheObject:asType:forId:error:
 Stores an object of a given type for the document of the given udid. More...
 
(Class) + documentClassForType:
 Returns the class for a previously registered type, or "IndivoDocument" if the type has not been registered. More...
 
(NSString *) + fetchReportPathForRecord:
 The base path to get reports for documents of this class. More...
 
(void) + registerDocumentClass:
 Our IndivoDocument subclasses call this in their +load method. More...
 
(NSString *) + reportType
 This name is used to construct the report path for this kind of document. More...
 
- Class Methods inherited from IndivoAbstractDocument
(Class) + classForProperty:
 Returns the class of a property from the property map dictionary. More...
 
(NSString *) + nameSpace
 
(id) + newWithRecord:
 To get a new instance that must be pushed to the server. More...
 
(NSDictionary *) + propertyClassMapper
 The automatically generated IndivoDocument subclasses return a dictionary with property->class mappings. More...
 
(BOOL) + useFlatXMLFormat
 Implementing this to have some flexibility about the XML format to use on the road to Indivo 2.0, default implementation returns YES. More...
 

Properties

INXMLNodetree
 
- Properties inherited from IndivoDocument
IndivoPrincipalcreator
 The creator of the document. More...
 
INDocumentStatus documentStatus
 This document's status. More...
 
BOOL fetched
 YES if the document has been fetched from the server. More...
 
NSString * label
 This document's label. More...
 
NSString * uuidLatest
 The udid of the latest document of the receiver. More...
 
NSString * uuidOriginal
 The udid of the original document, if the receiver replaced a document. More...
 
NSString * uuidReplaces
 The udid of the replaced document, if the receiver replaced a document. More...
 
- Properties inherited from IndivoAbstractDocument
IndivoCreated * created
 
NSString * nameSpace
 The namespace. More...
 
IndivoRecordrecord
 The owning record. If you change this on documents fetched from the server, you will get errors. More...
 
IndivoSuppressed * suppressed
 
- Properties inherited from INServerObject
BOOL onServer
 Indicates whether this document lives on the server. More...
 
IndivoServerserver
 Our beloved server. More...
 
NSString * uuid
 This object's udid. More...
 

Additional Inherited Members

- Protected Attributes inherited from INObject
NSString * _nodeName
 

Detailed Description

An app- and optionally record specific document with any XML structure.

This document holds one "tree" property, which is an INXMLNode. Work with this tree to add/change/remove data to the tree. Only the child nodes of the tree will make it into the document, so don't set attributes on "tree" itself, they will be ignored. Working with the tree directly is rather cumbersome, but gives you the most freedom.

Method Documentation

- (void) delete: (INCancelErrorBlock)  callback
+ (id) newOnServer: (IndivoServer *)  aServer

Property Documentation

- (INXMLNode *) tree
readwritenonatomicstrong

The documentation for this class was generated from the following files: