@Internal public class ProvisionerApiRequest extends Object
ProvisioningServlet
,
AbstractProvisionerApiServlet
,
ProvisionerApiResponse
Constructor and Description |
---|
ProvisionerApiRequest(String jsonString)
Construct by parsing json from Cloud Provisioner
|
Modifier and Type | Method and Description |
---|---|
String |
getCallbackUrl()
The callback URL at which the invoking service is listening for our final asynchronous response.
|
String |
getCloudId()
The tenant ID, always present.
|
String |
getCloudName()
Get the cloudName field if available, else throw ClientException.
|
String |
getCloudNamespace()
Get the cloudNamespace field if available, else throw ClientException.
|
String |
getHeartbeatUrl()
The heartbeat URL at which the invoking service is listening for our heartbeats during asynchronous processing.
|
String |
getJdbcPassword()
Get the JDBC database password from Monarch if available, else throw ClientException.
|
String |
getJdbcUrl()
Get the JDBC URL from Monarch if available, else throw ClientException.
|
String |
getJdbcUser()
Get the JDBC database user from Monarch if available, else throw ClientException.
|
Set<String> |
getLicensedProductKeys()
Get license info from Purchasing in the provisioner request if available, else an empty set.
|
Optional<String> |
getOfflineReason()
Get the first reason a tenant is made offline.
|
Map<String,String> |
getProductLicenseInfo()
Returns a mapping of all values within
LICENSE_PRODUCTS_DATA flattened |
Set<String> |
getRequestProducts()
Get products relevant to the CURRENT request, if present, else an empty set.
|
String |
getServiceEntitlementNumber()
Get the Service Entitlement Number (SEN) from billingDetails if available, else throw ClientException
This is NOT available in migration requests, should never be null in provisioning requests.
|
ZoneId |
getTimeZone()
Get the timezone from cloud-provisioner details if available, else throw ClientException
Unconfirmed whether this is available in migration requests; should never be null in provisioning requests.
|
boolean |
hasJdbcInfo()
Check for whether we've been given valid monarch JDBC connection details.
|
static String |
removeEnd(String str,
String remove)
Removes a substring only if it is at the end of a source string,
otherwise returns the source string.
|
public ProvisionerApiRequest(String jsonString)
jsonString
- raw json in Cloud Provisioner API formatClientException
- for invalid values or missing mandatory fieldspublic String getCloudId()
public String getCloudName()
ClientException
- if not setpublic String getCloudNamespace()
ClientException
- if not setpublic String getJdbcUrl()
ClientException
- if not setpublic boolean hasJdbcInfo()
public String getJdbcUser()
ClientException
- if not setpublic String getJdbcPassword()
ClientException
- if not setpublic String getServiceEntitlementNumber()
ClientException
- if not setpublic ZoneId getTimeZone()
ClientException
- if not setpublic String getCallbackUrl()
public String getHeartbeatUrl()
public Set<String> getLicensedProductKeys()
public Set<String> getRequestProducts()
getLicensedProductKeys()
in that getLicensedProductKeys will return ALL licensedProductKeys
that the product has, not just those relevant to the current request.public Map<String,String> getProductLicenseInfo()
LICENSE_PRODUCTS_DATA
flattenedpublic Optional<String> getOfflineReason()
public static String removeEnd(String str, String remove)
str
- the source String to searchremove
- the String to search for and removeCopyright © 2003–2017 Atlassian. All rights reserved.