Jive API (4.5.7.0) Core Javadocs

com.jivesoftware.community.objecttype
Interface ContentObjectTypeInfoProvider


public interface ContentObjectTypeInfoProvider

An information provider for ContentObjectTypes.

See Also:
ContentObjectType

Method Summary
 ContainableType getContainableType()
          Returns the containable type of this type.
 java.lang.String getCreateNewFormRelativeURL(JiveContainer targetContainer, boolean isUpload, java.lang.String tempObjectId, java.lang.String tags, java.lang.String subject)
           This method should return the relative URL pointing to the page which will allow users to create a new instance of the type.
 long getUserContentCount(long userID)
          Returns the number of content of the current type that a user has.
 com.jivesoftware.community.objecttype.UserProfileInfoProvider getUserProfileInfoProvider()
          Returns a provider class helping to render objects of this type inside a user profile (container).
 boolean isBinaryBodyUploadCapable()
          Returns true if this type supports the upload of binary bodies.
 boolean userHasCreatePermsFor(JiveContainer container)
          Return true if the currently logged in user is allowed to create objects of this type in the specified container.
 

Method Detail

getContainableType

ContainableType getContainableType()
Returns the containable type of this type. In most cases this will be this type itself, since most content types also implements the ContainableType. Must not return null.

Returns:
the containableType of current type.

userHasCreatePermsFor

boolean userHasCreatePermsFor(JiveContainer container)
Return true if the currently logged in user is allowed to create objects of this type in the specified container.

Parameters:
container - The target container.
Returns:
true if the currently logged in user has permissions to create objects in the container.

isBinaryBodyUploadCapable

boolean isBinaryBodyUploadCapable()
Returns true if this type supports the upload of binary bodies.

Returns:
true if this type supports the upload of binary bodies.

getCreateNewFormRelativeURL

java.lang.String getCreateNewFormRelativeURL(JiveContainer targetContainer,
                                             boolean isUpload,
                                             java.lang.String tempObjectId,
                                             java.lang.String tags,
                                             java.lang.String subject)
 This method should return the relative URL pointing to the page which will allow users to create a new instance
 of the type.
 As the URL is relative, it should not contain the base URL (eg. http://www.yourhost.com/clearpsace/...).
 type.
 

For example: /doc-create!input.jspa?container=1207&containerType=700&documentID=&tagSet=&tags=&subject=

This method must not return null or empty string.

Parameters:
targetContainer - The container chosen to house the new instance of the type.
isUpload - Value 'true' indicates that the body of the type is to be uploaded (rather than than created manually via an editor).
tempObjectId - The ID of a temporary instance of the new type.
tags - Any tags (usually separated by a space) pre-selected for labelling the new type instance.
subject - A subject line that will be used for the new type instance.
Returns:
The relative URL (struts action and a string of key-value request parameters delimited by '&' symbol) pointing to the page allowing users to create a new instance of the type.

getUserProfileInfoProvider

com.jivesoftware.community.objecttype.UserProfileInfoProvider getUserProfileInfoProvider()
Returns a provider class helping to render objects of this type inside a user profile (container).

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

getUserContentCount

long getUserContentCount(long userID)
Returns the number of content of the current type that a user has.


Jive Product Page

Copyright © 1999-2007 Jive Software.