Document toolboxDocument toolbox

Java API for Saving User Preferences

Applies to: Kyvos Enterprise  Kyvos Cloud (SaaS on AWS) Kyvos AWS Marketplace

Kyvos Azure Marketplace   Kyvos GCP Marketplace Kyvos Single Node Installation (Kyvos SNI)


Overview

API to save user preferences in the database.

Example

  1. API to save user preferences.

     /** * method to set user/group  preferences .  * @param preferenceJSON: Updated JSON * @param userName: Name of the user for which preferences has to be set. * @param userId: The Id of the user on which preferences has to be set. * @param groupName: group name on which preferences has to be set. * @param userInfo: Object of type UserInfo containing information about logged in user. *@param updateType : updateType can be COMPLETE or PARTIAL. Default value is COMPLETE. */ SecurityManager sm = SecurityManager.getInstance(); String updateUserPreferences(String preferenceJSON, String userName, UserInfo userInfo); String updateUserPreferencesByUserId(String preferenceJSON, String userId, UserInfo userInfo); String updateUserPreferencesByGroupName(String preferenceJSON, String groupName, UserInfo userInfo); public String updateUserPreferencesByGroupName(String preferenceJSON, String groupName, UserInfo userInfo, String updateType);
  2. API to add a custom attribute in UserInfo.

    /** * Method to add custom attribute. * @param attributeName * @param attributeValue * @param nameType * @param valueType */ public void addCustomAttribute(String attributeName, String attributeValue, String nameType, String valueType)
  3. API to parse UserInfo XML and set the internal properties of the UserInfo object.

    /** * Method to parse the given userXML and populate this Object attributes * @param userXML String */ public void parseXML(String userXML)
  4. API to add a user to a group.

  5. API to assign a role to a UserGroup.

  6. API to parse roleXML and set internal properties of UserRole.



Copyright Kyvos, Inc. All rights reserved.