Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Adding Documents
SoundUser3_(Delete)_2464390
Can I add a Document to a folder in the personal workspace instead of just the workspace using LAPI?
Find more posts tagged with
Comments
Richard_Boyne_(boyne_(Delete)_891609)
Yes. LAPI functions such as CreateObjectEx allow you to create objects, including documents, in a parent container.Specify the container object's volume ID and object ID in the function's parentVolID and parentID parameters. After obtaining the Enterprise or personal workspace object/volume ids, you can navigate down through a tree of container objects using the ListObjects function until you locate a container within which you want to create an object.
Tech_Writer_(edscauser5_-_(deleted))
Can you give us an example about how to use 'viewName' and 'queryStr' parameters when you call ListObjects()? Also, I'd like to know more about use LLNameEnumeration and LLValueEnumeration to display the returned values. Thanks,
Richard_Boyne_(boyne_(Delete)_891609)
From the LAPI doc.:"viewName the name of a custom view defining the columns of data to return; before specifying a view, the Livelink standard database schema must be modified first to include the view; the view name must be specified exactly as it exists in the database; to return all columns, specify a null value (0 for C/C++; VBNULLSTRING for Visual Basic; null for Java) queryStrthe limiting criteria defining a subset of child objects to return; it should be structured as the condition of a valid SQL WHERE clause, using any of the defined column names (either from the standard return RecArray or the custom view specified by the viewName parameter); to return all child objects, specify a null value (0 for C/C++; VBNULLSTRING for Visual Basic; null for Java) "When the "viewname" parameter is 0 or null, ListObjects operates on the DTREE table of the Livelink Database schema. This documentation indicates that you can add a SQL View to your Livelink Database schema. Presumably, that SQL View would be for a subset of the DTREE table. Specifying that SQL View's name as this function's viewname parameter value would have ListObjects operate on the specified SQL View table rather than directly on the DTREE table. Refer to a SQL book for further information on SQL Views. Also, check with Livelink Customer Support on whether there are issues with modifying the Livelink Database Schema. As mentioned above ListObjects operates on the DTREE table. To use the querystr parameter you must know about the DTREE table columns, their usage and values. A querystr example might be to have ListObjects only return Document type entries from the container specified by the function's parentVolume and parentID parameters. e.g. status = LL_ListObjects( Session, ObjectVOL, ObjectID, 0, "( SubType=144 ) ", LL_PERM_SEE, ChildDocuments );Where SubType is the DTREE column that designates the type of object that a row in the DTREE represents. 144 is the column value that represents an object of type Document.This value could be obtained from the corresponding LAPI language constant such as LL_DOCUMENTSUBTYPE for C or LAPI_DOCUMENTS.DOCUMENTSUBTYPE for JAVA.There may be training or documentation on the Livelink Database Schema available through your Livelink Customer Support representative.I have not used the LAPI JAVA "Content Enumeration Methods".I can only suggest that you research the Java Enumeration interface and experiment with the corresponding LAPI JAVA methods.
Tech_Writer_(edscauser5_-_(deleted))
Thanks for the reply, it helps. I also found that we can put more than one condition in queryStr. I wish that Open Text will have more(and better) documentation about the classes and their functions. The online doc is limited.