/** * 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"; /** * Channel utility interface. * *

* An instance of the Sitevision class implementing this interface can be obtained via * {@link MessagesFactory#getChannelUtil()}. * See {@link MessagesFactory} for how to obtain an instance of the MessagesFactory interface. *

* @author Elias Abrache * @since Sitevision 2024.05.1 */ export interface ChannelUtil { /** * Creates a channel. *

* A ConstraintViolationException will be thrown if social collaboration is not enabled * Or if current user is attempting to create a private channel without * {@link senselogic.sitevision.api.security.PermissionUtil.Permission#CREATE_PRIVATE_CHANNELS} permission. *

* *

* A IllegalArgumentException will be thrown if aName is null, blank or exceeds 80 characters. *

* *

* A ItemExistsException will be thrown if a channel with the same name already exists. *

* *

* A RepositoryException will be thrown If an error occurs while fetching channels *

* @param aName the name of the channel (Must be unique and must not exceed 80 characters) * @param aDescription the description of the channel * @param aPrivate whether the channel should be private or not * @throws RepositoryException if an error occurs. * @return a channel wrapper for the newly created channel, or null. */ createChannel( aName: String | string, aDescription: String | string, aPrivate: boolean ): Node; /** * Searches for a channel by name. * *

* Permission note Private channels can only be found by members. *

* *

* A ConstraintViolationException will be thrown if social collaboration is not enabled. *

* *

* A RepositoryException will be thrown if an error occurs while fetching channels. *

* @return the channel node, or null. * @param aChannelName the name of the channel to search for. * @throws RepositoryException if an error occurs. */ findChannelByName(aChannelName: String | string): Node; } declare namespace ChannelUtil {} declare var channelUtil: ChannelUtil; export default channelUtil;