Interface IMapEntry

All Known Subinterfaces:
IBranchMapping, IClientViewMapping, ILabelMapping, IProtectionEntry, IReviewSubscription, IStreamComponentMapping, IStreamIgnoredMapping, IStreamRemappedMapping, IStreamViewMapping, ITriggerEntry
All Known Implementing Classes:
BranchSpec.BranchViewMapping, ClientView.ClientViewMapping, Label.LabelMapping, MapEntry, ProtectionEntry, ReviewSubscription, Stream.StreamComponentMapping, Stream.StreamIgnoredMapping, Stream.StreamRemappedMapping, Stream.StreamViewMapping, TriggerEntry

public interface IMapEntry
Defines an individual view map entry. These entries map "left" values to "right" values, where the semantics and usage of "left" and "right" depends on the specific type of view (e.g. left may be "depot", right "client").

Note that the left and right strings are pure paths -- they do not contain (or should not contain) any leading include / exclude prefixes except where this is explicitly allowed (e.g. the special constructor).

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Defines the specific type of a given view map entry.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the "comment" entry for this mapping; equivalent to getComment(false).
    getComment(boolean quoteBlanks)
    Get the "comment" entry for this mapping.
    Get the "left" entry for this mapping; equivalent to getLeft(false).
    getLeft(boolean quoteBlanks)
    Get the "left" entry for this mapping.
    int
    Get the order of this entry in the entry list, if known.
    Get the "right" entry for this mapping; equivalent to getRight(false).
    getRight(boolean quoteBlanks)
    Get the "right" entry for this mapping.
    Return the view map type of this entry.
    void
    setComment(String comment)
    Set the "comment" entry for this mapping.
    void
    Set the "left" entry for this mapping.
    void
    setOrder(int position)
    Set the order of this entry in the entry list.
    void
    Set the "right" entry for this mapping.
    void
    Set this entry's type.
    Alias for toString(" ", false).
    toString(String sepString, boolean quoteBlanks)
    Return a canonical String representation of this entry.
  • Field Details

  • Method Details

    • getOrder

      int getOrder()
      Get the order of this entry in the entry list, if known. Returns ORDER_UNKNOWN if the order is unknown or this entry is not currently associated with a map.
      Returns:
      ORDER_UNKNOWN or current order.
    • setOrder

      void setOrder(int position)
      Set the order of this entry in the entry list. Note that this method has no effect on the actual order within an entry whatsoever, and is provided for symmetry and for implementation initialization reasons only.
      Parameters:
      position - new order
    • getType

      Return the view map type of this entry.
      Returns:
      possibly-null EntryType
    • setType

      void setType(IMapEntry.EntryType type)
      Set this entry's type.
      Parameters:
      type - new entry type. May be null.
    • getLeft

      String getLeft()
      Get the "left" entry for this mapping; equivalent to getLeft(false).
      Returns:
      possibly-null left mapping entry.
    • getLeft

      String getLeft(boolean quoteBlanks)
      Get the "left" entry for this mapping. Will not include any prefixes. If quoteBlanks is true and the left string contains spaces or tabs the entire string is returned surrounded by quote characters.
      Parameters:
      quoteBlanks - if true, and the left string contains spaces or tabs the entire string is returned surrounded by quote characters.
      Returns:
      possibly-null left mapping entry.
    • setLeft

      void setLeft(String left)
      Set the "left" entry for this mapping. Will strip off any exclude (etc.) prefix before assigning it.
      Parameters:
      left - possibly-null new left mapping entry
    • getRight

      String getRight()
      Get the "right" entry for this mapping; equivalent to getRight(false).
      Returns:
      possibly-null right mapping entry.
    • getRight

      String getRight(boolean quoteBlanks)
      Get the "right" entry for this mapping. Will not include any prefixes. If quoteBlanks is true and the right string contains spaces or tabs the entire string is returned surrounded by quote characters.
      Parameters:
      quoteBlanks - if true, and the right string contains spaces or tabs the entire string is returned surrounded by quote characters.
      Returns:
      possibly-null right mapping entry.
    • setRight

      void setRight(String right)
      Set the "right" entry for this mapping. Will strip off any exclude (etc.) prefix before assigning it.
      Parameters:
      right - possibly-null new right mapping entry
    • getComment

      String getComment()
      Get the "comment" entry for this mapping; equivalent to getComment(false).
      Returns:
      possibly-null comment mapping entry.
    • getComment

      String getComment(boolean quoteBlanks)
      Get the "comment" entry for this mapping. Will not include any prefixes. If quoteBlanks is true and the comment string contains spaces or tabs the entire string is returned surrounded by quote characters.
      Parameters:
      quoteBlanks - if true, and the comment string contains spaces or tabs the entire string is returned surrounded by quote characters.
      Returns:
      possibly-null comment mapping entry.
    • setComment

      void setComment(String comment)
      Set the "comment" entry for this mapping. Will strip off any exclude (etc.) prefix before assigning it.
      Parameters:
      comment - possibly-null new comment mapping entry
    • toString

      String toString()
      Alias for toString(" ", false).
      Overrides:
      toString in class Object
    • toString

      String toString(String sepString, boolean quoteBlanks)
      Return a canonical String representation of this entry. This is in the form [type prefix]leftpath[specstring]rightpath, e.g. "-//depot/dev/test/... //clientname/newpath/..."

      If the passed-in string is null, the left and right strings (if they exist) will be concatenated into one long separator-less string.

      If the quoteBlanks parameter is true, if either or both the left or right entries contain spaces, the entries are quoted in full, i.e. the mapping //depot/test/space test 01/... //depot/test/space test 02/... becomes "//depot/test/space test 01/..." "//depot/test/space test 02/...".

      Parameters:
      sepString - separator string
      quoteBlanks - quotes if spaces are used
      Returns:
      formatted string