Personalisation

From Gcube Wiki
Revision as of 14:24, 27 August 2008 by Panagiota.koltsida (Talk | contribs) (Depedencies)

Jump to: navigation, search

Personalisation

Introduction

The main functionality of the Personalization is to handle the user's profiles. The objective of the personalization service in the gCube platform is the personalization of information retrieval. The Personalization service consists of two components, the UserProfileAccess service and the ProfileAdministration service. Each one of them will be described below.

UserProfileAccess Service

The UserProfileAccess service is a statefull service and it is responsible for creating and managing the user's profiles. It creates WS-Resources, one for each user profile, and publishes them on the DIS.

Each WS-Resource has two properties:

  • The username, which is the logical name of the XML file, that contains the real data of the user's profile and it is stored in the Content Management Layer.
  • The ID of the user profile, which is the identifier returned by the Content Management Service when the profile is stored in the Content Management Layer.

In order to create or retrieve the profile of a user a service/portlet must invoke the createResource(String username) giving as a parameter the username of the user. When this method is invoked there are different options:

  • If there is no WS-Resource for this user, a new resource is created.
    • If a profile exists in the Content Management Layer but for a reason there is no WS-resource, the new WS-resource has as property the username ant the ID Of the profile that already exists.
    • If there is no profile in the Content Management Layer, it creates e new profile and the WS-resource has the ID of the new profile.
  • If WS-Resources exist for this user.
    • If any of the existing WS-Resources had been created from the same Running instance that invoked this method, then it returns this resource.
    • Otherwise it creates a new WS-Resource with the same properties as the ones that already exist.


The service exposes the following operations:

  • getUserProfile() -> String
    This operation returns the user's profile in a String representation.
  • getElementValue(String elementName) -> String
    This operation returns the value of the element with name 'elementName' of the user's profile.
  • getElement(String elementName) -> String[]
    This operation returns an array which contains all the elements with name ‘elementName’.
  • setElement(String elementName, String value, String path) -> Void
    This operation creates a new element in the user profile.
  • SetElementValue(String elementName, String value) -> Void
    This operation sets a new value to the element with name 'elementName'.
  • DeleteElement(String elementName) -> Void
    This operation deletes the element with name 'elementName' from the user profile.

The 'elementName' should be an XPath expression.

ProfileAdministration Service

The ProfileAdministration service is a stateless service which provides the administrator with the functionality for creating or deleting a user profile. It also provides the functionality to upload or edit the DefaultUserProfile.

The service exposes the following operations:

  • createUserprofile(String username) -> Void
    This operation creates a new user profile with the given username.
  • dropUserProfile(String username) -> Void
    This operation deletes the profile for the given username.
  • setDefaultProfile(String profile) -> Void
    This operation sets or updates (if already exists) the DefaultUserProfile, which is stored on the IS.

Dependencies

  • UserProfileAccess Service:
    • Java Runtime Environment 1.5
    • gCore
    • gCube Information Service
    • gCube Content Management Service
    • gCube Collection Management Service


  • ProfileAdministration Service:
    • Java Runtime Environment 1.5
    • gCore
    • UserProfileAccess Service
    • gCube Information Service
    • gCube Content Management Service