Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Labrador
AuTA
Core
Commits
a5c3977b
Verified
Commit
a5c3977b
authored
Aug 23, 2022
by
Luc Everse
Browse files
Options
Downloads
Patches
Plain Diff
Attach Submit metadata to submissions
parent
4aa6eaaa
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!179
Release 2.5.0
,
!177
Submit integration
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/src/main/java/nl/tudelft/ewi/auta/core/model/SubmitAppMetadata.java
+184
-0
184 additions, 0 deletions
...ava/nl/tudelft/ewi/auta/core/model/SubmitAppMetadata.java
with
184 additions
and
0 deletions
core/src/main/java/nl/tudelft/ewi/auta/core/model/SubmitAppMetadata.java
0 → 100644
+
184
−
0
View file @
a5c3977b
package
nl.tudelft.ewi.auta.core.model
;
import
java.util.Objects
;
/**
* Submission metadata as supplied by Submit.
*/
public
class
SubmitAppMetadata
{
/**
* Submit's submission ID.
*/
private
long
submissionId
;
/**
* Submit's script ID for the script that called AuTA.
*/
private
long
scriptId
;
/**
* The key to authenticate with when returning feedback.
*/
private
String
key
;
/**
* The grade scheme to use.
*
* This is one of the values listed in the "Allowed scores" table on
* https://gitlab.ewi.tudelft.nl/eip/labrador/submit/-/blob/8344af40/docs/ScriptApi.md
* For future extensibility, any value is accepted here.
*/
private
String
gradeScheme
;
/**
* The URL to post feedback to.
*/
private
String
url
;
/**
* Creates a new Submit metadata object.
*
* The members are initialized to (likely) invalid values. IDs are -1 and the key and grade
* scheme are empty strings.
*/
public
SubmitAppMetadata
()
{
this
.
submissionId
=
-
1
;
this
.
scriptId
=
-
1
;
this
.
key
=
""
;
this
.
gradeScheme
=
""
;
this
.
url
=
""
;
}
/**
* Creates a new Submit metadata object.
*
* @param submissionId the Submit submission ID
* @param scriptId the ID of the script calling AuTA
* @param key the key to authenticate with when uploading feedback
* @param gradeScheme the grade scheme to use
* @param url the URL to send feedback to
*/
public
SubmitAppMetadata
(
final
long
submissionId
,
final
long
scriptId
,
final
String
key
,
final
String
gradeScheme
,
final
String
url
)
{
this
.
submissionId
=
submissionId
;
this
.
scriptId
=
scriptId
;
this
.
key
=
key
;
this
.
gradeScheme
=
gradeScheme
;
this
.
url
=
url
;
}
/**
* Returns the Submit submission ID.
*
* @return the submission ID
*/
public
long
getSubmissionId
()
{
return
this
.
submissionId
;
}
/**
* Sets the Submit submission ID.
*
* @param submissionId the submission ID
*/
public
void
setSubmissionId
(
final
long
submissionId
)
{
this
.
submissionId
=
submissionId
;
}
/**
* Returns the ID of the script that called AuTA.
*
* @return the script ID
*/
public
long
getScriptId
()
{
return
this
.
scriptId
;
}
/**
* Sets the ID of the script that called AuTA.
*
* @param scriptId the script ID
*/
public
void
setScriptId
(
final
long
scriptId
)
{
this
.
scriptId
=
scriptId
;
}
/**
* Returns the key to authenticate with when returning feedback.
*
* @return the authentication key
*/
public
String
getKey
()
{
return
this
.
key
;
}
/**
* Sets the key to authenticate with when returning feedback.
*
* @param key the authentication key
*/
public
void
setKey
(
final
String
key
)
{
this
.
key
=
key
;
}
/**
* Returns the grade scheme to use.
*
* @return the grade scheme
*/
public
String
getGradeScheme
()
{
return
this
.
gradeScheme
;
}
/**
* Sets the grade scheme to use.
*
* @param gradeScheme the grade scheme
*/
public
void
setGradeScheme
(
final
String
gradeScheme
)
{
this
.
gradeScheme
=
gradeScheme
;
}
/**
* Returns the URL to send feedback to.
*
* @return the URL
*/
public
String
getUrl
()
{
return
this
.
url
;
}
/**
* Sets the URL to send feedback to.
*
* @param url the URL
*/
public
void
setUrl
(
final
String
url
)
{
this
.
url
=
url
;
}
@Override
public
boolean
equals
(
final
Object
obj
)
{
if
(!(
obj
instanceof
SubmitAppMetadata
))
{
return
false
;
}
final
var
other
=
(
SubmitAppMetadata
)
obj
;
return
this
.
submissionId
==
other
.
submissionId
&&
this
.
scriptId
==
other
.
scriptId
&&
Objects
.
equals
(
this
.
key
,
other
.
key
)
&&
Objects
.
equals
(
this
.
gradeScheme
,
other
.
gradeScheme
)
&&
Objects
.
equals
(
this
.
url
,
other
.
url
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
this
.
submissionId
,
this
.
scriptId
,
this
.
key
,
this
.
gradeScheme
,
this
.
url
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment