Home

 

Working with policies

Use the WikisPolicyService commands to add, edit, count, and return information about policies. You apply policies to libraries to set a maximum size on those libraries. A library is a set of files owned by a person or community.

  1. Open a command window and start the wsadmin command line tool as described in the topic, Starting the wsadmin client.

  2. Start the Wikis script with the following command:

  3. Network deployment:

      execfile("profile_root/config/bin_lc_admin/ wikisAdmin.py")
      

  4. Run the following commands to work with policies:


    WikisPolicyService administrative commands

    Command Description

    WikisPolicyService.add(string title, long maximumSize)

    Creates a policy with a specified title and maximum size. Policies set a maximum size limit on libraries.

    A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments. It includes all wiki page versions, but does not include meta-data such as comments. Parameters:

      title

      The policy title. A required value.

      maximumSize

      The maximum size allowed, in bytes. Must be zero or greater. A value of zero means the size is unlimited.

    When a policy is created, an ID is created for it and returned to you. The ID is in the following standard UUID format: 00000000-0000-0000-0000-000000000000. You must provide policy IDs as parameters when running other WikisPolicyService commands.

    Policies can be applied to libraries using the WikisLibraryService.assignPolicy or WikisLibraryService.assignPolicyBatch commands.

    WikisPolicyService.edit(string policyId, string title, long maximumSize)

    Edits the title and maximum size of a policy with a specified ID. If the ID is for a default policy, the title is not modified. Policies set a maximum size limit on libraries. A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments. It includes all wiki page versions, but does not include meta-data such as comments. Parameters:

      policyID

      The policy ID in the following standard Universally Unique Identifier (UUID) format: 00000000-0000-0000-0000-000000000000.

      title

      The policy title. A required value.

      maximumSize

      The maximum size allowed, in bytes. Must be zero or greater. A value of zero means the size is unlimited.

    WikisPolicyService.getById(string id)

    Returns information for a single policy specified by an ID. Policies set a maximum size limit on libraries.

    A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments. It includes all wiki page versions, but does not include meta-data such as comments. Parameters:

      id

      The policy ID in the following standard Universally Unique Identifier (UUID) format: 00000000-0000-0000-0000-000000000000. The following information is returned:

      • id: the ID

      • title: the policy title

      • maximumSize: the maximum size (in bytes) the library can be, or 0 for unlimited

    WikisPolicyService.browse(string sortOption, string sortAscending, int pageNumber, int itemsPerPage)

    Returns a list of policies with ID, title, and maximum size information, as described for the WikisPolicyService.getById(id) command. Policies set a maximum size limit on libraries.

    A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments. Parameters:

      sortOption

      A string value that specifies how to sort the list. The default value is title, but you can also use maximumSize.

      sortAscending

      A string value that specifies whether the list sorts in ascending alphabetical order. This depends on sortOption. If sortOption is title, then this value is true; if sortOption any other value, then this value is false.

      pageNumber

      The number of the page to return. For example, if the itemsPerPage value is 40, and pageNumber value is 2, the command returns items 41 to 80 (page 2) instead of 1 to 40 (page 1).

      itemsPerPage

      The maximum number of policies to list per page. The default value is 20.

    WikisPolicyService.getCount

    Returns the number of policies. Policies set a maximum size limit on libraries. A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments.

    WikisPolicyService.editDefault(long maximumSize)

    Sets the maximum size, in bytes, for the personal wiki library default policy. Personal wikis are owned by a person. Parameters:

      maximumSize

      A number representing the maximum size allowed, in bytes, for wikis that the default policy is assigned to.

    WikisPolicyService.editCommunityDefault(long maximumSize)

    Sets the maximum size, in bytes, for the community wiki library default policy. Community wikis are owned by a community. Parameters:

      maximumSize

      A number representing the maximum size allowed, in bytes, for wikis that the default policy is assigned to.


Administer Wikis

 

Related tasks

Start the wsadmin client


+

Search Tips   |   Advanced Search