Difference between revisions of "UserManagement Core"

From Gcube Wiki
Jump to: navigation, search
(Interfaces)
(UserManager APIs)
Line 40: Line 40:
 
* get user information such as email, id, username, professional information, fullname and much more;
 
* get user information such as email, id, username, professional information, fullname and much more;
 
* list all the users;
 
* list all the users;
* list users belonging to a given group.
+
* list users belonging to a given group;
 
+
* remove users;
but also create/delete user methods;
+
* remove users from groups;
 +
* manage users' registrations and membership requests.
  
 
=== GroupManager APIs===
 
=== GroupManager APIs===
  
 
=== RoleManager APIs===
 
=== RoleManager APIs===

Revision as of 10:23, 3 May 2016

User Management

Introduction

User Management is a library that sits between the Liferay portal services and gCube portlets. The main functionality of the Library is to provide management of users, roles and organizations. It provides a layer of abstraction above the liferay services, hiding the configuration complexities of roles and organizations. The gcube requirement of roles in the scope of organization is achieved by creating a role with the organization name suffixed to it. The addition/removal of organization names to the role names are handled by the Library and are transparent to the application and portlets using the library.

Interfaces

The library exposes three interfaces:

  • User Manager
  • Role Manager
  • Group(Organization) and Team (starting from gCube release 4.0.0) Manager

These interfaces provide the functionalities necessary for CRUD operation on Users, Roles and Groups and additional functionalities that organise users into Groups(Teams) and assigning/dismissal of roles.

Maven Dependency

Add the following dependency to your maven project to use the library.

<dependency>
	<groupId>org.gcube.dvos</groupId>
	<artifactId>usermanagement-core</artifactId>
	<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
	<scope>provided</scope>
</dependency>

UserManager APIs

The UserManager interface allows to create, retrieve and delete users. In order to perform such operations you need to instanciate the proper manager. See the below example.

// Instanciate the manager
UserManager userManager = new LiferayUserManager();
 
//you want to retrieve information about an existing user
GCubeUser userByMail = userManager.getUserByEmail(validUserMail);

The UserManager offers a lot of other utilities. They are reported below:

  • get user information such as email, id, username, professional information, fullname and much more;
  • list all the users;
  • list users belonging to a given group;
  • remove users;
  • remove users from groups;
  • manage users' registrations and membership requests.

GroupManager APIs

RoleManager APIs