com.bea.dsp.management.primitives
Class PersistencePrimitives

java.lang.Object
  extended by com.bea.dsp.management.primitives.PersistencePrimitives

public abstract class PersistencePrimitives
extends java.lang.Object

Exclude:

Field Summary
static java.lang.String DOT_DSP
           
static java.lang.String DSP_INF
           
static java.lang.String LIB
           
 
Constructor Summary
PersistencePrimitives()
           
 
Method Summary
static java.util.Set<java.lang.String> detectProjects(java.io.File appRoot)
          Collects the names of the folders under the given directory that correspond to DSP projects.
static void persistBinaryContent(java.io.InputStream in, java.lang.String absoluteFilePath)
          Persists the specified binary content in the specified file.
static void safeDelete(java.io.File f)
          Deletes a file or folder and all its contents, first checking if the file or folder exists.
static void safeDeleteContents(java.io.File f)
          Deletes all contents of a given folder if it exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DSP_INF

public static final java.lang.String DSP_INF
See Also:
Constant Field Values

LIB

public static final java.lang.String LIB
See Also:
Constant Field Values

DOT_DSP

public static final java.lang.String DOT_DSP
See Also:
Constant Field Values
Constructor Detail

PersistencePrimitives

public PersistencePrimitives()
Method Detail

detectProjects

public static java.util.Set<java.lang.String> detectProjects(java.io.File appRoot)
Collects the names of the folders under the given directory that correspond to DSP projects.

The detection is based on the presence of the folder: "META-INF/.liquiddata".

Parameters:
appRoot - The application root
Returns:
A set containing the names of the DSP projects. An empty set if no such project is found.

persistBinaryContent

public static void persistBinaryContent(java.io.InputStream in,
                                        java.lang.String absoluteFilePath)
                                 throws java.io.IOException
Persists the specified binary content in the specified file. If the file already exists it will be overwritten.

Parameters:
in -
absoluteFilePath -
Throws:
java.io.IOException

safeDelete

public static void safeDelete(java.io.File f)
Deletes a file or folder and all its contents, first checking if the file or folder exists.

Parameters:
a - file or folder

safeDeleteContents

public static void safeDeleteContents(java.io.File f)
Deletes all contents of a given folder if it exists.

Parameters:
f - Must be a folder.


Copyright © 2009 Oracle. All Rights Reserved.