All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alogient.cameleon.sdk.membership.dao.MembershipDao Maven / Gradle / Ivy

The newest version!
package com.alogient.cameleon.sdk.membership.dao;

import java.util.List;

import com.alogient.cameleon.sdk.membership.dao.model.CustomuserfieldUservalue;
import com.alogient.cameleon.sdk.membership.dao.model.Pagegroupaccess;
import com.alogient.cameleon.sdk.membership.dao.model.Users;
import com.alogient.cameleon.sdk.membership.util.exception.DuplicateUserException;

/**
 * Used to manage membership
 */
public interface MembershipDao {
    /**
     * Used to retrieve a user
     * 
     * @param userId id of the user to retrieve
     * @return the user
     */
    Users getUserById(String userId);

    /**
     * Used to retrieve a user by username
     * 
     * @param username username of the user to retrieve
     * @return the user
     */
    Users getUserByUsername(String username);

    /**
     * Used to retrieve a user by email
     * 
     * @param email email of the user to retrieve
     * @return the user
     */
    Users getUserByEmail(String email);

    /**
     * Used to retrieve the list of the customer fields
     * 
     * @param username the username
     * @param applicationName the applicationName
     * @return a list of custom user fields
     */
    List getCustomuserFields(String username, String applicationName);

    /**
     * Save the user
     * 
     * @param user user to save
     */
    void saveUser(Users user);

    /**
     * Gets the roles for a certain nav
     * 
     * @param navId The nav we want the roles for
     * @return The associated roles
     */
    List getRolesForNavId(Integer navId);

    /**
     * Creates a new user in an application
     * 
     * @param applicationName the application to create the user for
     * @param userName the user name
     * @param password the user password
     * @param email the user email address
     * @param groups the groups to add the user to
     * @return the user identifier
     * @throws DuplicateUserException thrown if a user already exists with the same name
     */
    String createUser(String applicationName, String userName, String password, String email, String[] groups) throws DuplicateUserException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy