@sitevision/api 2025.10.1 → 2026.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +5 -0
- package/package.json +2 -2
- package/server/ContentFormat/index.d.ts +20 -0
- package/server/ContentFormat/index.js +12 -0
- package/server/ContentRendererBuilder/index.d.ts +93 -0
- package/server/ContentRendererBuilder/index.js +14 -0
- package/server/CreateContentFactory/index.d.ts +53 -0
- package/server/CreateContentFactory/index.js +13 -0
- package/server/FileUtil/index.d.ts +21 -0
- package/server/FileUtil/index.js +1 -0
- package/server/FolderUtil/index.d.ts +24 -11
- package/server/GeolocationValueBuilder/index.d.ts +95 -0
- package/server/GeolocationValueBuilder/index.js +15 -0
- package/server/ImageUtil/index.d.ts +25 -4
- package/server/ImageUtil/index.js +1 -0
- package/server/LinkValueBuilder/index.d.ts +1 -1
- package/server/MetadataUtil/index.d.ts +23 -2
- package/server/MetadataUtil/index.js +2 -1
- package/server/OutputUtil/index.d.ts +5 -1
- package/server/PermissionUtil.Permission/index.d.ts +1 -0
- package/server/PermissionUtil.Permission/index.js +2 -1
- package/server/RelatedValueBuilder/index.d.ts +1 -1
- package/server/RendererBuilderFactory/index.d.ts +44 -0
- package/server/RendererBuilderFactory/index.js +13 -0
- package/server/TagUtil/index.d.ts +6 -3
- package/server/TextModuleRendererBuilder/index.d.ts +2 -2
- package/server/Utils/index.d.ts +16 -0
- package/server/Utils/index.js +3 -1
- package/server/ai/index.d.ts +19 -1
- package/types/senselogic/sitevision/api/metadata/value/GeolocationValue/index.d.ts +25 -0
- package/types/senselogic/sitevision/api/metadata/value/GeolocationValue/index.js +10 -0
- package/types/senselogic/sitevision/api/render/ContentRenderer/index.d.ts +127 -0
- package/types/senselogic/sitevision/api/render/ContentRenderer/index.js +16 -0
- package/types/senselogic/sitevision/api/render/TextModuleRenderer/index.d.ts +24 -3
- package/types/senselogic/sitevision/api/render/TextModuleRenderer/index.js +1 -0
- package/types/senselogic/sitevision/api/script/VersionedRestApi/index.d.ts +1 -1
- package/types/senselogic/sitevision/api/webresource/webcontent/TextModuleCreator/index.d.ts +157 -0
- package/types/senselogic/sitevision/api/webresource/webcontent/TextModuleCreator/index.js +17 -0
- package/types/senselogic/sitevision/api/webresource/webcontent/TextModuleUpdater/index.d.ts +147 -0
- package/types/senselogic/sitevision/api/webresource/webcontent/TextModuleUpdater/index.js +16 -0
package/index.d.ts
CHANGED
|
@@ -19,7 +19,10 @@ import './server/ColorUtil';
|
|
|
19
19
|
import './server/CompoundAndFilterBuilder';
|
|
20
20
|
import './server/CompoundComparatorBuilder';
|
|
21
21
|
import './server/CompoundOrFilterBuilder';
|
|
22
|
+
import './server/ContentFormat';
|
|
22
23
|
import './server/ContentNodeUtil';
|
|
24
|
+
import './server/ContentRendererBuilder';
|
|
25
|
+
import './server/CreateContentFactory';
|
|
23
26
|
import './server/CurrencyFactory';
|
|
24
27
|
import './server/DateUtil';
|
|
25
28
|
import './server/DecorationUtil';
|
|
@@ -37,6 +40,7 @@ import './server/FilterBuilder';
|
|
|
37
40
|
import './server/FolderUtil';
|
|
38
41
|
import './server/FontUtil';
|
|
39
42
|
import './server/FormatterBuilderFactory';
|
|
43
|
+
import './server/GeolocationValueBuilder';
|
|
40
44
|
import './server/HighlightBuilder';
|
|
41
45
|
import './server/IconUtil';
|
|
42
46
|
import './server/ImageLinkRenderer';
|
|
@@ -89,6 +93,7 @@ import './server/PublishingUtil';
|
|
|
89
93
|
import './server/QueryStringUtil';
|
|
90
94
|
import './server/RedirectUtil';
|
|
91
95
|
import './server/RelatedValueBuilder';
|
|
96
|
+
import './server/RendererBuilderFactory';
|
|
92
97
|
import './server/Requester';
|
|
93
98
|
import './server/ResourceLocatorUtil';
|
|
94
99
|
import './server/RestApi';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitevision/api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2026.1.1",
|
|
4
4
|
"author": "Sitevision AB",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"access": "public",
|
|
31
31
|
"directory": "dist"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "52e580c21b77cedc38ef73fbec05ded93d37dd6c"
|
|
34
34
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto generated from JavaDoc. Do not modify it manually.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Content format types for text modules.
|
|
7
|
+
*
|
|
8
|
+
* <p>
|
|
9
|
+
* This enum defines the supported content formats that can be used when creating or updating
|
|
10
|
+
* text modules. The format determines how the raw content string is parsed and converted into
|
|
11
|
+
* rich text elements.
|
|
12
|
+
* </p>
|
|
13
|
+
* @author Jens Kalshoven
|
|
14
|
+
* @since Sitevision 2026.01.1
|
|
15
|
+
*/
|
|
16
|
+
declare enum ContentFormat {
|
|
17
|
+
MARKDOWN,
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default ContentFormat;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* This file is auto generated. Do not modify it manually.
|
|
9
|
+
*/
|
|
10
|
+
var _default = exports["default"] = {
|
|
11
|
+
MARKDOWN: "MARKDOWN"
|
|
12
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto generated from JavaDoc. Do not modify it manually.
|
|
3
|
+
*/
|
|
4
|
+
import type { Node } from "../../types/javax/jcr/Node";
|
|
5
|
+
import type { Map } from "../../types/java/util/Map";
|
|
6
|
+
import type { ContentRenderer } from "../../types/senselogic/sitevision/api/render/ContentRenderer";
|
|
7
|
+
import type { Builder } from "../../types/senselogic/sitevision/api/base/Builder";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* <p>
|
|
11
|
+
* Builder for creating a {@link ContentRenderer} instance.
|
|
12
|
+
* </p>
|
|
13
|
+
*
|
|
14
|
+
* <p>
|
|
15
|
+
* ContentRendererBuilder has one <strong>mandatory attribute</strong> and one <em>optional</em> attribute:
|
|
16
|
+
* </p>
|
|
17
|
+
* <ul>
|
|
18
|
+
* <li>
|
|
19
|
+
* <em>page</em> (mandatory) - The page (sv:page, sv:article, sv:sitePage) where the content nodes to render resides.
|
|
20
|
+
* Must not be null and must not be "current page".
|
|
21
|
+
* </li>
|
|
22
|
+
* <li>
|
|
23
|
+
* <em>parameters</em> (optional) - A key/value map of page parameters to use when rendering the content nodes. May be null or empty.
|
|
24
|
+
* </li>
|
|
25
|
+
* </ul>
|
|
26
|
+
*
|
|
27
|
+
* <p>
|
|
28
|
+
* Using the ContentRendererBuilder is pretty straightforward, if you remember that it is <strong>stateful</strong>. Conceptually you
|
|
29
|
+
* would typically use it like this:
|
|
30
|
+
* </p>
|
|
31
|
+
* <ol>
|
|
32
|
+
* <li>Get the ContentRendererBuilder</li>
|
|
33
|
+
* <li>Set the page</li>
|
|
34
|
+
* <li>Potentially set the page parameters</li>
|
|
35
|
+
* <li>Do build</li>
|
|
36
|
+
* </ol>
|
|
37
|
+
* <p>
|
|
38
|
+
* When you have built a <code>ContentRenderer</code> instance, you can re-use the ContentRendererBuilder to build more instances.
|
|
39
|
+
* Typically like:
|
|
40
|
+
* </p>
|
|
41
|
+
* <ol>
|
|
42
|
+
* <li>Set the page</li>
|
|
43
|
+
* <li>Potentially set the page parameters</li>
|
|
44
|
+
* <li>Do build</li>
|
|
45
|
+
* </ol>
|
|
46
|
+
*
|
|
47
|
+
* <p>
|
|
48
|
+
* <strong>Tip!</strong> The {@link senselogic.sitevision.api.base.Builder Builder interface documentation} contains
|
|
49
|
+
* more information about Builders and how to work with them and {@link TextModuleRenderer} has a code example of how
|
|
50
|
+
* this builder and its result can be used.
|
|
51
|
+
* </p>
|
|
52
|
+
*
|
|
53
|
+
* <p>
|
|
54
|
+
* An instance of the Sitevision class implementing this interface can be obtained via
|
|
55
|
+
* {@link RendererBuilderFactory#getContentRendererBuilder()}.
|
|
56
|
+
* See {@link RendererBuilderFactory} for how to obtain an instance of the <code>RendererBuilderFactory</code> interface.
|
|
57
|
+
* </p>
|
|
58
|
+
* @author Magnus Lövgren
|
|
59
|
+
* @since Sitevision 2026.01.1
|
|
60
|
+
*/
|
|
61
|
+
export interface ContentRendererBuilder extends Builder {
|
|
62
|
+
/**
|
|
63
|
+
* Sets the page of this builder.
|
|
64
|
+
*
|
|
65
|
+
* <p>
|
|
66
|
+
* <strong>Note! Due to security reasons (potential never-ending loops) it is prohibited to create a content renderer for
|
|
67
|
+
* the currently executing page (i.e. {@link senselogic.sitevision.api.context.PortletContextUtil#getCurrentPage()})!</strong>
|
|
68
|
+
* </p>
|
|
69
|
+
* @param aPageNode a page node (sv:page, sv:article, sv:sitePage) where current user has READ permission, must not be null or "current page".
|
|
70
|
+
* @return this builder
|
|
71
|
+
*/
|
|
72
|
+
setPage(aPageNode: Node): ContentRendererBuilder;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Sets parameters for the page, to be used when rendering content.
|
|
76
|
+
* @param aParameters a map of parameters
|
|
77
|
+
* @return this builder
|
|
78
|
+
*/
|
|
79
|
+
setParameters(aParameters: Map | {}): ContentRendererBuilder;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Creates a ContentRenderer instance for the page of this builder.
|
|
83
|
+
* @return a content renderer instance
|
|
84
|
+
* @throws IllegalStateException if no page is set or if page is invalid (e.g. "current page")
|
|
85
|
+
*/
|
|
86
|
+
build(): ContentRenderer;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
declare namespace ContentRendererBuilder {}
|
|
90
|
+
|
|
91
|
+
declare var contentRendererBuilder: ContentRendererBuilder;
|
|
92
|
+
|
|
93
|
+
export default contentRendererBuilder;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* This file is auto generated. Do not modify it manually.
|
|
9
|
+
*/
|
|
10
|
+
var _default = exports["default"] = {
|
|
11
|
+
setPage: function setPage() {},
|
|
12
|
+
setParameters: function setParameters() {},
|
|
13
|
+
build: function build() {}
|
|
14
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto generated from JavaDoc. Do not modify it manually.
|
|
3
|
+
*/
|
|
4
|
+
import type { TextModuleCreator } from "../../types/senselogic/sitevision/api/webresource/webcontent/TextModuleCreator";
|
|
5
|
+
import type { TextModuleUpdater } from "../../types/senselogic/sitevision/api/webresource/webcontent/TextModuleUpdater";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Factory for creating and updating web content in Sitevision.
|
|
9
|
+
*
|
|
10
|
+
* <p>
|
|
11
|
+
* This factory provides builder instances for creating and updating content.
|
|
12
|
+
* </p>
|
|
13
|
+
*
|
|
14
|
+
* <p>
|
|
15
|
+
* An instance of the Sitevision class implementing this interface can be obtained via
|
|
16
|
+
* {@link senselogic.sitevision.api.Utils#getCreateContentFactory()}.
|
|
17
|
+
* See {@link senselogic.sitevision.api.Utils} for how to obtain an instance of the
|
|
18
|
+
* <code>Utils</code> interface.
|
|
19
|
+
* </p>
|
|
20
|
+
* @author Jens Kalshoven
|
|
21
|
+
* @since Sitevision 2026.01.1
|
|
22
|
+
*/
|
|
23
|
+
export interface CreateContentFactory {
|
|
24
|
+
/**
|
|
25
|
+
* Gets a builder for creating new text modules.
|
|
26
|
+
*
|
|
27
|
+
* <p>
|
|
28
|
+
* The returned builder can be used to configure and create a new text module (text portlet)
|
|
29
|
+
* on a page or within a layout. Each call to this method returns a fresh builder instance
|
|
30
|
+
* with no state carried over from previous operations.
|
|
31
|
+
* </p>
|
|
32
|
+
* @return a new TextModuleCreator builder instance
|
|
33
|
+
*/
|
|
34
|
+
getTextModuleCreator(): TextModuleCreator;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Gets a builder for updating existing text modules.
|
|
38
|
+
*
|
|
39
|
+
* <p>
|
|
40
|
+
* The returned builder can be used to update the content of an existing text module (text portlet).
|
|
41
|
+
* Each call to this method returns a fresh builder instance with no state carried over from
|
|
42
|
+
* previous operations.
|
|
43
|
+
* </p>
|
|
44
|
+
* @return a new TextModuleUpdater builder instance
|
|
45
|
+
*/
|
|
46
|
+
getTextModuleUpdater(): TextModuleUpdater;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare namespace CreateContentFactory {}
|
|
50
|
+
|
|
51
|
+
declare var createContentFactory: CreateContentFactory;
|
|
52
|
+
|
|
53
|
+
export default createContentFactory;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* This file is auto generated. Do not modify it manually.
|
|
9
|
+
*/
|
|
10
|
+
var _default = exports["default"] = {
|
|
11
|
+
getTextModuleCreator: function getTextModuleCreator() {},
|
|
12
|
+
getTextModuleUpdater: function getTextModuleUpdater() {}
|
|
13
|
+
};
|
|
@@ -131,6 +131,27 @@ export interface FileUtil {
|
|
|
131
131
|
*/
|
|
132
132
|
createFileFromTemporary(aParent: Node, aTemporaryFile: Node): Node;
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Copies a file to a given parent.
|
|
136
|
+
*
|
|
137
|
+
* <p>
|
|
138
|
+
* Note that the <code>aParent</code> of the file must be a <code>sv:localFileRepository</code>, <code>sv:fileRepository</code>,
|
|
139
|
+
* <code>sv:personalFileRepository</code> or a <code>sv:folder</code> residing as sub node to a file repository.
|
|
140
|
+
* The <code>aParent</code> must not be trashed.
|
|
141
|
+
* </p>
|
|
142
|
+
* <p>
|
|
143
|
+
* <strong>Permission note!</strong> Current user must be authorized to alter the parent node
|
|
144
|
+
* (e.g. {@link senselogic.sitevision.api.security.PermissionUtil.Permission#WRITE}).
|
|
145
|
+
* </p>
|
|
146
|
+
* @param aFile the file node to copy
|
|
147
|
+
* @param aParent the parent node where the file should be copied to
|
|
148
|
+
* @return a file node corresponding to the newly created file
|
|
149
|
+
* @throws ConstraintViolationException if the user is not authorized to alter the parent node, if an invalid
 parent node is specified, if an invalid file node is specified
|
|
150
|
+
* @throws RepositoryException if something else goes wrong
|
|
151
|
+
* @since Sitevision 2026.01.1
|
|
152
|
+
*/
|
|
153
|
+
copyFile(aFile: Node, aParent: Node): Node;
|
|
154
|
+
|
|
134
155
|
/**
|
|
135
156
|
* Updates the binary content of an existing file using a uri string.
|
|
136
157
|
*
|
package/server/FileUtil/index.js
CHANGED
|
@@ -12,6 +12,7 @@ var _default = exports["default"] = {
|
|
|
12
12
|
createFile: function createFile() {},
|
|
13
13
|
createFileFromBase64: function createFileFromBase64() {},
|
|
14
14
|
createFileFromTemporary: function createFileFromTemporary() {},
|
|
15
|
+
copyFile: function copyFile() {},
|
|
15
16
|
updateBinaryContent: function updateBinaryContent() {},
|
|
16
17
|
updateBinaryContentFromBase64: function updateBinaryContentFromBase64() {},
|
|
17
18
|
updateBinaryContentFromTemporary: function updateBinaryContentFromTemporary() {},
|
|
@@ -22,9 +22,8 @@ import type { String } from "../../types/java/lang/String";
|
|
|
22
22
|
*/
|
|
23
23
|
export interface FolderUtil {
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* </p>
|
|
25
|
+
* Creates a folder as sub node of the specified parent.
|
|
26
|
+
*
|
|
28
27
|
* <p>
|
|
29
28
|
* The parent may be either a {@code sv:sitePage}, {@code sv:page}, {@code sv:folder}, {@code sv:article}, {@code sv:collaborationGroupPage},
|
|
30
29
|
* {@code sv:imageRepository}, {@code sv:localImageRepository}, {@code sv:personalImageRepository},
|
|
@@ -33,10 +32,15 @@ export interface FolderUtil {
|
|
|
33
32
|
* If an other parent is specified an <code>ConstraintViolationException</code> is thrown.
|
|
34
33
|
* </p>
|
|
35
34
|
*
|
|
36
|
-
* <p>
|
|
35
|
+
* <p>
|
|
36
|
+
* Any name can be given the folder. If null is provided a <code>NullPointerException</code> is thrown.
|
|
37
|
+
* </p>
|
|
37
38
|
*
|
|
38
|
-
* <p>
|
|
39
|
-
*
|
|
39
|
+
* <p>
|
|
40
|
+
* The current user must be authorized to create folders and to do write operations on the parent node or a
|
|
41
|
+
* <code>ConstraintViolationException</code> will be thrown. <em>Note that creation of a folder in the sv:personalFileRepository or
|
|
42
|
+
* sv:localImageRepository of a sv:collaborationGroup is also allowed for members of the group.</em>
|
|
43
|
+
* </p>
|
|
40
44
|
*
|
|
41
45
|
* <p>Note that a new folder inherits metadata and permissions from its parent.</p>
|
|
42
46
|
* @param aParent the parent node of the sv:folder. May not be <code>null</code>
|
|
@@ -48,13 +52,22 @@ export interface FolderUtil {
|
|
|
48
52
|
createFolder(aParent: Node, aName: String | string): Node;
|
|
49
53
|
|
|
50
54
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
55
|
+
* Alters the name of a folder.
|
|
56
|
+
*
|
|
57
|
+
* <p>
|
|
58
|
+
* If no folder is specified a <code>NullPointerException</code> is thrown.
|
|
59
|
+
* If the node is not a sv:folder an <code>IllegalArgumentException</code> is thrown.
|
|
60
|
+
* </p>
|
|
53
61
|
*
|
|
54
|
-
* <p>
|
|
62
|
+
* <p>
|
|
63
|
+
* Any name can be given a folder. If null is provided a <code>NullPointerException</code> is thrown.
|
|
64
|
+
* </p>
|
|
55
65
|
*
|
|
56
|
-
* <p>
|
|
57
|
-
*
|
|
66
|
+
* <p>
|
|
67
|
+
* The current user must be authorized to do write operations on the folder or a <code>ConstraintViolationException</code> will be thrown.
|
|
68
|
+
* <em>Note that rename of a folder in the sv:personalFileRepository or sv:localImageRepository of a sv:collaborationGroup is also allowed
|
|
69
|
+
* for members of the group.</em>
|
|
70
|
+
* </p>
|
|
58
71
|
* @param aFolder the sv:folder that should be renamed. May not be <code>null</code>
|
|
59
72
|
* @param aName the new name of the folder. May not be <code>null</code>
|
|
60
73
|
* @throws ConstraintViolationException if the current user is not authorized to alter the name of the folder
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto generated from JavaDoc. Do not modify it manually.
|
|
3
|
+
*/
|
|
4
|
+
import type { String } from "../../types/java/lang/String";
|
|
5
|
+
|
|
6
|
+
import type { GeolocationValue } from "../../types/senselogic/sitevision/api/metadata/value/GeolocationValue";
|
|
7
|
+
import type { Builder } from "../../types/senselogic/sitevision/api/base/Builder";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Builder to create {@link GeolocationValue} instances that can be used to set geolocation metadata.
|
|
11
|
+
*
|
|
12
|
+
* <p>
|
|
13
|
+
* GeolocationValueBuilder has three <strong>mandatory attributes</strong>:
|
|
14
|
+
* </p>
|
|
15
|
+
* <ul>
|
|
16
|
+
* <li>
|
|
17
|
+
* <em>name</em> - The location name. Must not be null or blank.
|
|
18
|
+
* </li>
|
|
19
|
+
* <li>
|
|
20
|
+
* <em>latitude</em> - The Latitude. Must be a double value within range <code>[-90.0 ... 90.0]</code>.
|
|
21
|
+
* </li>
|
|
22
|
+
* <li>
|
|
23
|
+
* <em>longitude</em> - The Longitude. Must be a double value within range <code>[-180.0 ... 180.0]</code>.
|
|
24
|
+
* </li>
|
|
25
|
+
* </ul>
|
|
26
|
+
* <p>
|
|
27
|
+
* Using the GeolocationValueBuilder is pretty straightforward, if you remember that it is <strong>stateful</strong>. Conceptually you
|
|
28
|
+
* would typically use it like this:
|
|
29
|
+
* </p>
|
|
30
|
+
* <ol>
|
|
31
|
+
* <li>Get the GeolocationValueBuilder</li>
|
|
32
|
+
* <li>Set the name</li>
|
|
33
|
+
* <li>Set the latitude</li>
|
|
34
|
+
* <li>Set the longitude</li>
|
|
35
|
+
* <li>Do build</li>
|
|
36
|
+
* </ol>
|
|
37
|
+
* <p>
|
|
38
|
+
* When you have built a <code>GeolocationValue</code> instance, you can re-use the GeolocationValueBuilder to build more instances.
|
|
39
|
+
* Something like:
|
|
40
|
+
* </p>
|
|
41
|
+
* <ol>
|
|
42
|
+
* <li>Possibly set a new name</li>
|
|
43
|
+
* <li>Possibly set a new latitude</li>
|
|
44
|
+
* <li>Possibly set a new longitude</li>
|
|
45
|
+
* <li>Do build</li>
|
|
46
|
+
* </ol>
|
|
47
|
+
*
|
|
48
|
+
* <p>
|
|
49
|
+
* <strong>Tip!</strong> The {@link senselogic.sitevision.api.base.Builder Builder interface documentation} contains
|
|
50
|
+
* more information about Builders and how to work with them!
|
|
51
|
+
* </p>
|
|
52
|
+
*
|
|
53
|
+
* <p>
|
|
54
|
+
* An instance of the Sitevision class implementing this interface can be obtained via
|
|
55
|
+
* {@link senselogic.sitevision.api.metadata.MetadataUtil#getGeolocationValueBuilder()}.
|
|
56
|
+
* See {@link senselogic.sitevision.api.metadata.MetadataUtil} for how to obtain an instance of the <code>MetadataUtil</code> interface.
|
|
57
|
+
* </p>
|
|
58
|
+
* @author Magnus Lövgren
|
|
59
|
+
* @since Sitevision 2025.11.1
|
|
60
|
+
*/
|
|
61
|
+
export interface GeolocationValueBuilder extends Builder {
|
|
62
|
+
/**
|
|
63
|
+
* Sets the location name.
|
|
64
|
+
* @param aLocationName the location name, must not be null or blank
|
|
65
|
+
* @return this builder
|
|
66
|
+
*/
|
|
67
|
+
setName(aLocationName: String | string): GeolocationValueBuilder;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Sets the latitude.
|
|
71
|
+
* @param aLatitude the latitude, must be within range [-90.0 ... 90.0]
|
|
72
|
+
* @return this builder
|
|
73
|
+
*/
|
|
74
|
+
setLatitude(aLatitude: number): GeolocationValueBuilder;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Sets the longitude.
|
|
78
|
+
* @param aLongitude the longitude, must be within range [-180.0 ... 180.0]
|
|
79
|
+
* @return this builder
|
|
80
|
+
*/
|
|
81
|
+
setLongitude(aLongitude: number): GeolocationValueBuilder;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Creates a GeolocationValue instance using current state of this builder.
|
|
85
|
+
* @return a geolocation value
|
|
86
|
+
* @throws IllegalStateException if the name, longitude or latitude value are invalid
|
|
87
|
+
*/
|
|
88
|
+
build(): GeolocationValue;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare namespace GeolocationValueBuilder {}
|
|
92
|
+
|
|
93
|
+
declare var geolocationValueBuilder: GeolocationValueBuilder;
|
|
94
|
+
|
|
95
|
+
export default geolocationValueBuilder;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* This file is auto generated. Do not modify it manually.
|
|
9
|
+
*/
|
|
10
|
+
var _default = exports["default"] = {
|
|
11
|
+
setName: function setName() {},
|
|
12
|
+
setLatitude: function setLatitude() {},
|
|
13
|
+
setLongitude: function setLongitude() {},
|
|
14
|
+
build: function build() {}
|
|
15
|
+
};
|
|
@@ -59,10 +59,10 @@ export interface ImageUtil {
|
|
|
59
59
|
createImages(aParent: Node, aImages: Map | {}): void;
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
* Creates an image using
|
|
62
|
+
* Creates an image using an uri string.
|
|
63
63
|
*
|
|
64
64
|
* <p>
|
|
65
|
-
* Note that the <code>aParent</code>
|
|
65
|
+
* Note that the <code>aParent</code> for the image must be a <code>sv:localImageRepository</code>, <code>sv:imageRepository</code>,
|
|
66
66
|
* <code>sv:personalImageRepository</code> or a <code>sv:folder</code> residing as sub node to an image repository.
|
|
67
67
|
* </p>
|
|
68
68
|
* <p>
|
|
@@ -103,7 +103,7 @@ export interface ImageUtil {
|
|
|
103
103
|
* The decoder rejects data that contains characters outside the base64 alphabet.
|
|
104
104
|
* </p>
|
|
105
105
|
* <p>
|
|
106
|
-
* Note that the <code>aParent</code>
|
|
106
|
+
* Note that the <code>aParent</code> for the image must be a <code>sv:localImageRepository</code>, <code>sv:imageRepository</code>,
|
|
107
107
|
* <code>sv:personalImageRepository</code> or a <code>sv:folder</code> residing as sub node to an image repository.
|
|
108
108
|
* </p>
|
|
109
109
|
* <p>
|
|
@@ -135,7 +135,7 @@ export interface ImageUtil {
|
|
|
135
135
|
* Creates an image using a sv:temporaryFile.
|
|
136
136
|
*
|
|
137
137
|
* <p>
|
|
138
|
-
* Note that the <code>aParent</code>
|
|
138
|
+
* Note that the <code>aParent</code> for the image must be a <code>sv:localImageRepository</code>, <code>sv:imageRepository</code>,
|
|
139
139
|
* <code>sv:personalImageRepository</code> or a <code>sv:folder</code> residing as sub node to an image repository.
|
|
140
140
|
* </p>
|
|
141
141
|
* <p>
|
|
@@ -158,6 +158,27 @@ export interface ImageUtil {
|
|
|
158
158
|
*/
|
|
159
159
|
createImageFromTemporary(aParent: Node, aTemporaryFile: Node): Node;
|
|
160
160
|
|
|
161
|
+
/**
|
|
162
|
+
* Copies an image to a given parent.
|
|
163
|
+
*
|
|
164
|
+
* <p>
|
|
165
|
+
* Note that the <code>aParent</code> for the image must be a <code>sv:localImageRepository</code>, <code>sv:imageRepository</code>,
|
|
166
|
+
* <code>sv:personalImageRepository</code> or a <code>sv:folder</code> residing as sub node to an image repository.
|
|
167
|
+
* The <code>aParent</code> must not be trashed.
|
|
168
|
+
* </p>
|
|
169
|
+
* <p>
|
|
170
|
+
* <strong>Permission note!</strong> Current user must be authorized to alter the parent node
|
|
171
|
+
* (e.g. {@link senselogic.sitevision.api.security.PermissionUtil.Permission#WRITE}).
|
|
172
|
+
* </p>
|
|
173
|
+
* @param aImage the image node to copy
|
|
174
|
+
* @param aParent the parent node where the image should be copied to
|
|
175
|
+
* @return an image node corresponding to the newly created image
|
|
176
|
+
* @throws ConstraintViolationException if the user is not authorized to alter the parent node, if an invalid
 parent node is specified, if an invalid image node is specified
|
|
177
|
+
* @throws RepositoryException if something else goes wrong
|
|
178
|
+
* @since Sitevision 2026.01.1
|
|
179
|
+
*/
|
|
180
|
+
copyImage(aImage: Node, aParent: Node): Node;
|
|
181
|
+
|
|
161
182
|
/**
|
|
162
183
|
* Updates the binary content of an existing image using a uri string.
|
|
163
184
|
*
|
|
@@ -12,6 +12,7 @@ var _default = exports["default"] = {
|
|
|
12
12
|
createImage: function createImage() {},
|
|
13
13
|
createImageFromBase64: function createImageFromBase64() {},
|
|
14
14
|
createImageFromTemporary: function createImageFromTemporary() {},
|
|
15
|
+
copyImage: function copyImage() {},
|
|
15
16
|
updateBinaryContent: function updateBinaryContent() {},
|
|
16
17
|
updateBinaryContentFromBase64: function updateBinaryContentFromBase64() {},
|
|
17
18
|
updateBinaryContentFromTemporary: function updateBinaryContentFromTemporary() {},
|
|
@@ -8,7 +8,7 @@ import type { LinkValue } from "../../types/senselogic/sitevision/api/metadata/v
|
|
|
8
8
|
import type { Builder } from "../../types/senselogic/sitevision/api/base/Builder";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Builder to create LinkValue instances that can be used to set link metadata.
|
|
11
|
+
* Builder to create {@link LinkValue} instances that can be used to set link metadata.
|
|
12
12
|
*
|
|
13
13
|
* <p>
|
|
14
14
|
* LinkValueBuilder has one <strong>mandatory attribute</strong>:
|
|
@@ -10,6 +10,7 @@ import type { String } from "../../types/java/lang/String";
|
|
|
10
10
|
import type { List } from "../../types/java/util/List";
|
|
11
11
|
import type { LinkValueBuilder } from "../LinkValueBuilder";
|
|
12
12
|
import type { RelatedValueBuilder } from "../RelatedValueBuilder";
|
|
13
|
+
import type { GeolocationValueBuilder } from "../GeolocationValueBuilder";
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* <p>
|
|
@@ -140,6 +141,11 @@ export interface MetadataUtil {
|
|
|
140
141
|
* a comma separated string of the tag names. Note that tag names provided as a comma separated string must be prefixed with #.
|
|
141
142
|
* It is also possible to provide a collection or an array of <code>sv:tag</code> or strings of tag names.
|
|
142
143
|
* </li>
|
|
144
|
+
* <li>
|
|
145
|
+
* <strong>geolocation</strong> <em>(since Sitevision 2025.11.1)</em><br>
|
|
146
|
+
* The value must be a {@link senselogic.sitevision.api.metadata.value.GeolocationValue}.
|
|
147
|
+
* If no valid value is provided an <code>UnsupportedOperationException</code> is thrown.
|
|
148
|
+
* </li>
|
|
143
149
|
* </ul>
|
|
144
150
|
*
|
|
145
151
|
* <p>
|
|
@@ -332,7 +338,7 @@ export interface MetadataUtil {
|
|
|
332
338
|
|
|
333
339
|
/**
|
|
334
340
|
* <p>
|
|
335
|
-
* Returns a link value builder that
|
|
341
|
+
* Returns a link value builder that creates {@link senselogic.sitevision.api.metadata.value.LinkValue} instances.
|
|
336
342
|
* </p>
|
|
337
343
|
*
|
|
338
344
|
* <p>
|
|
@@ -347,7 +353,7 @@ export interface MetadataUtil {
|
|
|
347
353
|
|
|
348
354
|
/**
|
|
349
355
|
* <p>
|
|
350
|
-
* Returns a related value builder that
|
|
356
|
+
* Returns a related value builder that creates {@link senselogic.sitevision.api.metadata.value.RelatedValue} instances.
|
|
351
357
|
* </p>
|
|
352
358
|
*
|
|
353
359
|
* <p>
|
|
@@ -359,6 +365,21 @@ export interface MetadataUtil {
|
|
|
359
365
|
* @since Sitevision 3.6
|
|
360
366
|
*/
|
|
361
367
|
getRelatedValueBuilder(): RelatedValueBuilder;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* <p>
|
|
371
|
+
* Returns a geolocation value builder that creates {@link senselogic.sitevision.api.metadata.value.GeolocationValue} instances.
|
|
372
|
+
* </p>
|
|
373
|
+
*
|
|
374
|
+
* <p>
|
|
375
|
+
* <strong>Tip!</strong> A <code>GeolocationValue</code> can be used to set a <em>geolocation metadata</em>
|
|
376
|
+
* via {@link #setMetadataPropertyValue(javax.jcr.Node, String, Object)}
|
|
377
|
+
* or {@link #setMetadataPropertyValue(javax.jcr.Node, javax.jcr.Property, Object)}.
|
|
378
|
+
* </p>
|
|
379
|
+
* @return a geolocation value builder
|
|
380
|
+
* @since Sitevision 2025.11.1
|
|
381
|
+
*/
|
|
382
|
+
getGeolocationValueBuilder(): GeolocationValueBuilder;
|
|
362
383
|
}
|
|
363
384
|
|
|
364
385
|
declare namespace MetadataUtil {}
|
|
@@ -14,5 +14,6 @@ var _default = exports["default"] = {
|
|
|
14
14
|
getRelatedMetadataPropertyValues: function getRelatedMetadataPropertyValues() {},
|
|
15
15
|
getLinkMetadataPropertyValue: function getLinkMetadataPropertyValue() {},
|
|
16
16
|
getLinkValueBuilder: function getLinkValueBuilder() {},
|
|
17
|
-
getRelatedValueBuilder: function getRelatedValueBuilder() {}
|
|
17
|
+
getRelatedValueBuilder: function getRelatedValueBuilder() {},
|
|
18
|
+
getGeolocationValueBuilder: function getGeolocationValueBuilder() {}
|
|
18
19
|
};
|
|
@@ -298,8 +298,12 @@ export interface OutputUtil extends OutputUtilConstants {
|
|
|
298
298
|
* Gets the output as a specific content-type from a page node or a page content node.
|
|
299
299
|
*
|
|
300
300
|
* <p>
|
|
301
|
-
* <em>Tip
|
|
301
|
+
* <em>Tip!</em> This method has two versatile siblings that might be more suitable depending on your use case:
|
|
302
302
|
* </p>
|
|
303
|
+
* <ul>
|
|
304
|
+
* <li>Consider using {@link TextModuleRenderer} instead if you want the output of one or more Text modules.</li>
|
|
305
|
+
* <li>Consider using {@link ContentRenderer} instead if you want the output of arbitrary page content (layouts, modules).</li>
|
|
306
|
+
* </ul>
|
|
303
307
|
*
|
|
304
308
|
* <p>
|
|
305
309
|
* <strong>Note! Due to security reasons (potential never-ending loops) it is prohibited to get the output of anything from
|
|
@@ -43,5 +43,6 @@ var _default = exports["default"] = {
|
|
|
43
43
|
MANAGE_CUSTOM_SEARCH_INDEX: "MANAGE_CUSTOM_SEARCH_INDEX",
|
|
44
44
|
MANAGE_PUBLISHING_LOCK: "MANAGE_PUBLISHING_LOCK",
|
|
45
45
|
MANAGE_DASHBOARDS: "MANAGE_DASHBOARDS",
|
|
46
|
-
MANAGE_AI: "MANAGE_AI"
|
|
46
|
+
MANAGE_AI: "MANAGE_AI",
|
|
47
|
+
GENERATE_ALT_TEXT_AI: "GENERATE_ALT_TEXT_AI"
|
|
47
48
|
};
|
|
@@ -8,7 +8,7 @@ import type { RelatedValue } from "../../types/senselogic/sitevision/api/metadat
|
|
|
8
8
|
import type { Builder } from "../../types/senselogic/sitevision/api/base/Builder";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Builder to create RelatedValue instances that can be used to set related metadata.
|
|
11
|
+
* Builder to create {@link RelatedValue} instances that can be used to set related metadata.
|
|
12
12
|
*
|
|
13
13
|
* <p>
|
|
14
14
|
* RelatedValueBuilder has one <strong>mandatory attribute</strong>:
|