public class APIChangeState extends Object
| Constructor and Description |
|---|
APIChangeState(API actualAPI,
API desiredAPI)
Constructs the APIChangeState based on the given Actual- and Desired-API.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
copyChangedProps(API desiredAPI,
API createdAPI,
List<String> changes) |
static void |
copyProps(API sourceAPI,
API targetAPI,
List<String> propsToCopy,
boolean logMessage)
Copied all changed properties of the API having APIPropertyAnnotation set to copyProp = true (default)
|
API |
getActualAPI() |
List<String> |
getAllChanges() |
List<String> |
getBreakingChanges() |
API |
getDesiredAPI() |
List<String> |
getNonBreakingChanges() |
boolean |
hasAnyChanges() |
static void |
initCreatedAPI(API desiredAPI,
API createdAPI) |
boolean |
isAdminAccountNeeded() |
boolean |
isBreaking() |
boolean |
isProxyUpdateRequired() |
boolean |
isUpdateExistingAPI() |
void |
setActualAPI(API actualAPI) |
void |
setDesiredAPI(API desiredAPI) |
String |
waiting4Approval() |
public APIChangeState(API actualAPI, API desiredAPI) throws AppException
actualAPI - - The API taken from the API-ManagerdesiredAPI - - The API loaded from the Swagger + ConfigAppException - - Is thrown when something goes wrong.public static void initCreatedAPI(API desiredAPI, API createdAPI) throws AppException
AppExceptionpublic static void copyChangedProps(API desiredAPI, API createdAPI, List<String> changes) throws AppException
AppExceptionpublic static void copyProps(API sourceAPI, API targetAPI, List<String> propsToCopy, boolean logMessage) throws AppException
sourceAPI - copy the properties from this source APItargetAPI - copy the properties into this target APIpropsToCopy - the list of API properties to copylogMessage - controls if a log message is created which properties are copiedAppException - if something goes wrongpublic API getActualAPI()
public void setActualAPI(API actualAPI)
actualAPI - overwrites the API-Manager API instancepublic API getDesiredAPI()
public void setDesiredAPI(API desiredAPI)
desiredAPI - overwrites the desired API.public boolean hasAnyChanges()
public boolean isBreaking()
throws AppException
AppException - if the actualAPI.state can't be readpublic boolean isUpdateExistingAPI()
public List<String> getNonBreakingChanges()
public boolean isProxyUpdateRequired()
public boolean isAdminAccountNeeded()
throws AppException
AppExceptionpublic String waiting4Approval() throws AppException
AppExceptionCopyright © 2020. All rights reserved.