From 3303be7f7507525d83722f0f78d57a456c686605 Mon Sep 17 00:00:00 2001 From: eparovyshnaya Date: Thu, 4 Apr 2024 18:26:20 +0300 Subject: [PATCH] [#1334] Net emf objects transfer should rely on domain resource factory Signed-off-by: eparovyshnaya --- .../passage/lbc/internal/base/DecodedRequest.java | 4 ++-- .../lbc/internal/base/acquire/LicensePacks.java | 4 ++-- .../passage/lbc/internal/base/interaction/Pack.java | 3 ++- .../internal/base/mine/ReassemblingMiningTool.java | 3 ++- .../passage/lbc/internal/jetty/FlsCommands.java | 3 ++- .../build.properties | 3 ++- .../lic/emf/resource/BlindResourceFactory.java | 12 ++++++++++++ .../passage/lic/internal/emf/BlindResource.java | 12 ++++++++++++ .../passage/lic/internal/emf/EObjectFromBytes.java | 3 ++- .../passage/lic/internal/emf/EObjectFromFile.java | 3 ++- .../passage/lic/internal/emf/EObjectFromStream.java | 3 ++- .../passage/lic/internal/emf/EObjectToBytes.java | 3 ++- .../plugin.xml | 6 +++++- .../passage/lic/hc/remote/impl/AccessPacks.java | 3 ++- .../lic/hc/remote/impl/EObjectFromXmiResponse.java | 3 ++- .../lic/hc/remote/impl/acquire/RemoteAcquire.java | 3 ++- .../lic/hc/remote/impl/acquire/RemoteRelease.java | 3 ++- .../build.properties | 3 ++- .../org.eclipse.passage.lic.keys.model/plugin.xml | 3 ++- .../lic/keys/model/util/KeysResourceImpl.java | 2 +- .../build.properties | 3 ++- .../model/util/LicensesResourceFactoryImpl.java | 3 ++- .../model/transport/BaseXmiConditionTransport.java | 5 ++--- .../lic/internal/net/handle/EObjectTransfer.java | 3 ++- .../build.properties | 3 ++- .../plugin.xml | 6 +++++- .../build.properties | 3 ++- .../org.eclipse.passage.lic.users.model/plugin.xml | 6 ++++++ .../loc/edit/ui/DomainRegistryExplorerPart.java | 3 ++- .../build.properties | 3 ++- .../loc/internal/products/core/KeyPairStored.java | 3 ++- .../loc/internal/products/core/ProductKeys.java | 3 ++- .../products/ui/handlers/ProductExportHandler.java | 3 ++- .../loc/workbench/emfforms/parts/DetailsView.java | 3 ++- .../passage/lbc/base/tests/DecodedResponse.java | 3 ++- .../passage/lbc/base/tests/FeatureRequest.java | 3 ++- .../requirements/RequirementsFromManifestTest.java | 3 ++- .../model/migration/tests/FeaturesMigratorTest.java | 8 ++++---- .../model/migration/tests/LicenseMigratorTest.java | 7 +++---- .../tests/XmiLicensingConditionExtractorTest.java | 8 +++++--- .../model/migration/tests/ProductsMigratorTest.java | 1 - .../model/migration/tests/UsersMigratorTest.java | 5 ++--- 42 files changed, 117 insertions(+), 53 deletions(-) diff --git a/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/DecodedRequest.java b/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/DecodedRequest.java index d104fee24..0475d8ada 100644 --- a/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/DecodedRequest.java +++ b/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/DecodedRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lbc.internal.base; @@ -40,7 +41,6 @@ protected DecodedRequest(RawRequest request, Map options) { } public final T get() throws IOException, LicensingException { - // FIXME:AF: should be done via factory return new EObjectFromBytes(decoded(request.content()), target()).get(options); } diff --git a/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/acquire/LicensePacks.java b/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/acquire/LicensePacks.java index 647a12b06..2dcbc0871 100644 --- a/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/acquire/LicensePacks.java +++ b/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/acquire/LicensePacks.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2022 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lbc.internal.base.acquire; @@ -66,7 +67,6 @@ private Collection files() throws LicensingException { private Optional pack(Path license) { FloatingLicensePack pack; try { - // FIXME:AF: should be done via factory pack = new EObjectFromBytes(decoded(license), LicensesPackage.eINSTANCE.getFloatingLicensePack())// .get(Collections.singletonMap(LicensesPackage.eNS_URI, LicensesPackage.eINSTANCE)); diff --git a/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/interaction/Pack.java b/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/interaction/Pack.java index 0b3917627..262192f1c 100644 --- a/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/interaction/Pack.java +++ b/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/interaction/Pack.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2021, 2024 ArSysOp * * This program and the accompanying materials are made available under the @@ -10,6 +10,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lbc.internal.base.interaction; diff --git a/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/ReassemblingMiningTool.java b/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/ReassemblingMiningTool.java index 7f7646a7d..52cf878cd 100644 --- a/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/ReassemblingMiningTool.java +++ b/bundles/org.eclipse.passage.lbc.base/src/org/eclipse/passage/lbc/internal/base/mine/ReassemblingMiningTool.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2022 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lbc.internal.base.mine; diff --git a/bundles/org.eclipse.passage.lbc.jetty/src/org/eclipse/passage/lbc/internal/jetty/FlsCommands.java b/bundles/org.eclipse.passage.lbc.jetty/src/org/eclipse/passage/lbc/internal/jetty/FlsCommands.java index addc7c52b..1fb963388 100644 --- a/bundles/org.eclipse.passage.lbc.jetty/src/org/eclipse/passage/lbc/internal/jetty/FlsCommands.java +++ b/bundles/org.eclipse.passage.lbc.jetty/src/org/eclipse/passage/lbc/internal/jetty/FlsCommands.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021, 2022 ArSysOp + * Copyright (c) 2021, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lbc.internal.jetty; diff --git a/bundles/org.eclipse.passage.lic.agreements.ecore/build.properties b/bundles/org.eclipse.passage.lic.agreements.ecore/build.properties index d75e0a22a..0dd897ce9 100644 --- a/bundles/org.eclipse.passage.lic.agreements.ecore/build.properties +++ b/bundles/org.eclipse.passage.lic.agreements.ecore/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2021 ArSysOp +# Copyright (c) 2021, 2024 ArSysOp # # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ # # Contributors: # ArSysOp - initial API and implementation +# ArSysOp - further support ############################################################################### source.. = src/ diff --git a/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/emf/resource/BlindResourceFactory.java b/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/emf/resource/BlindResourceFactory.java index 5f3a3d90c..ea6b36b57 100644 --- a/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/emf/resource/BlindResourceFactory.java +++ b/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/emf/resource/BlindResourceFactory.java @@ -1,3 +1,15 @@ +/******************************************************************************* + * Copyright (c) 2024 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.emf.resource; import org.eclipse.emf.ecore.resource.Resource; diff --git a/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/BlindResource.java b/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/BlindResource.java index 2001c3cce..5ff413511 100644 --- a/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/BlindResource.java +++ b/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/BlindResource.java @@ -1,3 +1,15 @@ +/******************************************************************************* + * Copyright (c) 2024 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.emf; import java.util.Objects; diff --git a/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectFromBytes.java b/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectFromBytes.java index 17d7e0ad9..3384eece9 100644 --- a/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectFromBytes.java +++ b/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectFromBytes.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lic.internal.emf; diff --git a/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectFromFile.java b/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectFromFile.java index 742b8e4e1..d16e1962f 100644 --- a/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectFromFile.java +++ b/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectFromFile.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lic.internal.emf; diff --git a/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectFromStream.java b/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectFromStream.java index 4510aaa3c..c3c084ecc 100644 --- a/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectFromStream.java +++ b/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectFromStream.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lic.internal.emf; diff --git a/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectToBytes.java b/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectToBytes.java index 4552ed116..11c12f657 100644 --- a/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectToBytes.java +++ b/bundles/org.eclipse.passage.lic.emf/src/org/eclipse/passage/lic/internal/emf/EObjectToBytes.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lic.internal.emf; diff --git a/bundles/org.eclipse.passage.lic.features.model/plugin.xml b/bundles/org.eclipse.passage.lic.features.model/plugin.xml index 2cddf85e5..c6e134580 100644 --- a/bundles/org.eclipse.passage.lic.features.model/plugin.xml +++ b/bundles/org.eclipse.passage.lic.features.model/plugin.xml @@ -1,7 +1,7 @@ @@ -27,6 +28,9 @@ + diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/AccessPacks.java b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/AccessPacks.java index 185a8a8d3..3dd965a47 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/AccessPacks.java +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/AccessPacks.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lic.hc.remote.impl; diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/EObjectFromXmiResponse.java b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/EObjectFromXmiResponse.java index 265c0a6d0..af288967e 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/EObjectFromXmiResponse.java +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/EObjectFromXmiResponse.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lic.hc.remote.impl; diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/acquire/RemoteAcquire.java b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/acquire/RemoteAcquire.java index 4abaaa2c7..ffa3bfcf2 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/acquire/RemoteAcquire.java +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/acquire/RemoteAcquire.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lic.hc.remote.impl.acquire; diff --git a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/acquire/RemoteRelease.java b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/acquire/RemoteRelease.java index bfeba8a0c..b4ed9755a 100644 --- a/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/acquire/RemoteRelease.java +++ b/bundles/org.eclipse.passage.lic.hc/src/org/eclipse/passage/lic/hc/remote/impl/acquire/RemoteRelease.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lic.hc.remote.impl.acquire; diff --git a/bundles/org.eclipse.passage.lic.keys.ecore/build.properties b/bundles/org.eclipse.passage.lic.keys.ecore/build.properties index d75e0a22a..0dd897ce9 100644 --- a/bundles/org.eclipse.passage.lic.keys.ecore/build.properties +++ b/bundles/org.eclipse.passage.lic.keys.ecore/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2021 ArSysOp +# Copyright (c) 2021, 2024 ArSysOp # # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ # # Contributors: # ArSysOp - initial API and implementation +# ArSysOp - further support ############################################################################### source.. = src/ diff --git a/bundles/org.eclipse.passage.lic.keys.model/plugin.xml b/bundles/org.eclipse.passage.lic.keys.model/plugin.xml index c7a5fb6f3..7db8c92ae 100644 --- a/bundles/org.eclipse.passage.lic.keys.model/plugin.xml +++ b/bundles/org.eclipse.passage.lic.keys.model/plugin.xml @@ -1,7 +1,7 @@ diff --git a/bundles/org.eclipse.passage.lic.keys.model/src-gen/org/eclipse/passage/lic/keys/model/util/KeysResourceImpl.java b/bundles/org.eclipse.passage.lic.keys.model/src-gen/org/eclipse/passage/lic/keys/model/util/KeysResourceImpl.java index a06e1d4b4..d8a22c210 100644 --- a/bundles/org.eclipse.passage.lic.keys.model/src-gen/org/eclipse/passage/lic/keys/model/util/KeysResourceImpl.java +++ b/bundles/org.eclipse.passage.lic.keys.model/src-gen/org/eclipse/passage/lic/keys/model/util/KeysResourceImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018, 2021 ArSysOp + * Copyright (c) 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at diff --git a/bundles/org.eclipse.passage.lic.licenses.ecore/build.properties b/bundles/org.eclipse.passage.lic.licenses.ecore/build.properties index 5ec1bc0ae..9efe7f29f 100644 --- a/bundles/org.eclipse.passage.lic.licenses.ecore/build.properties +++ b/bundles/org.eclipse.passage.lic.licenses.ecore/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2018, 2020 ArSysOp and others +# Copyright (c) 2018, 2024 ArSysOp and others # # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ # # Contributors: # ArSysOp - initial API and implementation +# ArSysOp - further support ############################################################################### source.. = src/ diff --git a/bundles/org.eclipse.passage.lic.licenses.model/src-gen/org/eclipse/passage/lic/licenses/model/util/LicensesResourceFactoryImpl.java b/bundles/org.eclipse.passage.lic.licenses.model/src-gen/org/eclipse/passage/lic/licenses/model/util/LicensesResourceFactoryImpl.java index fa9424874..381593269 100644 --- a/bundles/org.eclipse.passage.lic.licenses.model/src-gen/org/eclipse/passage/lic/licenses/model/util/LicensesResourceFactoryImpl.java +++ b/bundles/org.eclipse.passage.lic.licenses.model/src-gen/org/eclipse/passage/lic/licenses/model/util/LicensesResourceFactoryImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018, 2021 ArSysOp + * Copyright (c) 2018, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lic.licenses.model.util; diff --git a/bundles/org.eclipse.passage.lic.licenses.model/src/org/eclipse/passage/lic/licenses/model/transport/BaseXmiConditionTransport.java b/bundles/org.eclipse.passage.lic.licenses.model/src/org/eclipse/passage/lic/licenses/model/transport/BaseXmiConditionTransport.java index 7d83e9278..3d99588fe 100644 --- a/bundles/org.eclipse.passage.lic.licenses.model/src/org/eclipse/passage/lic/licenses/model/transport/BaseXmiConditionTransport.java +++ b/bundles/org.eclipse.passage.lic.licenses.model/src/org/eclipse/passage/lic/licenses/model/transport/BaseXmiConditionTransport.java @@ -35,6 +35,7 @@ import org.eclipse.passage.lic.base.conditions.BaseCondition; import org.eclipse.passage.lic.base.conditions.BaseEvaluationInstructions; import org.eclipse.passage.lic.base.conditions.BaseValidityPeriodClosed; +import org.eclipse.passage.lic.internal.emf.BlindResource; import org.eclipse.passage.lic.internal.licenses.convert.PAgreements; import org.eclipse.passage.lic.internal.licenses.convert.PIssuerSignature; import org.eclipse.passage.lic.internal.licenses.convert.PVersionMatch; @@ -43,7 +44,6 @@ import org.eclipse.passage.lic.licenses.model.api.PersonalFeatureGrant; import org.eclipse.passage.lic.licenses.model.api.PersonalLicensePack; import org.eclipse.passage.lic.licenses.model.meta.LicensesPackage; -import org.eclipse.passage.lic.licenses.model.util.LicensesResourceImpl; @SuppressWarnings("restriction") abstract class BaseXmiConditionTransport implements ConditionTransport { @@ -66,8 +66,7 @@ public ContentType id() { @Override public Data read(InputStream input) throws IOException { - // FIXME:AF: should be done via factory - Resource resource = new LicensesResourceImpl(); + Resource resource = new BlindResource(LicensesPackage.eINSTANCE.getPersonalLicensePack()).get(); resource.load(input, loadOptions()); Optional license = resource.getContents().stream() // .filter(PersonalLicensePack.class::isInstance) // diff --git a/bundles/org.eclipse.passage.lic.net/src/org/eclipse/passage/lic/internal/net/handle/EObjectTransfer.java b/bundles/org.eclipse.passage.lic.net/src/org/eclipse/passage/lic/internal/net/handle/EObjectTransfer.java index cf8fa7d6e..e5d96d6df 100644 --- a/bundles/org.eclipse.passage.lic.net/src/org/eclipse/passage/lic/internal/net/handle/EObjectTransfer.java +++ b/bundles/org.eclipse.passage.lic.net/src/org/eclipse/passage/lic/internal/net/handle/EObjectTransfer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lic.internal.net.handle; diff --git a/bundles/org.eclipse.passage.lic.products.ecore/build.properties b/bundles/org.eclipse.passage.lic.products.ecore/build.properties index 5ec1bc0ae..9efe7f29f 100644 --- a/bundles/org.eclipse.passage.lic.products.ecore/build.properties +++ b/bundles/org.eclipse.passage.lic.products.ecore/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2018, 2020 ArSysOp and others +# Copyright (c) 2018, 2024 ArSysOp and others # # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ # # Contributors: # ArSysOp - initial API and implementation +# ArSysOp - further support ############################################################################### source.. = src/ diff --git a/bundles/org.eclipse.passage.lic.products.model/plugin.xml b/bundles/org.eclipse.passage.lic.products.model/plugin.xml index ab50e7ca7..9552e7d5d 100644 --- a/bundles/org.eclipse.passage.lic.products.model/plugin.xml +++ b/bundles/org.eclipse.passage.lic.products.model/plugin.xml @@ -1,7 +1,7 @@ @@ -27,6 +28,9 @@ + diff --git a/bundles/org.eclipse.passage.lic.users.ecore/build.properties b/bundles/org.eclipse.passage.lic.users.ecore/build.properties index 5ec1bc0ae..9efe7f29f 100644 --- a/bundles/org.eclipse.passage.lic.users.ecore/build.properties +++ b/bundles/org.eclipse.passage.lic.users.ecore/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2018, 2020 ArSysOp and others +# Copyright (c) 2018, 2024 ArSysOp and others # # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ # # Contributors: # ArSysOp - initial API and implementation +# ArSysOp - further support ############################################################################### source.. = src/ diff --git a/bundles/org.eclipse.passage.lic.users.model/plugin.xml b/bundles/org.eclipse.passage.lic.users.model/plugin.xml index e546c2053..b32c65715 100644 --- a/bundles/org.eclipse.passage.lic.users.model/plugin.xml +++ b/bundles/org.eclipse.passage.lic.users.model/plugin.xml @@ -28,6 +28,12 @@ + + diff --git a/bundles/org.eclipse.passage.loc.edit.ui/src/org/eclipse/passage/loc/edit/ui/DomainRegistryExplorerPart.java b/bundles/org.eclipse.passage.loc.edit.ui/src/org/eclipse/passage/loc/edit/ui/DomainRegistryExplorerPart.java index d9779e21f..1075badab 100644 --- a/bundles/org.eclipse.passage.loc.edit.ui/src/org/eclipse/passage/loc/edit/ui/DomainRegistryExplorerPart.java +++ b/bundles/org.eclipse.passage.loc.edit.ui/src/org/eclipse/passage/loc/edit/ui/DomainRegistryExplorerPart.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018, 2021 ArSysOp + * Copyright (c) 2018, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.loc.edit.ui; diff --git a/bundles/org.eclipse.passage.loc.operator/build.properties b/bundles/org.eclipse.passage.loc.operator/build.properties index 0c4c109e1..9be656415 100644 --- a/bundles/org.eclipse.passage.loc.operator/build.properties +++ b/bundles/org.eclipse.passage.loc.operator/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2018, 2021 ArSysOp and others +# Copyright (c) 2018, 2024 ArSysOp and others # # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ # # Contributors: # ArSysOp - initial API and implementation +# ArSysOp - further support ############################################################################### source.. = src/ diff --git a/bundles/org.eclipse.passage.loc.products.core/src/org/eclipse/passage/loc/internal/products/core/KeyPairStored.java b/bundles/org.eclipse.passage.loc.products.core/src/org/eclipse/passage/loc/internal/products/core/KeyPairStored.java index 8f861d5f7..5384fddce 100644 --- a/bundles/org.eclipse.passage.loc.products.core/src/org/eclipse/passage/loc/internal/products/core/KeyPairStored.java +++ b/bundles/org.eclipse.passage.loc.products.core/src/org/eclipse/passage/loc/internal/products/core/KeyPairStored.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2021, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.loc.internal.products.core; diff --git a/bundles/org.eclipse.passage.loc.products.core/src/org/eclipse/passage/loc/internal/products/core/ProductKeys.java b/bundles/org.eclipse.passage.loc.products.core/src/org/eclipse/passage/loc/internal/products/core/ProductKeys.java index e8894f252..196909568 100644 --- a/bundles/org.eclipse.passage.loc.products.core/src/org/eclipse/passage/loc/internal/products/core/ProductKeys.java +++ b/bundles/org.eclipse.passage.loc.products.core/src/org/eclipse/passage/loc/internal/products/core/ProductKeys.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021 ArSysOp + * Copyright (c) 2021, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.loc.internal.products.core; diff --git a/bundles/org.eclipse.passage.loc.products.ui/src/org/eclipse/passage/loc/products/ui/handlers/ProductExportHandler.java b/bundles/org.eclipse.passage.loc.products.ui/src/org/eclipse/passage/loc/products/ui/handlers/ProductExportHandler.java index 511cf0ce4..d67583d28 100644 --- a/bundles/org.eclipse.passage.loc.products.ui/src/org/eclipse/passage/loc/products/ui/handlers/ProductExportHandler.java +++ b/bundles/org.eclipse.passage.loc.products.ui/src/org/eclipse/passage/loc/products/ui/handlers/ProductExportHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018, 2021 ArSysOp + * Copyright (c) 2018, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.loc.products.ui.handlers; diff --git a/bundles/org.eclipse.passage.loc.workbench.emfforms/src/org/eclipse/passage/loc/workbench/emfforms/parts/DetailsView.java b/bundles/org.eclipse.passage.loc.workbench.emfforms/src/org/eclipse/passage/loc/workbench/emfforms/parts/DetailsView.java index f96c28c93..ac8cc0120 100644 --- a/bundles/org.eclipse.passage.loc.workbench.emfforms/src/org/eclipse/passage/loc/workbench/emfforms/parts/DetailsView.java +++ b/bundles/org.eclipse.passage.loc.workbench.emfforms/src/org/eclipse/passage/loc/workbench/emfforms/parts/DetailsView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018, 2022 ArSysOp + * Copyright (c) 2018, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.loc.workbench.emfforms.parts; diff --git a/tests/org.eclipse.passage.lbc.base.tests/src/org/eclipse/passage/lbc/base/tests/DecodedResponse.java b/tests/org.eclipse.passage.lbc.base.tests/src/org/eclipse/passage/lbc/base/tests/DecodedResponse.java index e462c1fb6..f15b32a27 100644 --- a/tests/org.eclipse.passage.lbc.base.tests/src/org/eclipse/passage/lbc/base/tests/DecodedResponse.java +++ b/tests/org.eclipse.passage.lbc.base.tests/src/org/eclipse/passage/lbc/base/tests/DecodedResponse.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lbc.base.tests; diff --git a/tests/org.eclipse.passage.lbc.base.tests/src/org/eclipse/passage/lbc/base/tests/FeatureRequest.java b/tests/org.eclipse.passage.lbc.base.tests/src/org/eclipse/passage/lbc/base/tests/FeatureRequest.java index 042dfa3dc..76e557b2c 100644 --- a/tests/org.eclipse.passage.lbc.base.tests/src/org/eclipse/passage/lbc/base/tests/FeatureRequest.java +++ b/tests/org.eclipse.passage.lbc.base.tests/src/org/eclipse/passage/lbc/base/tests/FeatureRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lbc.base.tests; diff --git a/tests/org.eclipse.passage.lic.equinox.tests/src/org/eclipse/passage/lic/equinox/requirements/RequirementsFromManifestTest.java b/tests/org.eclipse.passage.lic.equinox.tests/src/org/eclipse/passage/lic/equinox/requirements/RequirementsFromManifestTest.java index 2e3482131..b245bb144 100644 --- a/tests/org.eclipse.passage.lic.equinox.tests/src/org/eclipse/passage/lic/equinox/requirements/RequirementsFromManifestTest.java +++ b/tests/org.eclipse.passage.lic.equinox.tests/src/org/eclipse/passage/lic/equinox/requirements/RequirementsFromManifestTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020, 2021 ArSysOp + * Copyright (c) 2020, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lic.equinox.requirements; diff --git a/tests/org.eclipse.passage.lic.features.model.tests/src/org/eclipse/passage/lic/features/model/migration/tests/FeaturesMigratorTest.java b/tests/org.eclipse.passage.lic.features.model.tests/src/org/eclipse/passage/lic/features/model/migration/tests/FeaturesMigratorTest.java index e14e5e187..65391ef71 100644 --- a/tests/org.eclipse.passage.lic.features.model.tests/src/org/eclipse/passage/lic/features/model/migration/tests/FeaturesMigratorTest.java +++ b/tests/org.eclipse.passage.lic.features.model.tests/src/org/eclipse/passage/lic/features/model/migration/tests/FeaturesMigratorTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018, 2020 ArSysOp + * Copyright (c) 2018, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lic.features.model.migration.tests; @@ -20,10 +21,10 @@ import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; import org.eclipse.passage.lic.features.model.api.Feature; import org.eclipse.passage.lic.features.model.api.FeatureSet; import org.eclipse.passage.lic.features.model.api.FeatureVersion; -import org.eclipse.passage.lic.features.model.util.FeaturesResourceImpl; import org.junit.Test; public final class FeaturesMigratorTest { @@ -33,8 +34,7 @@ public void testMigratorPositive() throws Exception { File legacy = new File( System.getProperty("user.dir") + File.separator + "model/org.eclipse.passage.lic.lic_features"); //$NON-NLS-1$//$NON-NLS-2$ URI uri = URI.createFileURI(legacy.getPath()); - // FIXME:AF: should be done via factory - Resource resource = new FeaturesResourceImpl(uri); + Resource resource = new ResourceSetImpl().createResource(uri); resource.load(null); EList contents = resource.getContents(); EObject eObject = contents.get(0); diff --git a/tests/org.eclipse.passage.lic.licenses.model.tests/src/org/eclipse/passage/lic/internal/licenses/model/migration/tests/LicenseMigratorTest.java b/tests/org.eclipse.passage.lic.licenses.model.tests/src/org/eclipse/passage/lic/internal/licenses/model/migration/tests/LicenseMigratorTest.java index ce78cc7fe..e7fbc4b76 100644 --- a/tests/org.eclipse.passage.lic.licenses.model.tests/src/org/eclipse/passage/lic/internal/licenses/model/migration/tests/LicenseMigratorTest.java +++ b/tests/org.eclipse.passage.lic.licenses.model.tests/src/org/eclipse/passage/lic/internal/licenses/model/migration/tests/LicenseMigratorTest.java @@ -34,12 +34,12 @@ import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; import org.eclipse.passage.lic.licenses.ValidityPeriodClosedDescriptor; -import org.eclipse.passage.lic.licenses.model.api.PersonalFeatureGrant; import org.eclipse.passage.lic.licenses.model.api.LicensePlan; import org.eclipse.passage.lic.licenses.model.api.LicensePlanFeature; +import org.eclipse.passage.lic.licenses.model.api.PersonalFeatureGrant; import org.eclipse.passage.lic.licenses.model.api.PersonalLicensePack; -import org.eclipse.passage.lic.licenses.model.util.LicensesResourceImpl; import org.junit.Test; public final class LicenseMigratorTest { @@ -190,8 +190,7 @@ private LicensePlan plan(String path) throws IOException { private T read(String path, Class expected) throws IOException { File legacy = new File(System.getProperty("user.dir") + File.separator + path); //$NON-NLS-1$ URI uri = URI.createFileURI(legacy.getPath()); - // FIXME:AF: should be done via factory - Resource resource = new LicensesResourceImpl(uri); + Resource resource = new ResourceSetImpl().createResource(uri); resource.load(Collections.emptyMap()); return expected.cast(resource.getContents().get(0)); } diff --git a/tests/org.eclipse.passage.lic.licenses.model.tests/src/org/eclipse/passage/lic/internal/licenses/model/migration/tests/XmiLicensingConditionExtractorTest.java b/tests/org.eclipse.passage.lic.licenses.model.tests/src/org/eclipse/passage/lic/internal/licenses/model/migration/tests/XmiLicensingConditionExtractorTest.java index fc482904e..73d5869e4 100644 --- a/tests/org.eclipse.passage.lic.licenses.model.tests/src/org/eclipse/passage/lic/internal/licenses/model/migration/tests/XmiLicensingConditionExtractorTest.java +++ b/tests/org.eclipse.passage.lic.licenses.model.tests/src/org/eclipse/passage/lic/internal/licenses/model/migration/tests/XmiLicensingConditionExtractorTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018, 2021 ArSysOp + * Copyright (c) 2018, 2024 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -9,6 +9,7 @@ * * Contributors: * ArSysOp - initial API and implementation + * ArSysOp - further support *******************************************************************************/ package org.eclipse.passage.lic.internal.licenses.model.migration.tests; @@ -25,17 +26,18 @@ import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.passage.lic.api.conditions.Condition; +import org.eclipse.passage.lic.internal.emf.BlindResource; import org.eclipse.passage.lic.internal.licenses.model.EmptyPersonalFeatureGrant; import org.eclipse.passage.lic.internal.licenses.model.EmptyPersonalLicensePack; import org.eclipse.passage.lic.licenses.model.api.PersonalFeatureGrant; import org.eclipse.passage.lic.licenses.model.api.PersonalLicensePack; import org.eclipse.passage.lic.licenses.model.api.ValidityPeriodClosed; import org.eclipse.passage.lic.licenses.model.transport.XmiConditionTransport; -import org.eclipse.passage.lic.licenses.model.util.LicensesResourceImpl; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; +@SuppressWarnings("restriction") public class XmiLicensingConditionExtractorTest { private static final String COND1_FEATURE_ID = "loc.workbench"; //$NON-NLS-1$ @@ -91,7 +93,7 @@ public void testExtractorPositive() throws Exception { File file = baseFolder.newFile("some.lic"); //$NON-NLS-1$ try (FileOutputStream fos = new FileOutputStream(file)) { // FIXME:AF: should be done via factory - Resource saved = new LicensesResourceImpl(); + Resource saved = new BlindResource(license).get(); saved.getContents().add(license); saved.save(fos, new HashMap<>()); } diff --git a/tests/org.eclipse.passage.lic.products.model.tests/src/org/eclipse/passage/lic/products/model/migration/tests/ProductsMigratorTest.java b/tests/org.eclipse.passage.lic.products.model.tests/src/org/eclipse/passage/lic/products/model/migration/tests/ProductsMigratorTest.java index def38e72e..256d28d09 100644 --- a/tests/org.eclipse.passage.lic.products.model.tests/src/org/eclipse/passage/lic/products/model/migration/tests/ProductsMigratorTest.java +++ b/tests/org.eclipse.passage.lic.products.model.tests/src/org/eclipse/passage/lic/products/model/migration/tests/ProductsMigratorTest.java @@ -34,7 +34,6 @@ public void testMigratorPositive() throws Exception { File legacy = new File( System.getProperty("user.dir") + File.separator + "model/org.eclipse.passage.lic.lic_products"); //$NON-NLS-1$//$NON-NLS-2$ URI uri = URI.createFileURI(legacy.getPath()); - // FIXME:AF: should be done via factory Resource resource = new ProductsResourceImpl(uri); resource.load(null); EList contents = resource.getContents(); diff --git a/tests/org.eclipse.passage.lic.users.model.tests/src/org/eclipse/passage/lic/users/model/migration/tests/UsersMigratorTest.java b/tests/org.eclipse.passage.lic.users.model.tests/src/org/eclipse/passage/lic/users/model/migration/tests/UsersMigratorTest.java index db023975e..5564eb9c7 100644 --- a/tests/org.eclipse.passage.lic.users.model.tests/src/org/eclipse/passage/lic/users/model/migration/tests/UsersMigratorTest.java +++ b/tests/org.eclipse.passage.lic.users.model.tests/src/org/eclipse/passage/lic/users/model/migration/tests/UsersMigratorTest.java @@ -24,9 +24,9 @@ import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; import org.eclipse.passage.lic.users.model.api.User; import org.eclipse.passage.lic.users.model.api.UserOrigin; -import org.eclipse.passage.lic.users.model.util.UsersResourceImpl; import org.junit.Test; public final class UsersMigratorTest { @@ -86,8 +86,7 @@ private void assert033(UserOrigin origin) { private UserOrigin origin(String path) throws IOException { File legacy = new File(System.getProperty("user.dir") + File.separator + path); //$NON-NLS-1$ - // FIXME:AF: should be done via factory - Resource resource = new UsersResourceImpl(URI.createFileURI(legacy.getPath())); + Resource resource = new ResourceSetImpl().createResource(URI.createFileURI(legacy.getPath())); resource.load(Collections.emptyMap()); return UserOrigin.class.cast(resource.getContents().get(0)); }