summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
e276ad3)
Issue-ID: PORTAL-865
Change-Id: Ic7cbaa4fadb34147184d2ba599a22ebe4d7ac9ac
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@ApiOperation(
value = "Accepts messages from external ticketing systems and creates notifications for Portal users.",
response = PortalRestResponse.class)
@ApiOperation(
value = "Accepts messages from external ticketing systems and creates notifications for Portal users.",
response = PortalRestResponse.class)
- @RequestMapping(value = { "/ticketevent" }, method = RequestMethod.POST)
+ @PostMapping(value = { "/ticketevent" })
public PortalRestResponse<String> handleRequest(HttpServletRequest request, HttpServletResponse response,
@RequestBody String ticketEventJson) throws Exception {
public PortalRestResponse<String> handleRequest(HttpServletRequest request, HttpServletResponse response,
@RequestBody String ticketEventJson) throws Exception {
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
*
* @return PortalRestResponse of EPUser
*/
*
* @return PortalRestResponse of EPUser
*/
- @RequestMapping(value = { "/portalApi/loggedinUser" }, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = { "/portalApi/loggedinUser" }, produces = "application/json")
public PortalRestResponse<ProfileDetail> getLoggedinUser(HttpServletRequest request) {
PortalRestResponse<ProfileDetail> portalRestResponse = null;
try {
public PortalRestResponse<ProfileDetail> getLoggedinUser(HttpServletRequest request) {
PortalRestResponse<ProfileDetail> portalRestResponse = null;
try {
* Body with user information
* @return PortalRestResponse of String
*/
* Body with user information
* @return PortalRestResponse of String
*/
- @RequestMapping(value = {
- "/portalApi/modifyLoggedinUser" }, method = RequestMethod.PUT, produces = "application/json")
+ @PutMapping(value = {
+ "/portalApi/modifyLoggedinUser" }, produces = "application/json")
public PortalRestResponse<String> modifyLoggedinUser(HttpServletRequest request,
@RequestBody ProfileDetail profileDetail) {
PortalRestResponse<String> portalRestResponse = null;
public PortalRestResponse<String> modifyLoggedinUser(HttpServletRequest request,
@RequestBody ProfileDetail profileDetail) {
PortalRestResponse<String> portalRestResponse = null;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.onap.portalapp.controller.EPRestrictedBaseController;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.onap.portalapp.controller.EPRestrictedBaseController;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
* @param response HttpServletResponse
* @return array of found users as json
*/
* @param response HttpServletResponse
* @return array of found users as json
*/
- @RequestMapping(value = { "/portalApi/queryUsers" }, method = RequestMethod.GET, produces = "application/json")
+ @GetMapping(value = { "/portalApi/queryUsers" }, produces = "application/json")
public String getPhoneBookSearchResult(HttpServletRequest request, @RequestParam("search") String searchString,
HttpServletResponse response) {
EPUser user = EPUserUtils.getUserSession(request);
public String getPhoneBookSearchResult(HttpServletRequest request, @RequestParam("search") String searchString,
HttpServletResponse response) {
EPUser user = EPUserUtils.getUserSession(request);
* @param response HttpServletResponse
* @return for GET: array of all applications with boolean isAdmin=true/false for each application
*/
* @param response HttpServletResponse
* @return for GET: array of all applications with boolean isAdmin=true/false for each application
*/
- @RequestMapping(value = { "/portalApi/adminAppsRoles" }, method = {
- RequestMethod.GET }, produces = "application/json")
+ @GetMapping(value = { "/portalApi/adminAppsRoles" }, produces = "application/json")
public AppsListWithAdminRole getAppsWithAdminRoleStateForUser(HttpServletRequest request,
@RequestParam("user") String orgUserId, HttpServletResponse response) {
public AppsListWithAdminRole getAppsWithAdminRoleStateForUser(HttpServletRequest request,
@RequestParam("user") String orgUserId, HttpServletResponse response) {
* @param response HttpServletResponse
* @return FieldsValidator
*/
* @param response HttpServletResponse
* @return FieldsValidator
*/
- @RequestMapping(value = { "/portalApi/adminAppsRoles" }, method = {
- RequestMethod.PUT }, produces = "application/json")
+ @PutMapping(value = { "/portalApi/adminAppsRoles" }, produces = "application/json")
public FieldsValidator putAppsWithAdminRoleStateForUser(HttpServletRequest request,
@RequestBody AppsListWithAdminRole newAppsListWithAdminRoles, HttpServletResponse response) {
public FieldsValidator putAppsWithAdminRoleStateForUser(HttpServletRequest request,
@RequestBody AppsListWithAdminRole newAppsListWithAdminRoles, HttpServletResponse response) {
* @param extRequestValue set to false if request is from users page otherwise true
* @return List<RoleInAppForUser>
*/
* @param extRequestValue set to false if request is from users page otherwise true
* @return List<RoleInAppForUser>
*/
- @RequestMapping(value = { "/portalApi/userAppRoles" }, method = {
- RequestMethod.GET }, produces = "application/json")
+ @GetMapping(value = { "/portalApi/userAppRoles" }, produces = "application/json")
public List<RoleInAppForUser> getAppRolesForUser(HttpServletRequest request, @RequestParam("user") String orgUserId,
@RequestParam("app") Long appid, @RequestParam("externalRequest") Boolean extRequestValue,
@RequestParam("isSystemUser") Boolean isSystemUser,
public List<RoleInAppForUser> getAppRolesForUser(HttpServletRequest request, @RequestParam("user") String orgUserId,
@RequestParam("app") Long appid, @RequestParam("externalRequest") Boolean extRequestValue,
@RequestParam("isSystemUser") Boolean isSystemUser,
- @RequestMapping(value = { "/portalApi/userAppRoles" }, method = {
- RequestMethod.PUT }, produces = "application/json")
+ @PutMapping(value = { "/portalApi/userAppRoles" }, produces = "application/json")
public PortalRestResponse<String> putAppWithUserRoleStateForUser(HttpServletRequest request,
@RequestBody AppWithRolesForUser newAppRolesForUser, HttpServletResponse response) {
// FieldsValidator fieldsValidator = new FieldsValidator();
public PortalRestResponse<String> putAppWithUserRoleStateForUser(HttpServletRequest request,
@RequestBody AppWithRolesForUser newAppRolesForUser, HttpServletResponse response) {
// FieldsValidator fieldsValidator = new FieldsValidator();
- @RequestMapping(value = { "/portalApi/updateRemoteUserProfile" }, method = {
- RequestMethod.GET }, produces = "application/json")
+ @GetMapping(value = { "/portalApi/updateRemoteUserProfile" }, produces = "application/json")
public PortalRestResponse<String> updateRemoteUserProfile(HttpServletRequest request,
HttpServletResponse response) {
public PortalRestResponse<String> updateRemoteUserProfile(HttpServletRequest request,
HttpServletResponse response) {
- @RequestMapping(value = { "/portalApi/app/{appId}/users" }, method = {
- RequestMethod.GET }, produces = "application/json")
+ @GetMapping(value = { "/portalApi/app/{appId}/users" }, produces = "application/json")
public List<UserApplicationRoles> getUsersFromAppEndpoint(HttpServletRequest request,
@PathVariable("appId") Long appId) throws HTTPException {
try {
public List<UserApplicationRoles> getUsersFromAppEndpoint(HttpServletRequest request,
@PathVariable("appId") Long appId) throws HTTPException {
try {
- @RequestMapping(value = { "/portalApi/app/{appId}/roles" }, method = {
- RequestMethod.GET }, produces = "application/json")
+ @GetMapping(value = { "/portalApi/app/{appId}/roles" }, produces = "application/json")
public List<EcompRole> testGetRoles(HttpServletRequest request, @PathVariable("appId") Long appId)
throws HTTPException {
EcompRole[] appRoles = applicationsRestClientService.get(EcompRole[].class, appId, "/roles");
public List<EcompRole> testGetRoles(HttpServletRequest request, @PathVariable("appId") Long appId)
throws HTTPException {
EcompRole[] appRoles = applicationsRestClientService.get(EcompRole[].class, appId, "/roles");
- @RequestMapping(value = { "/portalApi/admin/import/app/{appId}/roles" }, method = {
- RequestMethod.GET }, produces = "application/json")
+ @GetMapping(value = { "/portalApi/admin/import/app/{appId}/roles" }, produces = "application/json")
public List<EPRole> importRolesFromRemoteApplication(HttpServletRequest request, @PathVariable("appId") Long appId)
throws HTTPException {
List<EPRole> rolesList = userRolesService.importRolesFromRemoteApplication(appId);
public List<EPRole> importRolesFromRemoteApplication(HttpServletRequest request, @PathVariable("appId") Long appId)
throws HTTPException {
List<EPRole> rolesList = userRolesService.importRolesFromRemoteApplication(appId);
- @RequestMapping(value = { "/portalApi/app/{appId}/user/{orgUserId}/roles" }, method = {
- RequestMethod.GET }, produces = "application/json")
+ @GetMapping(value = { "/portalApi/app/{appId}/user/{orgUserId}/roles" }, produces = "application/json")
public EcompRole testGetRoles(HttpServletRequest request, @PathVariable("appId") Long appId,
@PathVariable("orgUserId") String orgUserId) throws Exception {
if (!EcompPortalUtils.legitimateUserId(orgUserId)) {
public EcompRole testGetRoles(HttpServletRequest request, @PathVariable("appId") Long appId,
@PathVariable("orgUserId") String orgUserId) throws Exception {
if (!EcompPortalUtils.legitimateUserId(orgUserId)) {
- @RequestMapping(value = { "/portalApi/saveUserAppRoles" }, method = {
- RequestMethod.PUT }, produces = "application/json")
+ @PutMapping(value = { "/portalApi/saveUserAppRoles" }, produces = "application/json")
public FieldsValidator putAppWithUserRoleRequest(HttpServletRequest request,
@RequestBody AppWithRolesForUser newAppRolesForUser, HttpServletResponse response) {
FieldsValidator fieldsValidator = null;
public FieldsValidator putAppWithUserRoleRequest(HttpServletRequest request,
@RequestBody AppWithRolesForUser newAppRolesForUser, HttpServletResponse response) {
FieldsValidator fieldsValidator = null;
return fieldsValidator;
}
return fieldsValidator;
}
- @RequestMapping(value = { "/portalApi/appCatalogRoles" }, method = {
- RequestMethod.GET }, produces = "application/json")
+ @GetMapping(value = { "/portalApi/appCatalogRoles" }, produces = "application/json")
public List<EPUserAppCatalogRoles> getUserAppCatalogRoles(HttpServletRequest request,
@RequestParam("appName") String appName) {
EPUser user = EPUserUtils.getUserSession(request);
public List<EPUserAppCatalogRoles> getUserAppCatalogRoles(HttpServletRequest request,
@RequestParam("appName") String appName) {
EPUser user = EPUserUtils.getUserSession(request);
- @RequestMapping(value = "/portalApi/externalRequestAccessSystem", method = RequestMethod.GET,
+ @GetMapping(value = "/portalApi/externalRequestAccessSystem",
produces = "application/json")
public ExternalSystemAccess readExternalRequestAccess(HttpServletRequest request) {
ExternalSystemAccess result = null;
produces = "application/json")
public ExternalSystemAccess readExternalRequestAccess(HttpServletRequest request) {
ExternalSystemAccess result = null;
- @RequestMapping(value = { "/portalApi/checkIfUserIsSuperAdmin" }, method = RequestMethod.GET,
- produces = "application/json")
+ @GetMapping(value = { "/portalApi/checkIfUserIsSuperAdmin" }, produces = "application/json")
public boolean checkIfUserIsSuperAdmin(HttpServletRequest request,
HttpServletResponse response) {
EPUser user = EPUserUtils.getUserSession(request);
public boolean checkIfUserIsSuperAdmin(HttpServletRequest request,
HttpServletResponse response) {
EPUser user = EPUserUtils.getUserSession(request);
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.AsyncRestTemplate;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.AsyncRestTemplate;