/** * This file is auto generated from JavaDoc. Do not modify it manually. */ import type { String } from "../../types/java/lang/String"; import type { Node } from "../../types/javax/jcr/Node"; import type { LinkValue } from "../../types/senselogic/sitevision/api/metadata/value/LinkValue"; import type { Builder } from "../../types/senselogic/sitevision/api/base/Builder"; /** * Builder to create {@link LinkValue} instances that can be used to set link metadata. * *
* LinkValueBuilder has one mandatory attribute: *
** LinkValueBuilder also has some optional attributes: *
*null.
* null.
* false.
* * Using the LinkValueBuilder is pretty straightforward, if you remember that it is stateful. Conceptually you * would typically use it like this: *
*
* When you have built a LinkValue instance, you can re-use the LinkValueBuilder 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.metadata.MetadataUtil#getLinkValueBuilder()}.
* See {@link senselogic.sitevision.api.metadata.MetadataUtil} for how to obtain an instance of the MetadataUtil interface.
*
aURL is null or whitespace only
*/
setExternalTarget(aURL: String | string): LinkValueBuilder;
/**
* 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): LinkValueBuilder;
/**
* Sets the target.
* @param aPhoneNumber a phone number
* @return this builder
* @throws IllegalArgumentException if aPhoneNumber is null, whitespace only or an invalid phone number.
* @since Sitevision 4.2.1
*/
setPhoneTarget(aPhoneNumber: String | string): LinkValueBuilder;
/**
* Sets the target.
* @param aNode the target, must be a linkable resource (i.e. a page/article/image/file or such) that isn't trashed.
* @return this builder
* @throws IllegalArgumentException if aNode is null or not a linkable resource.
*/
setInternalTarget(aNode: Node): LinkValueBuilder;
/**
* Sets the link name.
* @param aName the link name
* @return this builder
*/
setName(aName: String | string): LinkValueBuilder;
/**
* Sets the link description.
* @param aDescription the link description
* @return this builder
*/
setDescription(aDescription: String | string): LinkValueBuilder;
/**
* Sets open in new window.
* @param aOpenInNewWindow whether or not the link should be opened in new window
* @return this builder
*/
setOpenInNewWindow(aOpenInNewWindow: boolean): LinkValueBuilder;
/**
* Creates a LinkValue instance using current state of this builder.
* @return a link value
* @throws IllegalStateException if there are no link target.
*/
build(): LinkValue;
}
declare namespace LinkValueBuilder {}
declare var linkValueBuilder: LinkValueBuilder;
export default linkValueBuilder;