@Override
  public String getURL(PortletRequest portletRequest, PortletResponse portletResponse) {

    ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY);

    PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();

    Portlet portlet = _portletLocalService.getPortletById(portletDisplay.getId());

    PortletURL portletURL =
        PortletURLFactoryUtil.create(
            portletRequest,
            PortletProviderUtil.getPortletId(
                DDMStructure.class.getName(), PortletProvider.Action.VIEW),
            PortletRequest.RENDER_PHASE);

    portletURL.setParameter("mvcPath", "/view.jsp");
    portletURL.setParameter("backURL", themeDisplay.getURLCurrent());
    portletURL.setParameter("groupId", String.valueOf(themeDisplay.getScopeGroupId()));
    portletURL.setParameter("refererPortletName", DLPortletKeys.DOCUMENT_LIBRARY);
    portletURL.setParameter("refererWebDAVToken", WebDAVUtil.getStorageToken(portlet));
    portletURL.setParameter("showAncestorScopes", Boolean.TRUE.toString());
    portletURL.setParameter("showManageTemplates", Boolean.FALSE.toString());

    return portletURL.toString();
  }
  @Override
  public String getURL() {
    try {
      Portlet portlet = (Portlet) portletRequest.getAttribute(WebKeys.RENDER_PORTLET);

      PortletURL basePortletURL =
          PortletURLFactoryUtil.create(
              portletRequest,
              PortletKeys.PORTLET_SHARING,
              themeDisplay.getPlid(),
              PortletRequest.RESOURCE_PHASE);

      StringBundler sb = new StringBundler(5);

      sb.append("javascript:Liferay.PortletSharing.showNetvibesInfo('");
      sb.append(PortalUtil.getNetvibesURL(portlet, themeDisplay));
      sb.append("', '");
      sb.append(basePortletURL);
      sb.append("');");

      return sb.toString();
    } catch (PortalException pe) {
      if (_log.isWarnEnabled()) {
        _log.warn(pe, pe);
      }

      return StringPool.BLANK;
    }
  }
  private String _getOnclickMethod() {
    String imageEditorPortletId =
        PortletProviderUtil.getPortletId(Image.class.getName(), PortletProvider.Action.EDIT);

    PortletURL imageEditorURL =
        PortletURLFactoryUtil.create(_request, imageEditorPortletId, PortletRequest.RENDER_PHASE);

    imageEditorURL.setParameter("mvcRenderCommandName", "/image_editor/view");

    try {
      imageEditorURL.setWindowState(LiferayWindowState.POP_UP);
    } catch (Exception e) {
      throw new SystemException("Unable to set window state", e);
    }

    LiferayPortletResponse liferayPortletResponse = _getLiferayPortletResponse();

    PortletURL editURL = liferayPortletResponse.createActionURL();

    editURL.setParameter(
        ActionRequest.ACTION_NAME, "/document_library/edit_file_entry_with_image_editor");

    editURL.setParameter("fileEntryId", String.valueOf(_fileEntry.getFileEntryId()));

    String fileEntryPreviewURL =
        DLUtil.getPreviewURL(_fileEntry, _fileVersion, _themeDisplay, StringPool.BLANK);

    StringBundler sb = new StringBundler(10);

    sb.append(liferayPortletResponse.getNamespace());
    sb.append("editWithImageEditor('");
    sb.append(imageEditorURL.toString());
    sb.append("', '");
    sb.append(editURL.toString());
    sb.append("', '");
    sb.append(_fileEntry.getFileName());
    sb.append("', '");
    sb.append(fileEntryPreviewURL);
    sb.append("');");

    return sb.toString();
  }
  @Override
  public String getURL(PortletRequest portletRequest, PortletResponse portletResponse) {

    try {
      PortletURL portletURL =
          PortletURLFactoryUtil.create(
              portletRequest,
              UserGroupsAdminPortletKeys.USER_GROUPS_ADMIN,
              PortletRequest.RENDER_PHASE);

      portletURL.setParameter("mvcPath", "/edit_user_group.jsp");
      portletURL.setParameter("redirect", PortalUtil.getCurrentURL(portletRequest));

      UserGroup userGroup = ActionUtil.getUserGroup(portletRequest);

      portletURL.setParameter("userGroupId", String.valueOf(userGroup.getUserGroupId()));

      return portletURL.toString();
    } catch (Exception e) {
    }

    return StringPool.BLANK;
  }