FileDocCategorySizeDatePackage
APIManager.javaAPI DocExample6426Tue Dec 08 01:21:00 GMT 1998oisoft.togetherx.scriptapi

APIManager

public interface APIManager
The APIManager interface offers access to all the Together/J 2.0 model interfaces and services. A reference to this interface is passed as the only parameter of Script.doIt() method. The interface contains in addition some common utility methods.
version
2.1.05 14.06.1998
author
Andrei Ivanov
see
Script
see
Script#doIt
see
oisoft.togetherx.scriptapi.UML.UMLModel

Fields Summary
Constructors Summary
Methods Summary
public java.awt.WindowcreateDialog(java.lang.String title, boolean modal)
Used to create an (initially invisible) top level, Together owned window or dialog. A window created using this entrypoint will behave correctly when Together is minimized/maximized via a system command.

param
title the title of the window when displayed.
param
modal determines if the resulting window should be modal
since
345

public voidcreateMessage(java.lang.String strMessage)
Use this method to put error messages into the Together/J message window.

param
strMessage Message to display

public voidcreateMessage(java.lang.String strFolder, java.lang.String strMessage, java.lang.String strPath, int line, int col, java.lang.String strType)
Use these methods to put any messages into the Together/J Message window. It is possible to navigate to edit panel from message window, if url is path to java-file.

param
strFolder Name of message group
param
strMessage Message to display
param
strPath Path to file contains error
param
line Line of error
param
col Column of error
param
strType Type of message. Use "Error" for error messages and "Warning" for warnings
since
345

public voidcreateMessage(java.lang.String strFolder, java.lang.String strMessage, java.lang.String strType)

public booleancustomize(java.lang.Object customizableObject, java.lang.String strTitle)

public booleancustomize(java.lang.Object customizableObject, java.lang.String strTitle, java.lang.String strHelpFile)

public voidcustomize(java.lang.Object customizableObject)
Use these methods (in overloaded forms) when you wish to customize some JavaBean property for your script or some other object. When you call customize() method, Together/J displays a panel with the properties of object being customized and those properties should meet the standard JavaBeans name convention. You can use properties of standard types and of the java.io.File type. The first form of this method invokes the default customization dialog. The second form of this method allows to control the dialog title and user's response (due to the return value). The third form of this method allows in addition to control the Help support for the dialog: Pass the HTML help file name, which will display on clicking the Help button. You can use the Create Script master for examples of customization and for automatic adding properties to a script.

param
customizableObject Object to be customized
param
strTitle a title for the customization dialog (only for second and third form)
param
strHelpFile a Help file invoked by clicking the Help button (only for third form)
return
true - if user finish the dialog with OK, and
false - if user click Cancel (only for second and third form)

public java.util.PropertiesgetHostProperties()
Use this method to access the system properties, Together/J properties, or properties of your script. The Properties this method returns are collected from the system properties and properties from the host.properties and together.properties files. You can add your own properties and modify existing ones - they will be saved for future use. For example:
...
Properties props = apiManager.getHostProperties();
props.put("some_script.some_property", "some_value");
...

return
Properties collection

public java.lang.StringgetIdeRootDir()
Use this method for getting the full path to the Together/J installation directory.

return
Full product installation path

public java.lang.StringgetOutputDirectory(java.lang.String strExtension)
Use this method for getting the full path of the output directory. Usually the implementation launches the standard "Save As" or "Choose directory" dialog. (Compare with getOutputStream(), which returns the full path to file)

return
Full path to the selected directory
param
strExtension extension defining the filter for files you wish to be displayed in the dialog
see
#getOutputStream

public java.lang.StringgetOutputStream(java.lang.String strExtension)
Use this method for getting the full path of the output document. Usually the implementation launches the standard "Save As" dialog. (Compare with getOutputDirectory(), which returns the full path to directory).

return
Full path to the selected document
param
strExtension extension defining the file type you wish to open
see
#getOutputDirectory
see
#openExternalViewer

public oisoft.togetherx.scriptapi.UML.UMLModelgetUMLModel()
Use this method when you begin to work with a UML package to access its elements and properties.

return
Reference to the root interface of the hierarchy of UML elements.
see
oisoft.togetherx.scriptapi.UML.UMLModel

public voidopenExternalViewer(java.lang.String strOutputName)
Use this method when you wish to open the output document in the associated application. The document should be previously created. The implementation launches the application associated with the file extension using oistart.

param
strOutputName Full path to the document to be opened
see
#getOutputStream

public booleanwarningMessage(java.lang.String message)