Jive API (3.0.13) Core Javadocs

com.jivesoftware.community.media
Class MediaContainableTypeInfoProvider

java.lang.Object
  extended by com.jivesoftware.community.media.MediaContainableTypeInfoProvider
All Implemented Interfaces:
ContainableTypeInfoProvider
Direct Known Subclasses:
VideoContainableTypeInfoProvider

public class MediaContainableTypeInfoProvider
extends Object
implements ContainableTypeInfoProvider

Governs the containers media types can exist in and the behavior of that content when displayed in a particular container


Field Summary
protected  UserContainerManager userContainerManager
           
 
Constructor Summary
MediaContainableTypeInfoProvider()
           
 
Method Summary
 CommunityContainableInfoProvider getCommunityContainableInfoProvider()
          Returns a provider class helping to render objects of this type inside a community (container).
 JiveObject getContainerFor(JiveObject object)
          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.
 void setUserContainerManager(UserContainerManager userContainerManager)
           
 boolean userHasCreatePermsFor(JiveContainer container, User user)
          Is the currently logged in user allowed to create objects of this type?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userContainerManager

protected UserContainerManager userContainerManager
Constructor Detail

MediaContainableTypeInfoProvider

public MediaContainableTypeInfoProvider()
Method Detail

isAvailableForContainer

public boolean isAvailableForContainer(int containerType)
Description copied from interface: ContainableTypeInfoProvider
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.

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

isRequiredForContainer

public boolean isRequiredForContainer(int containerType)
Description copied from interface: ContainableTypeInfoProvider
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).

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

isEnabledByDefaultForContainer

public boolean isEnabledByDefaultForContainer(int containerType)
Description copied from interface: ContainableTypeInfoProvider
For a given container type, returns whether or not the object type is enabled when there is no previous specification.

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

getSubContentTypes

public List<ContentObjectType> getSubContentTypes()
Description copied from interface: ContainableTypeInfoProvider
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.

Specified by:
getSubContentTypes in interface ContainableTypeInfoProvider
Returns:
a list of the child content types which comprise this containable type.

getContainerFor

public JiveObject getContainerFor(JiveObject object)
Description copied from interface: ContainableTypeInfoProvider
Returns the container for the supplied jive object. The algorithm for calculating the actual 'parent' for a given object may vary between types.

Specified by:
getContainerFor in interface ContainableTypeInfoProvider
Parameters:
object - The object you are trying to retrieve the container for.
Returns:
the container for the supplied jive object.

getTabViewID

public String getTabViewID()
Description copied from interface: ContainableTypeInfoProvider
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

Specified by:
getTabViewID in interface ContainableTypeInfoProvider
Returns:
the ID used to build the tab view URL

getUserPersonalContainerForContentType

public JiveContainer getUserPersonalContainerForContentType(User owner)
Description copied from interface: ContainableTypeInfoProvider
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.

Specified by:
getUserPersonalContainerForContentType in interface ContainableTypeInfoProvider
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.

setUserContainerManager

public void setUserContainerManager(UserContainerManager userContainerManager)

getStatisticsGenerators

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

Specified by:
getStatisticsGenerators in interface ContainableTypeInfoProvider
Returns:
a list of statistics generators for the type.

userHasCreatePermsFor

public boolean userHasCreatePermsFor(JiveContainer container,
                                     User user)
Description copied from interface: ContainableTypeInfoProvider
Is the currently logged in user allowed to create objects of this type?

Specified by:
userHasCreatePermsFor in interface ContainableTypeInfoProvider
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

public CommunityContainableInfoProvider getCommunityContainableInfoProvider()
Description copied from interface: ContainableTypeInfoProvider
Returns a provider class helping to render objects of this type inside a community (container).

Specified by:
getCommunityContainableInfoProvider in interface ContainableTypeInfoProvider
Returns:
a provider class helping to render objects of this type inside a community (container).

getProjectContainableInfoProvider

public ProjectContainableInfoProvider getProjectContainableInfoProvider()
Description copied from interface: ContainableTypeInfoProvider
Returns a provider class helping to render objects of this type inside a project (container).

Specified by:
getProjectContainableInfoProvider in interface ContainableTypeInfoProvider
Returns:
a provider class helping to render objects of this type inside a project (container).

getSocialGroupContainableInfoProvider

public SocialGroupContainableInfoProvider getSocialGroupContainableInfoProvider()
Description copied from interface: ContainableTypeInfoProvider
Returns a provider class helping to render objects of this type inside a social group (container).

Specified by:
getSocialGroupContainableInfoProvider in interface ContainableTypeInfoProvider
Returns:
a provider class helping to render objects of this type inside a social group (container).

Jive Product Page

Copyright © 1999-2007 Jive Software.