mihaylov
I'm new here

Custom search in Java Client 4.2

Jump to solution

Hello,

we are trying to tidy up our Media store and delete or move data which has no reference in CMS - meaning it's not linked in a CMS_INPUT_PICTURE for example.

I can, of course, directly go to a file and click show usage (ctr + u) but this will be simply too much work for our huge database. This made me thinking that there should be a way to search for this, since clearly the CMS differentiates between those two states.

I was wondering, is there a way to make a custom search (or use one of the existing solutions) to search explicitly for data which has not been referenced.

Thank you !

1 Solution

Accepted Solutions

Hello Veso,

with the UserService of the fs-acces api you can get the complete MediaStore. The UserService you can get from the script context Object.

For displaying the output you could use the class JOptionPane class and it's static Method showMessageDialogue of swing for example:

JOptionPane.showMessageDialog(null, "My output text here");

Docu you can find here: http://docs.oracle.com/javase/6/docs/api/javax/swing/JOptionPane.html#showMessageDialog%28java.awt.C...

Greetings

Johannes Perlet

View solution in original post

3 Replies
jpee
I'm new here

Hello Veso,

you could make a script which does what you described, so taking the MediaStoreRoot and checking each MediaStoreElement for its usages recursively.

Each MediaStoreElement you could move then to a folder you defined or store its referencenames into a list, which will be displayed at the end of the process.

Greetings

Johannes Perlet

Would you point me to an appropriate API ?

I'm also interested in display the search results in a dialogue box similar to the on from normal searches.

Is there a dialogue box in the API which would do the trick ?

Thanks in advance !

0 Kudos

Hello Veso,

with the UserService of the fs-acces api you can get the complete MediaStore. The UserService you can get from the script context Object.

For displaying the output you could use the class JOptionPane class and it's static Method showMessageDialogue of swing for example:

JOptionPane.showMessageDialog(null, "My output text here");

Docu you can find here: http://docs.oracle.com/javase/6/docs/api/javax/swing/JOptionPane.html#showMessageDialog%28java.awt.C...

Greetings

Johannes Perlet