com.togethersoft.openapi.ide.resource
Interface IdeResourceManager


public interface IdeResourceManager

Provides a set of methods for obtaining information about types of files and RwiElements.

Values returned by methods in this interface are closely related to the settings in the resource.config file. If the requested information is not defined in that config file, then methods of this interface return a default value.

Author:
TogetherSoft

Method Summary
 EnumerationfileExtensions(String fileType)
           Returns an enumeration of possible extensions of files that belong to the specified category.
 StringgetDefaultHelpLocation()
           Obtains the location of the default help topic.
 StringgetDescription(RwiElement rwiElement)
           Returns a string that contains a full type description of the specified RwiElement.
 StringgetDiagramPresentableName(RwiDiagram rwiDiagram)
           Returns a string that contains a brief description of the specified diagram (RwiDiagram).
 StringgetFileDescription(String url)
           Returns description of the file, defined by its URL.
 StringgetFileHelpURL(String url)
           Returns a string, that contains URL with a help topic for the specified file.
 javax.swing.IcongetFileIcon(String url, String iconType)
           Returns an icon object for the specified file.
 java.net.URLgetFileIconURL(String url, String iconType)
           Returns URL for the icon object for the file presented by the specified URL.
 StringgetFileLanguage(String url)
           Returns a string that defines name of the language of the specified file.
 StringgetFilePresentableName(String url)
           Returns a string that contains brief description of the specified file.
 StringgetFileType(String url)
           Returns a string that contains the type name of the specified file.
 StringgetHelpURL(RwiElement rwiElement)
           Returns a string that contains URL of the help topic for the specified RwiElement.
 javax.swing.IcongetIcon(RwiElement rwiElement, String iconType)
           Returns an icon object for the specified RwiElement.
 javax.swing.IcongetIcon(String path)
           
 java.net.URLgetIconURL(RwiElement rwiElement, String iconType)
           Returns URL of the icon for the specified RwiElement.
 StringgetLocationForHelpTopic(String topic)
           Resolve help topic id to the location which can be used by IdeManager.openHelp()
 StringgetPresentableName(RwiElement rwiElement)
           Returns a string that contains a brief description of the specified RwiElement.

Method Detail

fileExtensions

public Enumeration fileExtensions(String fileType)
Returns an enumeration of possible extensions of files that belong to the specified category.
Parameters:
fileType - String type of files
Returns: Enumeration object that contains all conceivable file extensions of this type
See Also:
IdeFileType

getDefaultHelpLocation

public String getDefaultHelpLocation()
Obtains the location of the default help topic.
Returns: String location of main help topic

getDescription

public String getDescription(RwiElement rwiElement)
Returns a string that contains a full type description of the specified RwiElement.
Parameters:
rwiElement - RwiElement instance for which the description is required
Returns: String type description of this RwiElement.
See Also:
getPresentableName(com.togethersoft.openapi.rwi.RwiElement)

getDiagramPresentableName

public String getDiagramPresentableName(RwiDiagram rwiDiagram)
Returns a string that contains a brief description of the specified diagram (RwiDiagram).
Parameters:
rwiElement - the RwiElement instance for which a brief description is needed.
Returns: String brief description of this RwiElement.
See Also:
getDescription(com.togethersoft.openapi.rwi.RwiElement)

getFileDescription

public String getFileDescription(String url)
Returns description of the file, defined by its URL.
Parameters:
url - String URL of the file for which the description is required
Returns: string type description of the specified file
See Also:
getFilePresentableName(java.lang.String)

getFileHelpURL

public String getFileHelpURL(String url)
Returns a string, that contains URL with a help topic for the specified file.
Parameters:
url - String URL of the file for which the help topic is required
Returns: String URL of this help topic
See Also:
getFileDescription(java.lang.String)

getFileIcon

public javax.swing.Icon getFileIcon(String url, String iconType)
Returns an icon object for the specified file. The file is presented by its URL the icon in question belongs to the type passed as a parameter.
Parameters:
url - String URL of the file for which the icon is required
iconType - String type of this icon. Predefined values are stored in IdeResourceIconType interface.
Returns: javax.swing.Icon
See Also:
IdeResourceIconType

getFileIconURL

public java.net.URL getFileIconURL(String url, String iconType)
Returns URL for the icon object for the file presented by the specified URL.
Parameters:
url - String URL of the file for which the icon is required
iconType - String type of this icon. Predefined values are stored in the IdeResourceIconType interface.
Returns: java.net.URL
See Also:
IdeResourceIconType

getFileLanguage

public String getFileLanguage(String url)
Returns a string that defines name of the language of the specified file.
Parameters:
url - string URL of this file.
Returns: String language name for the specified file.
See Also:
RwiLanguage

getFilePresentableName

public String getFilePresentableName(String url)
Returns a string that contains brief description of the specified file.
Parameters:
url - String URL of the file for which the description is required
Returns: String brief description of the specified file
See Also:
getFileDescription(java.lang.String)

getFileType

public String getFileType(String url)
Returns a string that contains the type name of the specified file.
Parameters:
url - String URL of this file.
Returns: String type of the specified file
See Also:
IdeFileType

getHelpURL

public String getHelpURL(RwiElement rwiElement)
Returns a string that contains URL of the help topic for the specified RwiElement.
Parameters:
rwiElement - RwiElement instance for help URL is required
Returns: String URL of the help topic of the specified RwiElement
See Also:
getDescription(com.togethersoft.openapi.rwi.RwiElement)

getIcon

public javax.swing.Icon getIcon(RwiElement rwiElement, String iconType)
Returns an icon object for the specified RwiElement. The returned value depends on the kind of information being represented by the element: for RwiNodes representing classes, an icon for a class will be returned,
for RwiNodes representing interfaces, an icon for an interface will be returned etc.
Parameters:
rwiElement - RwiElement instance for which an icon is required
iconType - String icon type. Predefined values are specified in the IdeResourceIconType interface.
Returns: javax.swing.Icon object of the specified type
See Also:
IdeResourceIconType, RwiElement

getIcon

public javax.swing.Icon getIcon(String path)

getIconURL

public java.net.URL getIconURL(RwiElement rwiElement, String iconType)
Returns URL of the icon for the specified RwiElement. The returned value depends on the kind of information being represented by the element: for RwiNodes representing classes, URL for the icon of the classs will be returned, for RwiNodes representing interfaces, URL of the icon for the interface will be returned etc.
Parameters:
rwiElement - RwiElement instance for which URL of the icon is required
iconType - String type of this icon. Predefined values are stored in the IdeResourceIconType interface.
Returns: java.net.URL
See Also:
IdeResourceIconType, RwiElement

getLocationForHelpTopic

public String getLocationForHelpTopic(String topic)
Resolve help topic id to the location which can be used by IdeManager.openHelp()
Parameters:
topic - String help topic identifier
Returns: String location of the corresponding topic or null if there is no such topic

getPresentableName

public String getPresentableName(RwiElement rwiElement)
Returns a string that contains a brief description of the specified RwiElement.
Parameters:
rwiElement - RwiElement instance for which a brief description is required
Returns: String description of the specified RwiElement.
See Also:
getDescription(com.togethersoft.openapi.rwi.RwiElement)