Skip to content
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

Onboard UPS Connector to Axon-ivy market #1

Merged
merged 34 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
06987cd
Initial commit
ny-huynh Oct 26, 2023
c72b0ee
feat: add rest client to call UPS API
ny-huynh Nov 8, 2023
cf3455b
feat: add tracking demo
ny-huynh Nov 20, 2023
161a120
Finalize demo of UPS
ny-huynh Dec 4, 2023
c0756e0
update pom.xml
ny-huynh Dec 22, 2023
675f0af
add JUnit Test for ups connector
ny-huynh Dec 28, 2023
db7a6a6
chore: polish doc & move images to folder
ptanhaxon Dec 28, 2023
d60376e
Merge pull request #1 from axonivy-professional-services/chore/polish…
ptanhaxon Dec 28, 2023
475aeb8
Merge remote-tracking branch 'remote/master'
ndkhanh-axonivy Jan 3, 2024
19c4a71
chore: Update product.json & group id, project version
ptanhaxon Jan 4, 2024
65165e6
fix: Correct version
ptanhaxon Jan 4, 2024
b6822fc
chore: Adjust product component
ptanhaxon Jan 4, 2024
f5e0dd0
fix: update version
ptanhaxon Jan 4, 2024
d4f61ce
fix: update version
ptanhaxon Jan 4, 2024
8a55716
Merge pull request #1 from ndkhanh-axonivy/chore/polish-document
ptanhaxon Jan 4, 2024
53f8e51
refactor: format code and remove unused code
ny-huynh Jan 5, 2024
20fa3dc
update pom.xml add oauth module
ny-huynh Jan 5, 2024
6593976
remove line space
ny-huynh Jan 5, 2024
b4571aa
Merge pull request #2 from ndkhanh-axonivy/chore/refactor-code
ny-huynh Jan 5, 2024
412e6dc
refactor: change to normal property to avoid encoded the variable on …
ny-huynh Jan 5, 2024
9a541cb
fix: correct parameter in process after changing variable name
ny-huynh Jan 8, 2024
2bc21b1
Merge pull request #3 from ndkhanh-axonivy/chore/refactor-code
ndkhanh-axonivy Jan 8, 2024
0001569
refactor: add variable for Auth base URL
ny-huynh Jan 9, 2024
40c657f
refactor: use frame-10 template, update property name
ny-huynh Jan 9, 2024
563e039
Merge pull request #4 from ndkhanh-axonivy/chore/refactor-code
ny-huynh Jan 9, 2024
b2358e0
fix: update project build plugin version
ny-huynh Jan 10, 2024
55e5d3e
Merge pull request #5 from ndkhanh-axonivy/chore/refactor-code
ndkhanh-axonivy Jan 10, 2024
bd27293
Remove pattern project
ndkhanh-axonivy Jan 10, 2024
2381c3e
refactor: update package name, format code
ny-huynh Jan 15, 2024
c468b72
fix: correct OAuth feature location on rest client
ny-huynh Jan 15, 2024
751ecc2
refactor: add connector tags, change version in pom.xml
ny-huynh Jan 16, 2024
d8385c2
refactor: add tag for demo project
ny-huynh Jan 16, 2024
68b11b6
Merge pull request #6 from ndkhanh-axonivy/chore/refactor-code
ndkhanh-axonivy Jan 16, 2024
11d2f02
update project build plugin version (#7)
ny-huynh Feb 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
ny-huynh marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ hs_err_pid*

# maven
target/
lib/mvn-deps/

# ivy
lib/mvn-deps/
logs/
classes/
src_dataClasses/
src_wsproc/
logs/
11 changes: 11 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ups-modules</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# MY-PRODUCT-NAME
# UPS connector
[![CI Build](https://github.com/axonivy-market/ups-connector/actions/workflows/ci.yml/badge.svg)](https://github.com/axonivy-market/ups-connector/actions/workflows/ci.yml)

[![CI Build](https://github.com/axonivy-market/REPO-NAME/actions/workflows/ci.yml/badge.svg)](https://github.com/axonivy-market/REPO-NAME/actions/workflows/ci.yml)
This is a UPS module built in the Axon Ivy framework, enabling users to seamlessly integrate with UPS services. With this app, users can effortlessly manage their packages through UPS.

"YOUR SHORT DESCRIPTION GOES HERE"

Read our [documentation](MY-PRODUCT-NAME-product/README.md).
Read our [documentation](ups-connector-product/README.md).
9 changes: 5 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.axonivy.market</groupId><!-- your group id: e.g. com.axonivy.connector.<myconnector> or com.axonivy.utils.<myutil> -->
<name>my-product</name><!-- fill your product name -->
<artifactId>my-product-modules</artifactId><!-- fill your product name + a "-modules" postfix -->
<version>10.0.0-SNAPSHOT</version><!-- identicate your minimal compliant ivy version with the first 2 digits -->
<groupId>com.axonivy.connector.ups</groupId><!-- your group id: e.g. com.axonivy.connector.<myconnector> or com.axonivy.utils.<myutil> -->
<name>ups-connector</name><!-- fill your product name -->
<artifactId>ups-connector-modules</artifactId><!-- fill your product name + a "-modules" postfix -->
<version>10.0.14-SNAPSHOT</version><!-- identicate your minimal compliant ivy version with the first 2 digits -->
Copy link

@nqhoan-axonivy nqhoan-axonivy Jan 9, 2024

Choose a reason for hiding this comment

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

please remove the hint in this pom? that hint supports we input the value after finishing we should remove it. Thanks! @ny-huynh

<packaging>pom</packaging>

<modules>
<module>ups-oauth-feature</module>
<module>${project.name}</module>
<module>${project.name}-demo</module>
<module>${project.name}-test</module>
Expand Down
33 changes: 33 additions & 0 deletions ups-connector-demo/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**/*.ivyClass|**/*.p.json|**/*.rddescriptor|**/*.xhtml" kind="src" path="src_hd">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src_wsproc">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src_dataClasses">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry exported="true" kind="con" path="IVY_CONTAINER"/>
<classpathentry kind="con" path="WEBAPP_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
19 changes: 19 additions & 0 deletions ups-connector-demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# general
Thumbs.db
.DS_Store
*~
*.log

# java
*.class
hs_err_pid*

# maven
target/
lib/mvn-deps/

# ivy
classes/
src_dataClasses/
src_wsproc/
logs/
49 changes: 49 additions & 0 deletions ups-connector-demo/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ups-connector-demo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>ch.ivyteam.ivy.designer.dataClasses.ui.ivyDataClassBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.ivyteam.ivy.designer.process.ui.ivyWebServiceProcessClassBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>ch.ivyteam.ivy.project.IvyProjectNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
12 changes: 12 additions & 0 deletions ups-connector-demo/.settings/.jsdtscope
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="webContent"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>
5 changes: 5 additions & 0 deletions ups-connector-demo/.settings/ch.ivyteam.ivy.designer.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_DATA_CLASS=ups.connector.demo.Data
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=ups.connector.demo
ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=11
ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=100000
eclipse.preferences.version=1
10 changes: 10 additions & 0 deletions ups-connector-demo/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
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.compliance=17
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
11 changes: 11 additions & 0 deletions ups-connector-demo/.settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="ups-connector-demo">
<wb-resource deploy-path="/" source-path="/webContent" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_hd"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_wsproc"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_dataClasses"/>
<property name="context-root" value="ups-connector-demo"/>
<property name="java-output-path" value="/ups-connector-demo/target/classes"/>
</wb-module>
</project-modules>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<root>
<facet id="jst.jsf">
<node name="libprov">
<attribute name="provider-id" value="jsf-user-library-provider"/>
</node>
</facet>
</root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="17"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="jst.jsf" version="2.1"/>
</faceted-project>
2 changes: 2 additions & 0 deletions ups-connector-demo/.settings/org.eclipse.wst.css.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
css-profile/<project>=org.eclipse.wst.css.core.cssprofile.css3
eclipse.preferences.version=1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Window
20 changes: 20 additions & 0 deletions ups-connector-demo/config/custom-fields.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# == Custom Fields Information ==
#
# You can define here your project custom fields.
# Have a look at our documentation for more information.
#
CustomFields:
# Tasks:
# MyTaskCustomField:
# Label: My task custom field
# Description: This new task custom field can be used to ...
# Type: STRING
# Cases:
# MyCaseCustomField:
# Label: My case custom field
# Description: This new case custom field can be used to ...
# Type: STRING
# Starts:
# MyStartCustomField:
# Label: My start custom field
# Description: This new start custom field can be used to ...
1 change: 1 addition & 0 deletions ups-connector-demo/config/databases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Databases:
1 change: 1 addition & 0 deletions ups-connector-demo/config/overrides.any
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
2 changes: 2 additions & 0 deletions ups-connector-demo/config/persistence.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.2" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"/>
1 change: 1 addition & 0 deletions ups-connector-demo/config/rest-clients.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RestClients:
4 changes: 4 additions & 0 deletions ups-connector-demo/config/roles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<role>
<identifier>Everybody</identifier>
</role>
2 changes: 2 additions & 0 deletions ups-connector-demo/config/users.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<userConfig/>
21 changes: 21 additions & 0 deletions ups-connector-demo/config/variables.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# == Variables ==
#
# You can define here your project Variables.
# If you want to define/override a Variable for a specific Environment,
# add an additional ‘variables.yaml’ file in a subdirectory in the ‘Config’ folder:
# '<project>/Config/_<environment>/variables.yaml
#
Variables:

ups-connector:

# Url to UPS connector
Url: "https://wwwcie.ups.com/api"

# Your UPS Application (client) ID
appId: "ZItPy7z8Ep1bZBpGLVQbW3CPiMk9rGFJDpRLjgocLCJbQ5Tw"

# Secret key from your applications "certificates & secrets"
# [password]
secretKey: "rLLiUjXI5j59kjvCWBfmXspBNCeW7Oo6x0RhOL0EyDSnADF7Vj4kHjx0JNAK3Jvi"

1 change: 1 addition & 0 deletions ups-connector-demo/config/webservice-clients.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WebServiceClients:
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Data #class
ups.connector.demo #namespace
27 changes: 27 additions & 0 deletions ups-connector-demo/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.axonivy.connector.ups</groupId>
<artifactId>ups-connector-demo</artifactId>
<version>10.0.14-SNAPSHOT</version>
<packaging>iar</packaging>
<dependencies>
<dependency>
<groupId>com.axonivy.connector.ups</groupId>
<artifactId>ups-connector</artifactId>
<version>${project.version}</version>
<type>iar</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.axonivy.ivy.ci</groupId>
<artifactId>project-build-plugin</artifactId>
<version>10.0.6</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
39 changes: 39 additions & 0 deletions ups-connector-demo/processes/Address.p.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"format" : "10.0.0",
"id" : "18BEBB83F9E96872",
"config" : {
"data" : "ups.connector.demo.Data"
},
"elements" : [ {
"id" : "f0",
"type" : "RequestStart",
"name" : "addressValidation.ivp",
"config" : {
"callSignature" : "addressValidation",
"outLink" : "addressValidation.ivp",
"startName" : "Validate Address"
},
"visual" : {
"at" : { "x" : 96, "y" : 64 }
},
"connect" : { "id" : "f4", "to" : "f3" }
}, {
"id" : "f1",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 664, "y" : 64 }
}
}, {
"id" : "f3",
"type" : "DialogCall",
"name" : "Address form",
"config" : {
"dialogId" : "ups.connector.demo.Address",
"startMethod" : "start()"
},
"visual" : {
"at" : { "x" : 424, "y" : 64 }
},
"connect" : { "id" : "f2", "to" : "f1" }
} ]
}
Loading
Loading