-
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 568632 Implement feature grant acquire/release
Make Licensing Conditions mining servce to be identified with it's own meaningful type. License Acquisition service is about to be identified wit the same class. Signed-off-by: eparovyshnaya <[email protected]>
- Loading branch information
1 parent
9be9d47
commit c28ddbb
Showing
24 changed files
with
157 additions
and
46 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
17 changes: 17 additions & 0 deletions
17
....passage.lic.api/src/org/eclipse/passage/lic/internal/api/conditions/ConditionSource.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,17 @@ | ||
/******************************************************************************* | ||
* 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.conditions; | ||
|
||
public interface ConditionSource { | ||
|
||
} |
81 changes: 81 additions & 0 deletions
81
...api/src/org/eclipse/passage/lic/internal/api/conditions/mining/ConditionMiningTarget.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,81 @@ | ||
/******************************************************************************* | ||
* 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.conditions.mining; | ||
|
||
import java.util.Objects; | ||
|
||
import org.eclipse.passage.lic.internal.api.registry.ServiceId; | ||
|
||
/** | ||
* String-valued {@linkplain ServiceId} with mime content type semantics | ||
*/ | ||
public abstract class ConditionMiningTarget implements ServiceId { | ||
|
||
private final String target; | ||
|
||
public ConditionMiningTarget(String target) { | ||
Objects.requireNonNull(target, "ConditionMiningTarget::target"); //$NON-NLS-1$ | ||
this.target = target; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object object) { | ||
if (!getClass().isInstance(object)) { | ||
return false; | ||
} | ||
return target.equals(((ConditionMiningTarget) object).target()); | ||
} | ||
|
||
public String target() { | ||
return target; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return target.hashCode(); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return target; | ||
} | ||
|
||
public ConditionMiningTarget child(String subtarget) { | ||
Objects.requireNonNull(subtarget, "ConditionMiningTarget::child"); //$NON-NLS-1$ | ||
return new Of(String.format("%s/%s", target, subtarget)); //$NON-NLS-1$ | ||
} | ||
|
||
public static final class Local extends ConditionMiningTarget { | ||
|
||
public Local() { | ||
super("local-file-system"); //$NON-NLS-1$ | ||
} | ||
|
||
} | ||
|
||
public static final class Remote extends ConditionMiningTarget { | ||
|
||
public Remote() { | ||
super("remote"); //$NON-NLS-1$ | ||
} | ||
|
||
} | ||
|
||
public static final class Of extends ConditionMiningTarget { | ||
|
||
public Of(String target) { | ||
super(target.toLowerCase()); | ||
} | ||
|
||
} | ||
} |
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
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
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.