Class OutsidePlantRestController
- java.lang.Object
-
- org.neotropic.kuwaiba.northbound.rest.aem.OutsidePlantRestController
-
- All Implemented Interfaces:
OutsidePlantRestOpenApi
@RestController @RequestMapping("/v2.1.1/osp-manager/") public class OutsidePlantRestController extends Object implements OutsidePlantRestOpenApi
Outside Plant Rest Controller.- Author:
- Mauricio Ruiz Beltrán <mauricio.ruiz@kuwaiba.org>
-
-
Constructor Summary
Constructors Constructor Description OutsidePlantRestController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
createOSPView(String name, String description, String structure, String sessionId)
Creates an Outside Plant View.void
deleteOSPView(long id, String sessionId)
Deletes an existing OSP view.ViewObject
getOSPView(long id, String sessionId)
Retrieves the specific information about an existing OSP view.List<ViewObjectLight>
getOSPViews(String sessionId)
Retrieves the existing OSP views.void
updateOSPView(long id, String name, String description, String structure, String sessionId)
Updates an existing OSP view.
-
-
-
Field Detail
-
PATH
public static final String PATH
Path that includes the Kuwaiba version and the module id- See Also:
- Constant Field Values
-
-
Method Detail
-
createOSPView
@RequestMapping(method=POST, value="createOSPView/{name}/{description}/{structure}/{sessionId}", produces="application/json") public long createOSPView(@PathVariable("name") String name, @PathVariable("description") String description, @PathVariable("structure") String structure, @PathVariable("sessionId") String sessionId)
Creates an Outside Plant View.- Specified by:
createOSPView
in interfaceOutsidePlantRestOpenApi
- Parameters:
name
- The name of the new view.description
- The description of the new view.structure
- The structure of the view as string Base64, from the XML document with the contents of the view. The format of the XML document is consistent with the other views:<view version=""> <class>OSPView</class> <center lon="" lat=""></center> <zoom>0</zoom> <nodes> <node lon="" lat="" class="businessObjectClass">businessObjectId</node> </nodes> <edges> <edge id="" class="" asideid="" asideclass="" bsideid="" bsideclass=""> <controlpoint lon="" lat=""></controlpoint> </edge> </edges> </view>
sessionId
- The session token id.- Returns:
- The id of the newly created view.
-
getOSPView
@RequestMapping(method=GET, value="getOSPView/{id}/{sessionId}", produces="application/json") public ViewObject getOSPView(@PathVariable("id") long id, @PathVariable("sessionId") String sessionId)
Retrieves the specific information about an existing OSP view.- Specified by:
getOSPView
in interfaceOutsidePlantRestOpenApi
- Parameters:
id
- The id of the view.sessionId
- The session token id.- Returns:
- An object containing the view details and structure.
-
getOSPViews
@RequestMapping(method=GET, value="getOSPViews/{sessionId}", produces="application/json") public List<ViewObjectLight> getOSPViews(@PathVariable("sessionId") String sessionId)
Retrieves the existing OSP views.- Specified by:
getOSPViews
in interfaceOutsidePlantRestOpenApi
- Parameters:
sessionId
- The session token id.- Returns:
- The list of existing OSP views.
-
updateOSPView
@RequestMapping(method=PUT, value="updateOSPView/{id}/{name}/{description}/{structure}/{sessionId}", produces="application/json") public void updateOSPView(@PathVariable("id") long id, @PathVariable("name") String name, @PathVariable("description") String description, @PathVariable("structure") String structure, @PathVariable("sessionId") String sessionId)
Updates an existing OSP view.- Specified by:
updateOSPView
in interfaceOutsidePlantRestOpenApi
- Parameters:
id
- The id of the view.name
- The new name of the view. Null if to remain unchanged.description
- The new description of the view. Null if to remain unchanged.structure
- The structure of the view as string Base64, from the XML document with the contents of the view. The format of the XML document is consistent with the other views:<view version=""> <class>OSPView</class> <center lon="" lat=""></center> <zoom>0</zoom> <nodes> <node lon="" lat="" class="businessObjectClass">businessObjectId</node> </nodes> <edges> <edge id="" class="" asideid="" asideclass="" bsideid="" bsideclass=""> <controlpoint lon="" lat=""></controlpoint> </edge> </edges> </view>
sessionId
- The session token id.
-
deleteOSPView
@RequestMapping(method=DELETE, value="deleteOSPView/{id}/{sessionId}", produces="application/json") public void deleteOSPView(@PathVariable("id") long id, @PathVariable("sessionId") String sessionId)
Deletes an existing OSP view.- Specified by:
deleteOSPView
in interfaceOutsidePlantRestOpenApi
- Parameters:
id
- The id of the view to be deleted.sessionId
- The session token id.
-
-