Package com.google.gerrit.entities
Class StoredCommentLinkInfo
- java.lang.Object
-
- com.google.gerrit.entities.StoredCommentLinkInfo
-
public abstract class StoredCommentLinkInfo extends Object
Info about a single commentlink section in a config.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StoredCommentLinkInfo.Builder
-
Constructor Summary
Constructors Constructor Description StoredCommentLinkInfo()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static StoredCommentLinkInfo.Builder
builder(String name)
Creates and returns a newStoredCommentLinkInfo.Builder
instance.static StoredCommentLinkInfo
disabled(String name)
Creates a disabledStoredCommentLinkInfo
that can be overridden but doesn't do anything on it's own.static StoredCommentLinkInfo
enabled(String name)
Creates an enabledStoredCommentLinkInfo
that can be overridden but doesn't do anything on its own.static StoredCommentLinkInfo
fromInfo(CommentLinkInfo src, Boolean enabled)
Creates and returns a newStoredCommentLinkInfo
instance with the same values.abstract Boolean
getEnabled()
Weather this comment link is active.abstract String
getHtml()
The html to replace the match with.abstract String
getLink()
The link to replace the match with.abstract String
getMatch()
A regular expression to match for the commentlink to apply.abstract String
getName()
abstract boolean
getOverrideOnly()
If set,StoredCommentLinkInfo
has to be overridden to take any effect.abstract String
getPrefix()
The text before the link tag that the match is replaced with.abstract String
getSuffix()
The text after the link tag that the match is replaced with.abstract String
getText()
The content of the link tag that the match is replaced with.CommentLinkInfo
toInfo()
Returns anCommentLinkInfo
instance with the same values.
-
-
-
Method Detail
-
getName
public abstract String getName()
-
getMatch
public abstract String getMatch()
A regular expression to match for the commentlink to apply.
-
getLink
public abstract String getLink()
The link to replace the match with. This can only be set if html isnull
.The constructed link is using
getLink()
getPrefix()
getSuffix()
andgetText()
, and has the shape ofPREFIX<a href="LINK">TEXT</a>SUFFIX
-
getPrefix
public abstract String getPrefix()
The text before the link tag that the match is replaced with. This can only be set if link is notnull
.
-
getSuffix
public abstract String getSuffix()
The text after the link tag that the match is replaced with. This can only be set if link is notnull
.
-
getText
public abstract String getText()
The content of the link tag that the match is replaced with. This can only be set if link is notnull
.
-
getHtml
public abstract String getHtml()
The html to replace the match with. This can only be set if link isnull
.
-
getEnabled
public abstract Boolean getEnabled()
Weather this comment link is active.null
means true.
-
getOverrideOnly
public abstract boolean getOverrideOnly()
If set,StoredCommentLinkInfo
has to be overridden to take any effect.
-
enabled
public static StoredCommentLinkInfo enabled(String name)
Creates an enabledStoredCommentLinkInfo
that can be overridden but doesn't do anything on its own.
-
disabled
public static StoredCommentLinkInfo disabled(String name)
Creates a disabledStoredCommentLinkInfo
that can be overridden but doesn't do anything on it's own.
-
builder
public static StoredCommentLinkInfo.Builder builder(String name)
Creates and returns a newStoredCommentLinkInfo.Builder
instance.
-
fromInfo
public static StoredCommentLinkInfo fromInfo(CommentLinkInfo src, Boolean enabled)
Creates and returns a newStoredCommentLinkInfo
instance with the same values.
-
toInfo
public CommentLinkInfo toInfo()
Returns anCommentLinkInfo
instance with the same values.
-
-