Class UnwrappedResult<T>

java.lang.Object
org.craftercms.studio.model.rest.Result
org.craftercms.studio.model.rest.content.UnwrappedResult<T>
Type Parameters:
T - the type of the result entity

public class UnwrappedResult<T> extends Result
Convenience generic decorator that unwraps (this means the result properties will be serialized as if they were properties of its containing object) the result entity. This is useful when the rest response should contain the same attributes as the service result, additional to the ApiResponse.
  • Constructor Details

    • UnwrappedResult

      public UnwrappedResult(T result)
  • Method Details

    • getResult

      public T getResult()
    • of

      public static <T> UnwrappedResult<T> of(T result)