org.sape.carbon.services.config.jar
Class JarLinkNodeFactory

java.lang.Object
  |
  +--org.sape.carbon.services.config.jar.JarLinkNodeFactory
All Implemented Interfaces:
LinkNodeFactory

public class JarLinkNodeFactory
extends Object
implements LinkNodeFactory

Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.2 $($Author: dvoet $ / $Date: 2003/05/05 21:21:09 $)
Author:
Douglas Voet, April 2002

Field Summary
private static NodeFactory configurationDocumentFactory
          Holds a reference to a JarConfigurationDocumentFactory
private static NodeFactory linkNodeFactory
          Holds a reference to a JarLinkNodeConfigurationDocumentFactory
private static NodeFactory subFolderFactory
          Holds a reference to a JarFolderFactory
 
Constructor Summary
JarLinkNodeFactory()
           
 
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  String getTargetPath(JarLinkNodeConfiguration jarLinkConfiguration)
          Gets and validates the target jar path from configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subFolderFactory

private static final NodeFactory subFolderFactory
Holds a reference to a JarFolderFactory


configurationDocumentFactory

private static final NodeFactory configurationDocumentFactory
Holds a reference to a JarConfigurationDocumentFactory


linkNodeFactory

private static final NodeFactory linkNodeFactory
Holds a reference to a JarLinkNodeConfigurationDocumentFactory

Constructor Detail

JarLinkNodeFactory

public JarLinkNodeFactory()
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

getTargetPath

private String getTargetPath(JarLinkNodeConfiguration jarLinkConfiguration)
Gets and validates the target jar path from configuration

Parameters:
jarLinkConfiguration - the link config to pull the target jar path from
Returns:
String the target jar path from configuration


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.