Example usage for com.liferay.portal.kernel.model Company getName

List of usage examples for com.liferay.portal.kernel.model Company getName

Introduction

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

Prototype

@com.liferay.portal.kernel.bean.AutoEscape
    public String getName() throws com.liferay.portal.kernel.exception.PortalException;

Source Link

Usage

From source file:com.liferay.blogs.service.impl.BlogsEntryServiceImpl.java

License:Open Source License

@Override
public String getCompanyEntriesRSS(long companyId, Date displayDate, int status, int max, String type,
        double version, String displayStyle, String feedURL, String entryURL, ThemeDisplay themeDisplay)
        throws PortalException {

    Company company = companyPersistence.findByPrimaryKey(companyId);

    String name = company.getName();
    List<BlogsEntry> blogsEntries = getCompanyEntries(companyId, displayDate, status, max);

    return exportToRSS(name, name, type, version, displayStyle, feedURL, entryURL, blogsEntries, themeDisplay);
}

From source file:com.liferay.flags.taglib.servlet.taglib.soy.FlagsTag.java

License:Open Source License

@Override
public int doStartTag() {
    ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);

    String randomNamespace = StringUtil.randomId() + StringPool.UNDERLINE;

    try {//from   w w w . j  a va  2 s . com
        Map<String, Object> context = getContext();

        boolean enabled = GetterUtil.getBoolean(context.get("enabled"), true);

        Company company = themeDisplay.getCompany();

        putValue("companyName", company.getName());

        putValue("flagsEnabled", _isFlagsEnabled(themeDisplay));

        putValue("formData", _getDataJSONObject(context));

        putValue("id", randomNamespace + "id");

        putValue("enabled", enabled);

        boolean label = GetterUtil.getBoolean(context.get("label"), true);

        putValue("label", label);

        String message = GetterUtil.getString(context.get("message"), LanguageUtil.get(request, "flag"));

        putValue("message", message);

        putValue("pathTermsOfUse", themeDisplay.getPathMain() + "/portal/terms_of_use");

        putValue("pathThemeImages", themeDisplay.getPathThemeImages());

        putValue("portletNamespace", PortalUtil.getPortletNamespace(PortletKeys.FLAGS));

        boolean signedIn = themeDisplay.isSignedIn();

        putValue("signedIn", signedIn);

        if (signedIn) {
            User user = themeDisplay.getUser();

            putValue("reporterEmailAddress", user.getEmailAddress());
        }

        String title = message;

        if (!enabled) {
            title = LanguageUtil.get(request,
                    "flags-are-disabled-because-this-entry-is-in-the-recycle-" + "bin");
        }

        putValue("title", title);

        putValue("uri", _getURI());

        putValue("reasons", _getReasons(themeDisplay.getCompanyId()));
    } catch (Exception e) {
        _log.error(e, e);
    }

    setTemplateNamespace("Flags.render");

    return super.doStartTag();
}