mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12874 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
39 lines
1.6 KiB
C#
39 lines
1.6 KiB
C#
using WcfTestClient.ObjectService;
|
|
|
|
namespace WcfCmisWSTests {
|
|
///
|
|
/// author: Dmitry Velichkevich
|
|
///
|
|
public class DocumentCreatorStrategy: CmisManipulationsStrategy<string> {
|
|
private string objectName;
|
|
private string objectParent;
|
|
private string objectMimeType;
|
|
private enumVersioningState versioningState;
|
|
private byte[] objectContentEntry;
|
|
|
|
public DocumentCreatorStrategy(string objectName, string objectParent, string objectMimeType,
|
|
enumVersioningState versioningState, byte[] objectContentEntry) {
|
|
|
|
this.objectName = objectName;
|
|
this.objectParent = objectParent;
|
|
this.objectMimeType = objectMimeType;
|
|
this.versioningState = versioningState;
|
|
this.objectContentEntry = objectContentEntry;
|
|
}
|
|
|
|
string CmisManipulationsStrategy<string>.getName() {
|
|
|
|
return objectName;
|
|
}
|
|
|
|
string CmisManipulationsStrategy<string>.performManipulations() {
|
|
|
|
return AbstractCmisServicesHelper.createObjectServiceClient().createDocument(
|
|
AbstractCmisServicesHelper.getAndAssertRepositoryId(), AbstractCmisServicesHelper.DOCUMENT_TYPE,
|
|
AbstractCmisServicesHelper.createCmisObjectProperties(objectName), objectParent,
|
|
AbstractCmisServicesHelper.createCmisDocumentContent(objectName, objectMimeType,
|
|
objectContentEntry), versioningState);
|
|
}
|
|
}
|
|
}
|