Class Prototype

java.lang.Object
org.apache.sling.feature.Prototype
All Implemented Interfaces:
Serializable, Comparable<Prototype>

public class Prototype extends Object implements Comparable<Prototype>, Serializable
A prototype is a blueprint of a feature with optional removals of
  • Configurations / configuration properties
  • Bundles
  • Framework properties
  • Extensions or artifacts from extensions
  • Capabilities
  • Requirements
This class is not thread-safe.
See Also:
  • Constructor Details

  • Method Details

    • getId

      public ArtifactId getId()
      Get the id of the artifact.
      Returns:
      The id.
    • getConfigurationRemovals

      public List<String> getConfigurationRemovals()
      Get the list of configuration removals The returned object is modifiable.
      Returns:
      List of PIDs.
    • getBundleRemovals

      public List<ArtifactId> getBundleRemovals()
      Get the list of artifact removals The returned object is modifiable.
      Returns:
      List of artifact ids.
    • getFrameworkPropertiesRemovals

      public List<String> getFrameworkPropertiesRemovals()
      Get the list of framework property removals The returned object is modifiable.
      Returns:
      List of property names
    • getExtensionRemovals

      public List<String> getExtensionRemovals()
      Get the list of extension removals The returned object is modifiable.
      Returns:
      List of extension names
    • getArtifactExtensionRemovals

      public Map<String,List<ArtifactId>> getArtifactExtensionRemovals()
      Get the list of artifacts removed from extensions The returned object is modifiable.
      Returns:
      Map where the extension name is the key, and the value is a list of artifact ids
    • getRequirementRemovals

      public List<MatchingRequirement> getRequirementRemovals()
      Get the list of requirement removals. The returned object is modifiable.
      Returns:
      The list of requirements
      Since:
      1.3
    • getCapabilityRemovals

      public List<org.osgi.resource.Capability> getCapabilityRemovals()
      Get the list of capability removals. The returned object is modifiable.
      Returns:
      The list of capabilities
    • compareTo

      public int compareTo(Prototype o)
      Specified by:
      compareTo in interface Comparable<Prototype>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object