Jive API (3.0.13) Core Javadocs

com.jivesoftware.community
Interface ContainableTypeInfoProvider

All Known Implementing Classes:
MediaContainableTypeInfoProvider, VideoContainableTypeInfoProvider

public interface ContainableTypeInfoProvider

This class describes the types of containers a containable type may be contained within, and the rules governing that relationship.

See Also:
ContainableType

Method Summary
 CommunityContainableInfoProvider getCommunityContainableInfoProvider()
          Returns a provider class helping to render objects of this type inside a community (container).
 JiveObject getContainerFor(JiveObject jiveObject)
          Returns the container for the supplied jive object.
 ProjectContainableInfoProvider getProjectContainableInfoProvider()
          Returns a provider class helping to render objects of this type inside a project (container).
 SocialGroupContainableInfoProvider getSocialGroupContainableInfoProvider()
          Returns a provider class helping to render objects of this type inside a social group (container).
 List<StatisticsGenerator> getStatisticsGenerators()
          Returns a list of statistics generators for the type.
 List<ContentObjectType> getSubContentTypes()
          Returns a list of all sub content types which comprise this containable type.
 String getTabViewID()
          Returns the ID used to build the tab view URL.
 JiveContainer getUserPersonalContainerForContentType(User owner)
          For this object type, return the container owned by the user which houses all instances of objects of this current type created by the user.
 boolean isAvailableForContainer(int containerType)
          For a given container type, returns whether this object type is available for selection when creating the container.
 boolean isEnabledByDefaultForContainer(int containerType)
          For a given container type, returns whether or not the object type is enabled when there is no previous specification.
 boolean isRequiredForContainer(int containerType)
          For a given container type, returns whether the object type is required for it when creating the container.
 boolean userHasCreatePermsFor(JiveContainer container, User user)
          Is the currently logged in user allowed to create objects of this type?
 

Method Detail

isAvailableForContainer

boolean isAvailableForContainer(int containerType)
For a given container type, returns whether this object type is available for selection when creating the container. If this object type is required then a true value will be returned.

Parameters:
containerType - The type of container we will check against.
Returns:
Whether this object type is allowed in that container.

isRequiredForContainer

boolean isRequiredForContainer(int containerType)
For a given container type, returns whether the object type is required for it when creating the container. In other words, this content type will be enabled with no option to turn it off. Generally, the object type will show up in the list of available content types, but disabled (ie, forced to a setting).

Parameters:
containerType - The type of container we will check against.
Returns:
Whether this object type is required in that container.

isEnabledByDefaultForContainer

boolean isEnabledByDefaultForContainer(int containerType)
For a given container type, returns whether or not the object type is enabled when there is no previous specification.

Parameters:
containerType - The type of container we will check against.
Returns:
Whether this object type is enabled by default in that container.

getSubContentTypes

List<ContentObjectType> getSubContentTypes()
Returns a list of all sub content types which comprise this containable type. In most cases, this method will return an emty list, but in other cases such as blogs, it would return a different type (in this case blogpost), as blogs are composed of blogposts. Implementors should return an immutable list.

Returns:
a list of the child content types which comprise this containable type.

getContainerFor

JiveObject getContainerFor(JiveObject jiveObject)
Returns the container for the supplied jive object. The algorithm for calculating the actual 'parent' for a given object may vary between types.

Parameters:
jiveObject - The object you are trying to retrieve the container for.
Returns:
the container for the supplied jive object.

getTabViewID

String getTabViewID()
Returns the ID used to build the tab view URL.

For example, to view the documents tab of a space named finance this method will return "documents". With that the system will build an URL like:

clearspace/community/finace?view=documents

Returns:
the ID used to build the tab view URL

getUserPersonalContainerForContentType

JiveContainer getUserPersonalContainerForContentType(User owner)
For this object type, return the container owned by the user which houses all instances of objects of this current type created by the user.

May return null if no such container exists for this type and user.

Parameters:
owner - the user for which the container belongs to.
Returns:
the container owned by the user which houses all instances of objects of this current type created by the user.

getStatisticsGenerators

List<StatisticsGenerator> getStatisticsGenerators()
Returns a list of statistics generators for the type. Each generator will create graphs that will be shown in the admin console.

Returns:
a list of statistics generators for the type.

userHasCreatePermsFor

boolean userHasCreatePermsFor(JiveContainer container,
                              User user)
Is the currently logged in user allowed to create objects of this type?

Parameters:
container - Container that will be checked for whether user can create objects of this type in it.
user - User who will be checked for creation permission.
Returns:
Whether this content type may be added to any containers by the current user.

getCommunityContainableInfoProvider

CommunityContainableInfoProvider getCommunityContainableInfoProvider()
Returns a provider class helping to render objects of this type inside a community (container).

Returns:
a provider class helping to render objects of this type inside a community (container).

getProjectContainableInfoProvider

ProjectContainableInfoProvider getProjectContainableInfoProvider()
Returns a provider class helping to render objects of this type inside a project (container).

Returns:
a provider class helping to render objects of this type inside a project (container).

getSocialGroupContainableInfoProvider

SocialGroupContainableInfoProvider getSocialGroupContainableInfoProvider()
Returns a provider class helping to render objects of this type inside a social group (container).

Returns:
a provider class helping to render objects of this type inside a social group (container).

Jive Product Page

Copyright © 1999-2007 Jive Software.