Jive API (3.0.13) Core Javadocs

com.jivesoftware.community.objecttype
Interface ContainableTypeManager


public interface ContainableTypeManager

Provides base behavior for containable media types.


Method Summary
 void deleteAllContent(JiveContainer container)
          Deletes all contents, and the related information, of the current type and its subtypes that belongs to the container.
 void deleteAllContent(User user)
          Deletes all contents, and the related information, of the current type, and it subtypes, that belongs to the user.
 int getContentCount(JiveContainer container, boolean recursive)
          Returns the number of elements that the container has of this type and its subtypes.
 int getContentCount(User user)
          Returns the number of elements that the user has of this type and its subtypes.
 

Method Detail

deleteAllContent

void deleteAllContent(JiveContainer container)
Deletes all contents, and the related information, of the current type and its subtypes that belongs to the container. This also should remove things from the cache and fire the corresponding delete events when that applies.

Note: This runs in a DB transaction, so it needs to be fast. If deleting the cache takes too long, then a good practise is to run it in another thread or in a task.

Note: To add this to the transaction you must use this annotation in the delete method

Parameters:
container - the container where the content to be deleted belongs.

getContentCount

int getContentCount(JiveContainer container,
                    boolean recursive)
Returns the number of elements that the container has of this type and its subtypes. If recursive is true, then it counts all objects in all containers recursively.

Parameters:
container - the container to count the objects from.
recursive - true to count all objects in all containers recursively
Returns:
the number of elements that the container has.

deleteAllContent

void deleteAllContent(User user)
Deletes all contents, and the related information, of the current type, and it subtypes, that belongs to the user. This also should remove things from the cache and fire the corresponding delete events when that applies.

Note: This runs in a DB transaction, so it needs to be fast. If deleting the cache takes too long, then a good practise is to run it in another thread or in a task.

Note: To add this to the transaction you must use this annotation in the delete method

Parameters:
user - the user to delete content from.

getContentCount

int getContentCount(User user)
Returns the number of elements that the user has of this type and its subtypes.

Parameters:
user - the user to count the objects from.
Returns:
the number of elements that the container has.

Jive Product Page

Copyright © 1999-2007 Jive Software.