com.aspose.tasks

Interfaces

Classes

Exceptions

com.aspose.tasks

Class CalendarCollection

    • Method Detail

      • getCount

        public int getCount()

        Returns the number of objects contained in this CalendarCollection object. Read only int.

        Returns:
        the number of objects contained in the collection.
      • getParentProject

        public Project getParentProject()

        Returns a parent Project of this object. Read only Project.

        Returns:
        parent project of this collection.
      • add

        public Calendar add(String name)

        Adds a new base calendar to this CalendarCollection object and returns added calendar.

        Parameters:
        name - Calendar name.
        Returns:
        Added Calendar object.
        Throws:
        com.aspose.ms.System.ArgumentException - is thrown if calendar name is null or empty.
      • add

        public Calendar add(String name,
                            Calendar baseCalendar)

        Adds a new calendar with specified base calendar to this CalendarCollection object and returns added calendar.

        Parameters:
        name - Specified name.
        baseCalendar - Specified base calendar.
        Returns:
        Added Calendar object.
      • getByName

        public Calendar getByName(String name)

        Returns a calendar with the specified name.

        Parameters:
        name - Name of a calendar.
        Returns:
        If found retuns calendar with a specified name else returns null.
      • getByUid

        public Calendar getByUid(int uid)

        Returns a calendar with the specified Uid.

        Parameters:
        uid - Uid of a calendar.
        Returns:
        Calendar with a specified uid.
      • remove

        public void remove(Calendar calendar)

        Removes Calendar from Project CalendarCollection.

        Parameters:
        calendar - Calendar instance to remove.
        Throws:
        com.aspose.ms.System.InvalidOperationException - is thrown when trying to remove standard calendar.
      • toList

        public List<Calendar> toList()

        Converts the CalendarCollection object to a list of Calendar objects.

        Returns:
        List of Calendar objects.