Copyright© 2008-2022 Sitevision AB, all rights reserved.
@Requireable(value="ArchiveUtil") public interface ArchiveUtil
sv:archive
.
An instance of the Sitevision class implementing this interface can be obtained via Utils.getArchiveUtil()
.
See Utils
for how to obtain an instance of the Utils
interface.
Modifier and Type | Method and Description |
---|---|
Node |
createArchive(Node aParent,
String aName)
Creates an archive as sub node of the specified parent.
|
void |
renameArchive(Node anArchive,
String aName)
Alters the name of an archive.
|
Node createArchive(Node aParent, String aName) throws ConstraintViolationException, RepositoryException
Creates an archive as sub node of the specified parent.
The parent may be either a sv:sitePage
, sv:page
, sv:folder
, sv:article
or a sv:collaborationGroupPage
.
If an other parent is specified a ConstraintViolationException
is thrown.
Any name can be given an archive. If null is provided a NullPointerException
is thrown.
The current user must be authorized to create archives and to do write operations on the parent node or
a ConstraintViolationException
will be thrown.
Note that a new archive inherits metadata and permissions from its parent.
aParent
- the parent node of the sv:archive. May not be null
aName
- the name of the archive. May not be null
ConstraintViolationException
- if an invalid parent is specified or if the current user
is not authorized to create an archiveRepositoryException
- if something else goes wrongvoid renameArchive(Node anArchive, String aName) throws ConstraintViolationException, RepositoryException
Alters the name of an archive. If no archive is specified a NullPointerException
is thrown. If the node is not a sv:archive an IllegalArgumentException
is thrown.
Any name can be given an archive. If null is provided a NullPointerException
is thrown.
The current user must be authorized to do write operations on the archive or
a ConstraintViolationException
will be thrown.
anArchive
- the archive that should be renamed. May not be null
aName
- the new name of the archive. May not be null
ConstraintViolationException
- if the current user is not authorized to alter the name of the
archiveRepositoryException
- 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-2022 Sitevision AB, all rights reserved.