Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
adapt
ace
Commits
71de277c
Commit
71de277c
authored
Mar 09, 2017
by
Michael Ritter
Browse files
Basic models for the Compare api controller
parent
34f9c264
Changes
3
Hide whitespace changes
Inline
Side-by-side
ace-am/src/main/java/edu/umiacs/ace/rest/models/CompareFile.java
0 → 100644
View file @
71de277c
package
edu.umiacs.ace.rest.models
;
/**
* Individual item in a Compare Request
*
* Created by shake on 3/9/17.
*/
public
class
CompareFile
{
private
String
path
;
private
String
digest
;
public
String
getPath
()
{
return
path
;
}
public
String
getDigest
()
{
return
digest
;
}
public
CompareFile
setPath
(
String
path
)
{
this
.
path
=
path
;
return
this
;
}
public
CompareFile
setDigest
(
String
digest
)
{
this
.
digest
=
digest
;
return
this
;
}
}
ace-am/src/main/java/edu/umiacs/ace/rest/models/CompareRequest.java
0 → 100644
View file @
71de277c
package
edu.umiacs.ace.rest.models
;
import
edu.umiacs.ace.rest.CompareController
;
import
java.util.List
;
/**
* The request body sent to the {@link CompareController}
*
* Created by shake on 3/9/17.
*/
public
class
CompareRequest
{
private
List
<
CompareFile
>
comparisons
;
public
List
<
CompareFile
>
getComparisons
()
{
return
comparisons
;
}
public
CompareRequest
setComparisons
(
List
<
CompareFile
>
comparisons
)
{
this
.
comparisons
=
comparisons
;
return
this
;
}
}
ace-am/src/main/java/edu/umiacs/ace/rest/models/CompareResponse.java
0 → 100644
View file @
71de277c
package
edu.umiacs.ace.rest.models
;
import
edu.umiacs.ace.rest.CompareController
;
import
java.util.HashSet
;
import
java.util.Set
;
/**
* Response object returned by the {@link CompareController}
*
* Created by shake on 3/9/17.
*/
public
class
CompareResponse
{
private
Set
<
String
>
diff
;
private
Set
<
String
>
match
;
private
Set
<
String
>
notFound
;
public
CompareResponse
()
{
this
.
diff
=
new
HashSet
<>();
this
.
match
=
new
HashSet
<>();
this
.
notFound
=
new
HashSet
<>();
}
public
CompareResponse
addDiff
(
String
path
)
{
diff
.
add
(
path
);
return
this
;
}
public
Set
<
String
>
getDiff
()
{
return
diff
;
}
public
CompareResponse
setDiff
(
Set
<
String
>
diff
)
{
this
.
diff
=
diff
;
return
this
;
}
public
CompareResponse
addMatch
(
String
path
)
{
match
.
add
(
path
);
return
this
;
}
public
Set
<
String
>
getMatch
()
{
return
match
;
}
public
CompareResponse
setMatch
(
Set
<
String
>
match
)
{
this
.
match
=
match
;
return
this
;
}
public
CompareResponse
addNotFound
(
String
path
)
{
notFound
.
add
(
path
);
return
this
;
}
public
Set
<
String
>
getNotFound
()
{
return
notFound
;
}
public
CompareResponse
setNotFound
(
Set
<
String
>
notFound
)
{
this
.
notFound
=
notFound
;
return
this
;
}
}
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