Class ServiceCapability<T>

java.lang.Object
io.spring.initializr.metadata.ServiceCapability<T>
Type Parameters:
T - the content type
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
DependenciesCapability, SingleSelectCapability, TextCapability, TypeCapability

public abstract class ServiceCapability<T> extends Object implements Cloneable
Defines a capability of the initializr service. Each capability is defined by a id and a type.
Author:
Stephane Nicoll
  • Constructor Details

  • Method Details

    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getId

      public String getId()
    • getType

      public ServiceCapabilityType getType()
    • getContent

      public abstract T getContent()
      Return the "content" of this capability. The structure of the content vastly depends on the type of the capability.
      Returns:
      the content
    • merge

      public abstract void merge(T otherContent)
      Merge the content of this instance with the specified content.
      Parameters:
      otherContent - the content to merge
      See Also:
    • merge

      public void merge(ServiceCapability<T> other)
      Merge this capability with the specified argument. The service capabilities should match (i.e have the same id and type). Sub-classes may merge additional content.
      Parameters:
      other - the content to merge