Revision 54970
Added by Michele Artini about 5 years ago
DatasourceManagerController.java | ||
---|---|---|
4 | 4 |
import java.util.List; |
5 | 5 |
import java.util.Map; |
6 | 6 |
|
7 |
import org.apache.commons.lang3.StringUtils; |
|
7 | 8 |
import org.springframework.beans.factory.annotation.Autowired; |
8 | 9 |
import org.springframework.web.bind.annotation.PathVariable; |
9 | 10 |
import org.springframework.web.bind.annotation.RequestBody; |
... | ... | |
67 | 68 |
@RequestMapping(value = "api/compliance", method = RequestMethod.GET) |
68 | 69 |
public boolean updateLevelOfCompliance(@RequestParam final String dsId, |
69 | 70 |
@RequestParam final String ifaceId, |
70 |
@RequestParam final String level, |
|
71 |
@RequestParam(required = false, defaultValue = "") final String level,
|
|
71 | 72 |
@RequestParam(required = false, defaultValue = "false") final boolean override) throws DatasourceManagerServiceException { |
72 |
return core.updateLevelOfCompliance(dsId, ifaceId, level, override); |
|
73 |
|
|
74 |
if (override && StringUtils.isBlank(level)) { |
|
75 |
return core.resetLevelOfCompliance(dsId, ifaceId); |
|
76 |
} else { |
|
77 |
return core.updateLevelOfCompliance(dsId, ifaceId, level, override); |
|
78 |
} |
|
73 | 79 |
} |
74 | 80 |
|
75 | 81 |
@RequestMapping(value = "api/baseUrl", method = RequestMethod.GET) |
Also available in: Unified diff