Home
TeamSite
WorkSite SDK Capabilities
JoeDoyle
Hi,
I have a question on a few capabilities of the SDK. I've read through the docs, but I haven't seen what I'm looking for. I know how to do this by directly modifying the database, but I'm looking to see if using the SDK is a viable alternative.
1) After I get a document, is there a way to replace the contents of that document?
a) At all?
b) After it has been marked as a record?
c) Are there any restrictions that could be placed on the document that would stop me from updating the data?
2) If I can replace the data contents of the record, is there a way to then update it's size and flag it for re-indexing?
Again, I'm looking to see if using the SDK is a better approach than directly accessing what I need via the database & file system.
Any help or suggestions would be appreciated.
Thanks,
Joe
Find more posts tagged with
Comments
dopey
1. You could use sync, although I would normally use a checkout/checkin, replacing the original.
a. yes
b. not if it's marked as a record.
c. records cannot have the document body modified (I think the profile can be modified)
2. NA
For the most part, it's preferable to use the SDK. My opinion, anyway.
jny
Which version of the SDK do you plan to use? Beginning with WorkSite 8.2, e-mail documents will be treated as records, enforced by a server key setting, so the original e-mail files cannot be replaced by another file content. Other types of documents can be replaced by calling the NRTDocument/IManDocument CheckIn Method, with the CheckInDisposition set to ReplaceOriginal, and
the upload file path pointing to the replacement file. Documentation and code example to this method is in the COM Object for WorkSite Developer's Reference Guide.pdf (8.x) and iManCOMManual.pdf (7.x).
I'm not sure what you mean by "updating the size of the document" as the size is dictated by the content bytes and is set by the server. You can read the size of the document but you cannot set it.
If the document has been marked indexable, once you update it with a new file content, it should be equipped for fulltext searching as the initial file is replaced by the server when you make the checkin call.
Once a record has been declared, it cannot be rolled back via the API's.
It is not recommended to manipulate data directly. Database access is carefully tuned to insure scalability and concurrent access. If you access the database directly, you throw out all of this careful tuning and run a high risk of your system being unavailable. In all, it goes against the core of our 3-tier architecture design.