org.gcube.application.reporting.persistence
Class PersistenceManager
java.lang.Object
org.gcube.application.reporting.persistence.PersistenceManager
public class PersistenceManager
- extends Object
- Author:
- massi
Method Summary |
static org.gcube.portlets.d4sreporting.common.shared.Model |
readModel(String pathToModel)
|
static boolean |
writeModel(org.gcube.portlets.d4sreporting.common.shared.Model model)
|
static boolean |
writeModel(org.gcube.portlets.d4sreporting.common.shared.Model model,
File modelInstanceFile)
|
static void |
zipDir(String zipFileName,
String dir)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PersistenceManager
public PersistenceManager()
writeModel
public static boolean writeModel(org.gcube.portlets.d4sreporting.common.shared.Model model)
- Parameters:
model
- the model to persist on disk
- Returns:
- true if ok
writeModel
public static boolean writeModel(org.gcube.portlets.d4sreporting.common.shared.Model model,
File modelInstanceFile)
- Parameters:
model
- the model to persist on diskfile
- the file where you want the model to be persisted
- Returns:
- true if ok
readModel
public static org.gcube.portlets.d4sreporting.common.shared.Model readModel(String pathToModel)
zipDir
public static void zipDir(String zipFileName,
String dir)
throws IOException
- Parameters:
zipFileName
- zipFileNamedir
- the dir to compress
- Throws:
IOException
Copyright © 2014. All Rights Reserved.