Package com.axway.apim.api
Class API
- java.lang.Object
-
- com.axway.apim.api.API
-
- All Implemented Interfaces:
CustomPropertiesEntity
public class API extends Object implements CustomPropertiesEntity
This class defines all common properties on an API and how each property should be treated during replication. APIManagerAPI and APIImportDefintion are both an instance of this class.Annotations for each property are used by the APIChangeState to decide: - Is it a breaking change? - Can the change be applied to the existing API? - Which Change-Handler should finally do the required actions to replicate the change into the APIManager
When adding new properties, please make sure to create Getter and Setter as Jackson is used to create the Instances.
Perhaps a way to simplify the code is to use for many of the properties is to use a SimplePropertyHandler as many properties are handled in the same way.
- Author:
- cwiechmann@axway.com
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description API()
-
Method Summary
-
-
-
Field Detail
-
STATE_PUBLISHED
public static final String STATE_PUBLISHED
- See Also:
- Constant Field Values
-
STATE_UNPUBLISHED
public static final String STATE_UNPUBLISHED
- See Also:
- Constant Field Values
-
STATE_DEPRECATED
public static final String STATE_DEPRECATED
- See Also:
- Constant Field Values
-
STATE_DELETED
public static final String STATE_DELETED
- See Also:
- Constant Field Values
-
STATE_PENDING
public static final String STATE_PENDING
- See Also:
- Constant Field Values
-
apiDefinition
protected APISpecification apiDefinition
-
descriptionType
protected String descriptionType
-
descriptionManual
protected String descriptionManual
-
descriptionMarkdown
protected String descriptionMarkdown
-
descriptionUrl
protected String descriptionUrl
-
securityProfiles
protected List<SecurityProfile> securityProfiles
-
authenticationProfiles
protected List<AuthenticationProfile> authenticationProfiles
-
tags
protected TagMap tags
-
outboundProfiles
protected Map<String,OutboundProfile> outboundProfiles
-
serviceProfiles
protected Map<String,ServiceProfile> serviceProfiles
-
inboundProfiles
protected Map<String,InboundProfile> inboundProfiles
-
corsProfiles
protected List<CorsProfile> corsProfiles
-
clientOrganizations
protected List<Organization> clientOrganizations
-
applications
protected List<ClientApplication> applications
-
path
protected String path
-
state
protected String state
-
version
protected String version
-
vhost
protected String vhost
-
name
protected String name
-
summary
protected String summary
-
createdOn
protected Long createdOn
-
createdBy
protected String createdBy
-
image
protected Image image
-
applicationQuota
protected APIQuota applicationQuota
-
systemQuota
protected APIQuota systemQuota
-
apiRoutingKey
protected String apiRoutingKey
-
organization
protected Organization organization
-
id
protected String id
-
apiId
protected String apiId
-
deprecated
protected String deprecated
-
backendImportedUrl
protected String backendImportedUrl
-
resourcePath
protected String resourcePath
-
retirementDate
protected Long retirementDate
-
remoteHost
protected RemoteHost remoteHost
-
-
Method Detail
-
getApiDefinition
public APISpecification getApiDefinition()
-
setApiDefinition
public void setApiDefinition(APISpecification apiDefinition)
-
getOutboundProfiles
public Map<String,OutboundProfile> getOutboundProfiles()
-
setOutboundProfiles
public void setOutboundProfiles(Map<String,OutboundProfile> outboundProfiles)
-
getSecurityProfiles
public List<SecurityProfile> getSecurityProfiles()
-
setSecurityProfiles
public void setSecurityProfiles(List<SecurityProfile> securityProfiles)
-
getAuthenticationProfiles
public List<AuthenticationProfile> getAuthenticationProfiles()
-
setAuthenticationProfiles
public void setAuthenticationProfiles(List<AuthenticationProfile> authenticationProfiles)
-
getInboundProfiles
public Map<String,InboundProfile> getInboundProfiles()
-
setInboundProfiles
public void setInboundProfiles(Map<String,InboundProfile> inboundProfiles)
-
getCorsProfiles
public List<CorsProfile> getCorsProfiles()
-
setCorsProfiles
public void setCorsProfiles(List<CorsProfile> corsProfiles)
-
getVhost
public String getVhost()
-
setVhost
public void setVhost(String vhost)
-
getTags
public TagMap getTags()
-
setState
public void setState(String state)
-
getState
public String getState()
The tool handles deprecation as an additional state (might not be best choice), but the API-Manager internally doesn't. In API-Manager deprecation is just a true/false toggle. To make Desired and Actual API comparable this method is encapsulating the difference.- Returns:
- the state of the API (unpublished, deprecated, etc.)
- See Also:
getState()
-
getVersion
public String getVersion()
-
setVersion
public void setVersion(String version)
-
getSummary
public String getSummary()
-
setSummary
public void setSummary(String summary)
-
getImage
public Image getImage()
-
setImage
public void setImage(Image image)
-
getName
public String getName()
-
setName
public void setName(String name)
-
getOrganization
public Organization getOrganization()
-
getOrganizationId
public String getOrganizationId()
-
setOrganization
public void setOrganization(Organization organization)
-
getPath
public String getPath()
-
setPath
public void setPath(String path)
-
getId
public String getId()
- Specified by:
getIdin interfaceCustomPropertiesEntity
-
setId
public void setId(String id)
-
getApiId
public String getApiId()
-
setApiId
public void setApiId(String apiId)
-
getDeprecated
public String getDeprecated()
-
setDeprecated
public void setDeprecated(String deprecated)
-
getRetirementDate
public Long getRetirementDate()
-
setRetirementDate
public void setRetirementDate(Long retirementDate)
-
getCustomProperties
public Map<String,String> getCustomProperties()
- Specified by:
getCustomPropertiesin interfaceCustomPropertiesEntity
-
setCustomProperties
public void setCustomProperties(Map<String,String> customProperties)
- Specified by:
setCustomPropertiesin interfaceCustomPropertiesEntity
-
getDescriptionType
public String getDescriptionType()
-
setDescriptionType
public void setDescriptionType(String descriptionType)
-
getDescriptionManual
public String getDescriptionManual()
-
setDescriptionManual
public void setDescriptionManual(String descriptionManual)
-
getDescriptionMarkdown
public String getDescriptionMarkdown()
-
setDescriptionMarkdown
public void setDescriptionMarkdown(String descriptionMarkdown)
-
getDescriptionUrl
public String getDescriptionUrl()
-
setDescriptionUrl
public void setDescriptionUrl(String descriptionUrl)
-
getApplicationQuota
public APIQuota getApplicationQuota()
-
setApplicationQuota
public void setApplicationQuota(APIQuota applicationQuota)
-
getSystemQuota
public APIQuota getSystemQuota()
-
setSystemQuota
public void setSystemQuota(APIQuota systemQuota)
-
getServiceProfiles
public Map<String,ServiceProfile> getServiceProfiles()
-
setTags
public void setTags(TagMap tags)
-
setServiceProfiles
public void setServiceProfiles(Map<String,ServiceProfile> serviceProfiles)
-
getClientOrganizations
public List<Organization> getClientOrganizations()
-
setClientOrganizations
public void setClientOrganizations(List<Organization> clientOrganizations)
-
getApplications
public List<ClientApplication> getApplications()
-
setApplications
public void setApplications(List<ClientApplication> applications)
-
getApiRoutingKey
public String getApiRoutingKey()
-
setApiRoutingKey
public void setApiRoutingKey(String apiRoutingKey)
-
toStringHuman
public String toStringHuman()
-
getApiDefinitionImport
public String getApiDefinitionImport()
-
getApiConfiguration
public com.fasterxml.jackson.databind.JsonNode getApiConfiguration()
-
setApiConfiguration
public void setApiConfiguration(com.fasterxml.jackson.databind.JsonNode apiConfiguration)
-
getCreatedOn
public Long getCreatedOn()
-
setCreatedOn
public void setCreatedOn(Long createdOn)
-
getCreatedBy
public String getCreatedBy()
-
setCreatedBy
public void setCreatedBy(String createdBy)
-
getRemotehost
public RemoteHost getRemotehost()
-
setRemotehost
public void setRemotehost(RemoteHost remotehost)
-
getResourcePath
public String getResourcePath()
- Returns:
- path of the resource registered for the belonging backend API or null if not set
-
setBackendResourcePath
public void setBackendResourcePath(String resourcePath)
- Parameters:
resourcePath- is the path of the resource registered for the belonging backend API
-
isRequestForAllOrgs
public boolean isRequestForAllOrgs()
requestForAllOrgs is used to decide if an API should grant access to ALL organizations. That means, when an API-Developer is defining ALL as the organization name this flag is set to true and it becomes the desired state.- Returns:
- true, if the developer wants to have permissions to this API for all Orgs.
-
setRequestForAllOrgs
public void setRequestForAllOrgs(boolean requestForAllOrgs)
requestForAllOrgs is used to decide if an API should grant access to ALL organizations. That means, when an API-Developer is defining ALL as the organization name this flag is set to true and it becomes the desired state. This method is used during creation of APIImportDefinition in APIImportConfig#handleAllOrganizations()- Parameters:
requestForAllOrgs- when set to true, the APIs will be granted to ALL organizations.
-
getBackendImportedUrl
public String getBackendImportedUrl()
-
setBackendImportedUrl
public void setBackendImportedUrl(String backendImportedUrl)
-
-