Skip to content

Commit

Permalink
Merge pull request #730 from eclipse-passage/572650
Browse files Browse the repository at this point in the history
572650  upgrade `licenses` domain model
  • Loading branch information
eparovyshnaya authored Apr 14, 2021
2 parents 177e8c4 + e1e3f75 commit 5b81eb5
Show file tree
Hide file tree
Showing 14 changed files with 192 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
abstract="true" interface="true"/>
<eClassifiers xsi:type="ecore:EClass" name="LicenseGrantDescriptor" instanceClassName="org.eclipse.passage.lic.licenses.LicenseGrantDescriptor"
abstract="true" interface="true"/>
<eClassifiers xsi:type="ecore:EClass" name="ProductRefDescriptor" instanceClassName="org.eclipse.passage.lic.licenses.ProductRefDescriptor"
abstract="true" interface="true"/>
<eClassifiers xsi:type="ecore:EClass" name="LicensePlan" eSuperTypes="#//LicensePlanDescriptor">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="identifier" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
iD="true"/>
Expand Down Expand Up @@ -94,7 +96,7 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="valid" lowerBound="1" eType="#//ValidityPeriod"
containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ProductRef">
<eClassifiers xsi:type="ecore:EClass" name="ProductRef" eSuperTypes="#//ProductRefDescriptor">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="product" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="version" lowerBound="1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ Bundle-Vendor: %providerName
Bundle-Copyright: %Bundle-Copyright
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.core.runtime;bundle-version="0.0.0";resolution:=optional;x-installation:=greedy,
Require-Bundle: org.eclipse.core.runtime;bundle-version="0.0.0";x-installation:=greedy;resolution:=optional,
org.eclipse.emf.ecore;bundle-version="0.0.0";visibility:=reexport,
org.eclipse.passage.lic.emf.meta;bundle-version="0.6.0",
org.eclipse.passage.lic.licenses;bundle-version="0.0.0";visibility:=reexport,
org.eclipse.passage.lic.base;bundle-version="1.0.201"
Export-Package: org.eclipse.passage.lic.internal.licenses.convert;x-friends:="org.eclipse.passage.lic.hc",
org.eclipse.passage.lic.internal.licenses.model;x-friends:="org.eclipse.passage.loc.dashboard.ui,org.eclipse.passage.lic.licenses.migration,org.eclipse.passage.loc.licenses.core",
Export-Package: org.eclipse.passage.lic.internal.licenses.convert;
x-friends:="org.eclipse.passage.lic.hc",
org.eclipse.passage.lic.internal.licenses.model;
x-friends:="org.eclipse.passage.loc.dashboard.ui,
org.eclipse.passage.lic.licenses.migration,
org.eclipse.passage.loc.licenses.core",
org.eclipse.passage.lic.licenses.model.api;
x-friends:="org.eclipse.passage.lic.hc,
org.eclipse.passage.lbc.base,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<genClasses image="false" ecoreClass="../../org.eclipse.passage.lic.licenses.ecore/model/licenses.ecore#//LicensePlanFeatureDescriptor"/>
<genClasses image="false" ecoreClass="../../org.eclipse.passage.lic.licenses.ecore/model/licenses.ecore#//LicensePackDescriptor"/>
<genClasses image="false" ecoreClass="../../org.eclipse.passage.lic.licenses.ecore/model/licenses.ecore#//LicenseGrantDescriptor"/>
<genClasses image="false" ecoreClass="../../org.eclipse.passage.lic.licenses.ecore/model/licenses.ecore#//ProductRefDescriptor"/>
<genClasses image="false" ecoreClass="../../org.eclipse.passage.lic.licenses.ecore/model/licenses.ecore#//LicensePlan">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.passage.lic.licenses.ecore/model/licenses.ecore#//LicensePlan/identifier"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ../../org.eclipse.passage.lic.licenses.ecore/model/licenses.ecore#//LicensePlan/name"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
package org.eclipse.passage.lic.licenses.model.api;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.passage.lic.licenses.ProductRefDescriptor;

/**
* <!-- begin-user-doc -->
Expand All @@ -28,10 +29,10 @@
* </ul>
*
* @see org.eclipse.passage.lic.licenses.model.meta.LicensesPackage#getProductRef()
* @model
* @model superTypes="org.eclipse.passage.lic.licenses.model.api.ProductRefDescriptor"
* @generated
*/
public interface ProductRef extends EObject {
public interface ProductRef extends EObject, ProductRefDescriptor {
/**
* Returns the value of the '<em><b>Product</b></em>' attribute.
* <!-- begin-user-doc -->
Expand All @@ -42,6 +43,7 @@ public interface ProductRef extends EObject {
* @model required="true"
* @generated
*/
@Override
String getProduct();

/**
Expand All @@ -64,6 +66,7 @@ public interface ProductRef extends EObject {
* @model required="true"
* @generated
*/
@Override
String getVersion();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.eclipse.passage.lic.licenses.LicensePackDescriptor;
import org.eclipse.passage.lic.licenses.LicensePlanDescriptor;
import org.eclipse.passage.lic.licenses.LicensePlanFeatureDescriptor;
import org.eclipse.passage.lic.licenses.ProductRefDescriptor;
import org.eclipse.passage.lic.licenses.model.api.EvaluationInstructions;
import org.eclipse.passage.lic.licenses.model.api.FeatureGrant;
import org.eclipse.passage.lic.licenses.model.api.FloatingLicenseAccess;
Expand Down Expand Up @@ -80,6 +81,13 @@ public class LicensesPackageImpl extends EPackageImpl implements LicensesPackage
*/
private EClass licenseGrantDescriptorEClass = null;

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass productRefDescriptorEClass = null;

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Expand Down Expand Up @@ -310,6 +318,16 @@ public EClass getLicenseGrantDescriptor() {
return licenseGrantDescriptorEClass;
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EClass getProductRefDescriptor() {
return productRefDescriptorEClass;
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Expand Down Expand Up @@ -1229,6 +1247,8 @@ public void createPackageContents() {

licenseGrantDescriptorEClass = createEClass(LICENSE_GRANT_DESCRIPTOR);

productRefDescriptorEClass = createEClass(PRODUCT_REF_DESCRIPTOR);

licensePlanEClass = createEClass(LICENSE_PLAN);
createEAttribute(licensePlanEClass, LICENSE_PLAN__IDENTIFIER);
createEAttribute(licensePlanEClass, LICENSE_PLAN__NAME);
Expand Down Expand Up @@ -1368,6 +1388,7 @@ public void initializePackageContents() {
licensePlanFeatureEClass.getESuperTypes().add(this.getLicensePlanFeatureDescriptor());
licensePackEClass.getESuperTypes().add(this.getLicensePackDescriptor());
licenseGrantEClass.getESuperTypes().add(this.getLicenseGrantDescriptor());
productRefEClass.getESuperTypes().add(this.getProductRefDescriptor());
validityPeriodClosedEClass.getESuperTypes().add(this.getValidityPeriod());

// Initialize classes, features, and operations; add parameters
Expand All @@ -1383,6 +1404,9 @@ public void initializePackageContents() {
initEClass(licenseGrantDescriptorEClass, LicenseGrantDescriptor.class, "LicenseGrantDescriptor", IS_ABSTRACT, //$NON-NLS-1$
IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);

initEClass(productRefDescriptorEClass, ProductRefDescriptor.class, "ProductRefDescriptor", IS_ABSTRACT, //$NON-NLS-1$
IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);

initEClass(licensePlanEClass, LicensePlan.class, "LicensePlan", !IS_ABSTRACT, !IS_INTERFACE, //$NON-NLS-1$
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getLicensePlan_Identifier(), ecorePackage.getEString(), "identifier", null, 0, 1, //$NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,34 @@ public interface LicensesPackage extends EPackage {
*/
int LICENSE_GRANT_DESCRIPTOR_OPERATION_COUNT = 0;

/**
* The meta object id for the '{@link org.eclipse.passage.lic.licenses.ProductRefDescriptor <em>Product Ref Descriptor</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.passage.lic.licenses.ProductRefDescriptor
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getProductRefDescriptor()
* @generated
*/
int PRODUCT_REF_DESCRIPTOR = 4;

/**
* The number of structural features of the '<em>Product Ref Descriptor</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PRODUCT_REF_DESCRIPTOR_FEATURE_COUNT = 0;

/**
* The number of operations of the '<em>Product Ref Descriptor</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PRODUCT_REF_DESCRIPTOR_OPERATION_COUNT = 0;

/**
* The meta object id for the '{@link org.eclipse.passage.lic.licenses.model.impl.LicensePlanImpl <em>License Plan</em>}' class.
* <!-- begin-user-doc -->
Expand All @@ -197,7 +225,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getLicensePlan()
* @generated
*/
int LICENSE_PLAN = 4;
int LICENSE_PLAN = 5;

/**
* The feature id for the '<em><b>Identifier</b></em>' attribute.
Expand Down Expand Up @@ -279,7 +307,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getLicensePlanFeature()
* @generated
*/
int LICENSE_PLAN_FEATURE = 5;
int LICENSE_PLAN_FEATURE = 6;

/**
* The feature id for the '<em><b>Feature Identifier</b></em>' attribute.
Expand Down Expand Up @@ -344,7 +372,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getLicensePack()
* @generated
*/
int LICENSE_PACK = 6;
int LICENSE_PACK = 7;

/**
* The feature id for the '<em><b>Identifier</b></em>' attribute.
Expand Down Expand Up @@ -462,7 +490,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getLicenseGrant()
* @generated
*/
int LICENSE_GRANT = 7;
int LICENSE_GRANT = 8;

/**
* The feature id for the '<em><b>Identifier</b></em>' attribute.
Expand Down Expand Up @@ -592,7 +620,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getFloatingLicensePack()
* @generated
*/
int FLOATING_LICENSE_PACK = 8;
int FLOATING_LICENSE_PACK = 9;

/**
* The feature id for the '<em><b>License</b></em>' containment reference.
Expand Down Expand Up @@ -656,7 +684,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getLicenseRequisites()
* @generated
*/
int LICENSE_REQUISITES = 9;
int LICENSE_REQUISITES = 10;

/**
* The feature id for the '<em><b>Identifier</b></em>' attribute.
Expand Down Expand Up @@ -738,7 +766,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getProductRef()
* @generated
*/
int PRODUCT_REF = 10;
int PRODUCT_REF = 11;

/**
* The feature id for the '<em><b>Product</b></em>' attribute.
Expand All @@ -747,7 +775,7 @@ public interface LicensesPackage extends EPackage {
* @generated
* @ordered
*/
int PRODUCT_REF__PRODUCT = 0;
int PRODUCT_REF__PRODUCT = PRODUCT_REF_DESCRIPTOR_FEATURE_COUNT + 0;

/**
* The feature id for the '<em><b>Version</b></em>' attribute.
Expand All @@ -756,7 +784,7 @@ public interface LicensesPackage extends EPackage {
* @generated
* @ordered
*/
int PRODUCT_REF__VERSION = 1;
int PRODUCT_REF__VERSION = PRODUCT_REF_DESCRIPTOR_FEATURE_COUNT + 1;

/**
* The number of structural features of the '<em>Product Ref</em>' class.
Expand All @@ -765,7 +793,7 @@ public interface LicensesPackage extends EPackage {
* @generated
* @ordered
*/
int PRODUCT_REF_FEATURE_COUNT = 2;
int PRODUCT_REF_FEATURE_COUNT = PRODUCT_REF_DESCRIPTOR_FEATURE_COUNT + 2;

/**
* The number of operations of the '<em>Product Ref</em>' class.
Expand All @@ -774,7 +802,7 @@ public interface LicensesPackage extends EPackage {
* @generated
* @ordered
*/
int PRODUCT_REF_OPERATION_COUNT = 0;
int PRODUCT_REF_OPERATION_COUNT = PRODUCT_REF_DESCRIPTOR_OPERATION_COUNT + 0;

/**
* The meta object id for the '{@link org.eclipse.passage.lic.licenses.model.impl.FloatingServerImpl <em>Floating Server</em>}' class.
Expand All @@ -784,7 +812,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getFloatingServer()
* @generated
*/
int FLOATING_SERVER = 11;
int FLOATING_SERVER = 12;

/**
* The feature id for the '<em><b>Identifier</b></em>' attribute.
Expand Down Expand Up @@ -830,7 +858,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getUserGrant()
* @generated
*/
int USER_GRANT = 12;
int USER_GRANT = 13;

/**
* The feature id for the '<em><b>User</b></em>' attribute.
Expand Down Expand Up @@ -876,7 +904,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getFeatureGrant()
* @generated
*/
int FEATURE_GRANT = 13;
int FEATURE_GRANT = 14;

/**
* The feature id for the '<em><b>Identifier</b></em>' attribute.
Expand Down Expand Up @@ -967,7 +995,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getValidityPeriod()
* @generated
*/
int VALIDITY_PERIOD = 14;
int VALIDITY_PERIOD = 15;

/**
* The number of structural features of the '<em>Validity Period</em>' class.
Expand Down Expand Up @@ -995,7 +1023,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getValidityPeriodClosed()
* @generated
*/
int VALIDITY_PERIOD_CLOSED = 15;
int VALIDITY_PERIOD_CLOSED = 16;

/**
* The feature id for the '<em><b>From</b></em>' attribute.
Expand Down Expand Up @@ -1041,7 +1069,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getEvaluationInstructions()
* @generated
*/
int EVALUATION_INSTRUCTIONS = 16;
int EVALUATION_INSTRUCTIONS = 17;

/**
* The feature id for the '<em><b>Type</b></em>' attribute.
Expand Down Expand Up @@ -1087,7 +1115,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getVersionMatch()
* @generated
*/
int VERSION_MATCH = 17;
int VERSION_MATCH = 18;

/**
* The feature id for the '<em><b>Version</b></em>' attribute.
Expand Down Expand Up @@ -1133,7 +1161,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getFloatingLicenseAccess()
* @generated
*/
int FLOATING_LICENSE_ACCESS = 18;
int FLOATING_LICENSE_ACCESS = 19;

/**
* The feature id for the '<em><b>User</b></em>' attribute.
Expand Down Expand Up @@ -1188,7 +1216,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getFloatingServerConnection()
* @generated
*/
int FLOATING_SERVER_CONNECTION = 19;
int FLOATING_SERVER_CONNECTION = 20;

/**
* The feature id for the '<em><b>Ip</b></em>' attribute.
Expand Down Expand Up @@ -1243,7 +1271,7 @@ public interface LicensesPackage extends EPackage {
* @see org.eclipse.passage.lic.licenses.model.impl.LicensesPackageImpl#getGrantAcqisition()
* @generated
*/
int GRANT_ACQISITION = 20;
int GRANT_ACQISITION = 21;

/**
* The feature id for the '<em><b>Identifier</b></em>' attribute.
Expand Down Expand Up @@ -1354,6 +1382,17 @@ public interface LicensesPackage extends EPackage {
*/
EClass getLicenseGrantDescriptor();

/**
* Returns the meta object for class '{@link org.eclipse.passage.lic.licenses.ProductRefDescriptor <em>Product Ref Descriptor</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Product Ref Descriptor</em>'.
* @see org.eclipse.passage.lic.licenses.ProductRefDescriptor
* @model instanceClass="org.eclipse.passage.lic.licenses.ProductRefDescriptor"
* @generated
*/
EClass getProductRefDescriptor();

/**
* Returns the meta object for class '{@link org.eclipse.passage.lic.licenses.model.api.LicensePlan <em>License Plan</em>}'.
* <!-- begin-user-doc -->
Expand Down
Loading

0 comments on commit 5b81eb5

Please sign in to comment.