Skip to content

Commit 487cf67

Browse files
committed
Merge branch 'main' of https://github.com/DevLab-umontp/API-JAVA-EDT into publication-package
2 parents 0c6b263 + 43edb58 commit 487cf67

File tree

3 files changed

+240
-9
lines changed

3 files changed

+240
-9
lines changed

LICENSE

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
Academic Free License ("AFL") v. 3.0
2+
3+
This Academic Free License (the "License") applies to any original work of authorship
4+
(the "Original Work") whose owner (the "Licensor") has placed the following licensing
5+
notice adjacent to the copyright notice for the Original Work:
6+
7+
Licensed under the Academic Free License version 3.0
8+
9+
1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive,
10+
sublicensable license, for the duration of the copyright, to do the following:
11+
12+
a) to reproduce the Original Work in copies, either alone or as part of a collective work;
13+
b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby
14+
creating derivative works ("Derivative Works") based upon the Original Work;
15+
c) to distribute or communicate copies of the Original Work and Derivative Works to the
16+
public, under any license of your choice that does not contradict the terms and conditions,
17+
including Licensor's reserved rights and remedies, in this Academic Free License;
18+
d) to perform the Original Work publicly; and
19+
e) to display the Original Work publicly.
20+
21+
2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive,
22+
sublicensable license, under patent claims owned or controlled by the Licensor that are
23+
embodied in the Original Work as furnished by the Licensor, for the duration of the patents,
24+
to make, use, sell, offer for sale, have made, and import the Original Work and Derivative
25+
Works.
26+
27+
3) Grant of Source Code License. The term "Source Code" means the preferred form of the
28+
Original Work for making modifications to it and all available documentation describing
29+
how to modify the Original Work. Licensor agrees to provide a machine-readable copy of
30+
the Source Code of the Original Work along with each copy of the Original Work that
31+
Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a
32+
machine-readable copy of the Source Code in an information repository reasonably calculated
33+
to permit inexpensive and convenient access by You for as long as Licensor continues to
34+
distribute the Original Work.
35+
36+
4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any
37+
contributors to the Original Work, nor any of their trademarks or service marks, may be
38+
used to endorse or promote products derived from this Original Work without express prior
39+
permission of the Licensor. Except as expressly stated herein, nothing in this License
40+
grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any
41+
other intellectual property. No patent license is granted to make, use, sell, offer for
42+
sale, have made, or import embodiments of any patent claims other than the licensed claims
43+
defined in Section 2. No license is granted to the trademarks of Licensor even if such marks
44+
are included in the Original Work. Nothing in this License shall be interpreted to prohibit
45+
Licensor from licensing under terms different from this License any Original Work that
46+
Licensor otherwise would have a right to license.
47+
48+
5) External Deployment. The term "External Deployment" means the use, distribution, or
49+
communication of the Original Work or Derivative Works in any way such that the Original
50+
Work or Derivative Works may be used by anyone other than You, whether those works are
51+
distributed or communicated to those persons or made available as an application intended
52+
for use over a network. As an express condition for the grants of license hereunder, You
53+
must treat any External Deployment by You of the Original Work or a Derivative Work as a
54+
distribution under section 1(c).
55+
56+
6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You
57+
create, all copyright, patent, or trademark notices from the Source Code of the Original
58+
Work, as well as any notices of licensing and any descriptive text identified therein as
59+
an "Attribution Notice." You must cause the Source Code for any Derivative Works that You
60+
create to carry a prominent Attribution Notice reasonably calculated to inform recipients
61+
that You have modified the Original Work.
62+
63+
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in
64+
and to the Original Work and the patent rights granted herein by Licensor are owned by the
65+
Licensor or are sublicensed to You under the terms of this License with the permission of
66+
the contributor(s) of those copyrights and patent rights. Except as expressly stated in the
67+
immediately preceding sentence, the Original Work is provided under this License on an
68+
"AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation,
69+
the warranties of non-infringement, merchantability or fitness for a particular purpose.
70+
THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF
71+
WARRANTY constitutes an essential part of this License. No license to the Original Work is
72+
granted by this License except under this disclaimer.
73+
74+
8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort
75+
(including negligence), contract, or otherwise, shall the Licensor be liable to anyone for
76+
any indirect, special, incidental, or consequential damages of any character arising as a
77+
result of this License or the use of the Original Work including, without limitation, damages
78+
for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other
79+
commercial damages or losses. This limitation of liability shall not apply to the extent
80+
applicable law prohibits such limitation.
81+
82+
9) Acceptance and Termination. If, at any time, You expressly assented to this License, that
83+
assent indicates your clear and irrevocable acceptance of this License and all of its terms
84+
and conditions. If You distribute or communicate copies of the Original Work or a Derivative
85+
Work, You must make a reasonable effort under the circumstances to obtain the express assent
86+
of recipients to the terms of this License. This License conditions your rights to undertake
87+
the activities listed in Section 1, including your right to create Derivative Works based upon
88+
the Original Work, and doing so without honoring these terms and conditions is prohibited by
89+
copyright law and international treaty. Nothing in this License is intended to affect copyright
90+
exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate
91+
immediately and You may no longer exercise any of the rights granted to You by this License upon
92+
your failure to honor the conditions in Section 1(c).
93+
94+
10) Termination for Patent Action. This License shall terminate automatically and You may no longer
95+
exercise any of the rights granted to You by this License as of the date You commence an action,
96+
including a cross-claim or counterclaim, against Licensor or any licensee alleging that the
97+
Original Work infringes a patent. This termination provision shall not apply for an action
98+
alleging patent infringement by combinations of the Original Work with other software or hardware.
99+
100+
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought
101+
only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts
102+
its primary business, and under the laws of that jurisdiction excluding its conflict-of-law
103+
provisions. The application of the United Nations Convention on Contracts for the International
104+
Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License
105+
or after its termination shall be subject to the requirements and penalties of copyright or patent
106+
law in the appropriate jurisdiction. This section shall survive the termination of this License.
107+
108+
12) Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating
109+
thereto, the prevailing party shall be entitled to recover its costs and expenses, including,
110+
without limitation, reasonable attorneys' fees and costs incurred in connection with such action,
111+
including any appeal of such action. This section shall survive the termination of this License.
112+
113+
13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall
114+
be reformed only to the extent necessary to make it enforceable.
115+
116+
14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case,
117+
means an individual or a legal entity exercising rights under, and complying with all of the terms
118+
of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or
119+
is under common control with you. For purposes of this definition, "control" means (i) the power,
120+
direct or indirect, to cause the direction or management of such entity, whether by contract or
121+
otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii)
122+
beneficial ownership of such entity.
123+
124+
15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by
125+
this License or by law, and Licensor promises not to interfere with or be responsible for such uses
126+
by You.
127+
128+
16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted
129+
to copy, distribute, or communicate this License without modification. Nothing in this License permits
130+
You to modify this License as applied to the Original Work or to Derivative Works. However, You may
131+
modify the text of this License and copy, distribute or communicate your modified version (the "Modified
132+
License") and apply it to other original works of authorship subject to the following conditions:
133+
(i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL"
134+
and you may not use those names in the name of your Modified License; (ii) You must replace the notice
135+
specified in the first paragraph above with the notice "Licensed under <insert your license name here>"
136+
or with a notice of your own that is not confusingly similar to the notice in this License; and (iii)
137+
You may not claim that your original works are open source software unless your Modified License has
138+
been approved by Open Source Initiative (OSI) and You comply with its license review and certification
139+
process.

README.md

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,65 @@
1+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=DevLab-umontp_API-JAVA-EDT&metric=alert_status)](https://sonarcloud.io/dashboard?id=DevLab-umontp_API-JAVA-EDT)
2+
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=DevLab-umontp_API-JAVA-EDT&metric=coverage)](https://sonarcloud.io/dashboard?id=DevLab-umontp_API-JAVA-EDT)
13
![GitHub Actions](https://github.com/DevLab-umontp/API-JAVA-EDT/workflows/Java%20CI%20with%20Maven/badge.svg)
24
[![Javadoc](https://img.shields.io/badge/JavaDoc-Online-green)](https://mathieusoysal.github.io/stats/api-java-edt)
35
[![Gitmoji.dev](https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat-square)](https://gitmoji.dev)
4-
# ![](ressources/devicon.png) API Java : EDT IUT Montpellier
6+
# ![](ressources/devicon.png) Librairie Java : EDT IUT Montpellier
57

68
### IUT Montpellier-Sète – Département Informatique
79
* **Colaborateurs:** [étudiants du département informatique](https://iut-montpellier-sete.edu.umontpellier.fr/dut-informatique/)
810

911

10-
## Utiliser l'API Java EDT IUT Montpellier :
12+
## Intégrer la Librairie Java EDT IUT Montpellier dans votre code
1113

1214
### Maven
1315

14-
Si vous avez Maven, utilisez le code suivant :
16+
Si vous avez Maven, ajoutez ce qui suit aux dépendances de votre fichier `pom.xml` :
1517

1618
```xml
1719
<dependency>
18-
<groupId> coming soon </groupId>
19-
<artifactId> coming soon </artifactId>
20-
<version> coming soon </version>
20+
<groupId>com.github.devlab-umontp</groupId>
21+
<artifactId>edt-iut-umontp</artifactId>
22+
<version>1.0.0</version>
2123
</dependency>
2224
```
23-
25+
>*Voir un exemple de fichier [pom.xml](https://github.com/DevLab-umontp/Librarie-Java-EDT/blob/main/ressources/pom.xml#L20L24) avec la librairie EDT IUT Montpellier*
2426
### Gradle
2527

2628
Si vous utilisez Gradle, ajoutez ce qui suit aux dépendances de votre fichier `build.gradle`:
2729

2830
```
29-
implementation 'groupId:artifactId:version'
31+
implementation 'com.github.devlab-umontp:edt-iut-umontp:1.0.0'
3032
```
3133

32-
## Exemple de code d'utilisation de l'API Java
34+
## Exemple de code d'utilisation de la Librairie Java EDT IUT Montpellier
35+
36+
```java
37+
import fr.umontp.edt.*;
38+
39+
class ExempleDeCode {
40+
public static void main(String[] args) {
41+
42+
// Récupérer l'emploi du temps de l'ent
43+
EmploiDuTempsProxy emploiDuTempsProxy = EmploiDuTempsProxy.getInstance();
3344

45+
// Récupérer le planning d'aujourd'hui
46+
Planning planningDate = emploiDuTempsProxy.getPlanningOf(LocalDate.now());
47+
48+
// Récupérer le planning du groupe S3
49+
Planning planningGroupe = emploiDuTempsProxy.getPlanningOf(Groupe.S3);
50+
51+
// Récupérer le planning d'aujourd'hui du groupe S2
52+
Planning planningDateGroupe = emploiDuTempsProxy.getPlanningOf(LocalDate.now(), Groupe.S2);
53+
54+
// Parcourir les cours d'un planning
55+
for (Cours cours : planningGroupe) {
56+
System.out.println(cours.getIntitule());
57+
}
58+
59+
// Actualiser votre emploi du temps local avec celui de l'ent
60+
emploiDuTempsProxy.actualiser();
61+
}
62+
}
63+
```
64+
## Contribution
65+
Les suggestions et contributions sont toujours les bienvenues! Veuillez discuter des modifications plus importantes via un [issue](https://github.com/DevLab-umontp/Librarie-Java-EDT/issues) avant de soumettre une demande.

ressources/pom.xml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<groupId>fr.umontpellier</groupId>
7+
<artifactId>exemple</artifactId>
8+
<version>1.0-SNAPSHOT</version>
9+
10+
<name>exemple</name>
11+
<url>http://www.example.com</url>
12+
13+
<properties>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
<maven.compiler.source>11</maven.compiler.source>
16+
<maven.compiler.target>11</maven.compiler.target>
17+
</properties>
18+
19+
<dependencies>
20+
<dependency>
21+
<groupId>com.github.devlab-umontp</groupId>
22+
<artifactId>edt-iut-umontp</artifactId>
23+
<version>1.0.0</version>
24+
</dependency>
25+
<dependency>
26+
<groupId>org.junit.jupiter</groupId>
27+
<artifactId>junit-jupiter-migration-support</artifactId>
28+
<version>5.0.0-M4</version>
29+
</dependency>
30+
<dependency>
31+
<groupId>junit</groupId>
32+
<artifactId>junit</artifactId>
33+
<version>4.13.1</version>
34+
<scope>test</scope>
35+
</dependency>
36+
</dependencies>
37+
38+
<build>
39+
<plugins>
40+
<plugin>
41+
<groupId>org.apache.maven.plugins</groupId>
42+
<artifactId>maven-surefire-plugin</artifactId>
43+
<version>3.0.0-M5</version>
44+
</plugin>
45+
<plugin>
46+
<groupId>org.apache.maven.plugins</groupId>
47+
<artifactId>maven-failsafe-plugin</artifactId>
48+
<version>3.0.0-M5</version>
49+
</plugin>
50+
<plugin>
51+
<artifactId>maven-compiler-plugin</artifactId>
52+
<version>3.8.0</version>
53+
</plugin>
54+
<plugin>
55+
<artifactId>maven-surefire-plugin</artifactId>
56+
<version>2.22.1</version>
57+
</plugin>
58+
</plugins>
59+
</build>
60+
</project>

0 commit comments

Comments
 (0)