Example usage for com.liferay.portal.kernel.trash TrashHandler isDeletable

List of usage examples for com.liferay.portal.kernel.trash TrashHandler isDeletable

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.trash TrashHandler isDeletable.

Prototype

@Deprecated
public boolean isDeletable();

Source Link

Document

Returns true if the entity can be deleted from the Recycle Bin.

Usage

From source file:com.liferay.trash.web.internal.portlet.configuration.icon.DeleteTrashPortletConfigurationIcon.java

License:Open Source License

@Override
public boolean isShow(PortletRequest portletRequest) {
    TrashDisplayContext trashDisplayContext = new TrashDisplayContext(
            _portal.getHttpServletRequest(portletRequest), null);

    TrashHandler trashHandler = trashDisplayContext.getTrashHandler();

    if (trashHandler == null) {
        return false;
    }/*from w  ww .  ja va 2s. c o  m*/

    if (!trashHandler.isDeletable()) {
        return false;
    }

    if (trashHandler.isContainerModel()) {
        return false;
    }

    return true;
}