@OpenApiAll
public abstract class HRefRunnable
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HREF_PREFIX |
Constructor and Description |
---|
HRefRunnable(java.lang.String text,
boolean close)
Creates href runnable with specified text as link and close boolean value indicating if notification must be
closed after link was pressed.
|
HRefRunnable(java.lang.String href,
java.lang.String text,
boolean close)
Creates href runnable with specified href id, text as link and close boolean value indicating if notification
must be closed after link was pressed.
|
Modifier and Type | Method and Description |
---|---|
static HRefRunnable |
createHRefRunnableForElement(Element element) |
static HRefRunnable |
createHRefRunnableForElement(Element element,
boolean includeVersionForTW) |
static HRefRunnable |
createHRefRunnableForElement(Element element,
boolean includeVersionForTW,
java.lang.String branch) |
static java.lang.String |
getElementName(Element element) |
java.lang.String |
getHref()
Returns runnable href id
|
java.lang.String |
getHrefLink()
Creates HTML tags to have real hyperlink.
|
java.lang.String |
getText()
Returns href action text.
|
boolean |
isCloseOnActivation()
Indicates if notification will be closed after this action is selected for execution.
|
boolean |
isVisible()
Indicates if action, representing href is rendered in notification
|
boolean |
runIfIdle()
Run given runnable if application is in idle mode.
|
void |
setCloseOnActivation(boolean closeOnActivation)
Sets notification close flag for this runnable.
|
void |
setHref(java.lang.String href)
Sets href runnable id
|
void |
setText(java.lang.String text)
Sets href action presentation text.
|
void |
setVisible(boolean visible)
Sets visibility of action representing href.
|
public static final java.lang.String HREF_PREFIX
public HRefRunnable(java.lang.String href, java.lang.String text, boolean close)
href
- runnable idtext
- link textclose
- indicates if notification must be closed after link was pressed. If set to true, notification will
be closed.public HRefRunnable(java.lang.String text, boolean close)
text
- link textclose
- indicates if notification must be closed after link was pressed. If set to true, notification will
be closed.public static java.lang.String getElementName(Element element)
public static HRefRunnable createHRefRunnableForElement(Element element)
public static HRefRunnable createHRefRunnableForElement(Element element, boolean includeVersionForTW)
public static HRefRunnable createHRefRunnableForElement(Element element, boolean includeVersionForTW, @CheckForNull java.lang.String branch)
public void setHref(@CheckForNull java.lang.String href)
href
- runnable idpublic java.lang.String getHref()
public void setCloseOnActivation(boolean closeOnActivation)
closeOnActivation
- close flag. If set to true, notification wll be closed after href link was selected.public boolean isCloseOnActivation()
public java.lang.String getText()
public void setText(java.lang.String text)
text
- new href action presentation textpublic boolean isVisible()
public void setVisible(boolean visible)
visible
- visibility state of action representing hrefpublic java.lang.String getHrefLink()
public boolean runIfIdle()