Checks if a page is a model page.<p>

@param cms the CMS context to use
@param containerPage the page to check

@return true if the resource is a model page
505157
private boolean isModelPage(CmsObject cms, CmsResource containerPage) {

        CmsADEConfigData config = getConfigData(containerPage.getRootPath());
        for (CmsModelPageConfig modelConfig : config.getModelPages()) {
            if (modelConfig.getResource().getStructureId().equals(containerPage.getStructureId())) {
                return true;
            }
        }
        return false;
    }
699625
public boolean isDetailPage(CmsObject cms, CmsResource resource) {

        return getCache(isOnline(cms)).isDetailPage(cms, resource);
    }
120141
boolean isPossiblyDetailContent(CmsResource resource) {

        if (CmsResourceTypeXmlContainerPage.isContainerPage(resource)) {
            return false;
        }
        I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(resource);
        if (type instanceof CmsResourceTypeXmlAdeConfiguration) {
            return false;
        }
        return true;
    }
1179228
public CmsJspResourceWrapper getPageResource() {

        try {
            if (m_pageResource == null) {
                // get the container page itself, checking the history first
                m_pageResource = CmsJspResourceWrapper.wrap(
                    m_cms,
                    (CmsResource)CmsHistoryResourceHandler.getHistoryResource(m_request));
                if (m_pageResource == null) {
                    m_pageResource = CmsJspResourceWrapper.wrap(
                        m_cms,
                        m_cms.readResource(m_cms.getRequestContext().getUri()));
                }
            }
        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
        }
        return m_pageResource;
    }
617387
public boolean isDetailPage(CmsObject cms, CmsResource resource) {

        try {
            boolean result = m_detailPageIdCache.get(resource).booleanValue();
            if (!result) {
                // We want new detail pages to be available fast, so we don't cache negative results
                m_detailPageIdCache.invalidate(resource);
            }
            return result;
        } catch (ExecutionException e) {
            LOG.error(e.getLocalizedMessage(), e);
            return true;
        }
    }
551666
public CmsContainerPageBean build() {

        List<CmsContainerBean> containers = Lists.newArrayList();
        for (String containerName : m_containerInfos.keySet()) {
            CmsContainerBean containerBean = buildContainerBean(m_containerInfos.get(containerName));
            containers.add(containerBean);
        }
        return new CmsContainerPageBean(containers);
    }
993389
private void addDetailContent(CmsObject adminCms, Set<CmsResource> containerPages, String containerPage) {

        if (CmsDetailOnlyContainerUtil.isDetailContainersPage(adminCms, containerPage)) {

            try {
                CmsResource detailRes = adminCms.readResource(
                    CmsDetailOnlyContainerUtil.getDetailContentPath(containerPage),
                    CmsResourceFilter.IGNORE_EXPIRATION);
                containerPages.add(detailRes);
            } catch (Throwable e) {
                if (LOG.isWarnEnabled()) {
                    LOG.warn(e.getLocalizedMessage(), e);
                }
            }
        }
    }
743516
public static boolean checkVisible(CmsUUID id) {

        boolean show = false;
        if (CmsSitemapView.getInstance().getController().isEditable()) {
            CmsNewResourceInfo info = CmsSitemapView.getInstance().getController().getData().getNewResourceInfoById(id);
            show = CmsSitemapView.getInstance().isModelPageMode()
                && (((info != null) && info.isEditable()) || CmsSitemapView.getInstance().isModelGroupEntry(id));
        }
        return show;
    }
977403
public static boolean isModelGroupResource(CmsResource resource) {

        return CmsResourceTypeXmlContainerPage.MODEL_GROUP_TYPE_NAME.equals(
            OpenCms.getResourceManager().getResourceType(resource).getTypeName());
    }
322336
public static boolean isModelCopyGroup(CmsObject cms, CmsResource resource) {

        boolean result = false;
        if (isModelGroup(resource)) {
            try {
                CmsProperty tempElementsProp = cms.readPropertyObject(
                    resource,
                    CmsPropertyDefinition.PROPERTY_TEMPLATE_ELEMENTS,
                    false);
                if (!tempElementsProp.isNullProperty()
                    && CmsContainerElement.USE_AS_COPY_MODEL.equals(tempElementsProp.getValue())) {
                    result = true;
                }
            } catch (CmsException e) {
                LOG.warn(e.getMessage(), e);
            }

        }
        return result;
    }
1010814
public static boolean isModelGroup(CmsResource resource) {

        return OpenCms.getResourceManager().getResourceType(resource).getTypeName().equals(MODEL_GROUP_TYPE_NAME);
    }
9326
protected void unlockContainerpage() {

        if (getData().getDetailContainerPage() != null) {

            CmsCoreProvider.get().unlock(getData().getDetailContainerPage());
        } else if (unlockResource(CmsCoreProvider.get().getStructureId())) {
            CmsDebugLog.getInstance().printLine(Messages.get().key(Messages.GUI_NOTIFICATION_PAGE_UNLOCKED_0));
        }
    }
215065
private boolean hasModelGroupAncestor(CmsJspStandardContextBean standardContext) {

        boolean result = false;
        if (!standardContext.isModelGroupPage()) {
            CmsContainerElementWrapper parent = standardContext.getElement();
            while ((parent != null) && !result) {
                result = parent.isModelGroup();
                parent = parent.getParent();
            }
        }
        return result;
    }
182166
public CmsModelPageConfig getDefaultModelPage() {

        List<CmsModelPageConfig> modelPages = getModelPages();
        for (CmsModelPageConfig modelPageConfig : getModelPages()) {
            if (modelPageConfig.isDefault()) {
                return modelPageConfig;
            }
        }
        if (modelPages.isEmpty()) {
            return null;
        }
        return modelPages.get(0);
    }
308745
public static boolean is(@NotNull Page page, @NotNull TemplatePathInfo @NotNull... templates) {
    if (page == null || templates == null || templates.length == 0) {
      return false;
    }
    String templatePath = page.getProperties().get(NameConstants.PN_TEMPLATE, String.class);
    for (TemplatePathInfo template : templates) {
      if (template.getTemplatePath().equals(templatePath)) {
        return true;
      }
    }
    return false;
  }
11554
protected static boolean isFolder(CmsResource resource) throws CmsLoaderException {

        I_CmsResourceType resourceType = OpenCms.getResourceManager().getResourceType(resource.getTypeId());
        return resourceType.isFolder();
    }
210138
public void loadModelPages() {

        CmsRpcAction<CmsModelInfo> action = new CmsRpcAction<CmsModelInfo>() {

            @Override
            public void execute() {

                start(500, false);
                getService().getModelInfos(m_data.getRoot().getId(), this);

            }

            @Override
            protected void onResponse(CmsModelInfo result) {

                stop(false);
                CmsSitemapView.getInstance().displayModelPages(result);
            }
        };
        action.execute();
    }