All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.wizards.builder.NativeSupportResourceWriter
java.lang.Object
|
+----com.sun.wizards.builder.NativeSupportResourceWriter
- public class NativeSupportResourceWriter
- extends Object
- implements ResourceResolver
This class can supply native resources for an archive. It can do
so using an existing archive (for writing archives during the
running of a wizard), or use the filesystem (used when building a
wizard from a class repository from the local filesystem. For now,
it plays a dual role of resource name collecting and resource
resolving.
-
NativeSupportResourceWriter(String)
- Creates a NativeSupportResourceWriter that reads its native
resources from the local filesystem.
-
NativeSupportResourceWriter(WizardState)
- Used to resolve native resources out of an existing wizard
archive that has supporting ArchiveReader and WizardStates
already instantiated.
-
addSection(ResourceCollection, String)
- Iterates through each section in the "NativeSupport" indirect pointers
-
getArchivePlatforms()
- Returns a Vector of Platform objects that describe the native
platform support that will be included in this archive.
-
getArchs(int, int, File)
- Loads the platforms variable with the native support found
in the SDK.
-
getOsNames(int, File)
- Loads the platforms variable with the native support found
in the SDK.
-
getOsTypes(String)
- Loads the platforms variable with the native support found
in the SDK.
-
getResources()
- Creates a ResourceCollection of resources to include in the
archive.
-
getSupportedPlatforms()
- Returns a Vector containing Platform objects which describe the
platforms supported by this object.
-
resolveResource(String, String, byte[])
- Gets the platform support data for each supported platformd.
-
setArchivePlatforms(Vector)
- Sets the platform support which will be included in the
archive.
NativeSupportResourceWriter
public NativeSupportResourceWriter(WizardState wizardState)
- Used to resolve native resources out of an existing wizard
archive that has supporting ArchiveReader and WizardStates
already instantiated.
- Parameters:
- wizardState - The WizardState to use during resource resolution.
NativeSupportResourceWriter
public NativeSupportResourceWriter(String classPath)
- Creates a NativeSupportResourceWriter that reads its native
resources from the local filesystem. Used when one is
building a new wizard from a class repository.
- Parameters:
- classPath - The path to search for native resources
(must be within a subdirectory called "native")
getSupportedPlatforms
public Vector getSupportedPlatforms()
- Returns a Vector containing Platform objects which describe the
platforms supported by this object.
- Returns:
- a Vector containing Platform objects which describe the
platforms supported by this object.
setArchivePlatforms
public void setArchivePlatforms(Vector platforms)
- Sets the platform support which will be included in the
archive. Each platform specified must be supported by
this object. To get a list of supported platforms, use
getSupportedPlatforms first.
- Parameters:
- platforms - The list of platforms the resulting archive should support.
getArchivePlatforms
public Vector getArchivePlatforms()
- Returns a Vector of Platform objects that describe the native
platform support that will be included in this archive.
- Returns:
- a Vector of Platform objects that describe the native
platform support that will be included in this archive.
getOsTypes
public void getOsTypes(String dirName)
- Loads the platforms variable with the native support found
in the SDK.
- Parameters:
- dirName - The directory in which the native support can be found.
getOsNames
public void getOsNames(int osType,
File osTypeDir)
- Loads the platforms variable with the native support found
in the SDK.
- Parameters:
- osType - The os type to load. (i.e. Unix, Windows).
- osTypeDir - The directory where the osType resides.
getArchs
public void getArchs(int osType,
int osName,
File archDir)
- Loads the platforms variable with the native support found
in the SDK.
- Parameters:
- osType - The os type to load. (i.e. Unix, Windows).
- osName - The os name to load. (i.e. Solaris, Windows 95).
- archDir - The directory where the architecture support resides.
getResources
public ResourceCollection getResources()
- Creates a ResourceCollection of resources to include in the
archive. Based on the support platforms. If a WizardState was
specified in the constructor, then that wizard state is used to
gather resources from the existing archive. Otherwise the
filesystem is queried and all native resources for the desired
platforms are included.
addSection
public void addSection(ResourceCollection collection,
String sectionName)
- Iterates through each section in the "NativeSupport" indirect pointers
- Parameters:
- collection - The collection of files to add to the specified section.
- sectionName - The name of the section the specified collection should
be written into.
resolveResource
public ResourceInputStream resolveResource(String type,
String name,
byte extData[])
- Gets the platform support data for each supported platformd.
We should only be resolving resources for native support if
they are the actual native binary files. The
platform-specific java classes get resolved by a standard
FileResolver.
- Parameters:
- type - The type of resource to resolve.
- name - The name of the resource.
- extData - The extra data to associate with the resource.
- Returns:
- The binary data for this file.
All Packages Class Hierarchy This Package Previous Next Index