-
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.
move UsersResource and Factory to internal package
- Loading branch information
1 parent
4227443
commit 58d9be1
Showing
7 changed files
with
299 additions
and
343 deletions.
There are no files selected for viewing
46 changes: 23 additions & 23 deletions
46
bundles/org.eclipse.passage.lic.users.model/META-INF/MANIFEST.MF
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
Manifest-Version: 1.0 | ||
Automatic-Module-Name: org.eclipse.passage.lic.users.model | ||
Bundle-ManifestVersion: 2 | ||
Bundle-SymbolicName: org.eclipse.passage.lic.users.model;singleton:=true | ||
Bundle-Version: 3.0.0.qualifier | ||
Bundle-Name: %pluginName | ||
Bundle-Vendor: %providerName | ||
Bundle-Copyright: %Bundle-Copyright | ||
Bundle-Localization: plugin | ||
Bundle-RequiredExecutionEnvironment: JavaSE-17 | ||
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.emf.ecore.xmi;bundle-version="0.0.0";visibility:=reexport, | ||
org.eclipse.passage.lic.emf;bundle-version="0.0.0", | ||
org.eclipse.passage.lic.users;bundle-version="0.0.0";visibility:=reexport | ||
Export-Package: org.eclipse.passage.lic.internal.users.model; | ||
x-friends:="org.eclipse.passage.loc.dashboard.ui", | ||
org.eclipse.passage.lic.users.model.api, | ||
org.eclipse.passage.lic.users.model.impl;x-internal:=true, | ||
org.eclipse.passage.lic.users.model.meta, | ||
org.eclipse.passage.lic.users.model.util | ||
Bundle-ClassPath: . | ||
Bundle-ActivationPolicy: lazy | ||
Manifest-Version: 1.0 | ||
Automatic-Module-Name: org.eclipse.passage.lic.users.model | ||
Bundle-ManifestVersion: 2 | ||
Bundle-SymbolicName: org.eclipse.passage.lic.users.model;singleton:=true | ||
Bundle-Version: 3.0.0.qualifier | ||
Bundle-Name: %pluginName | ||
Bundle-Vendor: %providerName | ||
Bundle-Copyright: %Bundle-Copyright | ||
Bundle-Localization: plugin | ||
Bundle-RequiredExecutionEnvironment: JavaSE-17 | ||
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.emf.ecore.xmi;bundle-version="0.0.0";visibility:=reexport, | ||
org.eclipse.passage.lic.emf;bundle-version="0.0.0", | ||
org.eclipse.passage.lic.users;bundle-version="0.0.0";visibility:=reexport | ||
Export-Package: org.eclipse.passage.lic.internal.users.model;x-friends:="org.eclipse.passage.loc.dashboard.ui", | ||
org.eclipse.passage.lic.internal.users.model.util;x-internal:=true, | ||
org.eclipse.passage.lic.users.model.api, | ||
org.eclipse.passage.lic.users.model.impl;x-internal:=true, | ||
org.eclipse.passage.lic.users.model.meta, | ||
org.eclipse.passage.lic.users.model.util | ||
Bundle-ClassPath: . | ||
Bundle-ActivationPolicy: lazy |
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 |
---|---|---|
@@ -1,39 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?eclipse version="3.0"?> | ||
<!-- | ||
Copyright (c) 2018, 2020 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 | ||
https://www.eclipse.org/legal/epl-2.0/. | ||
SPDX-License-Identifier: EPL-2.0 | ||
Contributors: | ||
ArSysOp - initial API and implementation | ||
--> | ||
<plugin> | ||
|
||
|
||
<extension point="org.eclipse.emf.ecore.generated_package"> | ||
<!-- @generated users --> | ||
<package | ||
uri="http://www.eclipse.org/passage/lic/users/3.0.0" | ||
class="org.eclipse.passage.lic.users.model.meta.UsersPackage" | ||
genModel="model/users.genmodel"/> | ||
</extension> | ||
|
||
<extension point="org.eclipse.emf.ecore.extension_parser"> | ||
<!-- @generated users --> | ||
<parser | ||
type="users" | ||
class="org.eclipse.passage.lic.users.model.util.UsersResourceFactoryImpl"/> | ||
<parser | ||
type="lic_users" | ||
class="org.eclipse.passage.lic.users.model.util.UsersResourceFactoryImpl"/> | ||
<parser | ||
type="users_xmi" | ||
class="org.eclipse.passage.lic.users.model.util.UsersResourceFactoryImpl"/> | ||
</extension> | ||
|
||
</plugin> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?eclipse version="3.0"?> | ||
<!-- | ||
Copyright (c) 2018, 2020 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 | ||
https://www.eclipse.org/legal/epl-2.0/. | ||
SPDX-License-Identifier: EPL-2.0 | ||
Contributors: | ||
ArSysOp - initial API and implementation | ||
--> | ||
<plugin> | ||
|
||
|
||
<extension point="org.eclipse.emf.ecore.generated_package"> | ||
<!-- @generated users --> | ||
<package | ||
uri="http://www.eclipse.org/passage/lic/users/3.0.0" | ||
class="org.eclipse.passage.lic.users.model.meta.UsersPackage" | ||
genModel="model/users.genmodel"/> | ||
</extension> | ||
|
||
<extension point="org.eclipse.emf.ecore.extension_parser"> | ||
<!-- @generated users --> | ||
<parser | ||
type="users" | ||
class="org.eclipse.passage.lic.internal.users.model.util.UsersResourceFactoryImpl"/> | ||
<parser | ||
type="lic_users" | ||
class="org.eclipse.passage.lic.internal.users.model.util.UsersResourceFactoryImpl"/> | ||
<parser | ||
type="users_xmi" | ||
class="org.eclipse.passage.lic.internal.users.model.util.UsersResourceFactoryImpl"/> | ||
</extension> | ||
|
||
</plugin> |
103 changes: 52 additions & 51 deletions
103
....lic.users.model/src/org/eclipse/passage/lic/internal/users/model/UsersClassMetadata.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 |
---|---|---|
@@ -1,51 +1,52 @@ | ||
/******************************************************************************* | ||
* 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 | ||
* 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.users.model; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
import java.util.Optional; | ||
|
||
import org.eclipse.passage.lic.emf.meta.ClassMetadata; | ||
import org.eclipse.passage.lic.emf.meta.EntityMetadata; | ||
import org.eclipse.passage.lic.emf.meta.PlainEntityMetadata; | ||
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.meta.UsersPackage; | ||
|
||
public final class UsersClassMetadata implements ClassMetadata { | ||
|
||
private final UsersPackage meta; | ||
private final Map<Class<?>, EntityMetadata> map; | ||
|
||
public UsersClassMetadata() { | ||
meta = UsersPackage.eINSTANCE; | ||
map = new HashMap<Class<?>, EntityMetadata>(); | ||
map.put(UserOrigin.class, // | ||
new PlainEntityMetadata(// | ||
meta.getUserOrigin(), // | ||
meta.getUserOrigin_Identifier(), // | ||
meta.getUserOrigin_Name())); | ||
map.put(User.class, // | ||
new PlainEntityMetadata(// | ||
meta.getUser(), // | ||
meta.getLicenseOwner_Identifier(), // | ||
meta.getLicenseOwner_Name())); | ||
} | ||
|
||
@Override | ||
public Optional<EntityMetadata> find(Class<?> clazz) { | ||
return Optional.ofNullable(map.get(clazz)); | ||
} | ||
|
||
} | ||
/******************************************************************************* | ||
* 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 | ||
* 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.users.model; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
import java.util.Optional; | ||
|
||
import org.eclipse.passage.lic.emf.meta.ClassMetadata; | ||
import org.eclipse.passage.lic.emf.meta.EntityMetadata; | ||
import org.eclipse.passage.lic.emf.meta.PlainEntityMetadata; | ||
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.meta.UsersPackage; | ||
|
||
@SuppressWarnings("restriction") | ||
public final class UsersClassMetadata implements ClassMetadata { | ||
|
||
private final UsersPackage meta; | ||
private final Map<Class<?>, EntityMetadata> map; | ||
|
||
public UsersClassMetadata() { | ||
meta = UsersPackage.eINSTANCE; | ||
map = new HashMap<Class<?>, EntityMetadata>(); | ||
map.put(UserOrigin.class, // | ||
new PlainEntityMetadata(// | ||
meta.getUserOrigin(), // | ||
meta.getUserOrigin_Identifier(), // | ||
meta.getUserOrigin_Name())); | ||
map.put(User.class, // | ||
new PlainEntityMetadata(// | ||
meta.getUser(), // | ||
meta.getLicenseOwner_Identifier(), // | ||
meta.getLicenseOwner_Name())); | ||
} | ||
|
||
@Override | ||
public Optional<EntityMetadata> find(Class<?> clazz) { | ||
return Optional.ofNullable(map.get(clazz)); | ||
} | ||
|
||
} |
Oops, something went wrong.