Copyright© 2008-2024 Sitevision AB, all rights reserved.
@Requireable(value="LinkPageUtil") public interface LinkPageUtil extends VelocityAccess.LinkPageUtilConstants
sv:link.
Note! This interface is used to create and update link pages. You would typically use
StructureUtil to move a link page
and TrashcanUtil to delete a link page.
Important note! Methods in this interface operates in the
VersionUtil.OFFLINE_VERSION.
Hence, if you create a link page, updates the name of a link page or such, the page must be published
(see PublishingUtil) to have any effect in the
VersionUtil.ONLINE_VERSION
An instance of the Sitevision class implementing this interface can be obtained via WebResourceFactory.getLinkPageUtil().
See WebResourceFactory for how to obtain an instance of the WebResourceFactory interface.
LinkTargetBuilder| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_CREATED_BY
Name of the property specifying the creator of a link page.
|
static String |
PROPERTY_CREATION_DATE
Name of the property specifying the creation date of a link page.
|
static String |
PROPERTY_LAST_MODIFIED_BY
Name of the property specifying the last modifier of a link page.
|
static String |
PROPERTY_LAST_MODIFIED_DATE
Name of the property specifying the last modified date of a link page.
|
static String |
PROPERTY_LAST_PUBLISH_DATE
Name of the property specifying the last published date of a link page.
|
static String |
PROPERTY_LAST_PUBLISHED_BY
Name of the property specifying the last publisher of a link page.
|
static String |
PROPERTY_LAST_UNPUBLISH_DATE
Name of the property specifying the last unpublished date of a link page.
|
static String |
PROPERTY_LAST_UNPUBLISHED_BY
Name of the property specifying the last user to unpublish a link page.
|
static String |
PROPERTY_PUBLISH_DATE
Name of the property specifying the published date of a link page.
|
static String |
PROPERTY_PUBLISHED_BY
Name of the property specifying the publisher of a link page.
|
static String |
PROPERTY_VISIBLE_IN_MENUS
Name of the property specifying if a link page is visible in menus.
|
| Modifier and Type | Method and Description |
|---|---|
Node |
createLinkPage(Node aParent,
String aName,
LinkTarget aLinkTarget)
Creates a link page as sub node of a specified parent.
|
Node |
createLinkPage(Node aParent,
String aName,
LinkTarget aLinkTarget,
Map<String,Object> aProperties)
Creates a link page with properties as sub node of a specified parent.
|
void |
renameLinkPage(Node aLinkPage,
String aName)
Updates the name of a link page.
|
void |
updateLinkPage(Node aLinkPage,
Map<String,Object> aProperties)
Updates the properties of a link page.
|
void |
updateLinkPageTarget(Node aLinkPage,
LinkTarget aLinkTarget)
Updates the target of a link page.
|
getPROPERTY_CREATED_BY, getPROPERTY_CREATION_DATE, getPROPERTY_LAST_MODIFIED_BY, getPROPERTY_LAST_MODIFIED_DATE, getPROPERTY_LAST_PUBLISH_DATE, getPROPERTY_LAST_PUBLISHED_BY, getPROPERTY_LAST_UNPUBLISH_DATE, getPROPERTY_LAST_UNPUBLISHED_BY, getPROPERTY_PUBLISH_DATE, getPROPERTY_PUBLISHED_BY, getPROPERTY_VISIBLE_IN_MENUSstatic final String PROPERTY_VISIBLE_IN_MENUS
visibleInMenus.
The property value must be of type Boolean.
static final String PROPERTY_CREATION_DATE
creationDate.
The property value must be of type Date or a String on format yyyy-MM-dd HH:mm:ss,
where HH:mm:ss is optional (defaults to 00:00:00).
static final String PROPERTY_CREATED_BY
createdBy.
The property value must be a Node with primary node type sv:user or sv:systemUser.
static final String PROPERTY_LAST_MODIFIED_DATE
lastModifiedDate.
The property value must be of type Date or a String on format yyyy-MM-dd HH:mm:ss,
where HH:mm:ss is optional (defaults to 00:00:00).
static final String PROPERTY_LAST_MODIFIED_BY
lastModifiedBy.
The property value must be a Node with primary node type sv:user or sv:systemUser.
static final String PROPERTY_LAST_PUBLISH_DATE
lastPublishDate.
The property value must be of type Date or a String on format yyyy-MM-dd HH:mm:ss,
where HH:mm:ss is optional (defaults to 00:00:00).
static final String PROPERTY_LAST_PUBLISHED_BY
lastPublishedBy.
The property value must be a Node with primary node type sv:user or sv:systemUser.
static final String PROPERTY_PUBLISH_DATE
publishDate.
The property value must be of type Date or a String on format yyyy-MM-dd HH:mm:ss,
where HH:mm:ss is optional (defaults to 00:00:00).
static final String PROPERTY_PUBLISHED_BY
publishedBy.
The property value must be a Node with primary node type sv:user or sv:systemUser.
static final String PROPERTY_LAST_UNPUBLISHED_BY
Name of the property specifying the last user to unpublish a link page.
It corresponds to the sv:link property lastUnpublishedBy.
The property value must be a Node with primary node type sv:user or sv:systemUser.
static final String PROPERTY_LAST_UNPUBLISH_DATE
Name of the property specifying the last unpublished date of a link page.
It corresponds to the sv:link property lastUnpublishDate.
The property value must be of type Date or a String on format yyyy-MM-dd HH:mm:ss,
where HH:mm:ss is optional (defaults to 00:00:00).
Node createLinkPage(Node aParent, String aName, LinkTarget aLinkTarget) throws ConstraintViolationException, RepositoryException
Creates a link page as sub node of a specified parent.
The parent may be:
sv:articlesv:collaborationGroupPagesv:foldersv:pagesv:sitePage
If other parent is specified a ConstraintViolationException is thrown.
Any non-whitespace name can be given a link page, it should however not contain the character '/'.
If no parent, no name or no link target is specified a NullPointerException is thrown.
The current user must be authorized to create links and to do write operations on the parent node or
a ConstraintViolationException will be thrown.
Note that a new link page inherits metadata and permissions from its parent.
aParent - the parent node of the link page. May not be nullaName - the name of the link page. May not be null or whitespace onlyaLinkTarget - the target of the link page. May not be nullConstraintViolationException - if an invalid parent is specified or if the current user
is not authorized to create a link pageRepositoryException - if something else goes wrongNode createLinkPage(Node aParent, String aName, LinkTarget aLinkTarget, Map<String,Object> aProperties) throws ConstraintViolationException, RepositoryException
Creates a link page with properties as sub node of a specified parent.
The parent may be:
sv:articlesv:collaborationGroupPagesv:foldersv:pagesv:sitePage
If other parent is specified a ConstraintViolationException is thrown.
Any non-whitespace name can be given a link page, it should however not contain the character '/'.
If no parent, no name or no link target is specified a NullPointerException is thrown.
The current user must be authorized to create links and to do write operations on the parent node or
a ConstraintViolationException will be thrown.
It is possible to provide these properties for the link page:
PROPERTY_VISIBLE_IN_MENUSPROPERTY_CREATION_DATEPROPERTY_CREATED_BYPROPERTY_LAST_MODIFIED_DATEPROPERTY_LAST_MODIFIED_BYPROPERTY_LAST_PUBLISH_DATEPROPERTY_LAST_PUBLISHED_BYPROPERTY_PUBLISH_DATEPROPERTY_PUBLISHED_BYPROPERTY_LAST_UNPUBLISHED_BYPROPERTY_LAST_UNPUBLISH_DATE
If an invalid value is provided for a property, an IllegalArgumentException is thrown
Default values:
PROPERTY_VISIBLE_IN_MENUS - truePROPERTY_CREATION_DATE - current time stampPROPERTY_CREATED_BY - current userPROPERTY_LAST_MODIFIED_DATE - current time stampPROPERTY_LAST_MODIFIED_BY - current userPROPERTY_LAST_PUBLISH_DATE - null (will not have a value)PROPERTY_LAST_PUBLISHED_BY - null (will not have a value)PROPERTY_PUBLISH_DATE - null (will not have a value)PROPERTY_PUBLISHED_BY - null (will not have a value)PROPERTY_LAST_UNPUBLISHED_BY - null (will not have a value)PROPERTY_LAST_UNPUBLISH_DATE - null (will not have a value)Note that a new link page inherits metadata and permissions from its parent.
aParent - the parent node of the link page. May not be nullaName - the name of the link page. May not be null or whitespace onlyaLinkTarget - the target of the link page. May not be nullaProperties - the link page properties. May be null or emptyConstraintViolationException - if an invalid parent is specified or if the current user
is not authorized to create the link pageRepositoryException - if something else goes wrongvoid renameLinkPage(Node aLinkPage, String aName) throws ConstraintViolationException, RepositoryException
Updates the name of a link page.
Any non-whitespace name can be given a link page, it should however not contain the character '/'.
If no link page or no name is specified a NullPointerException is thrown.
The current user must be authorized to do write operations on the link page or
a ConstraintViolationException will be thrown.
aLinkPage - the link page. May not be nullaName - the name of the link page. May not be null or whitespace onlyConstraintViolationException - if an invalid link page is specified or if the current user
is not authorized to update the link pageRepositoryException - if something else goes wrongvoid updateLinkPageTarget(Node aLinkPage, LinkTarget aLinkTarget) throws ConstraintViolationException, RepositoryException
Updates the target of a link page.
If no link page or no link target is specified a NullPointerException is thrown.
The current user must be authorized to do write operations on the link page or
a ConstraintViolationException will be thrown.
aLinkPage - the link page. May not be nullaLinkTarget - the target of the link page. May not be nullConstraintViolationException - if an invalid link page is specified or if the current user
is not authorized to update the link pageRepositoryException - if something else goes wrongvoid updateLinkPage(Node aLinkPage, Map<String,Object> aProperties) throws ConstraintViolationException, RepositoryException
Updates the properties of a link page.
If no link page is specified a NullPointerException is thrown.
The current user must be authorized to do write operations on the link page or
a ConstraintViolationException will be thrown.
Properties:
PROPERTY_VISIBLE_IN_MENUSPROPERTY_CREATION_DATEPROPERTY_CREATED_BYPROPERTY_LAST_MODIFIED_DATEPROPERTY_LAST_MODIFIED_BYPROPERTY_LAST_PUBLISH_DATEPROPERTY_LAST_PUBLISHED_BYPROPERTY_PUBLISH_DATEPROPERTY_PUBLISHED_BY
If an invalid value is provided for a property, an IllegalArgumentException is thrown
Default values:
PROPERTY_VISIBLE_IN_MENUS - truePROPERTY_CREATION_DATE - current time stampPROPERTY_CREATED_BY - current userPROPERTY_LAST_MODIFIED_DATE - current time stampPROPERTY_LAST_MODIFIED_BY - current userPROPERTY_LAST_PUBLISH_DATE - null (will not have a value)PROPERTY_LAST_PUBLISHED_BY - null (will not have a value)PROPERTY_PUBLISH_DATE - null (will not have a value)PROPERTY_PUBLISHED_BY - null (will not have a value)aLinkPage - the link page. May not be nullaProperties - the link page properties. Should not be null or emptyConstraintViolationException - if an invalid link page is specified or if the current user
is not authorized to update the link pageRepositoryException - if something else goes wrongSitevision - Portal and Content Management Made Easy
Sitevision is an advanced Java enterprise portal product and a portlet container (JSR 286) that implements Java Content Repository (JSR 283).
Copyright© 2008-2024 Sitevision AB, all rights reserved.