Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

List of UUID and files in CCM

We have stored documents in CCM (6.0.4). When we have a reference in that document  to another document the URL includes the UUID. Loading the documents into the workspace works. When you work offline you will not be able to find the referenced dockument.
Ist there any tool that may create a list with UUID and documentname + document path ?

0 votes


Accepted answer

Permanent link
Personally, I am not aware of such a tool.

Anyway, if you are familiar with Plain Java API, you can search the repository, retrieve the documents and get their names and UUIDs this way:


// retrieve the versionable (i.e. the document)
IVersionable versionable = ...;
String versionableName = versionable.getName();
UUID versionableId = versionable.getItemId();
String UUIDString = versionableId.toString();
Getting the document path is a bit more complex.
You must retrieve the configuration (IConfiguration) associated to the component to which the versionable belongs, then you can "build" the path this way:

String filePath = "";
IVersionableHandle versionableHandle = (IVersionableHandle) versionable.getItemHandle(),
List<IVersionableHandle> versionableHandleList = new ArrayList<IVersionableHandle>();
versionableHandleList.add(versionableHandle); 
List<?> ancestorReports = configuration.locateAncestors(versionableHandleList, monitor);
IAncestorReport iAncestorReport = (IAncestorReport) ancestorReports.get(0);
List<INameItemPair> reportList = iAncestorReport.getNameItemPairs();     
for (INameItemPair iNameItemPair : reportList){
String temp = iNameItemPair.getName();
if (temp != null) {
filePath += "/" + temp ;
}
}

Torsten Welk selected this answer as the correct answer

0 votes


One other answer

Permanent link
Thank you very much for the fast answer.

From an other side I got the possibility to use the CLI.

lscm login -r <URL> -n local -u <user> -P <PW>
lscm list files -D '-' -i -j -r local  <STREAM> > file.json

Writes out a json file with all files from the stream

1 vote

Comments

Yours is a quickier way to retrieve name and UUID of a file.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 73

Question asked: Jun 25 '19, 7:52 a.m.

Question was seen: 1,558 times

Last updated: Jun 27 '19, 2:28 a.m.

Confirmation Cancel Confirm