Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
CTF
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grzegorz
CTF
Commits
de0d0c6f
Commit
de0d0c6f
authored
Feb 22, 2016
by
Grzegorz Pietrusza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix get all tasks
parent
1e5d0a1c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
18 deletions
+14
-18
Flag.java
service/src/main/java/objects/Flag.java
+3
-0
Task.java
service/src/main/java/objects/Task.java
+1
-11
Repository.java
service/src/main/java/repositories/Repository.java
+3
-1
TasksRepository.java
service/src/main/java/repositories/TasksRepository.java
+1
-5
TeamsRepository.java
service/src/main/java/repositories/TeamsRepository.java
+0
-1
UsersRepository.java
service/src/main/java/repositories/UsersRepository.java
+6
-0
No files found.
service/src/main/java/objects/Flag.java
View file @
de0d0c6f
...
...
@@ -9,6 +9,9 @@ public class Flag {
private
String
value
;
private
static
int
flagLength
=
32
;
public
Flag
()
{
}
public
Flag
(
String
value
)
{
this
.
value
=
value
;
}
...
...
service/src/main/java/objects/Task.java
View file @
de0d0c6f
...
...
@@ -24,17 +24,7 @@ public class Task {
this
.
name
=
name
;
}
public
Task
()
{
}
public
ObjectId
getId
()
{
return
id
;
}
public
void
setId
(
ObjectId
id
)
{
this
.
id
=
id
;
}
public
Task
()
{}
public
String
getName
()
{
return
name
;
...
...
service/src/main/java/repositories/Repository.java
View file @
de0d0c6f
package
repositories
;
import
java.util.List
;
/**
* Created by gpietrus on 20.02.2016.
*/
public
interface
Repository
{
// void get(UUID uuid);
// List<Task>
getAll();
List
getAll
();
// void add(User user); //todo: not user //todo: use generics?
}
service/src/main/java/repositories/TasksRepository.java
View file @
de0d0c6f
...
...
@@ -39,11 +39,7 @@ public class TasksRepository implements Repository {
}
public
List
<
Task
>
getAll
()
{
return
null
;
//todo
// return mongoDBConnector.getCollection("tasks")
// .stream()
// .map(Task::new)
// .collect(Collectors.toList());
return
datastore
.
createQuery
(
Task
.
class
).
asList
();
}
public
void
add
(
Task
task
)
{
...
...
service/src/main/java/repositories/TeamsRepository.java
View file @
de0d0c6f
...
...
@@ -34,7 +34,6 @@ public class TeamsRepository implements Repository {
}
//todo: move this to inteface!!!
public
List
<
Team
>
getAll
()
{
return
datastore
.
createQuery
(
Team
.
class
).
asList
();
}
...
...
service/src/main/java/repositories/UsersRepository.java
View file @
de0d0c6f
...
...
@@ -6,6 +6,7 @@ import org.mongodb.morphia.Datastore;
import
java.security.MessageDigest
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.List
;
import
java.util.Optional
;
/**
...
...
@@ -54,6 +55,11 @@ public class UsersRepository implements Repository {
return userOptional;*/
}
@Override
public
List
getAll
()
{
return
null
;
}
// public void get(UUID uuid) {
// }
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment