Interface ITargetDefinition


  • public interface ITargetDefinition
    Defines a target platform. A target platform is a collection of bundles and features configured for a specific environment.
    Since:
    3.8
    See Also:
    Use the target platform service to work with target definitions
    Restriction:
    This interface is not intended to be implemented by clients.
    Restriction:
    This interface is not intended to be extended by clients.
    • Method Detail

      • isResolved

        boolean isResolved()
        Returns whether all ITargetLocations in this target currently in a resolved state.
        Returns:
        true if all locations are currently resolved
      • setDocument

        void setDocument​(Document document)
        Sets the XML document that stores the state of this target. The document is updated with each setter that has an affect on the target file source.
        Parameters:
        document - xml document or null
        Since:
        3.12
      • getDocument

        Document getDocument()
        Returns the Document that represents this target, or null if none
        Returns:
        document or null
        Since:
        3.12
      • getBundles

        TargetBundle[] getBundles()
        Returns all bundles included in this target definition or null if this container is not resolved. Takes all the bundles available from the set target locations (returned by getAllBundles() and applies the filters (returned by getIncluded()) to determine the final list of bundles in this target.

        Some of the returned bundles may have non-OK statuses. These bundles may be missing some information (location, version, source target). To get a bundle's status call TargetBundle.getStatus(). Calling getStatus() will return all problems in this target definition.

        Returns:
        resolved bundles or null
      • getAllBundles

        TargetBundle[] getAllBundles()
        Returns a list of all resolved bundles in this target definition or null. Does not filter based on any filters (getIncluded(). Returns null if this target has not been resolved. Use getBundles() to get the filtered list of bundles.

        Some of the returned bundles may have non-OK statuses. These bundles may be missing some information (location, version, source target). To get a bundle's status call TargetBundle.getStatus(). Calling getStatus() will return all problems in this target definition.

        Returns:
        collection of resolved bundles or null
      • getAllFeatures

        TargetFeature[] getAllFeatures()
        Returns the list of feature models available in this target or null if this target has not been resolved.
        Returns:
        collection of feature models or null
      • getHandle

        ITargetHandle getHandle()
        Returns a handle to this target definition.
        Returns:
        target handle
      • getName

        String getName()
        Returns the name of this target, or null if none
        Returns:
        name or null
      • setName

        void setName​(String name)
        Sets the name of this target.
        Parameters:
        name - target name or null
      • getTargetLocations

        ITargetLocation[] getTargetLocations()
        Returns the locations defined by this target, possible null.
        Returns:
        target locations or null
      • setTargetLocations

        void setTargetLocations​(ITargetLocation[] containers)
        Sets the locations in this target definition or null if none.
        Parameters:
        containers - target locations or null
      • setIncluded

        void setIncluded​(NameVersionDescriptor[] included)
        Sets a list of descriptors to filter the resolved plug-ins in this target. The list may include both plug-ins and features. To include all plug-ins in the target, pass null as the argument.

        The descriptions passed to this method must have an ID set. The version may be null to include any version of the matches the ID. Only descriptors with a type of NameVersionDescriptor.TYPE_FEATURE or NameVersionDescriptor.TYPE_PLUGIN will be considered.

        Parameters:
        included - list of descriptors to include in the target or null to include all plug-ins
        See Also:
        getBundles(), getIncluded()
      • getJREContainer

        IPath getJREContainer()
        Returns JRE container path that this target definition should be built against, or null if the workspace default JRE should be used. JavaRuntime can be used to resolve JRE's and execution environments from a container path.
        Returns:
        JRE container path or null
        See Also:
        JavaRuntime
      • setJREContainer

        void setJREContainer​(IPath containerPath)
        Sets the JRE that this target definition should be built against, or null to use the workspace default JRE. JavaRuntime should be used to generate and parse JRE container paths.
        Parameters:
        containerPath - JRE container path
        See Also:
        JavaRuntime
      • getOS

        String getOS()
        Returns the identifier of the operating system this target is configured for, possibly null.
        Returns:
        operating system identifier or null to default to the running operating system
      • setOS

        void setOS​(String os)
        Sets the operating system this target is configured for or null to default to the running operating system.
        Parameters:
        os - operating system identifier - one of the operating system constants defined by Constants or null to default to the running operating system
      • getWS

        String getWS()
        Returns the identifier of the window system this target is configured for, possibly null.
        Returns:
        window system identifier - one of the window system constants defined by Constants, or null to default to the running window system
      • setWS

        void setWS​(String ws)
        Sets the window system this target is configured for or null to default to the running window system.
        Parameters:
        ws - window system identifier or null to default to the running window system
      • getArch

        String getArch()
        Returns the identifier of the architecture this target is configured for, or null to default to the running architecture.
        Returns:
        architecture identifier - one of the architecture constants defined by Constants or null to default to the running architecture
      • setArch

        void setArch​(String arch)
        Sets the architecture this target is configured for, or null to default to the running architecture.
        Parameters:
        arch - architecture identifier or null to default to the running architecture.
      • getNL

        String getNL()
        Returns the identifier of the locale this target is configured for, or null for default.
        Returns:
        locale identifier or null for default
      • setNL

        void setNL​(String nl)
        Sets the locale this target is configured for or null for default.
        Parameters:
        nl - locale identifier or null for default
      • getProgramArguments

        String getProgramArguments()
        Returns any program arguments that should be used when launching this target or null if none.
        Returns:
        program arguments or null if none
      • setProgramArguments

        void setProgramArguments​(String args)
        Sets any program arguments that should be used when launching this target or null if none.
        Parameters:
        args - program arguments or null
      • getVMArguments

        String getVMArguments()
        Returns any VM arguments that should be used when launching this target or null if none.
        Returns:
        VM arguments or null if none
      • setVMArguments

        void setVMArguments​(String args)
        Sets any VM arguments that should be used when launching this target or null if none.
        Parameters:
        args - VM arguments or null
      • setImplicitDependencies

        void setImplicitDependencies​(NameVersionDescriptor[] bundles)
        Sets implicit dependencies for this target. Bundles in this collection are always considered by PDE when computing plug-in dependencies. Only symbolic names need to be specified in the given descriptors.
        Parameters:
        bundles - implicit dependencies or null if none
      • getImplicitDependencies

        NameVersionDescriptor[] getImplicitDependencies()
        Returns the implicit dependencies set on this target or null if none.
        Returns:
        implicit dependencies or null