Skip to content

Commit a0a5d2f

Browse files
committed
initial commit
1 parent b07a593 commit a0a5d2f

File tree

89 files changed

+11059
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+11059
-0
lines changed

notes-api/pom.xml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>de.fk</groupId>
8+
<artifactId>notes</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
</parent>
11+
12+
<artifactId>notes-api</artifactId>
13+
<packaging>jar</packaging>
14+
15+
<dependencies>
16+
<dependency>
17+
<groupId>javax.ejb</groupId>
18+
<artifactId>javax.ejb-api</artifactId>
19+
<version>3.2.2</version>
20+
<scope>provided</scope>
21+
</dependency>
22+
</dependencies>
23+
24+
</project>

notes-api/src/main/idl/notes.idl

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
module de {
2+
module fk {
3+
module notes {
4+
5+
interface NotesCorbaService;
6+
7+
struct Note;
8+
struct ToDo;
9+
struct Folder;
10+
11+
typedef sequence<Note> Notes;
12+
typedef sequence<ToDo> ToDos;
13+
typedef sequence<Folder> Folders;
14+
15+
struct Note {
16+
long long id;
17+
long long createdAt;
18+
string description;
19+
};
20+
21+
struct ToDo {
22+
long long id;
23+
long long createdAt;
24+
long long doneAt;
25+
string description;
26+
boolean done;
27+
};
28+
29+
struct Folder {
30+
long long id;
31+
string name;
32+
sequence<Folder> parent;
33+
Folders children;
34+
};
35+
36+
interface NotesCorbaService {
37+
long long parse(in string text);
38+
ToDos getToDos();
39+
Note getNote(in long long id);
40+
Notes getNotes(in long long folderId);
41+
Folders getAllFolders();
42+
};
43+
};
44+
};
45+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package de.fk.notes.ejb.api;
2+
3+
import java.io.Serializable;
4+
import java.util.ArrayList;
5+
import java.util.Date;
6+
import java.util.List;
7+
8+
public class Folder implements Serializable {
9+
private static final long serialVersionUID = 1L;
10+
private long id;
11+
private String name;
12+
private Date createdAt;
13+
private Folder parent;
14+
private List<Folder> children;
15+
16+
public long getId() {
17+
return id;
18+
}
19+
20+
public void setId(long id) {
21+
this.id = id;
22+
}
23+
24+
public String getName() {
25+
return name;
26+
}
27+
28+
public void setName(String name) {
29+
this.name = name;
30+
}
31+
32+
public Folder getParent() {
33+
return parent;
34+
}
35+
36+
public void setParent(Folder parent) {
37+
this.parent = parent;
38+
}
39+
40+
public List<Folder> getChildren() {
41+
if (children == null) {
42+
children = new ArrayList<>();
43+
}
44+
return children;
45+
}
46+
47+
public Date getCreatedAt() {
48+
return createdAt;
49+
}
50+
51+
public void setCreatedAt(Date createdAt) {
52+
this.createdAt = createdAt;
53+
}
54+
55+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package de.fk.notes.ejb.api;
2+
3+
import java.io.Serializable;
4+
import java.util.Date;
5+
6+
public class Note implements Serializable {
7+
private static final long serialVersionUID = 1L;
8+
private long id;
9+
private Date createdAt;
10+
private String description;
11+
12+
public long getId() {
13+
return id;
14+
}
15+
16+
public void setId(long id) {
17+
this.id = id;
18+
}
19+
20+
public Date getCreatedAt() {
21+
return createdAt;
22+
}
23+
24+
public void setCreatedAt(Date createdAt) {
25+
this.createdAt = createdAt;
26+
}
27+
28+
public String getDescription() {
29+
return description;
30+
}
31+
32+
public void setDescription(String description) {
33+
this.description = description;
34+
}
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package de.fk.notes.ejb.api;
2+
3+
import javax.ejb.Remote;
4+
import java.util.List;
5+
6+
@Remote
7+
public interface NotesService {
8+
9+
long parse(String text);
10+
11+
List<Todo> getToDos();
12+
13+
Note getNote(long id);
14+
15+
List<Note> getNotes(long folderId);
16+
17+
List<Folder> getAllFolders();
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package de.fk.notes.ejb.api;
2+
3+
import java.io.Serializable;
4+
import java.util.Date;
5+
6+
public class Todo implements Serializable {
7+
private static final long serialVersionUID = 1L;
8+
private long id;
9+
private Date createdAt;
10+
private Date doneAt;
11+
private String description;
12+
private boolean done;
13+
14+
public long getId() {
15+
return id;
16+
}
17+
18+
public void setId(long id) {
19+
this.id = id;
20+
}
21+
22+
public Date getCreatedAt() {
23+
return createdAt;
24+
}
25+
26+
public void setCreatedAt(Date createdAt) {
27+
this.createdAt = createdAt;
28+
}
29+
30+
public Date getDoneAt() {
31+
return doneAt;
32+
}
33+
34+
public void setDoneAt(Date doneAt) {
35+
this.doneAt = doneAt;
36+
}
37+
38+
public String getDescription() {
39+
return description;
40+
}
41+
42+
public void setDescription(String description) {
43+
this.description = description;
44+
}
45+
46+
public boolean isDone() {
47+
return done;
48+
}
49+
50+
public void setDone(boolean done) {
51+
this.done = done;
52+
}
53+
}

0 commit comments

Comments
 (0)