Class ProjectAutomation


  • public class ProjectAutomation
    extends java.lang.Object
    This is the entry class for the Project Automation API.

    ProjectAutomation class provides the methods to create, load and save InstallAnywhere projects. It basically handles the Project object, which represents an IA installer project.

    When using the Project Automation API, there are some resources that need be loaded from the InstallAnywhere install location. The ProjectAutomation class tries to find where InstallAnywhere is installed, but the search can fail. In that case, the location should be explicity specified using the setIALocation() method.

    Starting with InstallAnywhere 2014, the Project automation API requires an additional argument to be added to your project's runtime environment to point to the licensing libraries in case you are using a node-locked licensing You can do this by using a -Djava.library.path=\resource\fnp\libraries If your path contains spaces, remember to specify quotes such as -Djava.library.path="\resource\fnp\libraries" This needs to be only used in case you require that your Project Automation API generates a project file that is licensed. Alternatively you can still run your Project Automation API to generate an unlicensed project file and then build using a licensed command line builder or licensed IDE to license the installer Also note that when you try to license the API using project automation, the JRE to be used for running the Project Automation API must be a 32 bit JRE to be able to check out node locked licenses properly.

    See Also:
    Project
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void createCredentialsForAmazonVirtualAppliance​(Project project, java.lang.String identityNameOfKey, java.lang.String accessKey, java.lang.String secretKey, java.lang.String accountNumber, java.lang.String pathToPrivateKey, java.lang.String pathToX509Certificate, java.lang.String helperHostName, java.lang.String helperHostUserName, java.lang.String helperHostPassword)
      Create credentials for Amazon Appliance for use with Project Automation.
      static void createCredentialsForVMwareVirtualAppliance​(Project project, java.lang.String identityNameOfKey, java.lang.String vCenterHostName, java.lang.String vCenterUserName, java.lang.String vCenterPassword, java.lang.String vCenterDataStore, java.lang.String vCenterDataCenter, java.lang.String vCenterResourcePool, boolean isUsingVCenter, java.lang.String associatedVSphereHostName, java.lang.String associatedVSphereUserName, java.lang.String associatedVSpherePassword, java.lang.String associatedVSphereDataStore, java.lang.String associatedVSphereDataCenter, java.lang.String associatedVSphereResourcePool)
      Create credentials for VMware Appliance for use with Project Automation.
      static Project createNewBasicProject​(java.lang.String projectFilePath)
      This method helps author to create a basic IA project
      static Project createNewProjectFromTemplate​(java.lang.String templatePath, java.lang.String projectFilePath)
      This method helps author to create a IA project from a specified template
      static void deleteCredentialFromCredentialStore​(Project project, java.lang.String identityNameOfKey)  
      static boolean doesCredentialExistInCredentialStore​(Project project, java.lang.String identityNameOfKey)
      Checks whether a credential with a given name exists.
      static Project loadProject​(java.io.File projectFile)
      Loads the specified project file and returns a Project object.
      static Project loadProject​(java.lang.String projectFilePath)
      Loads the specified project file and returns a Project object.
      static void saveProject​(Project project)
      Saves the specified project in the same location where it was loaded.
      static void saveProject​(Project project, java.lang.String location)
      Saves the specified project in a different location than where it was loaded.
      static void setIALocation​(java.lang.String location)
      Defines the location where InstallAnywhere is installed.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProjectAutomation

        public ProjectAutomation()
    • Method Detail

      • loadProject

        public static Project loadProject​(java.lang.String projectFilePath)
        Loads the specified project file and returns a Project object.
        Parameters:
        projectFilePath - The path of the project file to load.
        Returns:
        The loaded Project file.
      • loadProject

        public static Project loadProject​(java.io.File projectFile)
        Loads the specified project file and returns a Project object.
        Parameters:
        projectFilePath - The path of the project file to load.
        Returns:
        The loaded Project file.
      • saveProject

        public static void saveProject​(Project project)
        Saves the specified project in the same location where it was loaded.
        Parameters:
        project - The project to save.
      • createCredentialsForAmazonVirtualAppliance

        public static void createCredentialsForAmazonVirtualAppliance​(Project project,
                                                                      java.lang.String identityNameOfKey,
                                                                      java.lang.String accessKey,
                                                                      java.lang.String secretKey,
                                                                      java.lang.String accountNumber,
                                                                      java.lang.String pathToPrivateKey,
                                                                      java.lang.String pathToX509Certificate,
                                                                      java.lang.String helperHostName,
                                                                      java.lang.String helperHostUserName,
                                                                      java.lang.String helperHostPassword)
                                                               throws ProjectAutomationException
        Create credentials for Amazon Appliance for use with Project Automation.
        Parameters:
        project - Project File
        identityNameOfKey - Nickname of the credential
        accessKey -
        secretKey -
        accountNumber -
        pathToPrivateKey -
        pathToX509Certificate -
        helperHostName -
        helperHostUserName -
        helperHostPassword -
        Throws:
        CredentialStoreException
        CredentialStoreKeyException
        ProjectAutomationException
      • createCredentialsForVMwareVirtualAppliance

        public static void createCredentialsForVMwareVirtualAppliance​(Project project,
                                                                      java.lang.String identityNameOfKey,
                                                                      java.lang.String vCenterHostName,
                                                                      java.lang.String vCenterUserName,
                                                                      java.lang.String vCenterPassword,
                                                                      java.lang.String vCenterDataStore,
                                                                      java.lang.String vCenterDataCenter,
                                                                      java.lang.String vCenterResourcePool,
                                                                      boolean isUsingVCenter,
                                                                      java.lang.String associatedVSphereHostName,
                                                                      java.lang.String associatedVSphereUserName,
                                                                      java.lang.String associatedVSpherePassword,
                                                                      java.lang.String associatedVSphereDataStore,
                                                                      java.lang.String associatedVSphereDataCenter,
                                                                      java.lang.String associatedVSphereResourcePool)
                                                               throws ProjectAutomationException
        Create credentials for VMware Appliance for use with Project Automation. Provide details of vSphere server in place of vCenter details, if the deployment is targeted towards stand-alone vSphere instance.
        Parameters:
        project - location of the project
        identityNameOfKey - nickname of identity
        vCenterHostName -
        vCenterUserName -
        vCenterPassword -
        vCenterDataStore -
        vCenterDataCenter -
        vCenterResourcePool -
        isUsingVCenter -
        associatedVSphereHostName -
        associatedVSphereUserName -
        associatedVSpherePassword -
        associatedVSphereDataStore -
        associatedVSphereDataCenter -
        associatedVSphereResourcePool -
        Throws:
        CredentialStoreException
        CredentialStoreKeyException
        ProjectAutomationException
      • doesCredentialExistInCredentialStore

        public static boolean doesCredentialExistInCredentialStore​(Project project,
                                                                   java.lang.String identityNameOfKey)
        Checks whether a credential with a given name exists.
        Parameters:
        project -
        identityNameOfKey -
        Returns:
      • deleteCredentialFromCredentialStore

        public static void deleteCredentialFromCredentialStore​(Project project,
                                                               java.lang.String identityNameOfKey)
      • saveProject

        public static void saveProject​(Project project,
                                       java.lang.String location)
        Saves the specified project in a different location than where it was loaded.
        Parameters:
        project - The project to save.
        location - The location where to save the project.
      • setIALocation

        public static void setIALocation​(java.lang.String location)
        Defines the location where InstallAnywhere is installed. This information is necessary to load the Project Automation API resources.

        This method needs to be called only when the ProjectAutomation class can automatically find the InstallAnywhere install location.

      • createNewBasicProject

        public static Project createNewBasicProject​(java.lang.String projectFilePath)
                                             throws java.io.IOException
        This method helps author to create a basic IA project
        Parameters:
        projectFilePath -
        Returns:
        project
        Throws:
        java.io.IOException
      • createNewProjectFromTemplate

        public static Project createNewProjectFromTemplate​(java.lang.String templatePath,
                                                           java.lang.String projectFilePath)
                                                    throws java.io.IOException
        This method helps author to create a IA project from a specified template
        Parameters:
        templatePath -
        projectFilePath -
        Returns:
        project
        Throws:
        java.io.IOException