/*
 * oxTrust is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
 *
 * Copyright (c) 2017, Gluu
 */
package org.gluu.oxtrust.api.saml;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

/**
 * WS endpoint for TrustRelationship actions.
 * 
 * @author Dmitry Ognyannikov
 */
@Path("/saml/tr")
public class TrustRelationshipWebService {
    //TODO
    
    public void read() {
        //TODO
    }
    
    public void create() {
        //TODO
    }
    
    public void update() {
        //TODO
    }
    
    public void delete() {
        //TODO
    }
    
    public void list() {
        //TODO
    }
    
    
}

@@ -226,10 +226,86 @@
 .rs.
-GE
+DELETE;%0Aimport javax.ws.rs.GET;%0Aimport javax.ws.rs.POST;%0Aimport javax.ws.rs.PU
 T;%0Ai
@@ -421,16 +421,63 @@
 diaType;
+%0Aimport org.gluu.oxtrust.util.OxTrustConstants;
 %0A%0A/**%0A *
@@ -643,54 +643,284 @@
     
-public void read() %7B%0A        //TODO%0A    %7D%0A    
+@GET%0A    @Path(%22/read/%7Binum%7D/%22)%0A    @Produces(MediaType.APPLICATION_JSON)%0A    public String read(@PathParam(%22inum%22) String inum) %7B%0A        String result = null;%0A        //TODO%0A        return result;%0A    %7D%0A    %0A    @POST%0A    @Path(%22/create%22)%0A    @Produces(MediaType.TEXT_PLAIN)
 %0A   
@@ -927,20 +927,22 @@
  public 
-void
+String
  create(
@@ -953,33 +953,156 @@
         
-//TODO%0A    %7D%0A    
+String inum = null;%0A        //TODO%0A        return inum;%0A    %7D%0A    %0A    @PUT%0A    @Path(%22/update/%7Binum%7D/%22)%0A    @Produces(MediaType.TEXT_PLAIN)
 %0A    pub
@@ -1109,20 +1109,22 @@
 lic 
-void
+String
  update(
 ) %7B%0A
@@ -1123,37 +1123,192 @@
 ate(
-) %7B%0A        //TODO%0A    %7D%0A    
+@PathParam(%22inum%22) String inum) %7B%0A        //TODO%0A        return OxTrustConstants.RESULT_SUCCESS;%0A    %7D%0A    %0A    @DELETE%0A    @Path(%22/delete/%7Binum%7D/%22)%0A    @Produces(MediaType.TEXT_PLAIN)
 %0A   
@@ -1319,20 +1319,22 @@
 lic 
-void
+String
  delete(
 ) %7B%0A
@@ -1333,37 +1333,186 @@
 ete(
-) %7B%0A        //TODO%0A    %7D%0A    
+@PathParam(%22inum%22) String inum) %7B%0A        //TODO%0A        return OxTrustConstants.RESULT_SUCCESS;%0A    %7D%0A    %0A    @GET%0A    @Path(%22/list/%22)%0A    @Produces(MediaType.APPLICATION_JSON)
 %0A   
@@ -1523,12 +1523,14 @@
 lic 
-void
+String
  lis
@@ -1539,30 +1539,79 @@
 ) %7B%0A        
-//TODO
+String list = null;%0A        //TODO%0A        return list;
 %0A    %7D%0A    %0A

Prepare working prototype which demonstrates oxTrust API #784