public class AlgorithmController
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor and Description |
|---|
AlgorithmController()
constructor
|
| Modifier and Type | Method and Description |
|---|---|
DTO |
addNewAlgorithm(java.security.Principal principal,
NewAlgorithmRequest algorithmRequest)
Register new algorithm
|
DTO |
algorithm(java.lang.Long aId)
Display information for a specific algorithm
|
java.util.List<DTO> |
algorithms(java.util.Optional<java.lang.Integer> page)
Display a list of approved algorithm entities
|
void |
close()
Is never trowed, otherwise the client would get a 500 instead of the actual processed response
|
DTO |
deleteAlgorithm(java.lang.Long aId)
Deletes algorithm instance
|
DTO |
deleteProvider(java.lang.Long aId,
java.lang.Long pId,
java.security.Principal userPrincipal)
Deletes a algorithm provider.
|
DTO |
registerNewAlgorithmProvider(java.lang.Long aId,
NewAlgorithmProvider algorithmProviderRequest,
java.security.Principal principal)
Register new algorithm provider
|
DTO |
runAlgorithmImplementation(java.lang.Long aId,
java.lang.Long ag,
NewAlgorithmRunRequest request) |
DTO |
updateAlgorithm(java.security.Principal userPrincipal,
java.lang.Long aId,
UpdateAlgorithmRequest request)
Update algorithm instance
|
DTO |
updateEntityApproval(java.lang.Long aId,
ApprovalRequest request)
Updates algorithm approval
|
DTO |
updateProvider(java.security.Principal userPrincipal,
java.lang.Long aId,
java.lang.Long pId,
UpdateAlgorithmProvider request) |
public java.util.List<DTO> algorithms(java.util.Optional<java.lang.Integer> page)
page - Page used for paginate algorithmAlgorithmDTOpublic DTO updateAlgorithm(java.security.Principal userPrincipal, java.lang.Long aId, UpdateAlgorithmRequest request)
userPrincipal - See PrincipalaId - Algorithm Idrequest - See UpdateAlgorithmRequestAlgorithmDTOEntityNotFoundExceptionpublic DTO updateEntityApproval(java.lang.Long aId, ApprovalRequest request)
aId - Algorithm Idrequest - See ApprovalRequestAlgorithmDTOEntityNotFoundExceptionpublic DTO deleteAlgorithm(java.lang.Long aId)
aId - Algorithm IdAlgorithmDTOEntityNotFoundExceptionpublic DTO addNewAlgorithm(java.security.Principal principal, NewAlgorithmRequest algorithmRequest)
algorithmRequest - New Algorithm RequestAlgorithmProviderDTOpublic DTO algorithm(java.lang.Long aId)
aId - Algorithm IDAlgorithmProviderDTOEntityNotFoundException - Algorithm ID does not exists in databasepublic DTO registerNewAlgorithmProvider(java.lang.Long aId, NewAlgorithmProvider algorithmProviderRequest, java.security.Principal principal)
aId - Algorithm IDalgorithmProviderRequest - Algorithm Provider Requestprincipal - DeviceAlgorithmProviderDTOEntityNotFoundException - Algorithm ID does not exists in databasepublic DTO deleteProvider(java.lang.Long aId, java.lang.Long pId, java.security.Principal userPrincipal)
aId - Algorithm IDpId - Algorithm Provider IDuserPrincipal - DeviceAlgorithmProviderDTOEntityNotFoundException - Algorithm Provider ID does not exists in databaseForbiddenEntityAccessException - Device is not owner of the entitypublic DTO updateProvider(java.security.Principal userPrincipal, java.lang.Long aId, java.lang.Long pId, UpdateAlgorithmProvider request)
userPrincipal - aId - pId - request - AlgorithmProviderDTOEntityNotFoundException - If entity is not present in persist layerForbiddenEntityAccessException - If requester is not the owner of the instancejava.lang.IllegalArgumentException - If the request not contain valid provider propertiespublic void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exception - It must never occurpublic DTO runAlgorithmImplementation(java.lang.Long aId, java.lang.Long ag, NewAlgorithmRunRequest request)