net.sourceforge.openutils.mgnlmedia.media.utils
Class MediaLoadUtils
java.lang.Object
net.sourceforge.openutils.mgnlmedia.media.utils.MediaLoadUtils
public class MediaLoadUtils
- extends Object
Utility Class that manages loading files into media repository
- Version:
- $Id: MediaLoadUtils.java 1971 2010-02-17 09:50:56Z diego_schivo $
- Author:
- fgiust
|
Method Summary |
static info.magnolia.cms.core.Content |
getOrCreateFullPath(info.magnolia.cms.core.HierarchyManager mgr,
String path)
Get the content node matching required path using hierarchy manager. |
static info.magnolia.cms.core.Content |
loadEntry(InputStream inputStream,
String parent,
String filename,
boolean overwrite)
Load a file in media repository |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MediaLoadUtils
public MediaLoadUtils()
loadEntry
public static info.magnolia.cms.core.Content loadEntry(InputStream inputStream,
String parent,
String filename,
boolean overwrite)
throws javax.jcr.RepositoryException,
IOException
- Load a file in media repository
- Parameters:
inputStream - file input streamparent - parent folder nodefilename - filenameoverwrite - overwrite if already exists?
- Returns:
- create media node
- Throws:
javax.jcr.RepositoryException - exception working on media repository
IOException - exception working with file stream
getOrCreateFullPath
public static info.magnolia.cms.core.Content getOrCreateFullPath(info.magnolia.cms.core.HierarchyManager mgr,
String path)
throws javax.jcr.RepositoryException
- Get the content node matching required path using hierarchy manager. If the required path doesn't exist create
it.
- Parameters:
mgr - hierarchy managerpath - path to get or create
- Returns:
- content to required path
- Throws:
javax.jcr.RepositoryException - exception getting or creating path
Copyright © 2008-2010 Openmind. All Rights Reserved.