Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.esupportail.portal.channels.CStockage.spacesPersonalization
Class PersonalizationTool

    java.lang.Object
      org.esupportail.portal.channels.CStockage.spacesPersonalization.PersonalizationTool

public class PersonalizationTool
extends java.lang.Object

Id: PersonalizationTool.java,v 1.0 13 janv. 2005 Copyright (c) 2005 Esup Portail (www.esup-portail.org) Classes: PersonalizationTool Original Author: Yohan Colmant This class is a tool used to manage the sharing actions

Field Summary
`static java.lang.String` | `ADMINISTRATED_SERVER` If the server into the database is administrated
`private DataBaseAccess` | `dbAccess` The object used to access the database
`protected static Log` | `log` Logger object

Constructor Summary
`PersonalizationTool()` Constructor

Method Summary
`void` | `addStorageUsersPreferences(java.lang.String id, java.lang.String userKey)` Add a user preference into the database from a user
`void` | `delStorageUsersPreferences(java.lang.String id)` Delete users preferences for a shared space from the database
`void` | `delStorageUsersPreferencesForUser(java.lang.String id, java.lang.String userKey)` Delete a user preference from the database
`java.util.Vector` | `getAvailableSpacesForGroup(java.lang.String targetKey, java.lang.String userPortalLogin, boolean obliged)` Get the available spaces for a group
`private java.util.Vector` | `getAvailableSpacesForTarget(java.lang.String targetKey, boolean targetIsUser, java.lang.String userPortalLogin, boolean obliged)` Get the available spaces for a user or a group
`java.util.Vector` | `getAvailableSpacesForUser(java.lang.String targetKey, java.lang.String userPortalLogin, boolean obliged)` Get the available spaces for a user
`java.util.Vector` | `getKeyOfSpacesFromPreferences(java.lang.String target)` Get the list of ids of spaces which has already been selected by the current user from users table

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    protected static final Log log

  Logger object

### dbAccess

    private DataBaseAccess dbAccess

  The object used to access the database

### ADMINISTRATED_SERVER

    public static final java.lang.String ADMINISTRATED_SERVER

  If the server into the database is administrated

  See Also:
    Constant Field Values

Constructor Detail

### PersonalizationTool

    public PersonalizationTool()
                        throws PropertiesException

  Constructor

Throws:
  `PropertiesException`

Method Detail

### getAvailableSpacesForTarget

    private java.util.Vector getAvailableSpacesForTarget(java.lang.String targetKey,
                                                         boolean targetIsUser,
                                                         java.lang.String userPortalLogin,
                                                         boolean obliged)
                                                  throws PropertiesException,
                                                         DataBaseException,
                                                         ServerException

  Get the available spaces for a user or a group

  Parameters:
    `targetKey` - the key of the target
    `targetIsUser` - if we get spaces for user, the value is true, for a group, the value is false
    `userPortalLogin` - the login of the user in the portal
  Returns:
    a vector. Each element is an array of [id, url, path, label, owner, xmlSpace, read:'T'|'F', write:'T'|'F']
  Throws:
    `PropertiesException`
    `DataBaseException`
    `ServerException`

### getAvailableSpacesForUser

    public java.util.Vector getAvailableSpacesForUser(java.lang.String targetKey,
                                                      java.lang.String userPortalLogin,
                                                      boolean obliged)
                                               throws DataBaseException,
                                                      PropertiesException,
                                                      ServerException

  Get the available spaces for a user

  Parameters:
    `targetKey` - the key of the target
    `userPortalLogin` - the login of the user in the portal
  Returns:
    a vector. Each element is an array of [url, path, label, owner, xmlSpace, read:'T'|'F', write:'T'|'F']
  Throws:
    `DataBaseException`
    `PropertiesException`
    `ServerException`

### getAvailableSpacesForGroup

    public java.util.Vector getAvailableSpacesForGroup(java.lang.String targetKey,
                                                       java.lang.String userPortalLogin,
                                                       boolean obliged)
                                                throws DataBaseException,
                                                       PropertiesException,
                                                       ServerException

  Get the available spaces for a group

  Parameters:
    `targetKey` - the key of the target
  Returns:
    a vector. Each element is an array of [url, path, label, owner, xmlSpace, read:'T'|'F', write:'T'|'F']
  Throws:
    `DataBaseException`
    `PropertiesException`
    `ServerException`

### delStorageUsersPreferencesForUser

    public void delStorageUsersPreferencesForUser(java.lang.String id,
                                                  java.lang.String userKey)
                                           throws DataBaseException

  Delete a user preference from the database

  Parameters:
    `id` - the id of the sharement in the other database
    `userKey` - the key of the user
  Throws:
    `DataBaseException`

### delStorageUsersPreferences

    public void delStorageUsersPreferences(java.lang.String id)
                                    throws DataBaseException

  Delete users preferences for a shared space from the database

  Parameters:
    `id` - the id of the sharement in the other database
  Throws:
    `DataBaseException`

### addStorageUsersPreferences

    public void addStorageUsersPreferences(java.lang.String id,
                                           java.lang.String userKey)
                                    throws DataBaseException

  Add a user preference into the database from a user

  Parameters:
    `id` - the id of the sharement in the other database
    `userKey` - the login of the user in the portal
  Throws:
    `DataBaseException`

### getKeyOfSpacesFromPreferences

    public java.util.Vector getKeyOfSpacesFromPreferences(java.lang.String target)
                                                   throws DataBaseException

  Get the list of ids of spaces which has already been selected by the current user from users table

  Parameters:
    `target` - the user or group target key
  Returns:
    a Vector
  Throws:
    `DataBaseException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD