Class ListOptions


  • public class ListOptions
    extends Options
    This class is used to encapsulate all the information that forms the options part of the 'p4 list' command

    Usage: list [-l label [-d]] [-C] [-M] files...

    • Constructor Summary

      Constructors 
      Constructor Description
      ListOptions()
      Default constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getLabel()
      Returns the label attached to the list of files retrived
      boolean isDelete()
      Should the content referred to by the label be deleted
      boolean isLimitDepotPaths()
      Indicates whether depot path should be limited to that can be mapped via client workspace
      boolean isListFromReplica()
      Returns listFromReplica
      java.util.List<java.lang.String> processOptions​(IServer server)
      Turn this (specific) options object into a list of strings to be sent to the Perforce server as options for a specific command.
      void setDelete​(boolean delete)
      Sets a flag indicating that the files referred to by the label should be deleted or not
      void setLabel​(java.lang.String label)
      Sets a label to the list of files to be retrieved
      void setLimitClient​(boolean limitDepotPaths)
      Sets a flag indicating whether depot path shou;d be limited to that can be mapped via client workspace
      void setListFromReplica​(boolean listFromReplica)
      Sets listFromReplica
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ListOptions

        public ListOptions()
        Default constructor
    • Method Detail

      • processOptions

        public java.util.List<java.lang.String> processOptions​(IServer server)
                                                        throws OptionsException
        Description copied from class: Options
        Turn this (specific) options object into a list of strings to be sent to the Perforce server as options for a specific command. As a side effect, set the option list associated with this Option to the result.

        The method is used by the server object to generate the string-based arguments expected by the Perforce server corresponding to the state of this method-specific options object. Will return an empty list if there are no "interesting" options set or available. May simply return the superclass options string list if is non-null, but that behaviour is neither guaranteed nor required.

        Note that this method is not intended to be called directly by users but by the underlying P4Java plumbing; odd results may occur if this method is called in other contexts.

        Specified by:
        processOptions in class Options
        Parameters:
        server - possibly-null IServer representing the Perforce server the options are to be used against. If this parameter is null, it is acceptable to throw an OptionsException, but it is also possible to ignore it and do the best you can with what you've got...
        Returns:
        list of options strings
        Throws:
        OptionsException - Options Exception
      • getLabel

        public java.lang.String getLabel()
        Returns the label attached to the list of files retrived
        Returns:
        the label
      • setLabel

        public void setLabel​(java.lang.String label)
        Sets a label to the list of files to be retrieved
        Parameters:
        label - label name
      • isDelete

        public boolean isDelete()
        Should the content referred to by the label be deleted
        Returns:
        delete flag
      • setDelete

        public void setDelete​(boolean delete)
        Sets a flag indicating that the files referred to by the label should be deleted or not
        Parameters:
        delete - delete flag
      • isLimitDepotPaths

        public boolean isLimitDepotPaths()
        Indicates whether depot path should be limited to that can be mapped via client workspace
        Returns:
        limitDepotPaths flag
      • setLimitClient

        public void setLimitClient​(boolean limitDepotPaths)
        Sets a flag indicating whether depot path shou;d be limited to that can be mapped via client workspace
        Parameters:
        limitDepotPaths - limitDepotPaths flag
      • isListFromReplica

        public boolean isListFromReplica()
        Returns listFromReplica
        Returns:
        listFromReplica flag
      • setListFromReplica

        public void setListFromReplica​(boolean listFromReplica)
        Sets listFromReplica
        Parameters:
        listFromReplica - listFromReplica flag