Hi... I need your help with Documentum
First of all excuse my English because it is very bad and I used a translator.
i am new in Documentum... I am developer.. and I need to do a program to upload files to my repository
but I can not get the format of the files ...
v.g but class FileContent .... How to know if I have a *.doc that this is a msw8
Header 1 |
---|
public Form1() serviceFactory = ServiceFactory.Instance;
private void Form1_Load(object sender, EventArgs e)
private void btnCreateFolder_Click(object sender, EventArgs e)
private void btnUpLoadFile_Click(object sender, EventArgs e) if (openFileDialog.ShowDialog() == DialogResult.OK) string typeObject = Path.GetExtension(openFileDialog.FileName); the problem is here!!! if typeObject is "txt" the program fails as it should be "text" or "crtext" not to fail, how can I get those values BuildObject(repository, typeObjectIdentity, objectName, subject, title, keywords, typeObject, openFileDialog.FileName); MessageBox.Show("Listo...!");
private void CreateCabinet(string folderPath, string repositoryName)
private void BuildObject(string repositoryName, string typeObjectIdentity, string objectName, string subject, string title, string[] keywords, string typeObject, string contentPath) try Emc.Documentum.FS.DataModel.Core.DataObject dataObject dataObject.Properties.Set("object_name", objectName); if (!File.Exists(contentPath)) MessageBox.Show("The file: " + contentPath + " does not exist"); dataObject.Relationships.Add(referenceRelationship); dataPackage.AddDataObject(dataObject); OperationOptions operationOptions = null;
private IServiceContext GetServiceContext(string repositoryName, string userName, string password, string domain) ContentTransferProfile contentTransferProfile = new ContentTransferProfile(); contentTransferProfile.TransferMode = ContentTransferMode.MTOM; serviceContext.SetProfile(contentTransferProfile); try referenceRelationship.Name = Relationship.RELATIONSHIP_FOLDER; |
thanks....
Comments
-
It seems you are trying to use the DOS extention rather than the format name. The format name is defined in a dm_format object so I guess you could query for it if you wanted.
Have you tried not defining that property? DFC Operations used to take the default value defined on dm_format objects when the extention was part of the name and I believe DFS does the same, but this early in the morning I'm not sure.
0 -
Hi,
If I recall right you don't need to set the a_content_type, this will be done behind the scenes for you when you make the call into DFS, it works it out based on the name of the file being uploaded. You might want to confirm this as I don't have access to a development machine to test the theory.
On a separate, but related, point, you might want to consider moving the business logic to a custom DFS service (or an SBO fronted by a custom DFS service). That way clients can call into your service without needing to know too much about Documentum, DFC, DFS etc. as they will call a business logic specific method such as CreateMyBusinessDocument(...params...) and you could double wrap the generated client side code such that they don't even have to know that DFS is being used, all the call is your actual method and the underlying client side implementation takes care of the plumbing.
0 -
thanks guys, but I think I explained well ...I want to do is get the format that corresponds to the extensions txt, pdf, doc, docx, etc. .... regarding the format or extensions of Documentume.v.private string getFormat(string extension)......string extension = "doc";string result = "";result = getFormat(extension);console.writeline("The format is: ", result);.......The format is: msw8........the table to convert is....Table 5. Documentum format mapping
Description Documentum name
(includes Office 2003)Documentum name
(Office 2007 only)CAD drawings (DWF,
DWG)acad Corel WordPerfect (WPD) wpd8, wpd10 HTML html Microsoft Excel (XLS) excel8book excel12book Microsoft Excel (XLT) excel8template excel12template Microsoft PowerPoint (POT) ppt8_template ppt12template Microsoft PowerPoint (PPT) ppt8 ppt12 Microsoft Visio (VSD) vsd, vsd1, vsd2, vsd3, vsd4 Microsoft Word (DOC) msw8 msw12 Microsoft Word (DOT) msw8template msw12template PDF pdf thanks....0 -
Ok.
DFC provides this via the getFormatRecognizer method if IDfClientX for a specific file name so you can wrap that up in a DFS service and call that
or
You can use a query of the form select name, description, mime_type, dos_extension from dm_format where dos_extension != ' ' to select the formats. See the object model reference for dm_format.
0 -
getFormatRecognizer is defined in the IDfClientX interface, which is implemented by DfClientX. Both are in the Java package com.documentum.com.
As you mention namespace I assume your client is C#, if so you should be able to find the direct DFC packages in the PIA documentation.
0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 103 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax