|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.module.data.util.ImportUtil
public class ImportUtil
Data import related utility methods.
Constructor Summary | |
---|---|
ImportUtil()
|
Method Summary | |
---|---|
static info.magnolia.cms.core.Content |
getContentIfNew(info.magnolia.cms.core.Content node,
String name)
Gets new content from import (if any) or null when no new content is found. |
static boolean |
isOld(info.magnolia.cms.core.Content node)
Checks whether given node is old or new. |
static void |
saveFile(info.magnolia.cms.core.Content node,
String propertyName,
String fileName,
InputStream fileStream)
Saves file as a child of provided node. |
static void |
saveFile(info.magnolia.cms.core.Content node,
String propertyName,
String fileName,
InputStream fileStream,
Calendar modDate)
Saves binary file as a data node of given parent node. |
static void |
saveFile(info.magnolia.cms.core.Content node,
String propertyName,
String fileName,
ZipFile files)
Extracts and saves the content of the zip file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImportUtil()
Method Detail |
---|
public static void saveFile(info.magnolia.cms.core.Content node, String propertyName, String fileName, ZipFile files) throws IOException
node
- Parent node.fileName
- Name of file form zip archive to be saved.files
- Zip archive.
IOException
- When zip file is corrupted or can't be read.public static void saveFile(info.magnolia.cms.core.Content node, String propertyName, String fileName, InputStream fileStream) throws IOException
node
- Parent node.propertyName
- Name for newly created binary property.fileName
- File name.fileStream
- File data.
IOException
- When file data stream is corrupted.public static void saveFile(info.magnolia.cms.core.Content node, String propertyName, String fileName, InputStream fileStream, Calendar modDate) throws IOException
node
- Parent node.propertyName
- Name for newly created binary property.fileName
- File name.fileStream
- File data.modDate
- File last modification date.
IOException
- When file data stream is corrupted.public static info.magnolia.cms.core.Content getContentIfNew(info.magnolia.cms.core.Content node, String name)
node
- Parent node.name
- New content node name.
public static boolean isOld(info.magnolia.cms.core.Content node)
node
- Content node in question.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |