List of usage examples for com.liferay.portal.kernel.trash TrashHandler isMovable
@Deprecated public boolean isMovable();
true if the entity can be moved from one container model (such as a folder) to another. From source file:com.liferay.trash.web.internal.portlet.configuration.icon.RestoreTrashPortletConfigurationIcon.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; }// w w w. j av a 2 s.c o m if (!trashHandler.isMovable()) { return false; } if (trashHandler.isContainerModel()) { return false; } TrashEntry trashEntry = trashDisplayContext.getTrashEntry(); if (trashEntry != null) { try { if (!trashHandler.isRestorable(trashEntry.getClassPK())) { return false; } if (!trashHandler.isInTrashContainer(trashEntry.getClassPK())) { return false; } } catch (Exception e) { return false; } } return true; }