Tabnine Logo
CmsXmlContent.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
org.opencms.xml.content.CmsXmlContent

Best Java code snippets using org.opencms.xml.content.CmsXmlContent.toString (Showing top 6 results out of 315)

origin: org.opencms/opencms-core

/**
 * Writes the xml content to the vfs and re-initializes the member variables.<p>
 *
 * @param cms the cms context
 * @param file the file to write to
 * @param content the content
 * @param encoding the file encoding
 *
 * @return the content
 *
 * @throws CmsException if writing the file fails
 */
private CmsXmlContent writeContent(CmsObject cms, CmsFile file, CmsXmlContent content, String encoding)
throws CmsException {
  String decodedContent = content.toString();
  try {
    file.setContents(decodedContent.getBytes(encoding));
  } catch (UnsupportedEncodingException e) {
    throw new CmsException(
      org.opencms.workplace.editors.Messages.get().container(
        org.opencms.workplace.editors.Messages.ERR_INVALID_CONTENT_ENC_1,
        file.getRootPath()),
      e);
  }
  // the file content might have been modified during the write operation
  file = cms.writeFile(file);
  return CmsXmlContentFactory.unmarshal(cms, file);
}
origin: org.opencms/opencms-solr

  /**
   * Writes the xml content to the vfs and re-initializes the member variables.<p>
   * 
   * @throws CmsException if writing the file fails
   */
  private void writeContent() throws CmsException {

    String decodedContent = m_content.toString();
    try {
      m_file.setContents(decodedContent.getBytes(getFileEncoding()));
    } catch (UnsupportedEncodingException e) {
      throw new CmsException(Messages.get().container(Messages.ERR_INVALID_CONTENT_ENC_1, getParamResource()), e);
    }
    // the file content might have been modified during the write operation    
    m_file = getCloneCms().writeFile(m_file);
    m_content = CmsXmlContentFactory.unmarshal(getCloneCms(), m_file);
  }
}
origin: org.opencms/opencms-solr

String decodedContent = content.toString();
try {
  file.setContents(decodedContent.getBytes(content.getEncoding()));
origin: org.opencms/opencms-core

String decodedContent = content.toString();
try {
  file.setContents(decodedContent.getBytes(content.getEncoding()));
origin: org.opencms/opencms-core

  /**
   * Writes the xml content to the vfs and re-initializes the member variables.<p>
   *
   * @throws CmsException if writing the file fails
   */
  private void writeContent() throws CmsException {

    String decodedContent = m_content.toString();
    try {
      m_file.setContents(decodedContent.getBytes(getFileEncoding()));
    } catch (UnsupportedEncodingException e) {
      throw new CmsException(Messages.get().container(Messages.ERR_INVALID_CONTENT_ENC_1, getParamResource()), e);
    }
    // the file content might have been modified during the write operation
    CmsObject cloneCms = getCloneCms();
    CmsUUID tempProjectId = OpenCms.getWorkplaceManager().getTempFileProjectId();
    cloneCms.getRequestContext().setCurrentProject(getCms().readProject(tempProjectId));
    m_file = cloneCms.writeFile(m_file);
    m_content = CmsXmlContentFactory.unmarshal(cloneCms, m_file);

  }
}
origin: org.opencms/org.opencms.workplace.tools.content

  cmsFile = cmsObject.readFile(cmsResource);
  CmsXmlContent xmlContent = CmsXmlContentFactory.unmarshal(getCms(), cmsFile);
  fileXmlContent = xmlContent.toString();
} catch (CmsException e) {
  m_errorTransform += 1;
org.opencms.xml.contentCmsXmlContenttoString

Popular methods of CmsXmlContent

  • getValue
  • getStringValue
  • getValues
  • hasLocale
  • getFile
  • getLocales
  • marshal
  • addValue
    Adds a new XML schema type with the default value to the given parent node.
  • getIndexCount
  • hasValue
  • addLocale
  • copyLocale
    Copies the content of the given source locale to the given destination locale in this XML document.
  • addLocale,
  • copyLocale,
  • correctXmlStructure,
  • getEncoding,
  • getLocaleNode,
  • initDocument,
  • removeLocale,
  • setAutoCorrectionEnabled,
  • visitAllValuesWith

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • findViewById (Activity)
  • setContentView (Activity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JTable (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Join (org.hibernate.mapping)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now