cancel
Showing results for 
Search instead for 
Did you mean: 

Space Information (get space size and space items number)

biersen
Champ in-the-making
Champ in-the-making
Hi all,

How can I get Space Information Data? The size of a space and the number of items in that space, like a OS Explorer.
I want to show this information on Space Details:

   Name:   Department A
   Title:   Department A
   Description:   Department A Docs
   Creator:   admin
   Created Date:   12 March 2010 15:58
   Modifier:   admin
   Modified Date:   12 March 2010 16:13
   Email ID:   1196
       Size: 128,08 MB
        Files: 12
        Sub-Folders: 2


How can I get this information directly? Thanks all.
2 REPLIES 2

nevoeiro
Champ in-the-making
Champ in-the-making
hi,

I think you have to navigate into space childs and count this values manualy.

biersen
Champ in-the-making
Champ in-the-making
Hi,

There are other topics that talk about this subject, like this one http://forums.alfresco.com/en/viewtopic.php?f=35&t=16589 or this http://forums.alfresco.com/en/viewtopic.php?f=12&t=27739. But there are no response that help us to get this information about each Space in Alfresco.
I'm not a Java expert, neither a Alfresco expert. I'm learning. I make some searches on web about possible solutions for this, and I want to try others. So, this is the situation point:

a) An solution would be create a script that navigate between nodes(spaces and files) and sum the size of each file. But, if we have a lot of files, this script takes too long to execute.
An example with templates:
http://cedric.bosdonnat.free.fr/wordpress/?p=85

I tried this but, as I wrote above, this takes too long to execute when we have a lot of documents.
A workaround to resolve this, will be implement a thread system that run a webscript at the night and update the values. But the disadvantage is that we never get the info at real time.


b) Other way would be create an SQL procedure to get this info faster, and then create a service that we can use to get the info through java. But, in my opinion, this is not a good implementation, because the database model is too complex. Any way there are some people that tried this:
1. http://ironman.darthgibus.net/?p=72
2. http://alfrescoshare.wordpress.com/2010/01/20/count-the-total-number-of-documents-in-alfresco-using-...

This way, i didn't tried yet.


So, does anyone knows more about this? What is the best way to follow, that can give us this information?

Thanks.
Regards