Class Associations
java.lang.Object
org.wso2.carbon.registry.rest.api.RegistryRestSuper
org.wso2.carbon.registry.rest.api.PaginationCalculation<org.wso2.carbon.registry.core.Association>
org.wso2.carbon.registry.rest.api.Associations
@Path("/associations")
public class Associations
extends PaginationCalculation<org.wso2.carbon.registry.core.Association>
his class is to handle the associations related REST verb GET.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponseaddAssociations(String sourcePath, AssociationModel[] association, String JWTToken) This method add the array of association sent as payload with the request for the given sourcejavax.ws.rs.core.ResponsegetAssociations(String sourcePath, String type, int start, int size, String JWTToken) This method takes the following parameters:protected javax.ws.rs.core.ResponsegetPaginatedResults(org.wso2.carbon.registry.core.Association[] associations, int start, int size, String sortBy, String sortOrder) Methods inherited from class org.wso2.carbon.registry.rest.api.RegistryRestSuper
getBegin, getEnd, getPageSize, getResourcePath, getTenantID, getUserRegistry, getUserRegistry, setBegin, setEnd, setPageSize, setUserRegistry
-
Constructor Details
-
Associations
public Associations()
-
-
Method Details
-
addAssociations
public javax.ws.rs.core.Response addAssociations(String sourcePath, AssociationModel[] association, @HeaderParam("X-JWT-Assertion") String JWTToken) This method add the array of association sent as payload with the request for the given source- Parameters:
sourcePath- - Path of the source resource which is going to add the associations.association- - JSON array of association objects[{"target":"","type":" "}] - Returns:
- Response HTTP 204 No Content.
-
getAssociations
public javax.ws.rs.core.Response getAssociations(String sourcePath, String type, int start, int size, @HeaderParam("X-JWT-Assertion") String JWTToken) This method takes the following parameters:- Parameters:
sourcePath- - Path of the resource,type- - - Type of association,start- - - Start page number,size- - - Number of records to be retrieved- Returns:
- Response the array of AssociationModel. HTTP 200 OK.
-
getPaginatedResults
protected javax.ws.rs.core.Response getPaginatedResults(org.wso2.carbon.registry.core.Association[] associations, int start, int size, String sortBy, String sortOrder) - Specified by:
getPaginatedResultsin classPaginationCalculation<org.wso2.carbon.registry.core.Association>
-