public class HashUtils extends Object
| Constructor and Description |
|---|
HashUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
detectChanges(List<ExtendedAPI> apis,
List<SubscriptionThrottlePolicyDTO> subscriptionPolicies,
List<ApplicationThrottlePolicyDTO> appPolicies,
String projectName)
Generate hashes for the specified apis, subscription and application policies, then compare with the previously
generated hashes and detect if there are changes with them.
|
static String |
generateAPIId(String apiName,
String version)
Get the MD5 hash for an API.
|
static String |
generateResourceId(String apiName,
String version,
String resource,
String method)
Get the MD5 hash for the given specific resource of an API.
|
public static boolean detectChanges(List<ExtendedAPI> apis, List<SubscriptionThrottlePolicyDTO> subscriptionPolicies, List<ApplicationThrottlePolicyDTO> appPolicies, String projectName) throws HashingException
apis - APIs listsubscriptionPolicies - Subscription Policies listappPolicies - Application policies listprojectName - Name of the projectHashingException - error while change detectionpublic static String generateAPIId(String apiName, String version)
apiName - API nameversion - API versionpublic static String generateResourceId(String apiName, String version, String resource, String method)
apiName - API nameversion - API versionresource - Resource namemethod - operation associated with the resourceCopyright © 2019 WSO2. All rights reserved.