mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
CMIS-WS .NET tests
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12874 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
38
source/test/dotnet/CmisWS/Source/DocumentCreatorStrategy.cs
Normal file
38
source/test/dotnet/CmisWS/Source/DocumentCreatorStrategy.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user