org.sape.carbon.core.config.node.file
Class FileLinkNodeFactory

java.lang.Object
  |
  +--org.sape.carbon.core.config.node.file.FileLinkNodeFactory
All Implemented Interfaces:
LinkNodeFactory

public class FileLinkNodeFactory
extends Object
implements LinkNodeFactory

Factory used to create links to nodes on a file system Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.13 $($Author: dvoet $ / $Date: 2003/12/18 18:42:14 $)
Author:
Douglas Voet, April 2002

Field Summary
private static NodeFactory configurationDocumentFactory
          Holds a reference to the configurationNodeFactory used.
private static NodeFactory linkNodeFactory
          Holds a reference to the linkNodeFactory used.
private  org.apache.commons.logging.Log log
          The handle to Apache-commons logger
private static NodeFactory subFolderFactory
          Holds a reference to the subFolderFactory used.
 
Constructor Summary
FileLinkNodeFactory()
           
 
Method Summary
protected  NodeFactory getConfigurationDocumentFactory()
          Gets the factory used within this package to create configuration documents
 LinkNode getInstance(Node parent, String name, ConfigurationDocument linkConfigurationDoc)
          Constructs a LinkNode.
protected  NodeFactory getLinkNodeFactory()
          Gets the factory used within this package to create links
protected  NodeFactory getSubFolderFactory()
          Gets the factory used within this package to create folders
private  FileLinkNodeConfiguration readConfiguration(ConfigurationDocument linkConfigurationDoc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private org.apache.commons.logging.Log log
The handle to Apache-commons logger


subFolderFactory

private static final NodeFactory subFolderFactory
Holds a reference to the subFolderFactory used. Since this is a FileLinkNodeFactory, a FileFolderFactory is used.


configurationDocumentFactory

private static final NodeFactory configurationDocumentFactory
Holds a reference to the configurationNodeFactory used. Since this is a FileLinkNodeFactory, a FileConfigurationDocumentFactory is used.


linkNodeFactory

private static final NodeFactory linkNodeFactory
Holds a reference to the linkNodeFactory used. Since this is a FileLinkNodeFactory, a FileLinkNodeConfigurationDocumentFactory is used.

Constructor Detail

FileLinkNodeFactory

public FileLinkNodeFactory()
Method Detail

getInstance

public LinkNode getInstance(Node parent,
                            String name,
                            ConfigurationDocument linkConfigurationDoc)
                     throws NodeCreationException
Description copied from interface: LinkNodeFactory
Constructs a LinkNode.

Specified by:
getInstance in interface LinkNodeFactory
Parameters:
parent - the parent Folder of the LinkNode. Can be null only if the LinkNode is the root Node for the ConfigurationService
name - the name of the LinkNode. Cannot be null.
linkConfigurationDoc - the ConfigurationDocument containing the LinkNodeConfiguration for the new link. Cannot be null.
Returns:
LinkNode the new link
Throws:
NodeCreationException - if the LinkNode cannot be created.
See Also:
LinkNodeFactory.getInstance(org.sape.carbon.core.config.node.Node, java.lang.String, org.sape.carbon.core.config.node.ConfigurationDocument)

getSubFolderFactory

protected NodeFactory getSubFolderFactory()
Gets the factory used within this package to create folders

Returns:
NodeFactory

getConfigurationDocumentFactory

protected NodeFactory getConfigurationDocumentFactory()
Gets the factory used within this package to create configuration documents

Returns:
NodeFactory

getLinkNodeFactory

protected NodeFactory getLinkNodeFactory()
Gets the factory used within this package to create links

Returns:
NodeFactory

readConfiguration

private FileLinkNodeConfiguration readConfiguration(ConfigurationDocument linkConfigurationDoc)


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.