Nueva Activity Social para DLFileEntry

thumbnail
Beatriz Valdés Suárez, modified 6 Years ago. Junior Member Posts: 50 Join Date: 3/31/14 Recent Posts
Hola, 
(Liferay DXP7) Estoy tratando de generar nuevas Activity Social para documentos, con el siguiente xml,
&nbsp;&nbsp; &nbsp;<activity>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<model-name>com.liferay.document.library.kernel.model.DLFileEntry</model-name>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<activity-type>${com.xxxx.xxxx.social.keys.DLFileEntryActivityKeys.FILE_VISITED}</activity-type>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<language-key>FILE_VISITED</language-key>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<log-activity>true</log-activity>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<contribution-value>1</contribution-value>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<participation-value>1</participation-value>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<counter>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<name>asset.visited</name>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<owner-type>asset</owner-type>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</counter>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<counter>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<name>user.visited</name>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<owner-type>actor</owner-type>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</counter>
&nbsp;&nbsp; &nbsp;</activity>

y he creado la clase Configurator

@Component(immediate = true, service = DLFileEntrySocialActivityConfigurator.class)
public class DLFileEntrySocialActivityConfigurator {

&nbsp;&nbsp; &nbsp;@Activate
&nbsp;&nbsp; &nbsp;protected void activate() throws Exception {
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Class<!--?--> clazz = getClass();

&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;String xml = new String(
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;FileUtil.getBytes(
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;getClass(), "/META-INF/social/liferay-social.xml"));

&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;SocialConfigurationUtil.read(
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;clazz.getClassLoader(), new String[] {xml});
&nbsp;&nbsp; &nbsp;}

&nbsp;&nbsp; &nbsp;@Reference(target = ModuleServiceLifecycle.PORTAL_INITIALIZED, unbind = "-")
&nbsp;&nbsp; &nbsp;protected void setModuleServiceLifecycle(
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ModuleServiceLifecycle moduleServiceLifecycle) {
&nbsp;&nbsp; &nbsp;}
}

Pero cuando lo despliego, no me aparece dentro del menú de Actividades Sociales del site para habilitar....

¿Alguien le ha pasado algo similar?