-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#21: Checker now takes resource instead of collection of capabilities…
…. Implementation of rest api for checker. OSGi service for checker. Checker and restimpl indexer modules added to default modules so that they're included in the build.
- Loading branch information
Zdenek Vales
committed
Jan 23, 2020
1 parent
be3cbd8
commit 7d6aa5f
Showing
13 changed files
with
165 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#----------------------------------------------------------------- | ||
# Use this file to add customized Bnd instructions for the bundle | ||
#----------------------------------------------------------------- | ||
|
||
Bundle-Activator: ${bundle.namespace}.internal.Activator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 15 additions & 10 deletions
25
...-compatibility-checker/src/main/java/cz/zcu/kiv/crce/apicomp/ApiCompatibilityChecker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,41 @@ | ||
package cz.zcu.kiv.crce.apicomp; | ||
|
||
import cz.zcu.kiv.crce.apicomp.result.CompatibilityCheckResult; | ||
import cz.zcu.kiv.crce.metadata.Capability; | ||
|
||
import java.util.Set; | ||
import cz.zcu.kiv.crce.metadata.Resource; | ||
|
||
/** | ||
* Interface for compatibility checkers. | ||
*/ | ||
public interface ApiCompatibilityChecker { | ||
|
||
/** | ||
* Namespace of the root capability that is expected to hold all metadata relevant to this checker. | ||
* | ||
* @return Capability namespace. | ||
*/ | ||
String getRootCapabilityNamespace(); | ||
|
||
/** | ||
* Verifies that the provided API is supported by this compatibility checker. | ||
* Verification is based on presence of identity capability and it's correct | ||
* namespace and value. | ||
* Verification is based on presence of root capability with namespace equal to | ||
* {@link #getRootCapabilityNamespace()}. | ||
* | ||
* @param apiMetadata Set of capabilities which describes the API. | ||
* @param resource Resource that contains API metadata. | ||
* @return True if the given API is supported. | ||
*/ | ||
boolean isApiSupported(Set<Capability> apiMetadata); | ||
boolean isApiSupported(Resource resource); | ||
|
||
/** | ||
* Compares two APIs using metadata stored in CRCE and returns result in form of | ||
* a CompatibilityCheckResult object. | ||
* | ||
* @param api1 Set of capabilities containing the metadata for the first API. This might be either single root | ||
* @param api1 Resource with capabilities containing the metadata for the first API. This might be either single root | ||
* capability which contains child capabilities with attributes and/or properties with metadata or set of root | ||
* capabilities with child capabilities with attributes and/or properties. | ||
* @param api2 Set of capabilities containing the metadata for the second API. This might be either single root | ||
* @param api2 Resource with capabilities containing the metadata for the second API. This might be either single root | ||
* capability which contains child capabilities with attributes and/or properties with metadata or set of root | ||
* capabilities with child capabilities with attributes and/or properties. | ||
* @return Result. | ||
*/ | ||
CompatibilityCheckResult compareApis(Set<Capability> api1, Set<Capability> api2); | ||
CompatibilityCheckResult compareApis(Resource api1, Resource api2); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.