You are here

createDocumentWithName

-(void) createDocumentWithName - Create a new document in the target folder using the specified properties.

createDocumentWithName:inParentFolder:contentFile:properties:aspects:completionBlock:progressBlock

-(AlfrescoRequest *) createDocumentWithName:(NSString *)documentName inParentFolder:(AlfrescoFolder *)folder contentFile:(AlfrescoContentFile *)file properties:(NSDictionary *)properties aspects:(NSArray *)aspects completionBlock:(AlfrescoDocumentCompletionBlock)completionBlock progressBlock:(AlfrescoProgressBlock)progressBlock - Create a new document in the target folder using the specified properties. The content for the document is taken from the specified file. If the file parameter is not provided the document is created without content. The list of aspects is optional, if omitted the default aspects will be applied.

Parameters

(NSString *) documentName
The name of the document to create.
(AlfrescoFolder *) folder
The parent folder of the folder to be created.
(AlfrescoContentFile *) file
The contents to be used for the new document.
(NSDictionary *) properties
The properties to be applied to the document.
(NSArray *) aspects
The aspects to be applied to the document. Default aspects will be applied if this parameter is omitted.
(AlfrescoDocumentCompletionBlock) completionBlock
The block that is called with the created document on completion of the operation. The completion block has the format typedef void (^AlfrescoDocumentCompletionBlock)(AlfrescoDocument *document, NSError *error).
(AlfrescoProgressBlock) progressBlock
The block that's called with the upload progress. The block has the format typedef void (^AlfrescoProgressBlock)(NSInteger bytesTransferred, NSInteger bytesTotal).

Returns

(AlfrescoRequest *)

Example




        

createDocumentWithName:inParentFolder:contentStream:properties:aspects:completionBlock:progressBlock

- (AlfrescoRequest *)createDocumentWithName:(NSString *)documentName inParentFolder:(AlfrescoFolder *)folder inputStream:(AlfrescoContentStream *)contentStream properties:(NSDictionary *)properties aspects:(NSArray *)array completionBlock:(AlfrescoDocumentCompletionBlock)completionBlock progressBlock:(AlfrescoProgressBlock)progressBlock; - Create a new document in the target folder using the specified properties. The content for the document is taken from the specified input stream. If the input stream parameter is not provided the document is created without content. The list of aspects is optional, if omitted the default aspects will be applied.

Parameters

(NSString *) documentName
The name of the document to create.
(AlfrescoFolder *) folder
The parent folder of the folder to be created.
(AlfrescoContentStream *) contentStream
The contents from an content stream to be used for the new document.
(NSDictionary *) properties
The properties to be applied to the document.
(NSArray *) aspects
The aspects to be applied to the document. Default aspects will be applied if this parameter is omitted.
(AlfrescoDocumentCompletionBlock) completionBlock
The block that is called with the created document on completion of the operation. The completion block has the format typedef void (^AlfrescoDocumentCompletionBlock)(AlfrescoDocument *document, NSError *error).
(AlfrescoProgressBlock) progressBlock
The block that's called with the upload progress. The block has the format typedef void (^AlfrescoProgressBlock)(NSInteger bytesTransferred, NSInteger bytesTotal).

Returns

(AlfrescoRequest *)

Example




        

createDocumentWithName:inParentFolder:contentFile:properties:aspects:type:completionBlock:progressBlock

- (AlfrescoRequest *)createDocumentWithName:(NSString *)documentName inParentFolder:(AlfrescoFolder *)folder contentFile:(AlfrescoContentFile *)file properties:(NSDictionary *)properties aspects:(NSArray *)aspects type:(NSString *)type completionBlock:(AlfrescoDocumentCompletionBlock)completionBlock progressBlock:(AlfrescoProgressBlock)progressBlock - Create a new document in the target folder using the specified properties. The content for the document is taken from the specified file. If the file parameter is not provided the document is created without content. The list of aspects is optional, if omitted the default aspects will be applied. Specifies a custom type. If the type is omitted the content is created with the default cm:content type.

Parameters

(NSString *) documentName
The name of the document to create.
(AlfrescoFolder *) folder
The parent folder of the folder to be created.
(AlfrescoContentFile *) file
The contents to be used for the new document.
(NSDictionary *) properties
The properties to be applied to the document.
(NSArray *) aspects
The aspects to be applied to the document. Default aspects will be applied if this parameter is omitted.
(NSString*) type
The custom type to be applied to the document. If this is omitted the default content type, cm:content, will be used.
(AlfrescoDocumentCompletionBlock) completionBlock
The block that is called with the created document on completion of the operation. The completion block has the format typedef void (^AlfrescoDocumentCompletionBlock)(AlfrescoDocument *document, NSError *error).
(AlfrescoProgressBlock) progressBlock
The block that's called with the upload progress. The block has the format typedef void (^AlfrescoProgressBlock)(NSInteger bytesTransferred, NSInteger bytesTotal).

Returns

(AlfrescoRequest *)

Example




        

createDocumentWithName:inParentFolder:contentStream:properties:aspects:type:completionBlock:progressBlock

- (AlfrescoRequest *)createDocumentWithName:(NSString *)documentName inParentFolder:(AlfrescoFolder *)folder contentStream:(AlfrescoContentStream *)contentStream properties:(NSDictionary *)properties aspects:(NSArray *)array type:(NSString *)type completionBlock:(AlfrescoDocumentCompletionBlock)completionBlock progressBlock:(AlfrescoProgressBlock)progressBlock; - Create a new document in the target folder using the specified properties. The content for the document is taken from the specified input stream. If the content stream parameter is not provided the document is created without content. The list of aspects is optional, if omitted the default aspects will be applied.

Parameters

(NSString *) documentName
The name of the document to create.
(AlfrescoFolder *) folder
The parent folder of the folder to be created.
(AlfrescoContentStream *) contentStream
The contents from an content stream to be used for the new document.
(NSDictionary *) properties
The properties to be applied to the document.
(NSArray *) aspects
The aspects to be applied to the document. Default aspects will be applied if this parameter is omitted.
(NSString*) type
The custom type to be applied to the document. If this is omitted the default content type, cm:content, will be used.
(AlfrescoDocumentCompletionBlock) completionBlock
The block that is called with the created document on completion of the operation. The completion block has the format typedef void (^AlfrescoDocumentCompletionBlock)(AlfrescoDocument *document, NSError *error).
(AlfrescoProgressBlock) progressBlock
The block that's called with the upload progress. The block has the format typedef void (^AlfrescoProgressBlock)(NSInteger bytesTransferred, NSInteger bytesTotal).

Returns

(AlfrescoRequest *)

Example




        

createDocumentWithName:inParentFolder:contentStream:properties:completionBlock:progressBlock

- (AlfrescoRequest *)createDocumentWithName:(NSString *)documentName inParentFolder:(AlfrescoFolder *)folder contentStream:(AlfrescoContentStream *)contentStream properties:(NSDictionary *)properties completionBlock:(AlfrescoDocumentCompletionBlock)completionBlock progressBlock:(AlfrescoProgressBlock)progressBlock; - Create a new document in the target folder using the specified properties. The content for the document is taken from the specified input stream. If the input stream parameter is not provided the document is created without content.

Parameters

(NSString *) documentName
The name of the document to create.
(AlfrescoFolder *) folder
The parent folder of the folder to be created.
(AlfrescoContentStream *) contentStream
The contents from an content stream to be used for the new document.
(NSDictionary *) properties
The properties to be applied to the document.
(AlfrescoDocumentCompletionBlock) completionBlock
The block that is called with the created document on completion of the operation. The completion block has the format typedef void (^AlfrescoDocumentCompletionBlock)(AlfrescoDocument *document, NSError *error).
(AlfrescoProgressBlock) progressBlock
The block that's called with the upload progress. The block has the format typedef void (^AlfrescoProgressBlock)(NSInteger bytesTransferred, NSInteger bytesTotal).

Returns

(AlfrescoRequest *)

Example