/** * This file is auto generated from JavaDoc. Do not modify it manually. */ import type { Node } from "../../types/javax/jcr/Node"; import type { String } from "../../types/java/lang/String"; import type { LinkTarget } from "../../types/senselogic/sitevision/api/webresource/LinkTarget"; import type { Builder } from "../../types/senselogic/sitevision/api/base/Builder"; /** * Builder to create link target instances that can be used to create and update a Link page * via {@link senselogic.sitevision.api.webresource.LinkPageUtil}. * *
* LinkTargetBuilder has one mandatory attribute: *
** LinkTargetBuilder also has some optional attributes: *
*null.
* false.
* * Using the LinkTargetBuilder is pretty straightforward, if you remember that it is stateful. Conceptually you * would typically use it like this: *
*
* When you have built a LinkTarget instance, you can re-use the LinkTargetBuilder to build more instances. Something like:
*
* Tip! The {@link senselogic.sitevision.api.base.Builder Builder interface documentation} contains * more information about Builders and how to work with them! *
* *
* An instance of the Sitevision class implementing this interface can be obtained via
* {@link senselogic.sitevision.api.webresource.WebResourceFactory#getLinkTargetBuilder()}.
* See {@link senselogic.sitevision.api.webresource.WebResourceFactory} for how to obtain an instance of the
* WebResourceFactory interface.
*
aNode is null or not a linkable resource.
*/
setInternalTarget(aNode: Node): LinkTargetBuilder;
/**
* Sets the target.
* @param aURL the link target URL
* @return this builder
* @throws IllegalArgumentException if aURL is null or whitespace only
*/
setExternalTarget(aURL: String | string): LinkTargetBuilder;
/**
* Sets the target.
* @param aMailAddress a mail address
* @return this builder
* @throws IllegalArgumentException if aMailAddress is null, whitespace only or an invalid mail address.
* @see senselogic.sitevision.api.mail.MailUtil#isValidAddress(String)
*/
setMailTarget(aMailAddress: String | string): LinkTargetBuilder;
/**
* Sets the target.
* @param aPhoneNumber a phone number
* @return this builder
* @throws IllegalArgumentException if aPhoneNumber is null, whitespace only or an invalid phone number.
*/
setPhoneTarget(aPhoneNumber: String | string): LinkTargetBuilder;
/**
* Sets the description.
* @param aDescription the description
* @return this builder
*/
setDescription(aDescription: String | string): LinkTargetBuilder;
/**
* Sets open in new window.
* @param aOpenInNewWindow whether or not the target should be opened in new window
* @return this builder
*/
setOpenInNewWindow(aOpenInNewWindow: boolean): LinkTargetBuilder;
/**
* Creates a LinkTarget instance using current state of this builder.
*
* * * Note! The 'open in new window' state is ignored when creating a LinkTarget with * a mail or telephone target (these target types can never be opened in a new window). * *
* @return a link target * @throws IllegalStateException if there are no link target. */ build(): LinkTarget; } declare namespace LinkTargetBuilder {} declare var linkTargetBuilder: LinkTargetBuilder; export default linkTargetBuilder;