|
Jive API (3.0.13) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FavoriteInfoProvider<O extends JiveObject,T extends JiveObjectType>
A provider for invormation needed to render favorites. Different favoritable types have different methods to determine the information around the favorited content and this will be reflected in the implementations.
| Nested Class Summary | |
|---|---|
static class |
FavoriteInfoProvider.EventType
|
| Method Summary | |
|---|---|
O |
getAncestor(JiveObject inheritor)
For an inherited object, getInheritedTypes(), this will return the ancestor for which it inherits from. |
User |
getAuthor(O object)
|
boolean |
getCanUserDefineSubject(O favoritedObject)
Returns true if users can change the subject for a favorite of the given object and false if they cannot. |
JiveContainer |
getContainer(O object)
|
List<String> |
getFavoritableTypeNames(T type)
Returns the name utilized in hackable urls to specify a marked favorite of a particular type. |
String |
getFavoriteUrl(O object)
Returns the landing page to view all meta-information pertaining to the passed in object. |
Set<JiveObjectType> |
getInheritedTypes()
Inherited types allow the favoriting of an object to be encompassed by another type. |
FavoriteInfoProvider.EventType |
getMappedEventType(BaseJiveEvent e)
Maps the event between the Jive Event domain to something that Favoriting can easily parse and understand. |
String |
getSubject(O object,
String userProvidedSubject)
Returns the subject for the given object to be displayed for the favorite. |
String |
getUrl(O favoritedObject)
Returns the url to view the favorited object. |
boolean |
isUserDefinedSubject(O favoritedObject,
String userProvidedSubject)
Returns true if the subject returned by getSubject(com.jivesoftware.community.JiveObject, String) was defined by the user. |
| Method Detail |
|---|
String getSubject(O object,
String userProvidedSubject)
object - the object for which the subject is being determined.userProvidedSubject - the subject, if it has been provided by the user, null otherwise. The subject
may be ignored by particular implementations.
boolean isUserDefinedSubject(O favoritedObject,
String userProvidedSubject)
getSubject(com.jivesoftware.community.JiveObject, String) was defined by the user. A return value of
false indicates that the subject was inherited from the favorited object.
favoritedObject - the object for which the subject is being determined.userProvidedSubject - the subject, if it has been provided by the user, null otherwise. The subject
may be ignored by particular implementations.
getSubject(com.jivesoftware.community.JiveObject, String) was defined by the user.boolean getCanUserDefineSubject(O favoritedObject)
favoritedObject - the object for which it is being determined if users can set the favorite subject.
String getUrl(O favoritedObject)
com.jivesoftware.community.favorites.external.ExternalURL it will return the url which this favorite
realtes to.
favoritedObject - the object for which the url will be returned
String getFavoriteUrl(O object)
com.jivesoftware.community.favorites.external.ExternalURL. If the type of object that this Favorite
relates does not have a landing page for information about the favorite, as is the case with discussions,
blog posts, and documents, this function will return the url for the piece of content.
object - the object for which the favorite meta-info landing page will be returned.
List<String> getFavoritableTypeNames(T type)
type - the type for which the name is being returned
User getAuthor(O object)
JiveContainer getContainer(O object)
FavoriteInfoProvider.EventType getMappedEventType(BaseJiveEvent e)
e - the event which is being mapped.
Set<JiveObjectType> getInheritedTypes()
O getAncestor(JiveObject inheritor)
throws IllegalArgumentException
getInheritedTypes(), this will return the ancestor for which it inherits from.
For example, in the case of a message the forum thread that the message belongs to would be returned.
inheritor - the object for which the ancestor will return.
IllegalArgumentException - will be thrown when an ancestor cannot be deteremined for the given inheritor.
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||