com.corticon.eclipse.studio.vocabulary.core

## Interface IJavaMetadataImportDialogAPI

- All Superinterfaces:
    IDialogAPI

      public interface IJavaMetadataImportDialogAPI
      extends IDialogAPI

  This is a "dialog smarts" API to support the Java Metadata Import wizard. The API provides supporting functions to allow the dialog to supply a list of JARs and/or class folder URIs. This API will discover all of the classes (and hence packages) contained within the specified JARs and class folders to build a package tree. The UI presents the package tree to the user. The user can then select the packages whose metadata is to be imported, then import the metadata into the Vocabulary.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ICON_PACKAGE_NODE` Icon identifier for package node.
    `static int` | `TREEVIEW_ID_PACKAGES` Treeview ID of package tree.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `areMetadataClassesAvailable(java.util.List<java.lang.String> alistPaths)` Return an indication of whether any metadata classes are available in the list of JARs or class folders supplied.
    `JavaPackageNode` | `findRoot()` Finder for root JavaPackageNode instance.
    `java.util.List<JavaPackageNode>` | `getJavaPackageNodeChildren(JavaPackageNode aJavaPackageNode)` Get a list of children of the specified Java package node as necessary to render the Java package tree.
    `int` | `getJavaPackageNodeIcon(JavaPackageNode aJavaPackageNode)` Get an integer number corresponding to the icon for the specified JavaPackageNode instance (e.g., ICON_PACKAGE_NODE).
    `JavaPackageNode` | `getJavaPackageNodeParent(JavaPackageNode aJavaPackageNode)` Get the parent of the specified JavaPackageNode instance as necessary to render the Java package tree view.
    `java.lang.String` | `getJavaPackageNodeText(JavaPackageNode aJavaPackageNode)` Given a JavaPackageNode instance, return localized text to be displayed adjacent to the icon in the Scope tree.
    `Selection` | `getSelectedPackages()` Return a Selection consisting of JavaMetadataPackage instances that were selected previously.
    `IVocabularyModelAPI` | `getVocabularyModelAPI()` Return a Selection consisting of the metadata packages
    `java.lang.String` | `importJavaMetadata(Selection aSelection, java.util.List<java.lang.String> alistClasspath, IProgressDelegate aIProgressDelegate)` Import Java class metadata for the specified Selection of packages.
    `boolean` | `isPageCompleteJavaMetadataSources(java.util.List<java.lang.String> alistPaths)` Determine whether the Java Metadata Sources wizard page is complete.
    `boolean` | `isPageCompleteJavaPackageSelection(Selection aSelection)` Determine whether the Java Package Selection wizard page is complete.
    `java.lang.String` | `loadFromMetadataSources(java.util.List<java.lang.String> alistFiles, java.util.List<java.lang.String> alistClasspath, IProgressDelegate aIProgressDelegate)` Load java metadata to build the Java Package tree.
    `void` | `setVocabularyModelAPI(IVocabularyModelAPI aIVocabularyModelAPI)` Setter for reference to Vocabulary Model API.

    - ### Methods inherited from interface com.corticon.eclipse.core.IDialogAPI

      `displayMessageBox, getIExceptionDialogDelegate, getLocale, getMessage, getMessage, getMessageBase, getMessageBoxDelegate, getPreferences, getScrollableMessageDelegate, getUserInterfaceInfoDelegate, setIExceptionDialogDelegate, setLocale, setMessageBoxDelegate, setPreferencesDelegate, setScrollableMessageDelegate, setUserInterfaceInfoDelegate`

- - ### Field Detail

    - #### TREEVIEW_ID_PACKAGES

          static final int TREEVIEW_ID_PACKAGES

      Treeview ID of package tree.
      See Also:
        Constant Field Values

    - #### ICON_PACKAGE_NODE

          static final int ICON_PACKAGE_NODE

      Icon identifier for package node.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### areMetadataClassesAvailable

          boolean areMetadataClassesAvailable(java.util.List<java.lang.String> alistPaths)

      Return an indication of whether any metadata classes are available in the list of JARs or class folders supplied.
      Parameters:
        `alistPaths` - List (String) of paths to either JARs or class folders.
      Returns:
        `true` if any classes are available.

    - #### findRoot

          JavaPackageNode findRoot()

      Finder for root JavaPackageNode instance.
      Returns:
        JavaPackageNode instance.

    - #### getJavaPackageNodeChildren

          java.util.List<JavaPackageNode> getJavaPackageNodeChildren(JavaPackageNode aJavaPackageNode)

      Get a list of children of the specified Java package node as necessary to render the Java package tree.
      Parameters:
        `aJavaPackageNode` - JavaPackageNode parent.
      Returns:
        List of JavaPackageNode nodes (children).

    - #### getJavaPackageNodeIcon

          int getJavaPackageNodeIcon(JavaPackageNode aJavaPackageNode)

      Get an integer number corresponding to the icon for the specified JavaPackageNode instance (e.g., ICON_PACKAGE_NODE).
      Parameters:
        `aJavaPackageNode` - JavaPackageNode child.
      Returns:
        Integer number indicating which icon to display (e.g., ICON_PACKAGE_NODE).

    - #### getJavaPackageNodeParent

          JavaPackageNode getJavaPackageNodeParent(JavaPackageNode aJavaPackageNode)

      Get the parent of the specified JavaPackageNode instance as necessary to render the Java package tree view.
      Parameters:
        `aJavaPackageNode` - JavaPackageNode child.
      Returns:
        JavaPackageNode parent instance.

    - #### getJavaPackageNodeText

          java.lang.String getJavaPackageNodeText(JavaPackageNode aJavaPackageNode)

      Given a JavaPackageNode instance, return localized text to be displayed adjacent to the icon in the Scope tree.
      Parameters:
        `aJavaPackageNode` - JavaPackageNode whose text is to be returned.
      Returns:
        Text display of JavaPackageNode.

    - #### getSelectedPackages

          Selection getSelectedPackages()

      Return a Selection consisting of JavaMetadataPackage instances that were selected previously. This Selection can be used to reset the selection state of the package tree, allowing the user to conveniently re-import the Java class metadata.
      Returns:
        Selection of JavaMetadataPackage instances.

    - #### getVocabularyModelAPI

          IVocabularyModelAPI getVocabularyModelAPI()

      Return a Selection consisting of the metadata packages
      Returns:
        Instance of Vocabulary Model API.

    - #### importJavaMetadata

          java.lang.String importJavaMetadata(Selection aSelection,
                                            java.util.List<java.lang.String> alistClasspath,
                                            IProgressDelegate aIProgressDelegate)

      Import Java class metadata for the specified Selection of packages.
      Parameters:
        `aSelection` - Selection of packages to import.
        `alistClasspath` - List of paths to JARs or class folders.
        `aIProgressDelegate` - Progress delegate or `null` if no progress reporting is needed.
      Returns:
        List of errors detected during import or `null`.

    - #### isPageCompleteJavaMetadataSources

          boolean isPageCompleteJavaMetadataSources(java.util.List<java.lang.String> alistPaths)

      Determine whether the Java Metadata Sources wizard page is complete.
      Parameters:
        `alistPaths` - List of paths chosen.
      Returns:
        `true` if Java Metadata Sources wizard page is complete.

    - #### isPageCompleteJavaPackageSelection

          boolean isPageCompleteJavaPackageSelection(Selection aSelection)

      Determine whether the Java Package Selection wizard page is complete.
      Parameters:
        `aSelection` - Selection of nodes (JavaPackageNode instances).
      Returns:
        `true` if Java Package Selection wizard page is complete.

    - #### loadFromMetadataSources

          java.lang.String loadFromMetadataSources(java.util.List<java.lang.String> alistFiles,
                                                 java.util.List<java.lang.String> alistClasspath,
                                                 IProgressDelegate aIProgressDelegate)

      Load java metadata to build the Java Package tree. The result is anchored in iJavaPackageNodeRoot.
      Parameters:
        `alistFiles` - List (String) of URIs to JARs and/or individual classes.
        `alistClasspath` - List (String) of URIs to use as classpath.
        `aIProgressDelegate` - Progress delegate or `null` if no progress reporting is needed.
      Returns:
        List of errors detected during loading or `null`.

    - #### setVocabularyModelAPI

          void setVocabularyModelAPI(IVocabularyModelAPI aIVocabularyModelAPI)

      Setter for reference to Vocabulary Model API.
      Parameters:
        `aIVocabularyModelAPI` - Instance of Vocabulary Model API.

Copyright © 2005-2013 Progress Software Corporation and/or its subsidiaries and affiliates. All rights reserved.