Class AbstractUrl
-
- All Implemented Interfaces:
-
ai.platon.pulsar.common.urls.ComparableUrlAware,ai.platon.pulsar.common.urls.UrlAware,kotlin.Comparable
public abstract class AbstractUrl implements ComparableUrlAware
An abstract url is a url with some common properties and methods.
-
-
Field Summary
Fields Modifier and Type Field Description private final StringconfiguredUrlprivate final BooleanisStandardprivate final URLtoURLprivate final URLtoURLOrNullprivate final BooleanisNilprivate final BooleanisPersistableprivate final Stringlabelprivate final Instantdeadlineprivate Stringurlprivate Stringtextprivate Integerorderprivate Stringreferrerprivate Stringargsprivate Stringhrefprivate Integerpriorityprivate Stringlangprivate Stringcountryprivate Stringdistrictprivate IntegernMaxRetryprivate Integerdepth
-
Method Summary
Modifier and Type Method Description StringgetConfiguredUrl()The configured url, always be "$url $args" BooleanisStandard()If true, the url is standard and can be converted to a java.net.URL URLgetToURL()Converted to a java.net.URL URLgetToURLOrNull()Converted to a java.net.URL, if the url is invalid, return null BooleanisNil()An url is Nil if it equals to AppConstants. BooleanisPersistable()If true, the url is persistable, it can be saved to the database. StringgetLabel()The url label, it should be a shortcut for -labeloption in load optionsInstantgetDeadline()The deadline, it should be a shortcut for -deadlineoption in load optionsStringgetUrl()The url specification of the hyperlink, it is usually normalized, and can contain load arguments. UnitsetUrl(String url)The url specification of the hyperlink, it is usually normalized, and can contain load arguments. StringgetText()The anchor text UnitsetText(String text)The anchor text IntegergetOrder()The order of this hyperlink in it referrer page UnitsetOrder(Integer order)The order of this hyperlink in it referrer page StringgetReferrer()The url of the referrer page UnitsetReferrer(String referrer)The url of the referrer page StringgetArgs()The additional url arguments UnitsetArgs(String args)The additional url arguments StringgetHref()The hypertext reference, It defines the address of the document, which this time is linked from UnitsetHref(String href)The hypertext reference, It defines the address of the document, which this time is linked from IntegergetPriority()The priority of this hyperlink UnitsetPriority(Integer priority)The priority of this hyperlink StringgetLang()The language of this hyperlink UnitsetLang(String lang)The language of this hyperlink StringgetCountry()The country of this hyperlink UnitsetCountry(String country)The country of this hyperlink StringgetDistrict()The district of this hyperlink UnitsetDistrict(String district)The district of this hyperlink IntegergetNMaxRetry()The maximum number of retries UnitsetNMaxRetry(Integer nMaxRetry)The maximum number of retries IntegergetDepth()The depth of this hyperlink UnitsetDepth(Integer depth)The depth of this hyperlink Booleanequals(Object other)An abstract url can compare to one of the following types: IntegercompareTo(UrlAware other)IntegerhashCode()StringtoString()Stringserialize()Serialize the url to a string StringBuilderserializeTo(StringBuilder sb)Serialize the url to a string builder -
-
Method Detail
-
getConfiguredUrl
String getConfiguredUrl()
The configured url, always be "$url $args"
-
isStandard
Boolean isStandard()
If true, the url is standard and can be converted to a java.net.URL
-
getToURL
URL getToURL()
Converted to a java.net.URL
-
getToURLOrNull
URL getToURLOrNull()
Converted to a java.net.URL, if the url is invalid, return null
-
isPersistable
Boolean isPersistable()
If true, the url is persistable, it can be saved to the database. Not all urls are persistable, for example, a ListenableHyperlink with events is not persistable.
-
getDeadline
Instant getDeadline()
The deadline, it should be a shortcut for
-deadlineoption in load options
-
getUrl
String getUrl()
The url specification of the hyperlink, it is usually normalized, and can contain load arguments.
-
setUrl
Unit setUrl(String url)
The url specification of the hyperlink, it is usually normalized, and can contain load arguments.
-
getReferrer
String getReferrer()
The url of the referrer page
-
setReferrer
Unit setReferrer(String referrer)
The url of the referrer page
-
getHref
String getHref()
The hypertext reference, It defines the address of the document, which this time is linked from
-
setHref
Unit setHref(String href)
The hypertext reference, It defines the address of the document, which this time is linked from
-
getPriority
Integer getPriority()
The priority of this hyperlink
-
setPriority
Unit setPriority(Integer priority)
The priority of this hyperlink
-
getCountry
String getCountry()
The country of this hyperlink
-
setCountry
Unit setCountry(String country)
The country of this hyperlink
-
getDistrict
String getDistrict()
The district of this hyperlink
-
setDistrict
Unit setDistrict(String district)
The district of this hyperlink
-
getNMaxRetry
Integer getNMaxRetry()
The maximum number of retries
-
setNMaxRetry
Unit setNMaxRetry(Integer nMaxRetry)
The maximum number of retries
-
serializeTo
StringBuilder serializeTo(StringBuilder sb)
Serialize the url to a string builder
-
-
-
-