-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 575182 protect condition mining with Agreements consistency check
convey global agreement to an end user in scope of examination certificate's in agreement state and restriction set Signed-off-by: eparovyshnaya <[email protected]>
- Loading branch information
1 parent
7342f45
commit d1c9cde
Showing
9 changed files
with
285 additions
and
24 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
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
53 changes: 53 additions & 0 deletions
53
...ssage.lic.base/src/org/eclipse/passage/lic/base/agreements/AgreementAcceptanceDemand.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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021 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.base.agreements; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import org.eclipse.passage.lic.api.agreements.ResolvedAgreement; | ||
import org.eclipse.passage.lic.api.requirements.Feature; | ||
import org.eclipse.passage.lic.api.requirements.Requirement; | ||
import org.eclipse.passage.lic.api.restrictions.RestrictionLevel; | ||
|
||
public final class AgreementAcceptanceDemand implements Requirement { | ||
|
||
private final Feature feature; | ||
private final List<ResolvedAgreement> agreement; | ||
|
||
public AgreementAcceptanceDemand(ResolvedAgreement agreement) { | ||
this.feature = new GlobalAgreementSupportFeature().get(); | ||
this.agreement = Collections.singletonList(agreement); | ||
} | ||
|
||
@Override | ||
public Feature feature() { | ||
return feature; | ||
} | ||
|
||
@Override | ||
public RestrictionLevel restrictionLevel() { | ||
return new RestrictionLevel.Fatal(); | ||
} | ||
|
||
@Override | ||
public List<ResolvedAgreement> agreements() { | ||
return agreement; | ||
} | ||
|
||
@Override | ||
public Object source() { | ||
return "a license"; //$NON-NLS-1$ | ||
} | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
...e.lic.base/src/org/eclipse/passage/lic/base/agreements/GlobalAgreementSupportFeature.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021 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.base.agreements; | ||
|
||
import java.util.function.Supplier; | ||
|
||
import org.eclipse.passage.lic.api.requirements.Feature; | ||
import org.eclipse.passage.lic.base.requirements.BaseFeature; | ||
|
||
public final class GlobalAgreementSupportFeature implements Supplier<Feature> { | ||
|
||
@Override | ||
public Feature get() { | ||
return new BaseFeature(// | ||
"passage.global-agreement-support.feature", //$NON-NLS-1$ | ||
"0.0.0", //$NON-NLS-1$ | ||
"Global Agreements Support", //$NON-NLS-1$ | ||
"Eclipse Passage Runtime" //$NON-NLS-1$ | ||
); | ||
} | ||
|
||
} |
Oops, something went wrong.