Class ProjectAutomation
- java.lang.Object
-
- com.zerog.ia.auto.project.ProjectAutomation
-
public class ProjectAutomation extends java.lang.ObjectThis is the entry class for the Project Automation API.ProjectAutomationclass provides the methods to create, load and save InstallAnywhere projects. It basically handles theProjectobject, 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
ProjectAutomationclass tries to find where InstallAnywhere is installed, but the search can fail. In that case, the location should be explicity specified using thesetIALocation()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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProjectAutomation.CopyFolderFilter
-
Constructor Summary
Constructors Constructor Description ProjectAutomation()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcreateCredentialsForAmazonVirtualAppliance(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 voidcreateCredentialsForVMwareVirtualAppliance(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 ProjectcreateNewBasicProject(java.lang.String projectFilePath)This method helps author to create a basic IA projectstatic ProjectcreateNewProjectFromTemplate(java.lang.String templatePath, java.lang.String projectFilePath)This method helps author to create a IA project from a specified templatestatic voiddeleteCredentialFromCredentialStore(Project project, java.lang.String identityNameOfKey)static booleandoesCredentialExistInCredentialStore(Project project, java.lang.String identityNameOfKey)Checks whether a credential with a given name exists.static ProjectloadProject(java.io.File projectFile)Loads the specified project file and returns aProjectobject.static ProjectloadProject(java.lang.String projectFilePath)Loads the specified project file and returns aProjectobject.static voidsaveProject(Project project)Saves the specified project in the same location where it was loaded.static voidsaveProject(Project project, java.lang.String location)Saves the specified project in a different location than where it was loaded.static voidsetIALocation(java.lang.String location)Defines the location where InstallAnywhere is installed.
-
-
-
Method Detail
-
loadProject
public static Project loadProject(java.lang.String projectFilePath)
Loads the specified project file and returns aProjectobject.- Parameters:
projectFilePath- The path of the project file to load.- Returns:
- The loaded
Projectfile.
-
loadProject
public static Project loadProject(java.io.File projectFile)
Loads the specified project file and returns aProjectobject.- Parameters:
projectFilePath- The path of the project file to load.- Returns:
- The loaded
Projectfile.
-
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 FileidentityNameOfKey- Nickname of the credentialaccessKey-secretKey-accountNumber-pathToPrivateKey-pathToX509Certificate-helperHostName-helperHostUserName-helperHostPassword-- Throws:
CredentialStoreExceptionCredentialStoreKeyExceptionProjectAutomationException
-
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 projectidentityNameOfKey- nickname of identityvCenterHostName-vCenterUserName-vCenterPassword-vCenterDataStore-vCenterDataCenter-vCenterResourcePool-isUsingVCenter-associatedVSphereHostName-associatedVSphereUserName-associatedVSpherePassword-associatedVSphereDataStore-associatedVSphereDataCenter-associatedVSphereResourcePool-- Throws:
CredentialStoreExceptionCredentialStoreKeyExceptionProjectAutomationException
-
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
ProjectAutomationclass 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
-
-