Class AssociationResource
All the REST methods have return type ResponseEntity.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntitycreateAssociations(List<Association> associations) Creates the associations for the given list of association objects.org.springframework.http.ResponseEntitydeleteAssociations(Node.NodeType nodeType, String objectIds) Deletes all the associations of an object for the specified nodeType and objectIds.org.springframework.http.ResponseEntitydeleteAssociations(String associationIds) Deletes the associations with the specified list of associationIds.org.springframework.http.ResponseEntitygetAssociations(String associationIds, boolean fillInfo, int page, int per_page) Returns the list association objects for the specified list of associationIds.org.springframework.http.ResponseEntitygetAssociationsByObjectType(Node.NodeType nodeType, String objectIds, boolean fillInfo, int page, int per_page) Returns the list association objects for the specified nodeType and objectIds.org.springframework.http.ResponseEntityupdateAssociations(List<Association> associations) This function is used to update the fields(Extended Properties) for the list of associations.
-
Field Details
-
request
@Autowired public jakarta.servlet.http.HttpServletRequest request
-
-
Constructor Details
-
AssociationResource
public AssociationResource()
-
-
Method Details
-
createAssociations
@PostMapping(path="/associations", consumes={"application/json","application/xml"}, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity createAssociations(@RequestBody List<Association> associations) throws Exception Creates the associations for the given list of association objects. Specifying the sourceObjectId, sourceObjectTypeId, targetObjectId, targetObjectTypeId in each association object are mandatory, while creating the associations.- Parameters:
associations- String- Returns:
- Response
- Throws:
Exception-
Sample 'Associations' JSON :
[
{
"id": 0,
"sourceObjectId": 0,
"sourceObjectTypeId": 0,
"targetObjectId": 0,
"targetObjectTypeId": 0,
"qualifierObjectId": 0,
"qualifierObjectTypeId": 0,
"fields": {},
"relationship":{
"id": "",
"masterId": "",
"titleForward": "",
"titleReverse": "",
"description":"",
"definedBy": "SYSTEM",
"relationshipType": "FORWARD"
}
},
{
" id": 0,
"sourceObjectId": 0,
"sourceObjectTypeId": 0,
"targetObjectId": 0,
"targetObjectTypeId": 0,
"qualifierObjectId": 0,
"qualifierObjectTypeId": 0,
"fields": {},
"relationship":{
"id": "",
"masterId": "",
"titleForward": "",
"titleReverse": "",
"description":"",
"definedBy": "SYSTEM",
"relationshipType": "FORWARD"
}
}
]
*- Since:
- 14.0
-
updateAssociations
@PutMapping(path="/associations", consumes={"application/json","application/xml"}, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity updateAssociations(@RequestBody List<Association> associations) throws Exception This function is used to update the fields(Extended Properties) for the list of associations. Specifying the associationId in each association object is mandatory while updating the association.- Parameters:
associations- List- Returns:
- Response
- Throws:
Exception-
Sample 'Associations' JSON :
[
{
"id": 0,
"sourceObjectId": 0,
"sourceObjectTypeId": 0,
"targetObjectId": 0,
"targetObjectTypeId": 0,
"qualifierObjectId": 0,
"qualifierObjectTypeId": 0,
"fields": {},
"relationship":{
"id": "",
"masterId": "",
"titleForward": "",
"titleReverse": "",
"description":"",
"definedBy": "SYSTEM",
"relationshipType": "FORWARD"
}
},
{
" id": 0,
"sourceObjectId": 0,
"sourceObjectTypeId": 0,
"targetObjectId": 0,
"targetObjectTypeId": 0,
"qualifierObjectId": 0,
"qualifierObjectTypeId": 0,
"fields": {},
"relationship":{
"id": "",
"masterId": "",
"titleForward": "",
"titleReverse": "",
"description":"",
"definedBy": "SYSTEM",
"relationshipType": "FORWARD"
}
}
]- Since:
- 14.0
-
deleteAssociations
@DeleteMapping(path="/associations/ids", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity deleteAssociations(@RequestParam(name="associationIds") String associationIds) throws Exception Deletes the associations with the specified list of associationIds. Specifying the associationIds list is mandatory.
If the associations are deleted all its associated data will also be deleted.- Parameters:
associationIds- String- Returns:
- Response
- Throws:
Exception- Since:
- 14.0
-
deleteAssociations
@DeleteMapping(path="/associations", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity deleteAssociations(@RequestParam(name="nodeType") Node.NodeType nodeType, @RequestParam(name="objectIds") String objectIds) throws Exception Deletes all the associations of an object for the specified nodeType and objectIds. Specifying the nodeType and objectIds is mandatory.- Parameters:
nodeType- Node.NodeTypeobjectIds- String- Returns:
- Response
- Throws:
Exception- Since:
- 14.0
-
getAssociations
@GetMapping(path="/associations", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getAssociations(@RequestParam(name="associationIds") String associationIds, @RequestParam(name="fillInfo",required=false) boolean fillInfo, @RequestParam(name="page",defaultValue="1") int page, @RequestParam(name="per_page",defaultValue="25") int per_page) throws Exception Returns the list association objects for the specified list of associationIds. Specifying the list of associationIds is mandatory.
FillInfo takes the values as true or false. If fillInfo is true it returns the association object filled with source and target object details. If it is false it return only the association details.
It returns all the details like association name, description, auditHistory details etc..
Note: Pagination is applied, and by default, 25 records are displayed per page.- Parameters:
associationIds- StringfillInfo- booleanpage- intper_page- int- Returns:
- Response
- Throws:
Exception- Since:
- 14.0
-
getAssociationsByObjectType
@GetMapping(path="/associations/objectIds", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity getAssociationsByObjectType(@RequestParam(name="nodeType") Node.NodeType nodeType, @RequestParam(name="objectIds") String objectIds, @RequestParam(name="fillInfo",required=false) boolean fillInfo, @RequestParam(name="page",defaultValue="1") int page, @RequestParam(name="per_page",defaultValue="25") int per_page) throws Exception Returns the list association objects for the specified nodeType and objectIds. Specifying the nodeType and objectIds is mandatory.
FillInfo takes the values as true or false. If fillInfo is true it returns the association object filled with source and target object details. If it is false it return only the association details.
It returns all the details like association name, description, auditHistory details etc..
Note: Pagination is applied, and by default, 25 records are displayed per page.- Parameters:
nodeType- Node.NodeTypeobjectIds- StringfillInfo- booleanpage- intper_page- int- Returns:
- Response
- Throws:
Exception- Since:
- 14.0
-