blob: 880c0ca865f204710efdbed2a2e7ffc7132b0149 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<!-- Generated by javadoc (version 1.7.0_25) on Mon Jul 01 14:53:07 CEST 2013 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>FilePersistenceManager (Apache Felix Configuration Admin Service 1.0.4 API)</title>
<meta name="date" content="2013-07-01">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="FilePersistenceManager (Apache Felix Configuration Admin Service 1.0.4 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/FilePersistenceManager.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/felix/cm/file/ConfigurationHandler.html" title="class in org.apache.felix.cm.file"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/felix/cm/file/FilePersistenceManager.html" target="_top">Frames</a></li>
<li><a href="FilePersistenceManager.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.felix.cm.file</div>
<h2 title="Class FilePersistenceManager" class="title">Class FilePersistenceManager</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.felix.cm.file.FilePersistenceManager</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../../org/apache/felix/cm/PersistenceManager.html" title="interface in org.apache.felix.cm">PersistenceManager</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">FilePersistenceManager</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../../org/apache/felix/cm/PersistenceManager.html" title="interface in org.apache.felix.cm">PersistenceManager</a></pre>
<div class="block">The <code>FilePersistenceManager</code> class stores configuration data in
properties-like files inside a given directory. All configuration files are
located in the same directory.
<p>
The configuration directory is set by either the
<a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#FilePersistenceManager(java.lang.String)"><code>FilePersistenceManager(String)</code></a> constructor or the
<a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#FilePersistenceManager(org.osgi.framework.BundleContext, java.lang.String)"><code>FilePersistenceManager(BundleContext, String)</code></a> constructor. Refer
to the respective JavaDocs for more information.
<p>
When this persistence manager is used by the Configuration Admin Service,
the location may be configured using the
<code>org.apache.felix.cm.impl.ConfigurationManager#CM_CONFIG_DIR</code> bundle
context property. That is the Configuration Admin Service creates an instance
of this class calling
<code>new FilePersistenceManager(bundleContext, bundleContext.getProperty(CM_CONFIG_DIR))</code>.
<p>
If the location is not set, the <code>config</code> directory in the current
working directory (as set in the <code>user.dir</code> system property) is
used. If the the location is set but, no such directory exists, the directory
and any missing parent directories are created. If a file exists at the given
location, the constructor fails.
<p>
Configuration files are created in the configuration directory by appending
the extension <code>.config</code> to the PID of the configuration. The PID
is converted into a relative path name by replacing enclosed dots to slashes.
Non-<code>symbolic-name</code> characters in the PID are encoded with their
Unicode character code in hexadecimal.
<p>
<table border="0" cellspacing="3" cellpadding="0">
<tr><td colspan="2"><b>Examples of PID to name conversion:</td></tr>
<tr><th>PID</th><th>Configuration File Name</th></tr>
<tr><td><code>sample</code><td><code>sample.config</code></tr>
<tr><td><code>org.apache.felix.log.LogService</code><td><code>org/apache/felix/log/LogService.config</code></tr>
<tr><td><code>sample.fl&auml;che</code><td><code>sample/fl%00e8che.config</code></tr>
</table>
<p>
<b>Mulithreading Issues</b>
<p>
In a multithreaded environment the <a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#store(java.lang.String, java.util.Dictionary)"><code>store(String, Dictionary)</code></a> and
<a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#load(java.io.File)"><code>load(File)</code></a> methods may be called at the the quasi-same time for the
same configuration PID. It may no happen, that the store method starts
writing the file and the load method might at the same time read from the
file currently being written and thus loading corrupt data (if data is
available at all).
<p>
To prevent this situation from happening, the methods use synchronization
and temporary files as follows:
<ul>
<li>The <a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#store(java.lang.String, java.util.Dictionary)"><code>store(String, Dictionary)</code></a> method writes a temporary file
with file extension <code>.tmp</code>. When done, the file is renamed to
actual configuration file name as implied by the PID. This last step of
renaming the file is synchronized on the FilePersistenceManager instance.</li>
<li>The <a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#load(java.io.File)"><code>load(File)</code></a> method is completeley synchronized on the
FilePersistenceManager instance such that the <a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#store(java.lang.String, java.util.Dictionary)"><code>store(java.lang.String, java.util.Dictionary)</code></a> method might
inadvertantly try to replace the file while it is being read.</li>
<li>Finally the <code>Iterator</code> returned by <a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#getDictionaries()"><code>getDictionaries()</code></a>
is implemented such that any temporary configuration file is just ignored.</li>
</ul></div>
<dl><dt><span class="strong">Author:</span></dt>
<dd>fmeschbe</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#DEFAULT_CONFIG_DIR">DEFAULT_CONFIG_DIR</a></strong></code>
<div class="block">The default configuration data directory if no location is configured
(value is "config").</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#FilePersistenceManager(org.osgi.framework.BundleContext, java.lang.String)">FilePersistenceManager</a></strong>(org.osgi.framework.BundleContext&nbsp;bundleContext,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;location)</code>
<div class="block">Creates an instance of this persistence manager using the given location
as the directory to store and retrieve the configuration files.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#FilePersistenceManager(java.lang.String)">FilePersistenceManager</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;location)</code>
<div class="block">Creates an instance of this persistence manager using the given location
as the directory to store and retrieve the configuration files.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#delete(java.lang.String)">delete</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;pid)</code>
<div class="block">Deletes the file for the given identifier.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#exists(java.lang.String)">exists</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;pid)</code>
<div class="block">Returns <code>true</code> if a (configuration) file exists for the given
identifier.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Enumeration.html?is-external=true" title="class or interface in java.util">Enumeration</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#getDictionaries()">getDictionaries</a></strong>()</code>
<div class="block">Loads configuration data from the configuration location and returns
it as <code>Dictionary</code> objects.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#getLocation()">getLocation</a></strong>()</code>
<div class="block">Returns the directory in which the configuration files are written as
a <code>File</code> object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Dictionary.html?is-external=true" title="class or interface in java.util">Dictionary</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#load(java.lang.String)">load</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;pid)</code>
<div class="block">Reads the (configuration) for the given identifier into a
<code>Dictionary</code> object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#store(java.lang.String, java.util.Dictionary)">store</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;pid,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Dictionary.html?is-external=true" title="class or interface in java.util">Dictionary</a>&nbsp;props)</code>
<div class="block">Stores the contents of the <code>Dictionary</code> in a file denoted
by the given identifier.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_CONFIG_DIR">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_CONFIG_DIR</h4>
<pre>public static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> DEFAULT_CONFIG_DIR</pre>
<div class="block">The default configuration data directory if no location is configured
(value is "config").</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.felix.cm.file.FilePersistenceManager.DEFAULT_CONFIG_DIR">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="FilePersistenceManager(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FilePersistenceManager</h4>
<pre>public&nbsp;FilePersistenceManager(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;location)</pre>
<div class="block">Creates an instance of this persistence manager using the given location
as the directory to store and retrieve the configuration files.
<p>
This constructor resolves the configuration file location as follows:
<ul>
<li>If <code>location</code> is <code>null</code>, the <code>config</code>
directory in the current working directory as specified in the
<code>user.dir</code> system property is assumed.</li>
<li>Otherwise the named directory is used.</li>
<li>If the directory name resolved in the first or second step is not an
absolute path, it is resolved to an absolute path calling the
<code>File.getAbsoluteFile()</code> method.</li>
<li>If a non-directory file exists as the location found in the previous
step or the named directory (including any parent directories) cannot be
created, an <code>IllegalArgumentException</code> is thrown.</li>
</ul>
<p>
This constructor is equivalent to calling
<a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#FilePersistenceManager(org.osgi.framework.BundleContext, java.lang.String)"><code>FilePersistenceManager(BundleContext, String)</code></a> with a
<code>null</code> <code>BundleContext</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>location</code> - The configuration file location. If this is
<code>null</code> the <code>config</code> directory below the current
working directory is used.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - If the <code>location</code> exists but
is not a directory or does not exist and cannot be created.</dd></dl>
</li>
</ul>
<a name="FilePersistenceManager(org.osgi.framework.BundleContext, java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>FilePersistenceManager</h4>
<pre>public&nbsp;FilePersistenceManager(org.osgi.framework.BundleContext&nbsp;bundleContext,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;location)</pre>
<div class="block">Creates an instance of this persistence manager using the given location
as the directory to store and retrieve the configuration files.
<p>
This constructor resolves the configuration file location as follows:
<ul>
<li>If <code>location</code> is <code>null</code>, the <code>config</code>
directory in the persistent storage area of the bundle identified by
<code>bundleContext</code> is used.</li>
<li>If the framework does not support persistent storage area for bundles
in the filesystem or if <code>bundleContext</code> is <code>null</code>,
the <code>config</code> directory in the current working directory as
specified in the <code>user.dir</code> system property is assumed.</li>
<li>Otherwise the named directory is used.</li>
<li>If the directory name resolved in the first, second or third step is
not an absolute path and a <code>bundleContext</code> is provided which
provides access to persistent storage area, the directory name is
resolved as being inside the persistent storage area. Otherwise the
directory name is resolved to an absolute path calling the
<code>File.getAbsoluteFile()</code> method.</li>
<li>If a non-directory file exists as the location found in the previous
step or the named directory (including any parent directories) cannot be
created, an <code>IllegalArgumentException</code> is thrown.</li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bundleContext</code> - The <code>BundleContext</code> to optionally get
the data location for the configuration files. This may be
<code>null</code>, in which case this constructor acts exactly the
same as calling <a href="../../../../../org/apache/felix/cm/file/FilePersistenceManager.html#FilePersistenceManager(java.lang.String)"><code>FilePersistenceManager(String)</code></a>.</dd><dd><code>location</code> - The configuration file location. If this is
<code>null</code> the <code>config</code> directory below the current
working directory is used.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - If the location exists but is not a
directory or does not exist and cannot be created.</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - If the <code>bundleContext</code> is not
valid.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getLocation()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocation</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;getLocation()</pre>
<div class="block">Returns the directory in which the configuration files are written as
a <code>File</code> object.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The configuration file location.</dd></dl>
</li>
</ul>
<a name="getDictionaries()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDictionaries</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Enumeration.html?is-external=true" title="class or interface in java.util">Enumeration</a>&nbsp;getDictionaries()</pre>
<div class="block">Loads configuration data from the configuration location and returns
it as <code>Dictionary</code> objects.
<p>
This method is a lazy implementation, which is just one configuration
file ahead of the current enumeration location.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/felix/cm/PersistenceManager.html#getDictionaries()">getDictionaries</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/felix/cm/PersistenceManager.html" title="interface in org.apache.felix.cm">PersistenceManager</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>an enumeration of configuration data returned as instances of
the <code>Dictionary</code> class.</dd></dl>
</li>
</ul>
<a name="delete(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>delete</h4>
<pre>public&nbsp;void&nbsp;delete(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;pid)</pre>
<div class="block">Deletes the file for the given identifier.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/felix/cm/PersistenceManager.html#delete(java.lang.String)">delete</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/felix/cm/PersistenceManager.html" title="interface in org.apache.felix.cm">PersistenceManager</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>pid</code> - The identifier of the configuration file to delete.</dd></dl>
</li>
</ul>
<a name="exists(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exists</h4>
<pre>public&nbsp;boolean&nbsp;exists(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;pid)</pre>
<div class="block">Returns <code>true</code> if a (configuration) file exists for the given
identifier.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/felix/cm/PersistenceManager.html#exists(java.lang.String)">exists</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/felix/cm/PersistenceManager.html" title="interface in org.apache.felix.cm">PersistenceManager</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>pid</code> - The identifier of the configuration file to check.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the file exists</dd></dl>
</li>
</ul>
<a name="load(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>load</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Dictionary.html?is-external=true" title="class or interface in java.util">Dictionary</a>&nbsp;load(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;pid)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads the (configuration) for the given identifier into a
<code>Dictionary</code> object.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/felix/cm/PersistenceManager.html#load(java.lang.String)">load</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/felix/cm/PersistenceManager.html" title="interface in org.apache.felix.cm">PersistenceManager</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>pid</code> - The identifier of the configuration file to delete.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The configuration read from the file. This <code>Dictionary</code>
may be empty if the file contains no configuration information
or is not properly formatted.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an error occurrs loading the dictionary. An
<code>IOException</code> must also be thrown if no dictionary
exists for the given identifier.</dd></dl>
</li>
</ul>
<a name="store(java.lang.String, java.util.Dictionary)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>store</h4>
<pre>public&nbsp;void&nbsp;store(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;pid,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Dictionary.html?is-external=true" title="class or interface in java.util">Dictionary</a>&nbsp;props)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Stores the contents of the <code>Dictionary</code> in a file denoted
by the given identifier.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/felix/cm/PersistenceManager.html#store(java.lang.String, java.util.Dictionary)">store</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/felix/cm/PersistenceManager.html" title="interface in org.apache.felix.cm">PersistenceManager</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>pid</code> - The identifier of the configuration file to which to write
the configuration contents.</dd><dd><code>props</code> - The configuration data to write.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If an error occurrs writing the configuration data.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/FilePersistenceManager.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/felix/cm/file/ConfigurationHandler.html" title="class in org.apache.felix.cm.file"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/felix/cm/file/FilePersistenceManager.html" target="_top">Frames</a></li>
<li><a href="FilePersistenceManager.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2006&#x2013;2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>