// Create the properties list
nameProperty = new NamedValue();
nameProperty.name = Constants.PROP_NAME;
nameProperty.value = strFileName;
nameProperty.isMultiValue = false;
//if new properties must be added, change the next line accordingly
arrProperties = new NamedValue[4];
arrProperties[0] = nameProperty;
nameProperty = new NamedValue();
nameProperty.name = Constants.PROP_TITLE;
nameProperty.value = strFileName;
nameProperty.isMultiValue = false;
arrProperties[1] = nameProperty;
nameProperty = new NamedValue();
nameProperty.name = Constants.ASPECT_VERSIONABLE;
nameProperty.value = strFileName;
nameProperty.isMultiValue = false;
arrProperties[2] = nameProperty;
nameProperty = new NamedValue();
nameProperty.name = Constants.ASPECT_CLASSIFIABLE;
nameProperty.value = strFileName;
nameProperty.isMultiValue = false;
arrProperties[3] = nameProperty;
// Create the CML create object
objCreate = new CMLCreate();
objCreate.parent = parentReference;
objCreate.id = "1";
objCreate.type = Constants.TYPE_CONTENT;
objCreate.property = arrProperties;
// Create and execute the cml statement
objCml = new CML();
objCml.create = new CMLCreate[] { objCreate };
arrUpdateResult = repoService.update(objCml);
// work around to cast Alfresco.RepositoryWebService.Reference to
// Alfresco.ContentWebService.Reference
Alfresco.RepositoryWebService.Reference rwsRef = arrUpdateResult[0].destination;
Alfresco.ContentWebService.Reference newContentNode = new Alfresco.ContentWebService.Reference();
newContentNode.path = rwsRef.path;
newContentNode.uuid = rwsRef.uuid;
Alfresco.ContentWebService.Store cwsStore = new Alfresco.ContentWebService.Store();
cwsStore.address = "SpacesStore";
spacesStore.scheme = Alfresco.RepositoryWebService.StoreEnum.workspace;
newContentNode.store = cwsStore;
// Open the file and convert to byte array
inputStream = new FileStream(file, FileMode.Open);
iBufferSize = (int)inputStream.Length;
arrBytes = new byte[iBufferSize];
inputStream.Read(arrBytes, 0, iBufferSize);
inputStream.Close();
Wie zu sehen ist werden Properties z.B. versionable und classifiable gesetzt. Dennoch haben hoch geladene Dokumente zwar eine Versionsnummer, dennoch wird diese nicht hochgezählt wenn eine neuere Version einer Datei hoch geladen wird. Wozu also setzt man in dem Beispiel diese Properties?Archive content from product discussions in German.
This group is now closed and content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.