info.magnolia.importexport
Class BootstrapUtil

java.lang.Object
  extended by info.magnolia.importexport.BootstrapUtil

public class BootstrapUtil
extends Object

Utilities to bootstrap set of files and/or to export content into a specified directory.


Constructor Summary
BootstrapUtil()
           
 
Method Summary
static void bootstrap(String[] resourceNames, int importUUIDBehavior)
           
static void export(Content content, File directory)
           
static String getFilenameFromResource(String resourcePath, String extension)
          I.e.
static String getFullpathFromResource(String resourcePath)
          I.e.
static String getPathnameFromResource(String resourcePath)
          I.e.
static String getWorkspaceNameFromResource(String resourcePath)
          I.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BootstrapUtil

public BootstrapUtil()
Method Detail

bootstrap

public static void bootstrap(String[] resourceNames,
                             int importUUIDBehavior)
                      throws IOException,
                             javax.jcr.RepositoryException
Throws:
IOException
javax.jcr.RepositoryException

export

public static void export(Content content,
                          File directory)
                   throws IOException,
                          javax.jcr.RepositoryException
Throws:
IOException
javax.jcr.RepositoryException

getWorkspaceNameFromResource

public static String getWorkspaceNameFromResource(String resourcePath)
I.e. given a resource path like /mgnl-bootstrap/foo/config.server.i18n.xml it will return config.


getFullpathFromResource

public static String getFullpathFromResource(String resourcePath)
I.e. given a resource path like /mgnl-bootstrap/foo/config.server.i18n.xml it will return /server/i18n.


getPathnameFromResource

public static String getPathnameFromResource(String resourcePath)
I.e. given a resource path like /mgnl-bootstrap/foo/config.server.i18n.xml it will return /server.


getFilenameFromResource

public static String getFilenameFromResource(String resourcePath,
                                             String extension)
I.e. given a resource path like /mgnl-bootstrap/foo/config.server.i18n.xml and .xml extension it will return config.server.i18n (no trailing dot). If extension is null, it defaults to .xml.



Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.