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