Package org.omegat.externalfinder.item
Class ExternalFinderItemURL.Builder
- java.lang.Object
-
- org.omegat.externalfinder.item.ExternalFinderItemURL.Builder
-
- Enclosing class:
- ExternalFinderItemURL
public static final class ExternalFinderItemURL.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ExternalFinderItemURL
build()
static ExternalFinderItemURL.Builder
from(ExternalFinderItemURL item)
java.net.URI
generateSampleURL()
ExternalFinderItem.ENCODING
getEncoding()
ExternalFinderItem.TARGET
getTarget()
java.lang.String
getURL()
ExternalFinderItemURL.Builder
setEncoding(ExternalFinderItem.ENCODING encoding)
ExternalFinderItemURL.Builder
setTarget(ExternalFinderItem.TARGET target)
ExternalFinderItemURL.Builder
setURL(java.lang.String url)
java.net.URI
validate()
Check the current builder parameters to see if they constitute a valid URL.
-
-
-
Method Detail
-
from
public static ExternalFinderItemURL.Builder from(ExternalFinderItemURL item)
-
setURL
public ExternalFinderItemURL.Builder setURL(java.lang.String url)
-
getURL
public java.lang.String getURL()
-
setTarget
public ExternalFinderItemURL.Builder setTarget(ExternalFinderItem.TARGET target)
-
getTarget
public ExternalFinderItem.TARGET getTarget()
-
setEncoding
public ExternalFinderItemURL.Builder setEncoding(ExternalFinderItem.ENCODING encoding)
-
getEncoding
public ExternalFinderItem.ENCODING getEncoding()
-
build
public ExternalFinderItemURL build() throws ExternalFinderValidationException
-
validate
public java.net.URI validate() throws ExternalFinderValidationException
Check the current builder parameters to see if they constitute a valid URL.- Returns:
- A sample URL illustrating what the output will look like
- Throws:
ExternalFinderValidationException
- If any parameter is not valid
-
generateSampleURL
public java.net.URI generateSampleURL() throws java.io.UnsupportedEncodingException, java.net.URISyntaxException
- Throws:
java.io.UnsupportedEncodingException
java.net.URISyntaxException
-
-