All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.sun.wizards.core.PlatformToolkit

public interface PlatformToolkit
The PlatformToolkit is an interface that creates a means of access to system-specific functionality.


Method Index

 o attach()
Try to load the native support.
 o createDesktopFolder(String)
Creates a desktop folder
 o createDesktopItem(String, String, String, String)
Creates a desktop item for the specified command.
 o createDesktopItems(Vector)
Creates many desktop item for the specified commands.
 o detach()
Try to unload the native support.
 o getComponent(String)
Return an install description of the specified component.
 o getComponent(String, String)
Return an install description of the specified component.
 o getComponent(String, String, int)
Return an install description of the specified component.
 o getFileAttributes(File)
Returns a string representing the file attributes of the specified file.
 o getHomeDirectory()
Returns the user's home directory, or a good alternative to that directory on systems that are not multiuser.
 o getJavaCommand(String, String[], String)
Returns a string that can be used to execute the specified Java application with the specified CLASSPATH.
 o getLibraryDirectory()
Returns the directory in which shared libraries should be installed.
 o getLogFileDirectory()
Returns the directory in which system log files might be written.
 o getNamedFolderList(String, String)
Gets a list of folders that are in the specified folder.
 o getPartitionFreeSpace(String)
Returns the space available on the specified partition.
 o getPartitionNames()
Returns an array of String representing all partition names.
 o getStandardInstallDirectory()
Returns the directory in which programs should be installed by default.
 o getStaticNativeLibraryDir()
Returns the directory in which the native library support for this wizard should be written.
 o getTempDirectory()
Returns the temporary directory.
 o registerComponent(ComponentDescription)
Register the specified component.
 o removeDesktopFolder(String)
Removes a desktop folder.
 o removeDesktopItem(String, String)
Removes a desktop item.
 o setFileAttributes(File, String)
Sets the attributes of the specified file.
 o setFileAttributes(File[], String[])
Sets the attributes of the specified files.
 o unregisterComponent(ComponentDescription)
Unregister the specified component.

Methods

 o getStaticNativeLibraryDir
 public abstract String getStaticNativeLibraryDir()
Returns the directory in which the native library support for this wizard should be written.

Returns:
The directory in which the native support should be written.
 o attach
 public abstract void attach()
Try to load the native support.

 o detach
 public abstract void detach()
Try to unload the native support.

 o getLibraryDirectory
 public abstract String getLibraryDirectory()
Returns the directory in which shared libraries should be installed.

Returns:
The shared library directory.
 o getLogFileDirectory
 public abstract String getLogFileDirectory()
Returns the directory in which system log files might be written.

Returns:
The shared library directory.
 o getStandardInstallDirectory
 public abstract String getStandardInstallDirectory()
Returns the directory in which programs should be installed by default.

Returns:
The common program install directory.
 o getTempDirectory
 public abstract String getTempDirectory()
Returns the temporary directory.

Returns:
The temporary directory.
 o getHomeDirectory
 public abstract String getHomeDirectory()
Returns the user's home directory, or a good alternative to that directory on systems that are not multiuser. Windows 95, for example, does not have a good concept of a home directory, and some versions of Java will report any random directory.

Returns:
The user's home directory.
 o getPartitionNames
 public abstract String[] getPartitionNames()
Returns an array of String representing all partition names.

Returns:
The list of partition names.
 o getJavaCommand
 public abstract String getJavaCommand(String applicationName,
                                       String applicationArgs[],
                                       String classpath)
Returns a string that can be used to execute the specified Java application with the specified CLASSPATH.

Parameters:
applicationName - The name of the Java application class.
applicationArgs - The arguments to pass into the Java application.
classpath - The CLASSPATH required to execute the specified application.
 o getPartitionFreeSpace
 public abstract long getPartitionFreeSpace(String partitionName)
Returns the space available on the specified partition.

Parameters:
partitionName - The name of the partition to query.
Returns:
The free space on the named partition, in bytes.
 o getFileAttributes
 public abstract String getFileAttributes(File file)
Returns a string representing the file attributes of the specified file.

Parameters:
file - The file to get the attributes from.
Returns:
A String representation of the file attributes that can be passed in to SystemInterface.setFileAttributes().
 o setFileAttributes
 public abstract void setFileAttributes(File file,
                                        String attributes)
Sets the attributes of the specified file.

Parameters:
file - The file the attributes should be applied to.
attributes - The String representation of the desired file attributes.
 o setFileAttributes
 public abstract void setFileAttributes(File file[],
                                        String attributes[])
Sets the attributes of the specified files.

Parameters:
file - The files the attributes should be applied to.
attributes - The String representation of the desired file attributes for each file.
 o registerComponent
 public abstract void registerComponent(ComponentDescription component)
Register the specified component.

Parameters:
component - The component description of the shared component to register.
 o unregisterComponent
 public abstract void unregisterComponent(ComponentDescription component)
Unregister the specified component.

Parameters:
component - The component description of the shared component to unregister.
 o getComponent
 public abstract ComponentDescription getComponent(String guid)
Return an install description of the specified component.

Parameters:
guid - The Universal Unique Identifier of the desired component.
Returns:
The shared component description if the component is registered; null otherwise.
 o getComponent
 public abstract ComponentDescription getComponent(String guid,
                                                   String installLocation)
Return an install description of the specified component.

Parameters:
guid - The Universal Unique Identifier of the desired component.
installLocation - The directory in which the component should be installed.
Returns:
The shared component description if the component is registered; null otherwise.
 o getComponent
 public abstract ComponentDescription getComponent(String guid,
                                                   String version,
                                                   int instance)
Return an install description of the specified component.

Parameters:
guid - The Universal Unique Identifier of the desired component.
version - The version of the desired component.
instance - The installed instance of the desired component.
Returns:
The shared component description if the component is registered; null otherwise.
 o getNamedFolderList
 public abstract String[] getNamedFolderList(String folderName,
                                             String param)
Gets a list of folders that are in the specified folder. You can use the names to search recursively through the folder tree

Parameters:
folderName - The name of the folder to search in.
param - An optional param used by implementations to specify additional parameters
Returns:
The list of items in this folder, or null if the folder does not exist or is not readable.
 o createDesktopItem
 public abstract boolean createDesktopItem(String folderName,
                                           String title,
                                           String target,
                                           String iconName)
Creates a desktop item for the specified command. For example, on Microsoft Windows, an icon is placed on the "Start" menu.

Parameters:
folderName - The name of the folder to search in.
title - The name of the item as it should appear on-screen.
command - The target file that is to be accessed via this desktop item. The platform-dependent toolkits should modify this to produce a platform-specific command line or do whatever is necessary to implement the desktop item on the particular platform. this desktop item is selected by the user.
iconName - The absolute path To the file representing the icon. The icon file format should be the correct one for the platform. For example, on Sun Solaris, the icon must be in .xpm format. If no icon name is supplied, none is used, or the default one is used for the supplied command.
Returns:
Whether the item was able to be added or not.
 o createDesktopItems
 public abstract boolean createDesktopItems(Vector targets)
Creates many desktop item for the specified commands. For example, on Microsoft Windows, an icon is placed on the "Start" menu.

This version is useful for adding many desktop items at once, where the act of adding something to the desktop is very expensive.

The list passed to this method should be a Vector, with each member being a String[] which contains (in order): {folderName, title, target, iconName}, with iconName being optional (as in createDesktopItem() API).

Parameters:
targets - The list of desktop items to add. The list is a Vector, with each member being a String[] which contains (in order): {folderName, title, target, iconName}, with iconName being optional (as in createDesktopItem() API).
Returns:
Whether the item was able to be added or not.
 o removeDesktopItem
 public abstract boolean removeDesktopItem(String folderName,
                                           String title)
Removes a desktop item.

Parameters:
folderName - The name of the folder that the item to remove is in.
title - The name of the item as it appears on-screen.
Returns:
Whether the item was removed or not. If the item did not exist in the first place, false is returned.
 o createDesktopFolder
 public abstract boolean createDesktopFolder(String folderName)
Creates a desktop folder

Parameters:
folderName - The name of the folder to search in.
Returns:
Whether the folder was created or not.
 o removeDesktopFolder
 public abstract boolean removeDesktopFolder(String folderName)
Removes a desktop folder.

Parameters:
folderName - The name of the folder that the folder to remove is in.
Returns:
Whether the folder was removed or not. If the folder did not exist in the first place, false is returned.

All Packages  Class Hierarchy  This Package  Previous  Next  Index