protected boolean hasBlockingLocks(final I_CmsDialogContext context) {

        CmsObject cms = context.getCms();
        List<CmsResource> resources = context.getResources();
        List<CmsResource> blocked = Lists.newArrayList();
        for (CmsResource resource : resources) {
            try {
                blocked.addAll(cms.getBlockingLockedResources(resource));
            } catch (CmsException e) {
                LOG.error(e.getLocalizedMessage(), e);
            }
        }
        if (blocked.isEmpty()) {
            return false;
        } else {

            CmsLockedResourcesList dialog = new CmsLockedResourcesList(
                cms,
                blocked,
                CmsVaadinUtils.getMessageText(Messages.GUI_CANT_PERFORM_OPERATION_BECAUSE_OF_LOCKED_RESOURCES_0),
                new Runnable() {

                    public void run() {

                        List<CmsUUID> noStructureIds = Collections.emptyList();
                        context.finish(noStructureIds);
                    }

                },
                null);
            context.start(
                CmsVaadinUtils.getMessageText(org.opencms.workplace.explorer.Messages.GUI_EXPLORER_CONTEXT_LOCKS_0),
                dialog);
            return true;
        }
    }
protected boolean hasBlockingLocks ( final I_CmsDialogContext context ) { CmsObject cms = context . getCms ( ) ; List < CmsResource > resources = context . getResources ( ) ; List < CmsResource > blocked = Lists . newArrayList ( ) ; for ( CmsResource resource : resources ) { try { blocked . addAll ( cms . getBlockingLockedResources ( resource ) ) ; } catch ( CmsException e ) { LOG . error ( e . getLocalizedMessage ( ) , e ) ; } } if ( blocked . isEmpty ( ) ) { return false ; } else { CmsLockedResourcesList dialog = new CmsLockedResourcesList ( cms , blocked , CmsVaadinUtils . getMessageText ( Messages . GUI_CANT_PERFORM_OPERATION_BECAUSE_OF_LOCKED_RESOURCES_0 ) , new Runnable ( ) { public void run ( ) { List < CmsUUID > noStructureIds = Collections . emptyList ( ) ; context . finish ( noStructureIds ) ; } } , null ) ; context . start ( CmsVaadinUtils . getMessageText ( org . opencms . workplace . explorer . Messages . GUI_EXPLORER_CONTEXT_LOCKS_0 ) , dialog ) ; return true ; } }
Returns if there are any blocking locks within the context resources.<p>
Will open the blocking locks dialog if required.<p>

@param context the dialog context

@return <code>true</code> in case of blocking locks