+

Search Tips   |   Advanced Search

Intelligent Management: runtime operations user preferences administrative tasks

We can use the Jacl and Jython scripting languages to clone, set, and get preferences with wsadmin.sh. Use commands in the UserPreferences group.

User preferences are stored under the cell context or in the context for each resource type. The following list gives examples at the cell level and each resource level:

Use the following commands to work with the preferences for runtime operations:

For examples using Jython to interact with preferences objects, see Jython preferences object commands.


clonePreference

The clonePreference command copies a preference from one user or role to another user or role.

Target object:

The configID of the parent.

Required parameters

-name Name of the preference to clone. (String, required)

Optional parameters

Batch mode example

Interactive mode


getPreferences

The getPreferences command returns a collection of preferences based on the preference document specified by passing in a role or user name. We must have administrator privileges to get preferences for a certain user or user role.

Target object:

The configID of the parent.

Required parameters

Optional parameters

Return value

The command returns a DescriptivePropertyGroup object containing the preferences, or null if no preferences are found.

Batch mode example

Interactive mode


setPreference

The setPreference command sets a specific preference in a preference document. We must have administrator privileges to set preferences for a certain user or user role.

Target object:

The configID of the parent.

Required parameters

Optional parameters

Batch mode example

Interactive mode


Jython preferences object commands

Use the following examples to interact with the preferences object with Jython commands:

To list preferences per user

prefSets = AdminConfig.list("PreferenceSet")
print prefSets

To remove preferences for a user

prefid = AdminConfig.getid("/PreferenceSet:User_1")
AdminConfig.remove(prefid)
AdminConfig.save()

To list preferences for all users, grouped by user

prefs = AdminConfig.list("Preferences")
print prefs


Related concepts

  • Runtime operations overview


    Related tasks

  • Monitor Intelligent Management operations
  • Create and manage reports

  • Intelligent Management: administrator scripting interface Reference topic