Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rendition Type of Document

Status
Not open for further replies.

Vikas1701

Programmer
Jul 10, 2014
10
IN
Hi,

Please help me on the below queries :

1. How to get the Rendition Type of a Document.

2. How Download the Document using using rendtion contents context.


Thanks in advance,
Vikas
 
1.Add a Document.Note its dataid . Go to the Version of the Document you added by using the function button.Using the 'Add Rendition' add the version again.Now run this command select * from dversdata where docid=<the dataid you noted>. If the experiment was done as I said you would get two rows.Look in the column 'VERTYPE'. The first version you added would be NULL and the RENDITION would have what you said it wanted to be.The rendition module plus the external renditioning engine(adlib) just uses this methodology to create Renditions.REndition and Versions are already in oscript the only difference being the VERTYPE.Hope you now understand how to do this.API's may have the command GetRenditionContents
2)in the WSAPI I see a command GetRenditionsContentsContext is that what you are asking about.Simply put in other context methods one creates a "context" a funny way of saying I have a lot of things I am trying to do and I want you to treat this as "single transcation".So one creates a "context" and writes code like "while my context is still there give me one by one".There are examples in the KB for permissions push while in a context.You would use that to figure out how to use that effcetively if I were you

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Thank you for your appnair.

I am trying to create a document in livelink programatically using webservices. I am using DocumentManagementService.createSimpleDocument/ CreateDocument, how to create a Attachment object of a file and How do i get the Metadata of a document required for creating documents in livelink. Is there any other way of importing large number of documents to livelink. I don't have the object importer of opentext.


Regards,
Vikas
 
Below is my code to create documents in Livelink. How do i add the VersionInfo while creating the document.?

Code:
public void uploadDocuments(DocumentManagement dm){
    	try {
    		File dir = new File("D:\\folder");
    		File[] files = dir.listFiles();
    		GregorianCalendar gregorianCalendar = new GregorianCalendar();
                DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();
                XMLGregorianCalendar date = datatypeFactory.newXMLGregorianCalendar(gregorianCalendar);

    		for (File file : files) {
    			if (file.isFile()) {
    				InputStream in = new FileInputStream(file);
    				byte[] bytes = IOUtils.toByteArray(in);
    				Attachment attach = new Attachment();
    				attach.setFileName(file.getName());
    				attach.setFileSize(file.getTotalSpace());
    				attach.setContents(bytes);
    				attach.setCreatedDate(date);
    				attach.setModifiedDate(date);
    				dm.createSimpleDocument(5315, file.getName(), attach);
    			}
    		}
    	} catch (Exception e) {
    		e.printStackTrace();
    	}
    }
 
if you look in OTDN or knowledge.opentext.com there are simple code files you can re-purpose. AFA OI is concerned it is very easy to write code as you will only be writing XML node instructions.Metadata there are so many kinds in normal livelink operation a power user or admin creates a category(template) with some leaves(attributes). As a programmer you have access to it with the WSAPI you would get and set its leaves and one of the parameters of your node creation is metadata.In my website livelink.in I have two samples that show how to read a category as well as set its category values.Metadata can also mean Classification,RM classification as well if so all of those have getter/setter methods.
If you write this yourself you would have to do everything yourself.OI has a beautiful queuing mechanism which you will have to make or emulate.

Is this for a product you are doing or ongoing if so I would put thought on how to write good code and sustain itself.If it is migration work it is worthwhile talking to OT as they used to "lease" OI for migration for a price.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top