Interface ITaggableRepository

All Known Subinterfaces:
ISourceRepository

public interface ITaggableRepository
Repository which has some notion of tags.

Repository tag is an abstract construct which covers branches, tags and other similar techniques.

Version:
$Revision$ $Date$
Author:
Stepan Roh, Polarion Software
  • Method Details

    • tagLocation

      ILocation tagLocation(ILocation location, String tag)
      Change location to incorporate given tag.

      What exactly is changed depends on repository (it may be location or revision).

      Tagging tagged location will replace old tag with new one.

      Tag appearance depends on repository.

      Parameters:
      location - location to tag
      tag - repository tag or null for untagging
      Returns:
      new tagged location (not null)
      Throws:
      IllegalArgumentException - if location is null
    • untagLocation

      ILocation untagLocation(ILocation location)
      Try to remove all tags from a location.

      Note that tagging first and untagging later may result in different locations.

      Parameters:
      location - location to tag
      Returns:
      new untagged location (not null)
      Throws:
      IllegalArgumentException - if location is null
    • getLocationTag

      String getLocationTag(ILocation location)
      Return location tag (if any).
      Parameters:
      location - location
      Returns:
      tag or null
      Throws:
      IllegalArgumentException - if location is null
    • getAvailableTags

      Collection getAvailableTags(ILocation location)
      Return all available tags which may apply to given location.

      There may be tags which are not returned from this method, but can be used anyway (date-based tags, for example).

      Whether given location is already tagged or not is ignored.

      Parameters:
      location - location
      Returns:
      Collection of String tags (not null)
      Throws:
      IllegalArgumentException - if location is null