public static String doTag(String modelName, PageContext pageContext) throws Exception {

    Object returnObj = PortalClassInvoker.invoke(false, _doEndTagMethodKey, modelName, pageContext);

    if (returnObj != null) {
      return returnObj.toString();
    } else {
      return StringPool.BLANK;
    }
  }
  protected void updateUserGroup(Group group) throws Exception {
    LayoutLocalServiceUtil.deleteLayouts(group.getGroupId(), false, new ServiceContext());

    LayoutSetPrototypeUtil.updateLayoutSetPrototype(
        group, false, SocialOfficeConstants.LAYOUT_SET_PROTOTYPE_KEY_USER_PUBLIC);

    LayoutSet publicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(group.getGroupId(), false);

    PortalClassInvoker.invoke(
        true, _mergeLayoutSetPrototypeLayoutsMethodKey, group, publicLayoutSet);

    LayoutLocalServiceUtil.deleteLayouts(group.getGroupId(), true, new ServiceContext());

    LayoutSetPrototypeUtil.updateLayoutSetPrototype(
        group, true, SocialOfficeConstants.LAYOUT_SET_PROTOTYPE_KEY_USER_PRIVATE);

    LayoutSet privateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(group.getGroupId(), true);

    PortalClassInvoker.invoke(
        true, _mergeLayoutSetPrototypeLayoutsMethodKey, group, privateLayoutSet);

    SocialOfficeUtil.enableSocialOffice(group);
  }
  public MicroblogsEntryFinderImpl() {
    try {
      MethodKey methodKey =
          new MethodKey("com.liferay.util.dao.orm.CustomSQL", "get", String.class);

      _joinBySocialRelationSQL =
          (String)
              PortalClassInvoker.invoke(
                  true,
                  methodKey,
                  "com.liferay.portal.service.persistence." + "UserFinder.joinBySocialRelation");
    } catch (Exception e) {
      _log.error(e, e);
    }
  }
示例#4
0
  public static Session createSession(Map<String, String> parameters) throws RepositoryException {

    Session session = null;

    try {
      Object returnObj = PortalClassInvoker.invoke(false, _createSessionMethodKey, parameters);

      if (returnObj != null) {
        session = (Session) returnObj;
      }
    } catch (RepositoryException re) {
      throw re;
    } catch (Exception e) {
      _log.error(e, e);
    }

    return session;
  }
示例#5
0
  public static void checkRepository(
      long repositoryId,
      Map<String, String> parameters,
      UnicodeProperties typeSettingsProperties,
      String typeSettingsKey) {

    try {
      PortalClassInvoker.invoke(
          false,
          _checkRepositoryMethodKey,
          repositoryId,
          parameters,
          typeSettingsProperties,
          typeSettingsKey);
    } catch (Exception e) {
      _log.error(e, e);
    }
  }
示例#6
0
  public static String getTypeSettingsValue(
      UnicodeProperties typeSettingsProperties, String typeSettingsKey) {

    String value = null;

    try {
      Object returnObj =
          PortalClassInvoker.invoke(
              false, _getTypeSettingsValueMethodKey, typeSettingsProperties, typeSettingsKey);

      if (returnObj != null) {
        value = (String) returnObj;
      }
    } catch (Exception e) {
      _log.error(e, e);
    }

    return value;
  }