/** * Returns a localized name for the given relation type.<p> * * @param locale the locale * * @return a localized name */ public String getLocalizedName(Locale locale) { return getLocalizedName(Messages.get().getBundle(locale)); }
/** * Returns a localized name for the given relation type.<p> * * @param locale the locale * * @return a localized name */ public String getLocalizedName(Locale locale) { return getLocalizedName(Messages.get().getBundle(locale)); }
if (pos < 0) { throw new CmsDataAccessException( Messages.get().container(Messages.ERR_CATEGORY_INVALID_LOCATION_1, rootPath));
/** * Public constructor for user defined relation types.<p> * * @param id the id of the relation type * @param name the name of the relation * @param type the type of relation type, strong or weak */ public CmsRelationType(int id, String name, String type) { m_name = name.toUpperCase(); if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) { // allow relation type definitions only during startup throw new CmsInitException(Messages.get().container(Messages.ERR_RELATION_TYPE_INIT_1, m_name)); } m_strong = type.toUpperCase().equals(VALUE_STRONG); m_defInContent = false; m_id = USER_DEFINED_MODE_LIMIT + id; }
/** * Returns a Html representation of this pointer link validation result.<p> * * @param locale the Locale to display the result in * * @return a Html representation of this external link validation result */ public String toHtml(Locale locale) { CmsMessages mg = Messages.get().getBundle(locale); if (m_brokenLinks.size() > 0) { StringBuffer result = new StringBuffer(1024); Iterator brokenLinks = m_brokenLinks.entrySet().iterator(); result.append(mg.key(Messages.GUI_LINK_VALIDATION_RESULTS_INTRO_1, new Object[] {m_validationDate})).append( "<ul>"); while (brokenLinks.hasNext()) { Entry link = (Map.Entry)brokenLinks.next(); String linkPath = (String)link.getKey(); String linkUrl = (String)link.getValue(); String msg = mg.key(Messages.GUI_LINK_POINTING_TO_2, new Object[] {linkPath, linkUrl}); result.append("<li>").append(msg).append("</li>"); } return result.append("</ul>").toString(); } else { return mg.key(Messages.GUI_LINK_VALIDATION_RESULTS_ALL_VALID_1, new Object[] {m_validationDate}); } } }
/** * Public constructor for user defined relation types.<p> * * @param id the id of the relation type * @param name the name of the relation * @param type the type of relation type, strong or weak */ public CmsRelationType(int id, String name, String type) { m_name = name.toUpperCase(); if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) { // allow relation type definitions only during startup throw new CmsInitException(Messages.get().container(Messages.ERR_RELATION_TYPE_INIT_1, m_name)); } m_strong = type.toUpperCase().equals(VALUE_STRONG); m_defInContent = false; m_id = USER_DEFINED_MODE_LIMIT + id; }
throw new CmsDataAccessException(Messages.get().container( Messages.ERR_CATEGORY_INVALID_LOCATION_1, rootPath));
/** * Returns a Html representation of this pointer link validation result.<p> * * @param locale the Locale to display the result in * * @return a Html representation of this external link validation result */ public String toHtml(Locale locale) { CmsMessages mg = Messages.get().getBundle(locale); if (m_brokenLinks.size() > 0) { StringBuffer result = new StringBuffer(1024); Iterator<Entry<String, String>> brokenLinks = m_brokenLinks.entrySet().iterator(); result.append(mg.key(Messages.GUI_LINK_VALIDATION_RESULTS_INTRO_1, new Object[] {m_validationDate})).append( "<ul>"); while (brokenLinks.hasNext()) { Entry<String, String> link = brokenLinks.next(); String linkPath = link.getKey(); String linkUrl = link.getValue(); String msg = mg.key(Messages.GUI_LINK_POINTING_TO_2, new Object[] {linkPath, linkUrl}); result.append("<li>").append(msg).append("</li>"); } return result.append("</ul>").toString(); } else { return mg.key(Messages.GUI_LINK_VALIDATION_RESULTS_ALL_VALID_1, new Object[] {m_validationDate}); } } }
relations = m_cms.getRelationsForResource(folderName, filter); } catch (CmsException e) { LOG.error(Messages.get().getBundle().key(Messages.LOG_LINK_SEARCH_1, folderName), e); continue;
relations = m_cms.getRelationsForResource(folderName, filter); } catch (CmsException e) { LOG.error(Messages.get().getBundle().key(Messages.LOG_LINK_SEARCH_1, folderName), e); continue;
Messages.get().getBundle().key( Messages.LOG_LINK_VALIDATION_READBYID_FAILED_2, relation.getTargetId().toString(), Messages.get().getBundle().key( Messages.LOG_LINK_VALIDATION_READBYPATH_FAILED_2, relation.getTargetPath(), if (offlineResource.getState().isDeleted()) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_LINK_VALIDATION_RESOURCEDELETED_1, link));
if (m_structureId == null) { throw new CmsException(Messages.get().container(Messages.LOG_BROKEN_LINK_NO_ID_0)); LOG.debug(Messages.get().getBundle().key( Messages.LOG_BROKEN_LINK_UPDATED_BY_ID_3, m_structureId, LOG.debug(Messages.get().getBundle().key(Messages.LOG_BROKEN_LINK_BY_ID_2, m_target, m_structureId), e); LOG.debug(Messages.get().getBundle().key( Messages.LOG_BROKEN_LINK_UPDATED_BY_NAME_3, m_target, LOG.debug(Messages.get().getBundle().key(Messages.LOG_BROKEN_LINK_BY_NAME_1, m_target), e1);
Messages.get().container(Messages.RPT_VALIDATE_EXTERNAL_LINKS_BEGIN_0), I_CmsReport.FORMAT_HEADLINE); new Integer(i), new Integer(links.size())), I_CmsReport.FORMAT_NOTE); m_report.print(Messages.get().container(Messages.RPT_VALIDATE_LINK_0), I_CmsReport.FORMAT_NOTE); m_report.print(org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_ARGUMENT_1, link.getRootPath())); m_report.print(Messages.get().container(Messages.GUI_LINK_POINTING_TO_0), I_CmsReport.FORMAT_NOTE); m_report.print(org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_ARGUMENT_1, m_report.println(Messages.get().container(Messages.RPT_BROKEN_0), I_CmsReport.FORMAT_ERROR); } else { m_report.println( m_report.println(Messages.get().container( Messages.RPT_LINK_VALIDATION_STAT_2, new Integer(links.size()), new Integer(brokenLinks.size())), I_CmsReport.FORMAT_HEADLINE); m_report.println( Messages.get().container(Messages.RPT_VALIDATE_EXTERNAL_LINKS_END_0), I_CmsReport.FORMAT_HEADLINE);
Messages.get().container(Messages.RPT_VALIDATE_EXTERNAL_LINKS_BEGIN_0), I_CmsReport.FORMAT_HEADLINE); new Integer(links.size())), I_CmsReport.FORMAT_NOTE); m_report.print(Messages.get().container(Messages.RPT_VALIDATE_LINK_0), I_CmsReport.FORMAT_NOTE); m_report.print( org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_ARGUMENT_1, link.getRootPath())); m_report.print(Messages.get().container(Messages.GUI_LINK_POINTING_TO_0), I_CmsReport.FORMAT_NOTE); m_report.print( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_ARGUMENT_1, linkUrl)); m_report.println(Messages.get().container(Messages.RPT_BROKEN_0), I_CmsReport.FORMAT_ERROR); } else { m_report.println( Messages.get().container( Messages.RPT_LINK_VALIDATION_STAT_2, new Integer(links.size()), I_CmsReport.FORMAT_HEADLINE); m_report.println( Messages.get().container(Messages.RPT_VALIDATE_EXTERNAL_LINKS_END_0), I_CmsReport.FORMAT_HEADLINE);
LOG.error(Messages.get().getBundle().key(Messages.LOG_LINK_SEARCH_1, resource), e); if (report != null) { report.println( Messages.get().container(Messages.LOG_LINK_SEARCH_1, dbc.removeSiteRoot(resource.getRootPath())), I_CmsReport.FORMAT_ERROR); if (report != null) { report.println( Messages.get().container(Messages.RPT_HTMLLINK_FOUND_BROKEN_LINKS_0), I_CmsReport.FORMAT_WARNING); if (!resource.getState().isDeleted()) { report.println( Messages.get().container( Messages.RPT_HTMLLINK_BROKEN_TARGET_2, relation.getSourcePath(), } else { report.println( Messages.get().container( Messages.RPT_HTMLLINK_BROKEN_SOURCE_2, dbc.removeSiteRoot(link),
report = new CmsStringBufferReport(cms.getRequestContext().getLocale()); report.println( Messages.get().container( Messages.GUI_RELATIONS_VALIDATION_PROJECT_1, cms.getRequestContext().getCurrentProject().getName()), subject = Messages.get().getBundle(cms.getRequestContext().getLocale()).key( Messages.GUI_RELATIONS_VALIDATION_DEFAULT_SUBJECT_0);
if (m_structureId == null) { throw new CmsException(Messages.get().container(Messages.LOG_BROKEN_LINK_NO_ID_0)); Messages.get().getBundle().key( Messages.LOG_BROKEN_LINK_UPDATED_BY_ID_3, m_structureId, LOG.debug(Messages.get().getBundle().key(Messages.LOG_BROKEN_LINK_BY_ID_2, m_target, m_structureId), e); Messages.get().getBundle().key( Messages.LOG_BROKEN_LINK_UPDATED_BY_NAME_3, m_target, LOG.debug(Messages.get().getBundle().key(Messages.LOG_BROKEN_LINK_BY_NAME_1, m_target), e1);
try { report = new CmsStringBufferReport(cms.getRequestContext().getLocale()); report.println(Messages.get().container( Messages.GUI_RELATIONS_VALIDATION_PROJECT_1, cms.getRequestContext().currentProject().getName()), I_CmsReport.FORMAT_HEADLINE); subject = Messages.get().getBundle(cms.getRequestContext().getLocale()).key( Messages.GUI_RELATIONS_VALIDATION_DEFAULT_SUBJECT_0);
org.opencms.notification.Messages.get(), org.opencms.publish.Messages.get(), org.opencms.relations.Messages.get(), org.opencms.report.Messages.get(), org.opencms.scheduler.Messages.get(),
org.opencms.notification.Messages.get(), org.opencms.publish.Messages.get(), org.opencms.relations.Messages.get(), org.opencms.repository.Messages.get(), org.opencms.report.Messages.get(),