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 algorithmAlgorithmDTO
public DTO updateAlgorithm(java.security.Principal userPrincipal, java.lang.Long aId, UpdateAlgorithmRequest request)
userPrincipal
- See Principal
aId
- Algorithm Idrequest
- See UpdateAlgorithmRequest
AlgorithmDTO
EntityNotFoundException
public DTO updateEntityApproval(java.lang.Long aId, ApprovalRequest request)
aId
- Algorithm Idrequest
- See ApprovalRequest
AlgorithmDTO
EntityNotFoundException
public DTO deleteAlgorithm(java.lang.Long aId)
aId
- Algorithm IdAlgorithmDTO
EntityNotFoundException
public DTO addNewAlgorithm(java.security.Principal principal, NewAlgorithmRequest algorithmRequest)
algorithmRequest
- New Algorithm RequestAlgorithmProviderDTO
public DTO algorithm(java.lang.Long aId)
aId
- Algorithm IDAlgorithmProviderDTO
EntityNotFoundException
- 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
- DeviceAlgorithmProviderDTO
EntityNotFoundException
- 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
- DeviceAlgorithmProviderDTO
EntityNotFoundException
- 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
- AlgorithmProviderDTO
EntityNotFoundException
- 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.AutoCloseable
java.lang.Exception
- It must never occurpublic DTO runAlgorithmImplementation(java.lang.Long aId, java.lang.Long ag, NewAlgorithmRunRequest request)