|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.util.XPDynamicDiscovery
public final class XPDynamicDiscovery
Given a set of class objects, and an interface type, the methods of this class will iterate through the set of available classes and return an instantiated array of classes that implement the given interface.
Constructor Summary | |
---|---|
XPDynamicDiscovery()
|
Method Summary | |
---|---|
static java.lang.Object[] |
GetInstancesFromLib(java.lang.String pathName,
java.lang.String interfaceJARFileName,
java.lang.String classesJARFileName,
java.lang.String interfaceName)
This method takes a war file or a jar file, iterates through that file and instantiates all classes of type represented by interfaceName. |
static java.lang.Object[] |
GetInstancesFromXML(java.lang.String XMLFilePath,
java.lang.String JARFolderPath)
This method takes an XML file and a WAR/web home path/or a .Net/bin path. |
static java.lang.Object |
GetObject(java.lang.String fullyQualifiedClassName,
java.lang.String assemblyName)
This method returns an instantiated class object, given a fully-qualified class name and the path to a jar or zip file which must contain its binary implementation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XPDynamicDiscovery()
Method Detail |
---|
public static final java.lang.Object[] GetInstancesFromLib(java.lang.String pathName, java.lang.String interfaceJARFileName, java.lang.String classesJARFileName, java.lang.String interfaceName)
pathName
- The location (directory or WAR file) of the jar file,
i.e. "com\\plumtree\\openfoundation\\util\\test\\help\\RTSI"
(use XPFileSystemObject.GetPathSeparator() in place of \\).
or if it's a war file, the pathname should have ".war" as an extension
(For example: "/opt/plumtree/ellington/SunOS/ptportal/5.0/webapp/portal.war"interfaceJARFileName
- This parameter is only used by the .NET version of the class, which
refers to the interface assembly file. For consistency, its value
may refer to the jar file, if any, where the interface represented
by interfaceName resides.classesJARFileName
- The jar file wherein all classes to be instantiated
reside. Will be appended to the pathName to for the fully-qualified path.interfaceName
- Interface name qualified by the package
i.e. "com.plumtree.uiinfrastructure.web.IVarPack"
public static final java.lang.Object[] GetInstancesFromXML(java.lang.String XMLFilePath, java.lang.String JARFolderPath)
XMLFilePath
- Path to xml file
(eg. com\\plumtree\\openfoundation\\util\\test\\help\\config.xml),JARFolderPath
- The jar file wherein all classes to be instantiated reside
(eg. com\\plumtree\\openfoundation\\util\\test\\dynamicdiscoverytest\\Assembly),
or the location of the war file, which has a ".war" extension
(eg. com\\plumtree\\openfoundation\\util\\test\\dynamicdiscoverytest\\Assembly\\testWar.war)
public static java.lang.Object GetObject(java.lang.String fullyQualifiedClassName, java.lang.String assemblyName)
fullyQualifiedClassName
- The fully-qualified class name,
i.e. "com.plumtree.openfoundation.util.XPDynamicDiscovery"assemblyName
- Name of the JAR file in which the desired class is found,
extension optional if a .jar, e.g. "openfoundation" or "uiinfrastructure".
In .NET it is interpreted as the AssemblyName. In Java it will be used to
attempt to create a URLClassLoader over the named jar file, including
filesystem path information if provided, and falling back to
the system classloader (classpath) if unsuccessful. The assumed
cross-platform practice is that there will be an application binary/library
directory containing the application which uses Open Foundation as well as
any plug-in libraries referred to by GetObject().
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |