Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
sunny huang
how the co-worker could be friends automatically?
23 ottobre 2012 7.59
Risposta

sunny huang

Punteggio: New Member

Messaggi: 6

Data di Iscrizione: 17 gennaio 2011

Messaggi recenti

hi,

In liferay the co-worker would be friends automatically,how liferay have this function and where is the code?

Thanks in advance
Saurabh Mehta
RE: how the co-worker could be friends automatically?
26 dicembre 2012 11.00
Risposta

Saurabh Mehta

Punteggio: New Member

Messaggi: 3

Data di Iscrizione: 24 dicembre 2012

Messaggi recenti

I also need similar functionality. If you were able to achieve this, then please let me know what all steps should I follow to get a list of co-workers as friends by default.

Thanks in advance!!
Jelmer Kuperus
RE: how the co-worker could be friends automatically?
26 dicembre 2012 14.55
Risposta

Jelmer Kuperus

Punteggio: Liferay Legend

Messaggi: 1192

Data di Iscrizione: 10 marzo 2010

Messaggi recenti

Coworker is a bit of a broad concept here that can mean different things to different people

  • It might mean that a social relationship exists between this coworker and yourself of the type SocialRelationConstants.TYPE_BI_COWORKER
  • It might mean every user of a specific organisation that you are also a part of
  • Or it might mean every user of the portal, because the portal is exclusively used by your coworkers


What you need to do differs slightly depending on this

Regardless probably the easiest way to solve this would be to define a model listener that creates the SocialRelations of type SocialRelationConstants.TYPE_BI_FRIEND which constitute a friendship, when an entity is created and that removes them when that entity is removed.

What the entity is your model listener should be listening for depends on what you consider a coworker.
Saurabh Mehta
RE: how the co-worker could be friends automatically?
27 dicembre 2012 5.47
Risposta

Saurabh Mehta

Punteggio: New Member

Messaggi: 3

Data di Iscrizione: 24 dicembre 2012

Messaggi recenti

Hi Jelmer,

Thanks for your reply. I am newbie to Liferay and I was thinking that I will be able to achieve this with the help of Organization, Communities or User groups(Any one out of these three). But this looks to a bit complex and need some tweak in code.

Once again thanks for your time..

Thanks