Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The URIs that don't have a parameter are used in service to service interactions passing JSON strings.  For each of these interactions, the simplest way to specify the contract is through a Java class.  For example the @POST /cu entry point has the following Java class

Code Block
languagejava
title@POST /cu entry point - contract
package com.celestial.dbbusinessobjects;

/**
 *
 * @author Selvyn
 */
public class User
{
    private String  userID;
    private String  userPwd;
    
    public  User()
    {}
    
    public  User( String userid, String pwd )
    {
        this.userID = userid;
        this.userPwd = pwd;
    }

    public String getUserID()
    {
        return userID;
    }

    public void setUserID(String itsUserID)
    {
        this.userID = itsUserID;
    }

    public String getUserPwd()
    {
        return userPwd;
    }

    public void setUserPwd(String itsUserPwd)
    {
        this.userPwd = itsUserPwd;
    }
    
    @Override
    public String toString()
    {
        return new StringBuffer("itsUserID:").append(this.userID)
                .append("itsUserPwd:").append(this.userPwd).toString();
    }
}