Setting maximum sizes on libraries
Use WikisLibraryService commands to set maximum sizes on libraries by assigning them a policy. A library is the pages, attachments, and other data that make up a wiki. A policy sets a maximum size for a library.
Before starting
To use administrative commands, use the wsadmin client. See Starting the wsadmin client for details.
Procedure
- Start the wsadmin client.
- Start the Wikis Jython script interpreter using the following command:
execfile("wikisAdmin.py")
- Create a policy to specify the library size, using steps in the topic Work with policies.
- Run the following commands to set maximum sizes on libraries:
WikisLibraryService.assignPolicy(string libraryId, string policyId)
Assigns a policy to a library. A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include metadata such as comments. It includes all wiki page versions, but does not include metadata such as comments. A policy sets a maximum size for a wiki.
No message is printed if the task succeeds.
Parameters:
libraryId
The library ID in the following standard Universally Unique Identifier (UUID) format: 00000000-0000-0000-0000-000000000000.
policyId
The policy ID in the following standard Universally Unique Identifier (UUID) format: 00000000-0000-0000-0000-000000000000.
For example:
WikisLibraryService.assignPolicy("f0d01111-9b21-4dd8-b8be-8825631cb84b", "2d93497d-065a-4022ae25-a4b52598d11a")
WikisLibraryService.assignPolicyBatch(string filePath)
Assigns policies to libraries as specified in a text file. The file must contain a list of library-policy ID pairs, one pair per line, values separated by a comma. For example: libraryId, policyId. Extra whitespace is ignored. You must create this text file and save it in a directory local to the server where you are running the wsadmin processor.
A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include metadata such as comments. It includes all wiki page versions, but does not include metadata such as comments.
Parameters:
filePath
The full path to the text file, as a string.
For example:
WikisLibraryService.assignPolicyBatch("C:/connections/assign_policies.txt")
Parent topic
Administer Wikis
Related tasks
Setting maximum sizes on media, pages, and attachments
Starting the wsadmin client
Work with Wikis policies
});