-
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.
Merge pull request #552 from eclipse-passage/568792
Bug 568792 extend access cycle with a grant acquiring and release
- Loading branch information
Showing
18 changed files
with
236 additions
and
11 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
43 changes: 43 additions & 0 deletions
43
...ase/src/org/eclipse/passage/lic/internal/base/acquire/LocalLicenseAcquisitionService.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,43 @@ | ||
/******************************************************************************* | ||
* 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.base.acquire; | ||
|
||
import java.util.Date; | ||
|
||
import org.eclipse.passage.lic.internal.api.LicensedProduct; | ||
import org.eclipse.passage.lic.internal.api.ServiceInvocationResult; | ||
import org.eclipse.passage.lic.internal.api.acquire.GrantAcqisition; | ||
import org.eclipse.passage.lic.internal.api.acquire.LicenseAcquisitionService; | ||
import org.eclipse.passage.lic.internal.base.BaseServiceInvocationResult; | ||
|
||
// FIXME: just stub for now. Implement properly. #568791 | ||
public abstract class LocalLicenseAcquisitionService implements LicenseAcquisitionService { | ||
|
||
@Override | ||
public final ServiceInvocationResult<GrantAcqisition> acquire(LicensedProduct product, String feature) { | ||
return new BaseServiceInvocationResult<>(// | ||
new BaseGrantAcquisition(// | ||
"local", //$NON-NLS-1$ | ||
"temp", //$NON-NLS-1$ | ||
feature, // | ||
"user", //$NON-NLS-1$ | ||
new Date())// | ||
); | ||
} | ||
|
||
@Override | ||
public final ServiceInvocationResult<Boolean> release(LicensedProduct product, GrantAcqisition acquisition) { | ||
return new BaseServiceInvocationResult<>(Boolean.TRUE); | ||
} | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
.../src/org/eclipse/passage/lic/internal/base/acquire/UserHomeLicenseAcquisitionService.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,25 @@ | ||
/******************************************************************************* | ||
* 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.base.acquire; | ||
|
||
import org.eclipse.passage.lic.internal.api.conditions.mining.ConditionMiningTarget; | ||
import org.eclipse.passage.lic.internal.base.conditions.mining.UserHomeMiningTarget; | ||
|
||
public final class UserHomeLicenseAcquisitionService extends LocalLicenseAcquisitionService { | ||
|
||
@Override | ||
public ConditionMiningTarget id() { | ||
return new UserHomeMiningTarget().get(); | ||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
...ase/src/org/eclipse/passage/lic/internal/base/conditions/mining/UserHomeMiningTarget.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,26 @@ | ||
/******************************************************************************* | ||
* 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.base.conditions.mining; | ||
|
||
import java.util.function.Supplier; | ||
|
||
import org.eclipse.passage.lic.internal.api.conditions.mining.ConditionMiningTarget; | ||
|
||
public final class UserHomeMiningTarget implements Supplier<ConditionMiningTarget> { | ||
|
||
@Override | ||
public ConditionMiningTarget get() { | ||
return new ConditionMiningTarget.Local().child("user-home-conditions"); //$NON-NLS-1$ | ||
} | ||
|
||
} |
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
26 changes: 26 additions & 0 deletions
26
.../eclipse/passage/lic/internal/equinox/acquire/ConfigurationLicenseAcquisitionService.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,26 @@ | ||
/******************************************************************************* | ||
* 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.equinox.acquire; | ||
|
||
import org.eclipse.passage.lic.internal.api.conditions.mining.ConditionMiningTarget; | ||
import org.eclipse.passage.lic.internal.base.acquire.LocalLicenseAcquisitionService; | ||
import org.eclipse.passage.lic.internal.equinox.conditions.ConfigurationMiningTarget; | ||
|
||
public final class ConfigurationLicenseAcquisitionService extends LocalLicenseAcquisitionService { | ||
|
||
@Override | ||
public ConditionMiningTarget id() { | ||
return new ConfigurationMiningTarget().get(); | ||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
...g/eclipse/passage/lic/internal/equinox/acquire/InstallationLicenseAcquisitionService.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,26 @@ | ||
/******************************************************************************* | ||
* 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.equinox.acquire; | ||
|
||
import org.eclipse.passage.lic.internal.api.conditions.mining.ConditionMiningTarget; | ||
import org.eclipse.passage.lic.internal.base.acquire.LocalLicenseAcquisitionService; | ||
import org.eclipse.passage.lic.internal.equinox.conditions.InstallationMiningTarget; | ||
|
||
public final class InstallationLicenseAcquisitionService extends LocalLicenseAcquisitionService { | ||
|
||
@Override | ||
public ConditionMiningTarget id() { | ||
return new InstallationMiningTarget().get(); | ||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
...ox/src/org/eclipse/passage/lic/internal/equinox/conditions/ConfigurationMiningTarget.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,26 @@ | ||
/******************************************************************************* | ||
* 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.equinox.conditions; | ||
|
||
import java.util.function.Supplier; | ||
|
||
import org.eclipse.passage.lic.internal.api.conditions.mining.ConditionMiningTarget; | ||
|
||
public final class ConfigurationMiningTarget implements Supplier<ConditionMiningTarget> { | ||
|
||
@Override | ||
public ConditionMiningTarget get() { | ||
return new ConditionMiningTarget.Local().child("configuration-conditions"); //$NON-NLS-1$ | ||
} | ||
|
||
} |
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
26 changes: 26 additions & 0 deletions
26
...nox/src/org/eclipse/passage/lic/internal/equinox/conditions/InstallationMiningTarget.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,26 @@ | ||
/******************************************************************************* | ||
* 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.equinox.conditions; | ||
|
||
import java.util.function.Supplier; | ||
|
||
import org.eclipse.passage.lic.internal.api.conditions.mining.ConditionMiningTarget; | ||
|
||
public final class InstallationMiningTarget implements Supplier<ConditionMiningTarget> { | ||
|
||
@Override | ||
public ConditionMiningTarget get() { | ||
return new ConditionMiningTarget.Local().child("installation-conditions"); //$NON-NLS-1$ | ||
} | ||
|
||
} |
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.