Tribune

Home » Liferay Portal » English » 2. Using Liferay » General

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Alagammai Kasi
Moving files from one community to another
30 ottobre 2012 18.28
Risposta

Alagammai Kasi

Punteggio: Regular Member

Messaggi: 149

Data di Iscrizione: 31 luglio 2012

Messaggi recenti

Dear buddies,

I need to move many many files from many communities to a new communities.

Is there a way to do this in Liferay itself or if I choose to do it using MySql, can know the tables that I need to be aware of to make the changes.

Thanks - Alagu
Hitoshi Ozawa
RE: Moving files from one community to another
30 ottobre 2012 18.58
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

Do you mean files in Documents and Media folder? Don't recommend modifying database data directly.
You can try using webdav to transfer files in and out of liferay.
Alagammai Kasi
RE: Moving files from one community to another
30 ottobre 2012 19.28
Risposta

Alagammai Kasi

Punteggio: Regular Member

Messaggi: 149

Data di Iscrizione: 31 luglio 2012

Messaggi recenti

Hi Hitoshi Ozawa,

I need to do this to tons of communities, at least around 300 communities.

I need to move the files from the community A to community B. A is a subject offered in a semester and those files should be moved to the same subject's community for the next semester.

Please throw some light
Hitoshi Ozawa
RE: Moving files from one community to another
30 ottobre 2012 21.10
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

Should have just put them in the global scope and just assigned privileges using roles.
Gaurav Jain
RE: Moving files from one community to another
30 ottobre 2012 23.53
Risposta

Gaurav Jain

Punteggio: Regular Member

Messaggi: 146

Data di Iscrizione: 31 gennaio 2011

Messaggi recenti

Yes, best approach in my point of view also is to export/move them to global scope, and access from there in all communities keeping proper roles and permissions as required
Alagammai Kasi
RE: Moving files from one community to another
31 ottobre 2012 19.10
Risposta

Alagammai Kasi

Punteggio: Regular Member

Messaggi: 149

Data di Iscrizione: 31 luglio 2012

Messaggi recenti

Dear buddies,

The issue is, each community is assigned to a subject tied to a semester.

Now, as new semester is coming, the management and users wants the files to be moved to the new community which is created for the new subjects.

I create the communities using a script in Oracle which creates the details in MySQL. That populates the new communities. But, I am not sure how to use the groupid of the old and new communities to move the files from one community to another.

So, I can't bring their files to a global scope since it belongs to different lecturers, departments and faculties.

Thanks - Alagu
Gaurav Jain
RE: Moving files from one community to another
31 ottobre 2012 22.37
Risposta

Gaurav Jain

Punteggio: Regular Member

Messaggi: 146

Data di Iscrizione: 31 gennaio 2011

Messaggi recenti

Alagammai Kasi:

I create the communities using a script in Oracle which creates the details in MySQL. That populates the new communities. But, I am not sure how to use the groupid of the old and new communities to move the files from one community to another.

Do you mean that you are creating community with direct sql procedure/function?
If so, this is really not recommended and actually violating liferay standards.
Instead you should create community from your code and when you will create it using code, you will get groupId of newly created community which you can use for managing your document and media files.

Point is that on which action you want to create your community? If its plain, then you may create a control panel portlet for admin when you place a button to add a new community and then this portlet is taking acre of all your process needs.


And is it just about moving the files? Or making copy of files into other community?
Alagammai Kasi
RE: Moving files from one community to another
13 novembre 2012 17.57
Risposta

Alagammai Kasi

Punteggio: Regular Member

Messaggi: 149

Data di Iscrizione: 31 luglio 2012

Messaggi recenti

Dear Gaurav,

Its about moving the files to some other communities.

Its like I have about 10 new communities and 10 old communities. All the files from the old community like Jan2012 has to be moved to community Jan2013.

There are hundreds of such communities and many many files in each community. Moving them manually is a tedious task.

Anyway to work this out?

Please advice.

Thanks - Alagu
Alagammai Kasi
RE: Moving files from one community to another
16 novembre 2012 20.24
Risposta

Alagammai Kasi

Punteggio: Regular Member

Messaggi: 149

Data di Iscrizione: 31 luglio 2012

Messaggi recenti

Can someone throw some light on this issue?
Juan Gonzalez
RE: Moving files from one community to another
17 novembre 2012 0.26
Risposta

Juan Gonzalez

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 2794

Data di Iscrizione: 28 ottobre 2008

Messaggi recenti

Guess the best approach (like someone said before) should be having all documents in global scope.

You said these documents are owned by different departments etc. No problem, you can put documents in folders depending on who the owner is (for example, Department XX folder for some documents and set update permissions there).

After that, instead of moving all files, you could simply change view permissions for documents depending in semester and communities. You could write a script to execute directly in Liferay (read this article: http://www.liferay.com/web/jeffrey.handa/blog/-/blogs/6424100 ).

This should be much easier and faster that moving huge amounts of documents.

And it isn't a good practice to make database scripts. Much better write Liferay scripts to execute, or invoke Liferay web services so cache is correctly updated in each case.
Alagammai Kasi
RE: Moving files from one community to another
27 novembre 2012 20.12
Risposta

Alagammai Kasi

Punteggio: Regular Member

Messaggi: 149

Data di Iscrizione: 31 luglio 2012

Messaggi recenti

How can I change the scope? Steps please?

Thanks - Alagu
Alagammai Kasi
RE: Moving files from one community to another
27 novembre 2012 21.21
Risposta

Alagammai Kasi

Punteggio: Regular Member

Messaggi: 149

Data di Iscrizione: 31 luglio 2012

Messaggi recenti

I just tried changing the scope to Global and doesn't find it suitable for my need. Because the lecturers/administrators are not able to change the scope to global themself


Any suggestion?
Alagammai Kasi
RE: Moving files from one community to another
27 novembre 2012 21.27
Risposta

Alagammai Kasi

Punteggio: Regular Member

Messaggi: 149

Data di Iscrizione: 31 luglio 2012

Messaggi recenti

Lets say, I have 10 communities for this semester and I need to create 10 more communities,
should the owners of the community be changing their scope, they don't have access to the config button?
Riccardo Ferrari
RE: Moving files from one community to another
29 novembre 2012 15.42
Risposta

Riccardo Ferrari

Punteggio: Regular Member

Messaggi: 137

Data di Iscrizione: 13 novembre 2010

Messaggi recenti

Hi,

I think you should consider develop you own portlet (or set of portlets) to meet your requirements. Consider that manually editing the LR database is strongly disencouraged. To modify Liferay from an external software you should consider using the remote API exposed via JSON/WebServices.

Best,
Riccardo
Alagammai Kasi
RE: Moving files from one community to another
3 dicembre 2012 20.05
Risposta

Alagammai Kasi

Punteggio: Regular Member

Messaggi: 149

Data di Iscrizione: 31 luglio 2012

Messaggi recenti

Thanks to everyone.

For now, without a choice I ask the lecturers to perform an export and import of the files. The management is not happy but I got to get my hands dirty quickly with the development part of the Liferay!

Thanks - Alagu