Example usage for com.liferay.portal.kernel.model PortletConstants WAR_SEPARATOR

List of usage examples for com.liferay.portal.kernel.model PortletConstants WAR_SEPARATOR

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.model PortletConstants WAR_SEPARATOR.

Prototype

String WAR_SEPARATOR

To view the source code for com.liferay.portal.kernel.model PortletConstants WAR_SEPARATOR.

Click Source Link

Document

War file separator.

Usage

From source file:com.liferay.application.list.deploy.hot.LegacyPortletPanelAppHotDeployListener.java

License:Open Source License

protected String getPortletId(String servletContextName, String portletName) {

    if (servletContextName == null) {
        return portletName;
    }/*from  ww  w. j  a  va2s . c o  m*/

    return _portal.getJsSafePortletId(portletName + PortletConstants.WAR_SEPARATOR + servletContextName);
}

From source file:com.liferay.exportimport.resources.importer.internal.util.FileSystemImporter.java

License:Open Source License

protected void updateLayoutSetThemeId(JSONObject sitemapJSONObject) throws Exception {

    String themeId = sitemapJSONObject.getString("themeId");

    if (Validator.isNotNull(themeId)) {
        Theme theme = themeLocalService.fetchTheme(companyId, themeId);

        if (theme == null) {
            themeId = null;//from   w  w  w  . j  a  v  a2 s . co m
        }
    }

    if (Validator.isNull(themeId)) {
        int pos = servletContextName.indexOf("-theme");

        if (pos != -1) {
            themeId = servletContextName.substring(0, pos) + PortletConstants.WAR_SEPARATOR
                    + servletContextName;

            themeId = portal.getJsSafePortletId(themeId);

            Theme theme = themeLocalService.fetchTheme(companyId, themeId);

            if (theme == null) {
                themeId = null;
            }
        }
    }

    if (Validator.isNotNull(themeId)) {
        layoutSetLocalService.updateLookAndFeel(groupId, themeId, null, null);
    }
}