Skip to content

Commit

Permalink
Bug 564328 API revision | conditions | rethink key interfaces
Browse files Browse the repository at this point in the history
>> related to 561540

- API for a version representation (lic.api/lic.internal.api.version) is
introduced

Signed-off-by: elena.parovyshnaya <elena.parovyshnaya@gmail.com>
  • Loading branch information
eparovyshnaya committed Jun 17, 2020
1 parent e7389ab commit 2d84315
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 8 deletions.
3 changes: 2 additions & 1 deletion bundles/org.eclipse.passage.lic.api/META-INF/MANIFEST.MF
Expand Up @@ -25,4 +25,5 @@ Export-Package: org.eclipse.passage.lic.api,
org.eclipse.passage.lic.internal.api.conditions;x-internal:=true,
org.eclipse.passage.lic.internal.api.registry;x-internal:=true,
org.eclipse.passage.lic.internal.api.requirements;x-internal:=true,
org.eclipse.passage.lic.internal.api.restrictions;x-internal:=true
org.eclipse.passage.lic.internal.api.restrictions;x-internal:=true,
org.eclipse.passage.lic.internal.api.version;x-internal:=true
@@ -0,0 +1,30 @@
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0/.
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.internal.api.version;

/**
* Well structured representation of a version.
*/
public interface SemanticVersion {

int major();

int minor();

int service();

boolean hasQualifier();

String qualifier();

}
@@ -0,0 +1,31 @@
/*******************************************************************************
* Copyright (c) 2020 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0/.
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.internal.api.version;

/**
* <p>
* Raw notion of a version constructed and parsed for an arbitrary source
* supplies a valid string representation or a structured equivalent.
* </p>
* <p>
* Instance of this interface that survived the construction must always be
* valid. That means eager parsing.
* </p>
*/
public interface Version {

String value();

SemanticVersion semantic();

}
3 changes: 2 additions & 1 deletion tests/org.eclipse.passage.lic.api.tests/META-INF/MANIFEST.MF
Expand Up @@ -9,4 +9,5 @@ Bundle-Copyright: %Bundle-Copyright
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.junit;bundle-version="4.12.0",
org.eclipse.passage.lic.api;bundle-version="0.7.0"
Export-Package: org.eclipse.passage.lic.api.tests
Export-Package: org.eclipse.passage.lic.api.conditions.tests;x-internal:=true,
org.eclipse.passage.lic.api.tests;x-internal:=true
Expand Up @@ -61,7 +61,6 @@ public void matchingIsIdempotant() {
assertTrue(first == second);
}


protected abstract MatchingRule create();

}
Expand Up @@ -19,15 +19,15 @@
public final class TemporaryTest {
/**
* <p>
* There only contract (meaning abstract) tests in this bundle. Nonetheless,
* it's still recognized as 'tests' bundle. All the special treatments are
* applied: sure-fire plug-in is applied. This one fails on a bundle where is
* There only contract (meaning abstract) tests are supposed to reside here. Nonetheless,
* this bundle is recognized as 'tests' one. Among all the special treatments that are
* applied for tests bundle sure-fire plug-in is triggered. This one fails on a bundle where is
* nothing to run.
* </p>
*
* <p>
* Thus we add a single deadly stupid but workable test especially for sure-fire
* to make it go.
* Thus we add a single deadly stupid but rock solid workable test especially for sure-fire
* to make it go.
* </p>
*/
@Test
Expand Down

0 comments on commit 2d84315

Please sign in to comment.