Index: contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/DirListingExportCommand.java =================================================================== --- contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/DirListingExportCommand.java (revision 209508) +++ contrib/jcr-server/server/src/java/org/apache/jackrabbit/server/io/DirListingExportCommand.java (working copy) @@ -49,12 +49,27 @@ private HashSet nonCollectionNodeTypes = new HashSet(); /** + * define which node types are ignored in the directory listing + */ + private HashSet ignoredNodeTypes = new HashSet(); + + /** * Creates a DirListingExportCommand */ public DirListingExportCommand() { } /** + * Returns true if nodes of the given node type should not be + * included in the directory listing. + * + * @return true if nodes of the given node type should be ignored + */ + public boolean isIgnoredNodeType(String nodeTypeName) { + return ignoredNodeTypes.contains(nodeTypeName); + } + + /** * Returns true if the given the node type name denotes a collection. * * @return true if the given the node type name denotes a collection node. @@ -70,6 +85,19 @@ } /** + * Defines the given node type names to not be included in the + * directory listing. + * + * @param nodeTypeNames comma separated String values + */ + public void setIgnoredNodeTypes(String nodeTypeNames) { + String[] names= nodeTypeNames.split(","); + for (int i = 0; i < names.length; i++) { + ignoredNodeTypes.add(names[i].trim()); + } + } + + /** * Defines the given node type names to represent collection nodes. * Child nodes having this node type result in a directory link. * @@ -143,6 +171,9 @@ NodeIterator iter = node.getNodes(); while (iter.hasNext()) { Node child = iter.nextNode(); + if (isIgnoredNodeType(child.getPrimaryNodeType().getName())) { + continue; + } String label = Text.getName(child.getPath()); writer.print("