Skip to content

Issue#6 #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
20 changes: 17 additions & 3 deletions cnf/central.mvn
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ org.eclipse.platform:org.eclipse.equinox.preferences:3.10.100
org.eclipse.jdt:org.eclipse.jdt.core:3.32.0
org.eclipse.platform:org.eclipse.osgi:3.18.200
org.eclipse.platform:org.eclipse.text:3.12.300
org.eclipse.emf:org.eclipse.emf.common:2.29.0
org.eclipse.emf:org.eclipse.emf.ecore:2.35.0
org.eclipse.emf:org.eclipse.emf.ecore.xcore.lib:1.7.0
org.eclipse.emf:org.eclipse.emf.ecore.xmi:2.36.0

org.osgi:org.osgi.annotation.versioning:1.1.2
org.osgi:org.osgi.annotation.bundle:2.0.0
Expand Down Expand Up @@ -118,12 +122,22 @@ org.osgi:osgi.cmpn:7.0.0
org.slf4j:slf4j-simple:1.7.36
org.slf4j:slf4j-api:1.7.36

org.geckoprojects.bnd:org.gecko.bnd.dimc.library:1.5.0
org.geckoprojects.bnd:org.gecko.bnd.jacoco.library:1.5.0
org.geckoprojects.bnd:org.gecko.bnd.osgitest.library:1.5.0
org.geckoprojects.bnd:org.gecko.bnd.dimc.library:1.6.0
org.geckoprojects.bnd:org.gecko.bnd.jacoco.library:1.6.0
org.geckoprojects.bnd:org.gecko.bnd.osgitest.library:1.6.0
org.geckoprojects.emf:org.gecko.emf.osgi.bnd.library.workspace:6.0.1
org.geckoprojects.emf.utils:org.gecko.emf.util.jakartars.bnd.library.workspace:2.3.0
org.geckoprojects.persistence:org.gecko.emf.repository.bnd.library.workspace:6.1.0-SNAPSHOT
org.eclipse.osgi-technology.rest:org.eclipse.osgitech.rest.bnd.library:1.2.2
org.geckoprojects.emf:org.gecko.emf.osgi.example.model.basic:6.2.0


org.bndtools:org.bndtools.templates.osgi:7.0.0

# Runtime Deps for fake PII generator
com.googlecode.libphonenumber:libphonenumber:8.13.50
org.geckoprojects.libraries:net.datafaker:2.4.2-SNAPSHOT

org.geckoprojects.emf.model:org.xmlsoap.model:1.0.0
org.geckoprojects.emf.model:org.emau.icmvc.ganimed.ttp.cm2:1.0.0-SNAPSHOT

2 changes: 1 addition & 1 deletion cnf/local/index.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<repository xmlns="http://www.osgi.org/xmlns/repository/v1.0.0" name="Local" increment="1706083395275"/>
<repository xmlns="http://www.osgi.org/xmlns/repository/v1.0.0" name="Local" increment="1733212185164"/>
1 change: 1 addition & 0 deletions cnf/local/index.xml.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7d4feb1a8c44c30021d4161f8ab90517f8144c8a93730fd975b47eadc35163cb
11 changes: 11 additions & 0 deletions org.avatar.gics.service/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
<classpathentry kind="src" output="bin" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1 change: 1 addition & 0 deletions org.avatar.gics.service/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin_test/
23 changes: 23 additions & 0 deletions org.avatar.gics.service/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.avatar.gics.service</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>bndtools.core.bndbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>bndtools.core.bndnature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
eclipse.preferences.version=1
encoding//src/org/avatar/gics/service/api/GICSService.java=UTF-8
encoding/<project>=UTF-8
encoding/bnd.bnd=UTF-8
encoding/launch.bndrun=UTF-8
14 changes: 14 additions & 0 deletions org.avatar.gics.service/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
9 changes: 9 additions & 0 deletions org.avatar.gics.service/bnd.bnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-library: enable-emf

javac.source: 17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed inherited from build.bnd resp. dimc library

javac.target: 17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed inherited from build.bnd resp. dimc library


Bundle-Version: ${project-version}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed inherited from build.bnd resp. dimc library

-buildpath: \
org.xmlsoap.model,\
org.emau.icmvc.ganimed.ttp.cm2
33 changes: 33 additions & 0 deletions org.avatar.gics.service/launch.bndrun
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#-runfw: org.apache.felix.framework;version=5
#-runee: JavaSE-1.8

-runprovidedcapabilities: ${native_capability}

-resolve.effective: active;skip:="osgi.service"

-runbundles: \
org.apache.felix.gogo.command;version='[1.1.2,1.1.3)',\
org.apache.felix.gogo.runtime;version='[1.1.6,1.1.7)',\
org.apache.felix.gogo.shell;version='[1.1.4,1.1.5)',\
org.apache.felix.scr;version='[2.2.10,2.2.11)',\
org.avatar.gics.service;version=snapshot,\
org.osgi.service.component;version='[1.5.1,1.5.2)',\
org.osgi.util.function;version='[1.2.0,1.2.1)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\
org.apache.felix.metatype;version='[1.2.4,1.2.5)',\
org.gecko.emf.osgi.component;version='[6.0.1,6.0.2)',\
org.osgi.service.log;version='[1.5.0,1.5.1)',\
org.osgi.util.converter;version='[1.0.9,1.0.10)',\
org.eclipse.emf.common;version='[2.29.0,2.29.1)',\
org.eclipse.emf.ecore;version='[2.35.0,2.35.1)',\
org.eclipse.emf.ecore.xmi;version='[2.36.0,2.36.1)',\
org.xmlsoap.model;version='[1.0.0,1.0.1)',\
org.emau.icmvc.ganimed.ttp.cm2;version='[1.0.0,1.0.1)'

-runrequires: \
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',\
bnd.identity;id='org.avatar.gics.service'
-runfw: org.apache.felix.framework;version='[7.0.5,7.0.5]'
-runee: JavaSE-17
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.avatar.gics.service.api;

import org.emau.icmvc.ganimed.ttp.cm2.AddConsentResponse;
import org.emau.icmvc.ganimed.ttp.cm2.ConsentDTO;
import org.emau.icmvc.ganimed.ttp.cm2.GetAllConsentedIdsForResponse;
import org.osgi.annotation.versioning.ProviderType;

@ProviderType
public interface GICSService {

GetAllConsentedIdsForResponse getAllConsentedIdsFor(String domainName, String policyName, String policyVersion, String signerIdTypeName);

AddConsentResponse addConsent(ConsentDTO consent);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Copyright (c) 2012 - 2024 Data In Motion and others.
* All rights reserved.
*
* 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:
* Data In Motion - initial API and implementation
*/
package org.avatar.gics.service.api;

/**
*
* @author ilenia
* @since Nov 29, 2024
*/
public @interface GICSServiceConfig {

String url() default "";

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@org.osgi.annotation.versioning.Version("1.0.0")
@org.osgi.annotation.bundle.Export
package org.avatar.gics.service.api;
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* Copyright (c) 2012 - 2024 Data In Motion and others.
* All rights reserved.
*
* 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:
* Data In Motion - initial API and implementation
*/
package org.avatar.gics.service.impl;

import org.emau.icmvc.ganimed.ttp.cm2.Cm2Factory;
import org.emau.icmvc.ganimed.ttp.cm2.GetAllConsentedIdsFor;
import org.emau.icmvc.ganimed.ttp.cm2.PolicyKeyDTO;
import org.emau.icmvc.ganimed.ttp.cm2.config.CheckConsentConfig;
import org.emau.icmvc.ganimed.ttp.cm2.config.ConfigFactory;

/**
*
* @author ilenia
* @since Nov 29, 2024
*/
public class GICSServiceHelper {

private GICSServiceHelper() {

}

public static GetAllConsentedIdsFor createGetAllConsentedIdsForRequest(String domainName, String policyName,
String policyVersion, String signerIdTypeName) {

GetAllConsentedIdsFor request = Cm2Factory.eINSTANCE.createGetAllConsentedIdsFor();
request.setSignerIdTypeName(signerIdTypeName);
PolicyKeyDTO policyKey = Cm2Factory.eINSTANCE.createPolicyKeyDTO();
policyKey.setDomainName(domainName);
policyKey.setName(policyName);
policyKey.setVersion(policyVersion);
request.setPolicyKey(policyKey);
CheckConsentConfig consentConfig = ConfigFactory.eINSTANCE.createCheckConsentConfig();
consentConfig.setIgnoreVersionNumber(false);
request.setConfig(consentConfig);
request.setConfig(consentConfig);
return request;
}

}
Loading
Loading