Method which is called after the status from a publish action has arrived.<p>

@param brokenResources the list of broken resources
518802
public void onReceiveStatus(CmsWorkflowResponse brokenResources) {

        if (brokenResources.isSuccess()) {
            succeed();
            hide();
            CmsNotification.get().send(
                CmsNotification.Type.NORMAL,
                org.opencms.gwt.client.Messages.get().key(org.opencms.gwt.client.Messages.GUI_DONE_0));

        } else {
            m_failureMessage = brokenResources.getMessage();
            m_state = State.failure;
            m_brokenLinksPanel.setEntries(brokenResources.getResources(), brokenResources.getAvailableActions());
            setPanel(PANEL_BROKEN_LINKS);
        }
    }
82748
public List<CmsResource> getResourcesWithBrokenLinks() {

        if (m_resourcesWithBrokenLinks == null) {
            // sort the resulting hash map
            List<String> resources = new ArrayList<String>(m_brokenRelations.keySet());
            Collections.sort(resources);

            m_resourcesWithBrokenLinks = new ArrayList<CmsResource>(resources.size());
            m_notVisibleResourcesCount = 0;
            // remove not visible resources
            CmsResourceFilter filter = CmsResourceFilter.IGNORE_EXPIRATION.addRequireVisible();
            String storedSiteRoot = m_cms.getRequestContext().getSiteRoot();
            try {
                m_cms.getRequestContext().setSiteRoot("/");
                Iterator<String> itResources = resources.iterator();
                while (itResources.hasNext()) {
                    String resourceName = itResources.next();
                    try {
                        m_resourcesWithBrokenLinks.add(m_cms.readResource(resourceName, filter));
                    } catch (Exception e) {
                        // resource is not visible, increase count
                        m_notVisibleResourcesCount++;
                    }
                }
            } finally {
                m_cms.getRequestContext().setSiteRoot(storedSiteRoot);
            }
        }
        return m_resourcesWithBrokenLinks;
    }
305362
public void onResourceReleased(final ResourceReleaseEvent resourceReleaseEvent) {
    String resourceRemoteId = getResourceRemoteId(resourceReleaseEvent.getIdentifier());

    // REEF Common will trigger a ResourceReleaseEvent even if the resource has failed. Since we know that the shim
    // has already failed, we can safely ignore this.
    if (this.failedResources.remove(resourceReleaseEvent.getIdentifier()) != null) {
      LOG.log(Level.INFO, "Received a ResourceReleaseEvent for a failed shim with resourceId = {0}. Ignoring.",
          resourceReleaseEvent.getIdentifier());
    } else if (this.evaluators.get(resourceReleaseEvent.getIdentifier()).isPresent()) {
      EventHandler<EvaluatorShimProtocol.EvaluatorShimControlProto> handler =
          this.remoteManager.getHandler(resourceRemoteId, EvaluatorShimProtocol.EvaluatorShimControlProto.class);

      LOG.log(Level.INFO, "Sending TERMINATE command to the shim with remoteId = {0}.", resourceRemoteId);
      handler.onNext(
          EvaluatorShimProtocol.EvaluatorShimControlProto
              .newBuilder()
              .setCommand(EvaluatorShimProtocol.EvaluatorShimCommand.TERMINATE)
              .build());

      this.updateRuntimeStatus();
    }
  }
666578
private CmsDeleteResourceBean getBrokenLinks(CmsResource entryResource) throws CmsException {

        CmsDeleteResourceBean result = null;

        CmsListInfoBean info = null;
        List<CmsBrokenLinkBean> brokenLinks = null;

        CmsObject cms = getCmsObject();
        String resourceSitePath = cms.getSitePath(entryResource);

        ensureSession();

        List<CmsResource> descendants = new ArrayList<CmsResource>();
        HashSet<CmsUUID> deleteIds = new HashSet<CmsUUID>();

        descendants.add(entryResource);
        if (entryResource.isFolder()) {
            descendants.addAll(cms.readResources(resourceSitePath, CmsResourceFilter.IGNORE_EXPIRATION));
        }

        for (CmsResource deleteRes : descendants) {
            deleteIds.add(deleteRes.getStructureId());
        }
        Multimap<CmsResource, CmsResource> linkMap = HashMultimap.create();
        for (CmsResource resource : descendants) {
            List<CmsRelation> relations = cms.getRelationsForResource(resource, CmsRelationFilter.SOURCES);
            List<CmsResource> result1 = new ArrayList<CmsResource>();
            for (CmsRelation relation : relations) {
                // only add related resources that are not going to be deleted
                if (!deleteIds.contains(relation.getSourceId())) {
                    CmsResource source1 = relation.getSource(cms, CmsResourceFilter.ALL);
                    if (!source1.getState().isDeleted()) {
                        result1.add(source1);
                    }
                }
            }
            List<CmsResource> linkSources = result1;
            for (CmsResource source : linkSources) {
                linkMap.put(source, resource);
            }
        }

        brokenLinks = getBrokenLinkBeans(linkMap);
        info = getPageInfo(entryResource);

        result = new CmsDeleteResourceBean(resourceSitePath, info, brokenLinks);

        return result;
    }
692986
@SuppressWarnings({"unchecked", "rawtypes"})
    protected void markReadsBroken(Throwable cause) {
        if (readsBrokenUpdater.compareAndSet(this, 0, 1)) {
            if(UndertowLogger.REQUEST_IO_LOGGER.isDebugEnabled()) {
                UndertowLogger.REQUEST_IO_LOGGER.debugf(new ClosedChannelException(), "Marking reads broken on channel %s", this);
            }
            if(receiver != null) {
                receiver.markStreamBroken();
            }
            for(AbstractFramedStreamSourceChannel<C, R, S> r : new ArrayList<>(getReceivers())) {
                r.markStreamBroken();
            }

            handleBrokenSourceChannel(cause);
            safeClose(channel.getSourceChannel());
            closeSubChannels();
        }
    }
461461
public void releaseResources() {
		for (InputStream str : fis) {
			try {
				str.close();
			} catch (Exception e) {
				LOG.info("Exception while trying to close streams", e);
			}
		}
	}
161237
public void setResources(java.util.Collection<String> resources) {
        if (resources == null) {
            this.resources = null;
            return;
        }

        this.resources = new java.util.ArrayList<String>(resources);
    }
1154188
@SuppressWarnings("checkstyle:emptyblock")
	private void loadTop(final String resourceName) {
		try {
			resources.push(resourceName);

			load(resourceName);

			// Now check for INCLUDE_AFTER resources
			String includes = get(INCLUDE_AFTER);

			if (includes != null) {
				// First, do substitution on the INCLUDE_AFTER
				do {
				} while (substitute(INCLUDE_AFTER));

				// Now split and process
				String[] includeAfter = getString(INCLUDE_AFTER).split(",");
				backing.remove(INCLUDE_AFTER);
				for (String after : includeAfter) {
					loadTop(after);
				}
			}
		} finally {
			resources.pop();
		}
	}
1363731
public boolean shouldClearAll(List<CmsPublishedResource> publishedResources) {

        for (CmsPublishedResource pubRes : publishedResources) {
            for (String clearPath : m_clearAll) {
                if (CmsStringUtil.isPrefixPath(clearPath, pubRes.getRootPath())) {
                    return true;
                }
            }
        }
        return false;
    }
734794
public void setResourceGroups(java.util.Collection<ResourceGroup> resourceGroups) {
        if (resourceGroups == null) {
            this.resourceGroups = null;
            return;
        }

        this.resourceGroups = new java.util.ArrayList<ResourceGroup>(resourceGroups);
    }
327913
protected void uncacheResources(List<CmsResource> resources) {

        if (resources == null) {
            return;
        }
        for (int i = 0, n = resources.size(); i < n; i++) {
            // remove the resource
            uncacheResource(resources.get(i));
        }
    }
390267
void onResourceReleaseRequest(final ResourceReleaseEvent releaseRequest) {
    synchronized (this.theContainers) {
      LOG.log(Level.FINEST, "Release container: {0}", releaseRequest.getIdentifier());
      this.theContainers.release(releaseRequest.getIdentifier());
      this.checkRequestQueue();
    }
  }
1027201
public void initResource(CmsObject cms) throws CmsException {

        if (m_resource == null) {
            m_resource = cms.readResource(getId(), CmsResourceFilter.IGNORE_EXPIRATION);
            m_releasedAndNotExpired = m_resource.isReleasedAndNotExpired(cms.getRequestContext().getRequestTime());
        } else if (!isInMemoryOnly()) {
            CmsUUID id = m_resource.getStructureId();
            if (id == null) {
                id = getId();
            }
            // the resource object may have a wrong root path, e.g. if it was created before the resource was moved
            if (cms.getRequestContext().getCurrentProject().isOnlineProject()) {
                m_resource = cms.readResource(id, CmsResourceFilter.IGNORE_EXPIRATION);
                m_releasedAndNotExpired = m_resource.isReleasedAndNotExpired(cms.getRequestContext().getRequestTime());
            } else {
                if (!isTemporaryContent()) {
                    m_resource = cms.readResource(getId(), CmsResourceFilter.IGNORE_EXPIRATION);
                }
                m_releasedAndNotExpired = m_resource.isReleasedAndNotExpired(cms.getRequestContext().getRequestTime());
            }
        }
        if (m_settings == null) {
            setSettings(new HashMap<String, String>(getIndividualSettings()));
        }
        // redo on every init call to ensure sitepath is calculated for current site
        m_sitePath = cms.getSitePath(m_resource);
    }
428945
public void setResources(Resource[] resources) throws IOException {
        clear();
        
        for (Resource resource : resources) {
            addResource(resource);
        }
    }
1080637
public void setPublishRelatedResourcesMode(String publishRelatedResourcesMode) {

        m_publishRelatedResourcesMode = CmsPublishRelatedResourcesMode.valueOf(publishRelatedResourcesMode);
        if ((m_publishRelatedResourcesMode != null) && CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(
                Messages.get().getBundle().key(
                    Messages.INIT_PUBLISH_RELATED_RESOURCES_MODE_1,
                    m_publishRelatedResourcesMode.toString()));
        }
    }
768146
public void setResourceTags(java.util.Collection<ResourceTag> resourceTags) {
        if (resourceTags == null) {
            this.resourceTags = null;
            return;
        }

        this.resourceTags = new com.amazonaws.internal.SdkInternalList<ResourceTag>(resourceTags);
    }
807419
private void initDeletedResources(CmsObject cms, List<I_CmsHistoryResource> deletedResources) throws CmsException {

        Collections.sort(deletedResources, new Comparator<I_CmsHistoryResource>() {

            public int compare(I_CmsHistoryResource first, I_CmsHistoryResource second) {

                return first.getRootPath().compareTo(second.getRootPath());
            }
        });
        m_deletedResourceContainer.removeAllComponents();
        m_selectionContainer = new IndexedContainer();
        m_selectionContainer.addContainerProperty(PROP_SELECTED, Boolean.class, Boolean.FALSE);
        m_okButton.setEnabled(!deletedResources.isEmpty());
        if (deletedResources.isEmpty()) {
            m_deletedResourceContainer.addComponent(
                new Label(CmsVaadinUtils.getMessageText(org.opencms.workplace.list.Messages.GUI_LIST_EMPTY_0)));

        }
        for (I_CmsHistoryResource deleted : deletedResources) {
            I_CmsResourceType resType = OpenCms.getResourceManager().getResourceType(deleted.getTypeId());
            String typeName = resType.getTypeName();
            CmsExplorerTypeSettings explorerType = OpenCms.getWorkplaceManager().getExplorerTypeSetting(typeName);
            String title = cms.getRequestContext().removeSiteRoot(deleted.getRootPath());

            String subtitle = CmsVaadinUtils.getMessageText(
                org.opencms.ui.Messages.GUI_RESTOREDELETED_DATE_VERSION_2,
                CmsVfsService.formatDateTime(cms, deleted.getDateLastModified()),
                "" + deleted.getVersion());
            if (explorerType == null) {
                explorerType = OpenCms.getWorkplaceManager().getExplorerTypeSetting(
                    deleted.isFile()
                    ? CmsResourceTypeUnknownFile.RESOURCE_TYPE_NAME
                    : CmsResourceTypeUnknownFolder.RESOURCE_TYPE_NAME);
            }
            CmsResourceInfo info = new CmsResourceInfo(
                title,
                subtitle,
                CmsResourceUtil.getBigIconResource(explorerType, deleted.getName()));
            info.setWidth("100%");
            HorizontalLayout hl = new HorizontalLayout();
            hl.setWidth("100%");
            CheckBox checkbox = new CheckBox();
            hl.addComponent(checkbox);
            hl.addComponent(info);
            hl.setExpandRatio(info, 1);
            hl.setComponentAlignment(checkbox, Alignment.MIDDLE_LEFT);
            m_selectionContainer.addItem(deleted.getStructureId());
            checkbox.setPropertyDataSource(
                m_selectionContainer.getItem(deleted.getStructureId()).getItemProperty(PROP_SELECTED));
            m_deletedResourceContainer.addComponent(hl);
        }

    }