org.apache.sling.provisioning.model

## Class ArtifactGroup

- java.lang.Object
- - org.apache.sling.provisioning.model.Traceable
  - - org.apache.sling.provisioning.model.Commentable
    - - org.apache.sling.provisioning.model.ItemList<Artifact>
      - - org.apache.sling.provisioning.model.ArtifactGroup

All Implemented Interfaces:
  Comparable<ArtifactGroup>, Iterable<Artifact>

    public class ArtifactGroup
    extends ItemList<Artifact>
    implements Comparable<ArtifactGroup>

A artifact group holds a set of artifacts. A valid start level is positive, start level 0 means the default OSGi start level.

### Field Summary

### Fields inherited from class org.apache.sling.provisioning.model.ItemList

`items`

### Constructor Summary

Constructors
Constructor and Description
`ArtifactGroup(int startLevel)` Create a new artifact group with the level.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `add(Artifact item)` Add a new item
`int` `compareTo(ArtifactGroup o)`
`int` `getStartLevel()` Get the start level.
`Artifact` `search(Artifact template)` Search an artifact with the same groupId, artifactId, type and classifier.
`String` `toString()`

### Methods inherited from class org.apache.sling.provisioning.model.ItemList

`isEmpty, iterator, remove`

### Methods inherited from class org.apache.sling.provisioning.model.Commentable

`getComment, setComment`

### Methods inherited from class org.apache.sling.provisioning.model.Traceable

`getLocation, setLocation`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Constructor Detail

#### ArtifactGroup

    public ArtifactGroup(int startLevel)

Create a new artifact group with the level.

Parameters:
  `startLevel` - The start level.

### Method Detail

#### add

    public void add(Artifact item)

Description copied from class: `ItemList`
Add a new item

Overrides:
  `add` in class `ItemList<Artifact>`
Parameters:
  `item` - The new item

#### getStartLevel

    public int getStartLevel()

Get the start level.

Returns:
  The start level.

#### search

    public Artifact search(Artifact template)

Search an artifact with the same groupId, artifactId, type and classifier. Version is not considered.

Parameters:
  `template` - A template artifact
Returns:
  The artifact or `null`.

#### compareTo

    public int compareTo(ArtifactGroup o)

Specified by:
  `compareTo` in interface `Comparable<ArtifactGroup>`

#### toString

    public String toString()

Overrides:
  `toString` in class `ItemList<Artifact>`