public List<CmsLink> parseLinks(CmsObject cms, CmsFile file) { if (file.getLength() == 0) { return Collections.emptyList();
if (file.getLength() == 0) { return Collections.emptyList();
if (file.getLength() == 0) { return ret;
/** * Upgrades the given resource to a {@link CmsFile} with content.<p> * * @param cms the current users OpenCms context * @param resource the resource to upgrade * * @return the given resource upgraded to a {@link CmsFile} with content * * @throws CmsException if the resource could not be read * @throws CmsIndexException if the resource has no content */ protected CmsFile readFile(CmsObject cms, CmsResource resource) throws CmsException, CmsIndexException { CmsFile file = cms.readFile(resource); if (file.getLength() <= 0) { throw new CmsIndexException(Messages.get().container(Messages.ERR_NO_CONTENT_1, resource.getRootPath())); } return file; } }
/** * Upgrades the given resource to a {@link CmsFile} with content.<p> * * @param cms the current users OpenCms context * @param resource the resource to upgrade * * @return the given resource upgraded to a {@link CmsFile} with content * * @throws CmsException if the resource could not be read * @throws CmsIndexNoContentException if the resource has no content */ protected CmsFile readFile(CmsObject cms, CmsResource resource) throws CmsException, CmsIndexNoContentException { CmsFile file = cms.readFile(resource); if (file.getLength() <= 0) { throw new CmsIndexNoContentException( Messages.get().container(Messages.ERR_NO_CONTENT_1, resource.getRootPath())); } return file; } }
if (file.getLength() == 0) { return Collections.EMPTY_LIST;
if (file.getLength() == 0) { Iterator iter = xml.getLocales().iterator(); while (iter.hasNext()) {
if (xml.hasLocale(locale) && (file.getLength() > 0)) { return getResourceForLocale(xmlPage, locale);
if (file.getLength() == 0) { return ret;
if (xml.hasLocale(locale) && (file.getLength() > 0)) { return getResourceForLocale(xmlPage, locale);
if (file.getLength() <= 0) { throw new CmsIndexNoContentException( Messages.get().container(Messages.ERR_NO_CONTENT_1, resource.getRootPath()));
if (file.getLength() == 0) { Iterator<Locale> iter = xml.getLocales().iterator(); while (iter.hasNext()) {
if (resource.getLength() > 0) {
if (resource.getLength() > 0) {
getDateExpired(), getSiblingCount(), getLength(), getDateContent(), getVersion(),
/** * Returns the virtual resource as a file.<p> * * @return the virtual resource as a file */ public CmsFile getFile() { if (m_base instanceof CmsFile) { CmsFile file = (CmsFile)m_base; return new CmsFile( file.getStructureId(), file.getResourceId(), m_rootPath, m_typeId, file.getFlags(), file.getProjectLastModified(), file.getState(), file.getDateCreated(), file.getUserCreated(), file.getDateLastModified(), file.getUserLastModified(), file.getDateReleased(), file.getDateExpired(), file.getSiblingCount(), file.getLength(), file.getDateContent(), file.getVersion(), file.getContents()); } return new CmsFile(getResource()); }