Example usage for com.liferay.portal.kernel.theme ThemeDisplay getScopeGroupName

List of usage examples for com.liferay.portal.kernel.theme ThemeDisplay getScopeGroupName

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.theme ThemeDisplay getScopeGroupName.

Prototype

public String getScopeGroupName() throws PortalException 

Source Link

Document

Returns the name of the scoped or sub-scoped active group (e.g.

Usage

From source file:com.liferay.asset.categories.admin.web.internal.portlet.configuration.icon.PermissionsPortletConfigurationIcon.java

License:Open Source License

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

    String url = StringPool.BLANK;

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

    try {/*  w ww  .java2s . c o m*/
        url = PermissionsURLTag.doTag(StringPool.BLANK, "com.liferay.asset.categories",
                themeDisplay.getScopeGroupName(), null, String.valueOf(themeDisplay.getSiteGroupId()),
                LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest());
    } catch (Exception e) {
    }

    return url;
}

From source file:com.liferay.blogs.web.internal.portlet.configuration.icon.PermissionsPortletConfigurationIcon.java

License:Open Source License

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

    String url = StringPool.BLANK;

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

    try {// ww w.j  a  va  2  s  .  co  m
        url = PermissionsURLTag.doTag(StringPool.BLANK, "com.liferay.blogs", themeDisplay.getScopeGroupName(),
                null, String.valueOf(themeDisplay.getScopeGroupId()), LiferayWindowState.POP_UP.toString(),
                null, themeDisplay.getRequest());
    } catch (Exception e) {
    }

    return url;
}

From source file:com.liferay.bookmarks.web.internal.portlet.configuration.icon.PermissionsPortletConfigurationIcon.java

License:Open Source License

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

    String url = StringPool.BLANK;

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

    try {/*from w  ww  .j a  v  a 2s  .co  m*/
        String modelResource = "com.liferay.bookmarks";
        String modelResourceDescription = themeDisplay.getScopeGroupName();
        String resourcePrimKey = String.valueOf(themeDisplay.getScopeGroupId());

        url = PermissionsURLTag.doTag(StringPool.BLANK, modelResource, modelResourceDescription, null,
                resourcePrimKey, LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest());
    } catch (Exception e) {
    }

    return url;
}

From source file:com.liferay.document.library.web.internal.portlet.action.DownloadEntriesMVCResourceCommand.java

License:Open Source License

protected String getZipFileName(long folderId, ThemeDisplay themeDisplay) throws PortalException {

    if (folderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
        Folder folder = _dlAppService.getFolder(folderId);

        return folder.getName() + ".zip";
    } else {/*from   w ww.  j  a va 2 s. c o  m*/
        return themeDisplay.getScopeGroupName() + ".zip";
    }
}

From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.FolderPermissionPortletConfigurationIcon.java

License:Open Source License

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

    String url = StringPool.BLANK;

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

    try {//  w  ww  . j  a v a  2s.  co  m
        Folder folder = ActionUtil.getFolder(portletRequest);

        if (folder != null) {
            url = PermissionsURLTag.doTag(null, DLFolderConstants.getClassName(),
                    HtmlUtil.unescape(folder.getName()), null, String.valueOf(folder.getFolderId()),
                    LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest());
        } else {
            url = PermissionsURLTag.doTag(null, "com.liferay.document.library",
                    HtmlUtil.unescape(themeDisplay.getScopeGroupName()), null,
                    String.valueOf(themeDisplay.getScopeGroupId()), LiferayWindowState.POP_UP.toString(), null,
                    themeDisplay.getRequest());
        }
    } catch (Exception e) {
    }

    return url;
}

From source file:com.liferay.document.library.web.internal.portlet.configuration.icon.PermissionsPortletConfigurationIcon.java

License:Open Source License

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

    String url = StringPool.BLANK;

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

    try {/*  w  ww .j ava2 s .c o  m*/
        url = PermissionsURLTag.doTag(StringPool.BLANK, "com.liferay.document.library",
                themeDisplay.getScopeGroupName(), null, String.valueOf(themeDisplay.getScopeGroupId()),
                LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest());
    } catch (Exception e) {
    }

    return url;
}

From source file:com.liferay.journal.web.internal.portlet.configuration.icon.FeedsPermissionsPortletConfigurationIcon.java

License:Open Source License

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

    String url = StringPool.BLANK;

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

    try {/*from  w  ww.j  a  v a 2s.  co  m*/
        url = PermissionsURLTag.doTag(StringPool.BLANK, "com.liferay.journal",
                HtmlUtil.escape(themeDisplay.getScopeGroupName()), null,
                String.valueOf(themeDisplay.getScopeGroupId()), LiferayWindowState.POP_UP.toString(), null,
                themeDisplay.getRequest());
    } catch (Exception e) {
    }

    return url;
}

From source file:com.liferay.layout.item.selector.web.internal.display.context.LayoutItemSelectorViewDisplayContext.java

License:Open Source License

public JSONArray getLayoutsJSONArray() throws Exception {
    JSONArray layoutsJSONArray = JSONFactoryUtil.createJSONArray();

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

    String layoutUuid = ParamUtil.getString(_request, "layoutUuid");

    JSONArray jsonArray = _getLayoutsJSONArray(themeDisplay.getScopeGroupId(), _privateLayout, 0, layoutUuid);

    JSONObject jsonObject = JSONFactoryUtil.createJSONObject();

    jsonObject.put("children", jsonArray);
    jsonObject.put("disabled", true);
    jsonObject.put("expanded", true);
    jsonObject.put("icon", "home");
    jsonObject.put("id", "0");
    jsonObject.put("name", themeDisplay.getScopeGroupName());

    layoutsJSONArray.put(jsonObject);//from  w w  w . java2s .c  o m

    return layoutsJSONArray;
}

From source file:com.liferay.message.boards.web.internal.portlet.configuration.icon.PermissionsPortletConfigurationIcon.java

License:Open Source License

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

    String url = StringPool.BLANK;

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

    try {//from w  w w. j  av a 2  s .com
        String modelResource = "com.liferay.message.boards";
        String modelResourceDescription = themeDisplay.getScopeGroupName();
        String resourcePrimKey = String.valueOf(themeDisplay.getScopeGroupId());

        url = PermissionsURLTag.doTag(StringPool.BLANK, modelResource, modelResourceDescription, null,
                resourcePrimKey, LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest());
    } catch (Exception e) {
    }

    return url;
}

From source file:com.liferay.password.policies.admin.web.internal.portlet.configuration.icon.PermissionsPortletConfigurationIcon.java

License:Open Source License

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

    String url = StringPool.BLANK;

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

    try {/*from w ww. j  a  v  a 2s . co m*/
        url = PermissionsURLTag.doTag(StringPool.BLANK, PasswordPolicy.class.getName(),
                themeDisplay.getScopeGroupName(), null, String.valueOf(_getPasswordPolicyId(portletRequest)),
                LiferayWindowState.POP_UP.toString(), null, themeDisplay.getRequest());
    } catch (Exception e) {
    }

    return url;
}