Esempio n. 1
0
        public static HttpFileCollectionBase ToFileCollection(this NCMIS.ObjectModel.ContentStream contentStream)
        {
            CmisHttpFileCollectionWrapper fileCollection = new CmisHttpFileCollectionWrapper();

            fileCollection.AddFile(contentStream.Id, contentStream.ToHttpPostedFile());
            return(fileCollection);
        }
Esempio n. 2
0
 public CmisHttpPostedFileWrapper(NCMIS.ObjectModel.ContentStream contentStream)
 {
     this.contentLength = contentStream.Length.HasValue ? (int)contentStream.Length.Value : 0;
     this.contentType   = contentStream.MimeType;
     this.fileName      = contentStream.Filename;
     this.inputStream   = new MemoryStream(contentStream.Stream);
 }
Esempio n. 3
0
        public override NCMIS.ObjectModel.CmisObject CreateDocument(string repositoryId, NCMIS.ObjectModel.CmisProperties properties, string folderId, NCMIS.ObjectModel.ContentStream contentStream, VersioningState versioningState, string[] policies, NCMIS.AccessControl.AccessControlList addACEs, NCMIS.AccessControl.AccessControlList removeACEs)
        {
            DocumentObjectService documentService = (DocumentObjectService)ObjectService.GetService(typeof(ContentBase));

            return(documentService.CreateDocument(repositoryId, properties, folderId, contentStream));
        }
Esempio n. 4
0
        public override NCMIS.ObjectModel.TokenedDocumentId SetContentStream(string repositoryId, string documentId, NCMIS.ObjectModel.ContentStream contentStream, bool?overwriteFlag, string changeToken)
        {
            IObjectService objectService = ObjectService.GetService(documentId);

            objectService.SetContentStream(repositoryId, documentId, contentStream, overwriteFlag);
            return(new NCMIS.ObjectModel.TokenedDocumentId()
            {
                ChangeToken = changeToken, DocumentId = documentId
            });
        }
Esempio n. 5
0
 public static HttpPostedFileBase ToHttpPostedFile(this NCMIS.ObjectModel.ContentStream contentStream)
 {
     return(new CmisHttpPostedFileWrapper(contentStream));
 }