Example usage for com.liferay.portal.kernel.util PropsKeys TRASH_ENABLED

List of usage examples for com.liferay.portal.kernel.util PropsKeys TRASH_ENABLED

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util PropsKeys TRASH_ENABLED.

Prototype

String TRASH_ENABLED

To view the source code for com.liferay.portal.kernel.util PropsKeys TRASH_ENABLED.

Click Source Link

Usage

From source file:com.liferay.site.admin.web.internal.servlet.taglib.ui.SiteRecycleBinFormNavigatorEntry.java

License:Open Source License

@Override
public boolean isVisible(User user, Group group) {
    if (group == null) {
        return false;
    }//from  w w w .j  a va 2s.c  o  m

    boolean trashEnabled = PrefsPropsUtil.getBoolean(group.getCompanyId(), PropsKeys.TRASH_ENABLED);

    if (!trashEnabled) {
        return false;
    }

    return true;
}

From source file:com.liferay.trash.internal.TrashHelperImpl.java

License:Open Source License

@Override
public boolean isTrashEnabled(Group group) {
    boolean companyTrashEnabled = PrefsPropsUtil.getBoolean(group.getCompanyId(), PropsKeys.TRASH_ENABLED);

    if (!companyTrashEnabled) {
        return false;
    }/*ww  w .  j  a v a2s .co m*/

    UnicodeProperties typeSettingsProperties = group.getParentLiveGroupTypeSettingsProperties();

    return GetterUtil.getBoolean(typeSettingsProperties.getProperty("trashEnabled"), true);
}