Package org.wicketstuff.twitter.intents
Class TweetLink
- java.lang.Object
-
- org.apache.wicket.Component
-
- org.apache.wicket.MarkupContainer
-
- org.apache.wicket.markup.html.WebMarkupContainer
-
- org.wicketstuff.twitter.intents.AbstractIntentLink
-
- org.wicketstuff.twitter.intents.TweetLink
-
- All Implemented Interfaces:
Serializable,Iterable<Component>,IEventSink,IEventSource,IFeedbackContributor,IConverterLocator,IMetadataContext<Serializable,Component>,IHeaderContributor,IRequestableComponent,IHierarchical<Component>,IClusterable
public class TweetLink extends AbstractIntentLink
https://dev.twitter.com/docs/intents#tweet-intent- Author:
- Till Freier
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_INITIALIZED, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING, RFLAG_CONTAINER_HAS_REMOVALS
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IModel<?>getHashTags()IModel<?>getInReplyTo()protected PageParametersgetParameters()IModel<?>getRelated()IModel<?>getText()IModel<?>getTweetUrl()IModel<?>getVia()<C extends Serializable>
voidsetHashTags(Collection<C> hashTags)Add context to the pre-prepared status update by appending #hashtags.voidsetHashTags(IModel<?> hashTags)Add context to the pre-prepared status update by appending #hashtags.voidsetInReplyTo(String inReplyTo)Associate this Tweet with a specific Tweet by indicating its status ID here.voidsetInReplyTo(IModel<?> inReplyTo)Associate this Tweet with a specific Tweet by indicating its status ID here.<C extends Serializable>
voidsetRelated(Collection<C> related)Suggest accounts related to the your content.voidsetRelated(IModel<?> related)Suggest accounts related to the your content.voidsetText(String text)Users will still be able to edit the pre-prepared text.voidsetText(IModel<?> text)Users will still be able to edit the pre-prepared text.voidsetTweetUrl(String tweetUrl)The provided URL will be shortened with t.co and appended to the end of the Tweet.voidsetTweetUrl(IModel<?> tweetUrl)The provided URL will be shortened with t.co and appended to the end of the Tweet.voidsetVia(String via)A screen name to associate with the Tweet.voidsetVia(IModel<?> via)A screen name to associate with the Tweet.-
Methods inherited from class org.wicketstuff.twitter.intents.AbstractIntentLink
getUrl
-
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
-
Methods inherited from class org.apache.wicket.MarkupContainer
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onComponentTagBody, onDetach, onInitialize, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildren
-
Methods inherited from class org.apache.wicket.Component
add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMarkupTag, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
TweetLink
public TweetLink(String id)
- Parameters:
id- wicket-idtweet- tweet-id
-
-
Method Detail
-
getHashTags
public IModel<?> getHashTags()
- Returns:
- the hashTags
-
getInReplyTo
public IModel<?> getInReplyTo()
- Returns:
- the inReplyTo
-
getParameters
protected PageParameters getParameters()
- Specified by:
getParametersin classAbstractIntentLink
-
getRelated
public IModel<?> getRelated()
- Returns:
- the related
-
getText
public IModel<?> getText()
- Returns:
- the text
-
getTweetUrl
public IModel<?> getTweetUrl()
- Returns:
- the tweetUrl
-
getVia
public IModel<?> getVia()
- Returns:
- the via
-
setHashTags
public <C extends Serializable> void setHashTags(Collection<C> hashTags)
Add context to the pre-prepared status update by appending #hashtags. Omit the "#" symbol.- Parameters:
hashTags- the hashTags to set
-
setHashTags
public void setHashTags(IModel<?> hashTags)
Add context to the pre-prepared status update by appending #hashtags. Omit the "#" symbol.- Parameters:
hashTags- the hashTags to set
-
setInReplyTo
public void setInReplyTo(IModel<?> inReplyTo)
Associate this Tweet with a specific Tweet by indicating its status ID here. The originating Tweet Author's screen name will be automatically prepended to the reply.- Parameters:
inReplyTo- the inReplyTo to set
-
setInReplyTo
public void setInReplyTo(String inReplyTo)
Associate this Tweet with a specific Tweet by indicating its status ID here. The originating Tweet Author's screen name will be automatically prepended to the reply.- Parameters:
inReplyTo- the inReplyTo to set
-
setRelated
public <C extends Serializable> void setRelated(Collection<C> related)
Suggest accounts related to the your content.- Parameters:
related- the related to set
-
setRelated
public void setRelated(IModel<?> related)
Suggest accounts related to the your content.- Parameters:
related- the related to set
-
setText
public void setText(IModel<?> text)
Users will still be able to edit the pre-prepared text. This field has a potential of 140 characters maximum, but consider the implications of other parameters like url and via.- Parameters:
text- the text to set
-
setText
public void setText(String text)
Users will still be able to edit the pre-prepared text. This field has a potential of 140 characters maximum, but consider the implications of other parameters like url and via.- Parameters:
text- the text to set
-
setTweetUrl
public void setTweetUrl(IModel<?> tweetUrl)
The provided URL will be shortened with t.co and appended to the end of the Tweet.- Parameters:
tweetUrl- the tweetUrl to set
-
setTweetUrl
public void setTweetUrl(String tweetUrl)
The provided URL will be shortened with t.co and appended to the end of the Tweet.- Parameters:
tweetUrl- the tweetUrl to set
-
setVia
public void setVia(IModel<?> via)
A screen name to associate with the Tweet. The provided screen name will be appended to the end of the tweet with the text: "via @username" "Via" will be translated to the proper locality of the posting user, if supported. Potentially drives new followers to the target account.- Parameters:
via- the via to set
-
setVia
public void setVia(String via)
A screen name to associate with the Tweet. The provided screen name will be appended to the end of the tweet with the text: "via @username" "Via" will be translated to the proper locality of the posting user, if supported. Potentially drives new followers to the target account.- Parameters:
via- the via to set
-
-