Class JKMatureServiceClient<T>

java.lang.Object
com.jk.services.client.JKServiceClient<T>
com.jk.services.client.JKMatureServiceClient<T>
Type Parameters:
T - Specifies the type of model that the service deals with.
Direct Known Subclasses:
JKWorkflowServiceClient

public abstract class JKMatureServiceClient<T> extends JKServiceClient<T>
This class extends JKServiceClient and provides common functionality for interacting with mature services.
Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Constructor Details

    • JKMatureServiceClient

      public JKMatureServiceClient()
  • Method Details

    • getServiceUrlPropertyName

      public String getServiceUrlPropertyName()
      This method is yet to be implemented (TBI).
      Overrides:
      getServiceUrlPropertyName in class JKServiceClient<T>
      Returns:
      null.
    • getBase

      public String getBase()
      This method gets the base URL used for making service calls.
      Overrides:
      getBase in class JKServiceClient<T>
      Returns:
      the base URL for service calls.
    • setBase

      public void setBase(String base)
      This method sets the base URL for the service to the provided value.
      Overrides:
      setBase in class JKServiceClient<T>
      Parameters:
      base - Specifies the new base URL for the service to the provided value.
    • getAll

      public List<T> getAll()
      This method retrieves a list of objects from the service.
      Returns:
      a list of objects obtained from the service response.
    • find

      public T find(String id)
      This method finds an object by its ID in the service.
      Parameters:
      id - Specifies the ID of the object to find.
      Returns:
      the object found in the service.
    • insert

      public T insert(T model)
      This method inserts an object into the service.
      Parameters:
      model - Specifies the model object to insert.
      Returns:
      the inserted object obtained from the service response.
    • update

      public String update(T model)
      This method updates an object in the service.
      Parameters:
      model - Specifies the model object to update.
      Returns:
      the response from the service indicating the update status.
    • delete

      public String delete(Object id)
      This method deletes an object from the service by its ID.
      Parameters:
      id - Specifies the ID of the object to delete.
      Returns:
      the response from the service indicating the delete status
    • getId

      protected String getId(T model)
      This method retrieves the ID of a model object.
      Parameters:
      model - Specifies the model object from which to extract the ID.
      Returns:
      the ID of a model object.