Class Component

  • All Implemented Interfaces:
    Referenceable
    Direct Known Subclasses:
    VMComponent

    public class Component
    extends InstallableObject
    Components are the smallest piece of an installation handled by the installer. From a developers perspective they are the building blocks of applications or features. End Users never see or interact with Components.

    Several Components make up each Feature, and each Component can belong to one or more Feature. Components are made up of files and actions. Every action to be executed or file to installed by the installer should be assigned to a Component. The children property contains the actions that are assigned to the Component. A file or action may belong to one component only. All installers must have at least one component, and can have as many as needed.

    Components are versioned and each has a unique ID, so that a particular version of a component on a system can be searched for to see if the latest version has been installed at a particular location.

    There are 3 types of components: standalone components, dependencies, and shared components. Each component type has different install/uninstall behavior. The checksDependency and hasSomethingToInstall properties define the type of the component.

    • Constructor Detail

      • Component

        public Component()
    • Method Detail

      • getFullName

        public java.lang.String getFullName()
        The full name of the component.
      • setFullName

        public void setFullName​(java.lang.String fullName)
        The full name of the component.
      • setShortName

        public void setShortName​(java.lang.String shortName)
        The short name of the component.
      • getShortName

        public java.lang.String getShortName()
        The short name of the component.
      • setComment

        public void setComment​(java.lang.String comment)
        The component comment.
      • getComment

        public java.lang.String getComment()
        The component comment.
      • setUniqueId

        public void setUniqueId​(UUID uniqueId)
        The component unique identifier.
      • getUniqueId

        public UUID getUniqueId()
        The component unique identifier.
      • setVersionMajor

        public void setVersionMajor​(int versionMajor)
        The major portion of the version number. A version is formated as major.minor.revision.sub-revision.
      • getVersionMajor

        public int getVersionMajor()
        The major portion of the version number. A version is formated as major.minor.revision.sub-revision.
      • setVersionMinor

        public void setVersionMinor​(int versionMinor)
        The minor portion of the version number. A version is formated as major.minor.revision.sub-revision.
      • getVersionMinor

        public int getVersionMinor()
        The minor portion of the version number. A version is formated as major.minor.revision.sub-revision.
      • setVersionRevision

        public void setVersionRevision​(int versionRevision)
        The revision portion of the version number. A version is formated as major.minor.revision.sub-revision.
      • getVersionRevision

        public int getVersionRevision()
        The revision portion of the version number. A version is formated as major.minor.revision.sub-revision.
      • setVersionSubRevision

        public void setVersionSubRevision​(int versionSubRevision)
        The sub-revision portion of the version number. A version is formated as major.minor.revision.sub-revision.
      • getVersionSubRevision

        public int getVersionSubRevision()
        The sub-revision portion of the version number. A version is formated as major.minor.revision.sub-revision.
      • setKeyFile

        public void setKeyFile​(ProjectObject key)
        The component key file, which is a file that must be present in all subsequent versions of the component. It is used to define the components location when the FindComponentInRegistry action is used.

        The key file should be a file resource actions, like the InstallFile or InstallZipFile actions.
      • getKeyFile

        public ProjectObject getKeyFile()
        The component key file, which is a file that must be present in all subsequent versions of the component. It is used to define the components location when the FindComponentInRegistry action is used.

        The key file should be a file resource actions, like the InstallFile or InstallZipFile actions.
      • setDependency

        public void setDependency​(ComponentDependency dependency)
        The component dependency settings, which is used to determine whether the dependency component is installed on the target system or not.
      • getDependency

        public ComponentDependency getDependency()
        The component dependency settings, which is used to determine whether the dependency component is installed on the target system or not.
      • setChecksDependency

        public void setChecksDependency​(boolean checksDependency)
        Whether or not the component is a shared component.

        Shared components are components that can either be a standalone component or a dependency. If the component is not already installed the component will act as if it was a standalone component. If the component is already installed the component will act as if it was a dependency.

        See Also:
        setDependency(ComponentDependency)
      • getChecksDependency

        public boolean getChecksDependency()
        Whether or not the component is a shared component.

        Shared components are components that can either be a standalone component or a dependency. If the component is not already installed the component will act as if it was a standalone component. If the component is already installed the component will act as if it was a dependency.

        See Also:
        getDependency()
      • setHasSomethingToInstall

        public void setHasSomethingToInstall​(boolean hasSomethingToInstall)
        Whether or not the component is a dependency only component. Every dependecy component should also be a shared component, which means the checksDependency property should be set to true.

        Dependencies are components that are needed by the application that is being installed, but are not actually installed by the application's installer. This is useful if the application relies on other components like an application server or a database that may be installed by other applications. At uninstall time the application will uninstall the component even though it did not install it unless another installed application needs it.

        The installer will search the product registry to check if a component with the component ID of the dependency specified is installed. You can also optionally specify a version number or key file location to make the search more specific.

        See Also:
        setDependency(ComponentDependency)
      • getHasSomethingToInstall

        public boolean getHasSomethingToInstall()
        Whether or not the component is a dependency only component. Every dependecy component should also be a shared component, which means the checksDependency property should be set to true.

        Dependencies are components that are needed by the application that is being installed, but are not actually installed by the application's installer. This is useful if the application relies on other components like an application server or a database that may be installed by other applications. At uninstall time the application will uninstall the component even though it did not install it unless another installed application needs it.

        The installer will search the product registry to check if a component with the component ID of the dependency specified is installed. You can also optionally specify a version number or key file location to make the search more specific.

        See Also:
        getDependency()
      • getChildren

        public java.util.Vector<ProjectObject> getChildren()
        The actions assigned to the component. A file or action may belong to one component only.