Codota Logo
CmsFile.getLength
Code IndexAdd Codota to your IDE (free)

How to use
getLength
method
in
org.opencms.file.CmsFile

Best Java code snippets using org.opencms.file.CmsFile.getLength (Showing top 16 results out of 315)

  • Common ways to obtain CmsFile
private void myMethod () {
CmsFile c =
  • Codota IconCmsObject cms;String resourcename;cms.readFile(resourcename)
  • Codota IconCmsObject cmsObject;String resourcename;CmsResourceFilter filter;cmsObject.readFile(resourcename, filter)
  • Codota IconCmsJspActionElement cmsJspActionElement;String resourcename;cmsJspActionElement.getCmsObject().readFile(resourcename)
  • Smart code suggestions by Codota
}
origin: org.opencms/opencms-core

public List<CmsLink> parseLinks(CmsObject cms, CmsFile file) {
  if (file.getLength() == 0) {
    return Collections.emptyList();
origin: org.opencms/opencms-core

if (file.getLength() == 0) {
  return Collections.emptyList();
origin: org.opencms/opencms-solr

if (file.getLength() == 0) {
  return ret;
origin: org.opencms/opencms-solr

  /**
   * 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;
  }
}
origin: org.opencms/opencms-core

  /**
   * 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;
  }
}
origin: org.opencms/opencms-solr

if (file.getLength() == 0) {
  return Collections.EMPTY_LIST;
origin: org.opencms/opencms-solr

if (file.getLength() == 0) {
  Iterator iter = xml.getLocales().iterator();
  while (iter.hasNext()) {
origin: org.opencms/opencms-solr

if (xml.hasLocale(locale) && (file.getLength() > 0)) {
  return getResourceForLocale(xmlPage, locale);
origin: org.opencms/opencms-core

if (file.getLength() == 0) {
  return ret;
origin: org.opencms/opencms-core

if (xml.hasLocale(locale) && (file.getLength() > 0)) {
  return getResourceForLocale(xmlPage, locale);
origin: org.opencms/opencms-core

if (file.getLength() <= 0) {
  throw new CmsIndexNoContentException(
    Messages.get().container(Messages.ERR_NO_CONTENT_1, resource.getRootPath()));
origin: org.opencms/opencms-core

if (file.getLength() == 0) {
  Iterator<Locale> iter = xml.getLocales().iterator();
  while (iter.hasNext()) {
origin: org.opencms/opencms-core

if (resource.getLength() > 0) {
origin: org.opencms/opencms-solr

if (resource.getLength() > 0) {
origin: org.opencms/opencms-core

getDateExpired(),
getSiblingCount(),
getLength(),
getDateContent(),
getVersion(),
origin: org.opencms/opencms-core

/**
 * 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());
}
org.opencms.fileCmsFilegetLength

Popular methods of CmsFile

  • getContents
    Returns the content of this file.
  • setContents
    Sets the contents of this file. This will also set the date content, but only if the content is alre
  • getName
  • getRootPath
  • getTypeId
  • getStructureId
  • setDateLastModified
  • <init>
  • clone
    Returns a clone of this Objects instance.
  • getDateCreated
  • getDateLastModified
  • getFlags
  • getDateLastModified,
  • getFlags,
  • getProjectLastModified,
  • getResourceId,
  • getState,
  • isFile,
  • isTouched,
  • setDateExpired,
  • setDateReleased

Popular in Java

  • Reactive rest calls using spring rest template
  • getSharedPreferences (Context)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • setContentView (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • String (java.lang)
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now