Search in sources :

Example 6 with VirtualFile

use of com.enonic.xp.vfs.VirtualFile in project xp by enonic.

the class ExportReader method getNodeSource.

public VirtualFile getNodeSource(final VirtualFile nodeFolder) {
    final VirtualFilePath nodeSourcePath = nodeFolder.getPath().join(SYSTEM_FOLDER_NAME, NODE_XML_EXPORT_NAME);
    final VirtualFile nodeVF = nodeFolder.resolve(nodeSourcePath);
    if (!nodeVF.exists()) {
        throw new ImportNodeException("Missing node source, expected at: " + nodeVF.getPath());
    }
    return nodeVF;
}
Also used : VirtualFile(com.enonic.xp.vfs.VirtualFile) VirtualFilePath(com.enonic.xp.vfs.VirtualFilePath) ImportNodeException(com.enonic.xp.export.ImportNodeException)

Aggregations

ImportNodeException (com.enonic.xp.export.ImportNodeException)6 VirtualFile (com.enonic.xp.vfs.VirtualFile)6 VirtualFilePath (com.enonic.xp.vfs.VirtualFilePath)3 XmlException (com.enonic.xp.xml.XmlException)3 XmlNodeParser (com.enonic.xp.core.impl.export.xml.XmlNodeParser)1 BinaryAttachment (com.enonic.xp.node.BinaryAttachment)1 ImportNodeResult (com.enonic.xp.node.ImportNodeResult)1 Node (com.enonic.xp.node.Node)1 NodePath (com.enonic.xp.node.NodePath)1 BinaryReference (com.enonic.xp.util.BinaryReference)1 CharSource (com.google.common.io.CharSource)1