com.silverpeas.calendar
Class CalendarEventCategories

java.lang.Object
  extended by com.silverpeas.calendar.CalendarEventCategories

public class CalendarEventCategories
extends Object

The categories in which an event, scheduled in a calendar, is classified. The categories are expected to be managed by the event itself.


Constructor Summary
protected CalendarEventCategories()
           
 
Method Summary
 void add(String categoryId)
          Adds a category to an event scheduled in a calendar.
 void addAll(List<String> categoryIds)
          Adds several categories to an event scheduled in a calendar.
 void addAll(String... categoryIds)
          Adds one or several categories to an event scheduled in a calendar.
 String[] asArray()
          Converts this categories container to an array of category identifiers.
 List<String> asList()
          Converts this categories container to a list of category identifiers.
 boolean contains(String category)
          Is the specified category is in the categories of an event scheduled in a calendar.
 boolean isEmpty()
          Is there is no any categories set for an event?
 void remove(String... categoryIds)
          Removes one or several categories from the categories of an event scheduled in a calendar.
 void remove(String categoryId)
          Removes a category from the categories of an event scheduled in a calendar.
 void removeAll(List<String> categoryIds)
          Removes several categories from the categories of an event scheduled in a calendar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalendarEventCategories

protected CalendarEventCategories()
Method Detail

add

public void add(String categoryId)
Adds a category to an event scheduled in a calendar. The category is specified by its unique identifier (its title for example). If the category is already added, then nothing is done.

Parameters:
categoryId - the identifier of the category to add.

addAll

public void addAll(List<String> categoryIds)
Adds several categories to an event scheduled in a calendar. The categories are specified by their unique identifier (their title for example). If some of the categories to add are already present, then they are not added.

Parameters:
categoryIds - the identifiers of the categories to add.

addAll

public void addAll(String... categoryIds)
Adds one or several categories to an event scheduled in a calendar. The categories are specified by their unique identifier (their title for example). If some of the categories to add are already present, then they are not added.

Parameters:
categoryIds - the identifiers of the categories to add.

remove

public void remove(String categoryId)
Removes a category from the categories of an event scheduled in a calendar. The category is specified by its unique identifier (its title for example). If the category isn't present, then nothing is done.

Parameters:
categoryId - the identifier of the category to remove.

removeAll

public void removeAll(List<String> categoryIds)
Removes several categories from the categories of an event scheduled in a calendar. The categories are specified by their unique identifier (their title for example). If some of the categories to remove aren't present, then nothing is done with them.

Parameters:
categoryIds - the identifiers of the categories to remove.

remove

public void remove(String... categoryIds)
Removes one or several categories from the categories of an event scheduled in a calendar. The categories are specified by their unique identifier (their title for example). If some of the categories to remove aren't present, then nothing is done with them.

Parameters:
categoryIds - the identifiers of the categories to remove.

asList

public List<String> asList()
Converts this categories container to a list of category identifiers.

Returns:
a list of category identifiers.

asArray

public String[] asArray()
Converts this categories container to an array of category identifiers.

Returns:
an array of category identifiers.

contains

public boolean contains(String category)
Is the specified category is in the categories of an event scheduled in a calendar.

Parameters:
category - a category identifier.
Returns:
true if the specified category is among the categories of an event, false otherwise.

isEmpty

public boolean isEmpty()
Is there is no any categories set for an event?

Returns:
true if no categories are set, false otherwise.


Copyright © 2016 Silverpeas. All Rights Reserved.