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 ExternalFinderItemURLbuild()static ExternalFinderItemURL.Builderfrom(ExternalFinderItemURL item)java.net.URIgenerateSampleURL()ExternalFinderItem.ENCODINGgetEncoding()ExternalFinderItem.TARGETgetTarget()java.lang.StringgetURL()ExternalFinderItemURL.BuildersetEncoding(ExternalFinderItem.ENCODING encoding)ExternalFinderItemURL.BuildersetTarget(ExternalFinderItem.TARGET target)ExternalFinderItemURL.BuildersetURL(java.lang.String url)java.net.URIvalidate()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 ExternalFinderValidationExceptionCheck 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.UnsupportedEncodingExceptionjava.net.URISyntaxException
-
-