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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I get a list of user's folders/documents ( LiveLink )

Status
Not open for further replies.

levzak

Programmer
May 21, 2010
4
CA
Hello,
I started developing on LAPI 9.2 .
I already found out how to create folders and documents.
Now I need to access user's folders/Documents and do check out & checkin.
For instance getAllFoldersByUserID, GetFolderByFolderID, etc.

Thanks
 
That is not how Livelink works.There is no concept for certain folders by userid.You are approximating a convenience maesure.

Having said that I think these may be things you are after.

A list of folders whose owner is a certain userid.That does not mean a thing in any livelink.People or groups who have elevated access to them may have already checked out/in those items.

GetFolderByFolderID what are you trying to d.If I have got a dataid of 3456,are you wanting to find what type it is where is it located,who is on its permission list etc etc

For that one would use the command GetObjectInfo.If it is a folder or container,then you call ListObjects again and agin for its children until you expend the tree.

The closest user related thing that I know is the users personal workspace.I have not seen a lot of collaborative/useful work ever done in users PWS,although it is a convenient place to practice livelink,permissions etc.

Let us know what exactly is your task so others who may have different ideas than mine could chip in as well

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
 
Thanks appnair, it made some clarification to me.

I'm browsing through the folders.I wrote the following recursive function to go down the 'bottom' of the folders hierarchy. So I can see all folders but not documents.

Why don't I see documents?

My actual task is to be able check in/out documents.

here is my function:

private static void GetFolders(LAPI_DOCUMENTS documents, int volumeID, int ID)
{
Debug.Print("----- ------------------ ------------------------------");
Debug.Print("----- Enter GetFolders(): VolumeID = {0}, ID = {1} ", volumeID, ID);

LLValue objInfo = (new LLValue()).setAssocNotSet();

int status = documents.ListObjects(volumeID, ID, "DTree",null, LAPI_DOCUMENTS.PERM_SEE, objInfo);

if (status == 0)
{
object[] fieldNames = ((com.opentext.api.LLTable)(objInfo.fInstance)).fNames.elementData;
object[] rows = ((LLTable)(objInfo.fInstance)).fRows.elementData;

for (int j = 0; j < rows.Count(); j++)
{
Vector row = (Vector)rows[j];
if (row != null)
{
for (int i = 0; i < row.elementCount; i++)
{
//Child count
if (i == 32 )
{
Debug.Print("***************** {0}: {1}", fieldNames, row.elementData);
if (int.Parse(row.elementData.ToString()) > 0)
{
GetFolders(documents, int.Parse(row.elementData[0].ToString()), int.Parse(row.elementData[2].ToString()));
}
}
else
{
Debug.Print("{0}: {1}", fieldNames, row.elementData);
}
}
Console.WriteLine();
}
}
}
}

Thank you
 
I am not sure I can follow this code.But I will post a C# example that will show some parsing that may help you.It is not as if your livelink has only folder objectts is it ?

If You have a situation like this observe the tree

Enterprise
First Level Folder
Second Level Folder

Then in psuedo code here's how I see

ListObjects on Enterprise

Result Set Contains "First Level folder" and any other objects

You do what you need with the other objects

Then you do ListObjects on "first Level folder" and so on.

I am not following what your code does sorry.

See if this hastily done sample gives you better ideas.
Don't run it on a huge livelink because the code will try to enumerate everything underneath it.

Code:
[URL unfurl="true"]http://communities.opentext.com/communities/llisapi.dll?func=ll&objId=8667048&objAction=download[/URL]


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
 
Thanks,
it helped me a lot. Now when I can iterate through the objects I need to be able to check out/in documents. Can you please, give me an idea how it could be done.

Thanks a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top