[dna-commits] DNA SVN: r1464 - in trunk: docs/reference/src/main/docbook/en-US/content/connectors and 1 other directories.
dna-commits at lists.jboss.org
dna-commits at lists.jboss.org
Sat Dec 19 09:06:33 EST 2009
Author: bcarothers
Date: 2009-12-19 09:06:33 -0500 (Sat, 19 Dec 2009)
New Revision: 1464
Modified:
trunk/docs/reference/src/main/docbook/en-US/content/connectors/file_system.xml
trunk/docs/reference/src/main/docbook/en-US/custom.dtd
trunk/extensions/dna-connector-filesystem/src/main/java/org/jboss/dna/connector/filesystem/FileSystemSource.java
Log:
DNA-593
Committed patch that updates the documentation to reflect that the connector is no longer read-only (incl. adding the updatesAllowed property to the docs) and renamed the getSupportsUpdates method to be consistent with the setUpdatesAllowed mutator.
The patch also adds references to the custom properties factory, but does not complete the sub-section describing the behavior yet.
Modified: trunk/docs/reference/src/main/docbook/en-US/content/connectors/file_system.xml
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/content/connectors/file_system.xml 2009-12-19 04:15:29 UTC (rev 1463)
+++ trunk/docs/reference/src/main/docbook/en-US/content/connectors/file_system.xml 2009-12-19 14:06:33 UTC (rev 1464)
@@ -31,9 +31,10 @@
<chapter id="file-system-connector">
<title>File System Connector</title>
<para>
- This connector exposes an area of the local file system as a <emphasis>read-only</emphasis> graph of "nt:file" and "nt:folder" nodes.
- The connector considers a workspace name to be the path to the directory on the file system that represents the root of that
- workspace. Each connector can define whether it allows new workspaces can be created, but if so the names of the new workspaces
+ This connector exposes an area of the local file system as a graph of "nt:file" and "nt:folder" nodes.
+ The connector can be configured so that the workspace name is either a path to the directory on the file system that represents the root of that
+ workspace <emphasis>or</emphasis> the name of subdirectory within a root directory (see the <code>workspaceRootPath</code> property below). Each
+ connector can define whether it allows new workspaces can be created, but if so the names of the new workspaces
must represent valid paths to existing directories.
<note>
<para>
@@ -42,6 +43,9 @@
to the built-in <code>nt:resource</code> node type in all ways except one: it does not extend <code>mix:referenceable</code>. This is because
DNA cannot assign a persistent UUID to the files in the file system or guarantee that no other process will not move or delete the files outside of DNA.
The <code>mix:referenceable</code> node type cannot be implemented if either of these conditions cannot be met.
+
+ Additional properties (including mixin types) can be added through the use of a &CustomPropertiesFactory;. See the <code>customPropertiesFactory</code>
+ property below for more details on how this works.
</para>
</note>
</para>
@@ -65,6 +69,11 @@
<entry>The name of the repository source, which is used by the &RepositoryService; when obtaining a &RepositoryConnection; by name.</entry>
</row>
<row>
+ <entry>updatesAllowed</entry>
+ <entry>Determines whether the content in the file system can be updated ("true"), or if the content may only be read ("false").
+ The default value is "false" to avoid unintentional security vulnerabilities.</entry>
+ </row>
+ <row>
<entry>cacheTimeToLiveInMilliseconds</entry>
<entry>Optional property that, if used, defines the maximum time in milliseconds that any information returned by this connector
is allowed to be cached before being considered invalid. When not used, this source will not define a specific
@@ -111,6 +120,10 @@
</para>
</entry>
</row>
+ <row>
+ <entry>customPropertiesFactory</entry>
+ <entry>Specifies the &CustomPropertiesFactory; that should be used to augment the default properties available on each node.</entry>
+ </row>
</tbody>
</tgroup>
@@ -130,5 +143,11 @@
.setProperty("rootNodeUuid", UUID.fromString("fd129c12-81a8-42ed-aa4b-820dba49e6f0")
.setProperty("creatingWorkspaceAllowed", "false");
]]></programlisting>
+ <sect1>
+ <title>Custom Properties Factories</title>
+ <para>
+ The &CustomPropertiesFactory; interface provides additional flexibility in the properties returned, including support for "sidecar" files.
+ </para>
+ </sect1>
</chapter>
Modified: trunk/docs/reference/src/main/docbook/en-US/custom.dtd
===================================================================
--- trunk/docs/reference/src/main/docbook/en-US/custom.dtd 2009-12-19 04:15:29 UTC (rev 1463)
+++ trunk/docs/reference/src/main/docbook/en-US/custom.dtd 2009-12-19 14:06:33 UTC (rev 1464)
@@ -197,7 +197,8 @@
<!-- Types in extensions/ -->
-<!ENTITY FileSystemSource "<ulink url='&API;connector/filesystem/FileSystemSource.html'><classname>FileSystemSource</classname></ulink>">
+<!ENTITY FileSystemSource "<ulink url='&API;connector/filesystem/FileSystemSource.html'><classname>FileSystemSource</classname></ulink>">
+<!ENTITY CustomPropertiesFactory "<ulink url='&API;connector/filesystem/CustomPropertiesFactory'><classname>CustomPropertiesFactory</classname></ulink>">
<!ENTITY JpaSource "<ulink url='&API;connector/source/jap/JpaSource.html'><classname>JpaSource</classname></ulink>">
<!ENTITY SVNRepositorySource "<ulink url='&API;connector/svn/SVNRepositorySource.html'><classname>SVNRepositorySource</classname></ulink>">
<!ENTITY JBossCacheRepository "<ulink url='&API;connector/jbosscache/JBossCacheRepository.html'><classname>JBossCacheRepository</classname></ulink>">
Modified: trunk/extensions/dna-connector-filesystem/src/main/java/org/jboss/dna/connector/filesystem/FileSystemSource.java
===================================================================
--- trunk/extensions/dna-connector-filesystem/src/main/java/org/jboss/dna/connector/filesystem/FileSystemSource.java 2009-12-19 04:15:29 UTC (rev 1463)
+++ trunk/extensions/dna-connector-filesystem/src/main/java/org/jboss/dna/connector/filesystem/FileSystemSource.java 2009-12-19 14:06:33 UTC (rev 1464)
@@ -194,23 +194,10 @@
*
* @return true if this source supports updates, or false if this source only supports reading content.
*/
- public boolean getSupportsUpdates() {
+ public boolean getUpdatesAllowed() {
return capabilities.supportsUpdates();
}
- // /**
- // * Set whether this source supports updates.
- // *
- // * @param supportsUpdates true if this source supports updating content, or false if this source only supports reading
- // * content.
- // */
- // public synchronized void setSupportsUpdates( boolean supportsUpdates ) {
- // capabilities = new RepositorySourceCapabilities(SUPPORTS_SAME_NAME_SIBLINGS,
- // supportsUpdates,
- // SUPPORTS_EVENTS,
- // capabilities.supportsCreatingWorkspaces());
- // }
-
/**
* Get the relative root directory for the workspaces. If this property is set, workspaces can be given as relative paths from
* this directory and all workspace paths must be ancestors of this path.
@@ -633,7 +620,7 @@
CustomPropertiesFactory propFactory = customPropertiesFactory != null ? customPropertiesFactory : DEFAULT_PROPERTIES_FACTORY;
return new FileSystemConnection(name, defaultWorkspaceName, availableWorkspaces, isCreatingWorkspacesAllowed(),
cachePolicy, rootNodeUuid, workspaceRootPath, maxPathLength, filenameFilter,
- getSupportsUpdates(), propFactory);
+ getUpdatesAllowed(), propFactory);
}
/**
More information about the dna-commits
mailing list