@BeforeClass
  public static void setUpClass() throws Exception {
    _userClassNameId = PortalUtil.getClassNameId(User.class.getName());

    Class<?> clazz = SocialActivitySettingLocalServiceTest.class;

    String xml = new String(FileUtil.getBytes(clazz, "dependencies/liferay-social.xml"));

    SocialConfigurationUtil.read(clazz.getClassLoader(), new String[] {xml});
  }
Ejemplo n.º 2
0
  protected void initSocial(PluginPackage pluginPackage) throws Exception {
    ClassLoader classLoader = ClassLoaderUtil.getPortalClassLoader();

    ServletContext servletContext = getServletContext();

    String[] xmls =
        new String[] {
          HttpUtil.URLtoString(servletContext.getResource("/WEB-INF/liferay-social.xml")),
          HttpUtil.URLtoString(servletContext.getResource("/WEB-INF/liferay-social-ext.xml"))
        };

    SocialConfigurationUtil.read(classLoader, xmls);
  }