Representation of an application that either already exists in a Cloud Foundry server, or is about to be pushed to a server, and contains additional properties local to the plugin framework not found in a {@link CloudApplication}. It contains additional Cloud Foundry information like a deployment information ( {@link ApplicationDeploymentInfo} ),application stats, instances, and staging that is not available from the local WST {@link IModule}. A cloud foundry application module need not necessarily indicate that the application exists and is deployed in a CF server. Modules are also created by the framework PRIOR to deploying an app. If the module has a corresponding {@link CloudApplication}, it means that the module does indeed represent an actual deployed app in a CF server. In addition:
1. A Cloud module can be external, meaning that the deployed application does not have an accessible workspace project. If this is the case, generally the module will also have a mapped {@link CloudApplication}, since only applications that have already been deployed can ever be external. Note although all external apps are apps that are deployed in a Cloud server, not all deployed apps are external. "External" is not the only indication of deployment, rather it is meant to indicate whether the application is linked to a local, accessible workspace project.
2. A Cloud module can also be mapped to a local workspace project via a local {@link IModule}, in which case it would not be classified as external. This does NOT mean that the application is not deployed. The application may be deployed in a CF server, but also have a link to a local workspace project. An application may also have a link to a local workspace project, but NOT yet be deployed (so it wouldn't have a mapped {@link CloudApplication}).
The application name of this CF-aware module may differ from the module name of the local WST {@link IModule}. The reason is that the module name of the local WST {@link IModule} is typically the associated workspace project, ifthe project is accessible, while the application name in the CF Application Module is the user-specified CF app name, which may be different.
To obtain the local WST module name, use {@link #getName()} or get it through{@link #getLocalModule()}, although the latter may be null if no IModule mapping has been created and linked by the framework. Local names may be used for obtaining workspace resources, like for example the application's corresponding workspace project.
To obtain the deployed application name, use {@link #getDeployedApplicationName()}.
The application module may be shared by multiple threads, therefore changes should be synchronised at the very least.
The app module also contains a deployment information ( {@link ApplicationDeploymentInfo} ), which describes deployment properties ofthe application (e.g., URLs, memory settings, etc..), as well as services that are bound, or will be bound, to the application.
If the application has already been deployed (i.e. has a corresponding {@link CloudApplication}), the deployment information is kept in synch any time the module mapping to a {@link CloudApplication} is changed.IMPORTANT NOTE: This class can be referred by the branding extension from adopter so this class should not be moved or renamed to avoid breakage to adopters.
@author Nieraj Singh
@author Christian Dupuis
@author Terry Denney
@author Leo Dos Santos
@author Steffen Pingel