Class ListService.ListOperationInfo

  • Direct Known Subclasses:
    ListService.ListCreationInfo
    Enclosing class:
    ListService

    public class ListService.ListOperationInfo
    extends java.lang.Object
    An abstraction of the combination of options that can be specified to generate a new list in a list operation. This object has facilities for supplying the minimum amount of information, including automatically generating unused list names.
    • Constructor Summary

      Constructors 
      Constructor Description
      ListOperationInfo()
      Create a new options bundle with all values set to their defaults.
      ListOperationInfo​(java.lang.String name)
      Create a new options bundle, with all elements set to their default apart from the name, which is given.
      ListOperationInfo​(java.lang.String name, java.lang.String description)
      Create a new options bundle, with all elements set to their default apart from the name and the description, which are given.
      ListOperationInfo​(java.lang.String name, java.lang.String description, java.util.Collection<? extends java.lang.String> tags)
      Create a new options bundle, specifying all options.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addTag​(java.lang.String tag)
      Add a tag to the set of tags to apply.
      void addTags​(java.util.Collection<? extends java.lang.String> newTags)
      Add some tags to the set of tags to apply.
      java.lang.String getTagString()
      Get the tags joined in the manner required for the list service.
      protected java.lang.String getUnusedListName()
      Get a name for the list if none has been supplied.
      • Methods inherited from class java.lang.Object

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

      • ListOperationInfo

        public ListOperationInfo()
        Create a new options bundle with all values set to their defaults.
      • ListOperationInfo

        public ListOperationInfo​(java.lang.String name)
        Create a new options bundle, with all elements set to their default apart from the name, which is given.
        Parameters:
        name - The name of the new list to create.
      • ListOperationInfo

        public ListOperationInfo​(java.lang.String name,
                                 java.lang.String description)
        Create a new options bundle, with all elements set to their default apart from the name and the description, which are given.
        Parameters:
        name - the name of the new list to create.
        description - A description to apply to the list.
      • ListOperationInfo

        public ListOperationInfo​(java.lang.String name,
                                 java.lang.String description,
                                 java.util.Collection<? extends java.lang.String> tags)
        Create a new options bundle, specifying all options.
        Parameters:
        name - The name of the new list to create.
        description - A description to apply to the list.
        tags - The tags to apply to the list.
    • Method Detail

      • addTag

        public void addTag​(java.lang.String tag)
        Add a tag to the set of tags to apply.
        Parameters:
        tag - The tag to add.
      • addTags

        public void addTags​(java.util.Collection<? extends java.lang.String> newTags)
        Add some tags to the set of tags to apply.
        Parameters:
        newTags - The tags to apply.
      • getTagString

        public java.lang.String getTagString()
        Get the tags joined in the manner required for the list service.
        Returns:
        A string suitable for using as a value in a list service request.
      • getUnusedListName

        protected java.lang.String getUnusedListName()
        Get a name for the list if none has been supplied.
        Returns:
        A new default name, which does not clash with the name of any existing name the user has access to.