Overview | Package | Class | Tree | Deprecated | Index | Help
| CStockage 4.2_beta-RC-1 API Documentation
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.esupportail.portal.channels.CStockage.channelAction.classic.sharing
Class SharingTool

    java.lang.Object
      org.esupportail.portal.channels.CStockage.channelAction.classic.sharing.SharingTool

public class SharingTool
extends java.lang.Object

Id: SharingTool.java,v 1.0 13 janv. 2005 Copyright (c) 2005 Esup Portail (www.esup-portail.org) Classes: SharingTool 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

Constructor Summary
`SharingTool()` Constructor

Method Summary
`void` | `addStorageAvailableSpace(Space currentSpace, Space sharedSpace, java.lang.String serverUrl, java.lang.String fromKey, java.lang.String path, java.util.Vector users, java.util.Vector groups, java.util.Vector others)` Add sharing properties for the users and groups into the database
`void` | `deleteAllPrivileges(Space currentSpace, java.lang.String serverId, java.lang.String spaceId)` Delete all privileges in ACL and Database
`void` | `delStorageAvailableSpaceForGroups(Space currentSpace, java.util.Vector groups, java.lang.String serverId)` Delete sharing properties for groups into the database
`void` | `delStorageAvailableSpaceForOthers(Space currentSpace, java.util.Vector others, java.lang.String serverId)` Delete sharing properties for others into the acl
`void` | `delStorageAvailableSpaceForSpecifiedPath(java.lang.String url, java.lang.String path)` Delete sharing properties for url and path into the database
`void` | `delStorageAvailableSpaceForUsers(Space currentSpace, java.util.Vector users, java.lang.String serverId)` Delete sharing properties for users into the database
`UserForPersonalization` | `getSpaceOwnerInMetadata(Space space)`
`java.lang.Object[]` | `getTargetsOfAvailableSpaceFromAcl(Space currentSpace, java.lang.String serverUrl)` Get the users for whose the resource is shared from the acl
`void` | `setInheritance(Space currentSpace, boolean inheritance)` Update the inheritance
`void` | `setPublic(Space currentSpace, boolean publicDirectory, Space sharedSpace)` Update the inheritance
`void` | `updatePathOfSharing(java.lang.String url, java.lang.String oldPath, java.lang.String newPath)` Update the path of shared spaces
`void` | `updateReadAndWriteAndShareSpaceGroups(Space currentSpace, java.util.Vector groups)` Update the "reading" and "writing" attributes for a specifical sharing for a group
`void` | `updateReadAndWriteAndShareSpaceOthers(Space currentSpace, java.util.Vector others)` Update the "reading" and "writing" attributes for a specifical sharing for an other principal
`void` | `updateReadAndWriteAndShareSpaceUsers(Space currentSpace, java.util.Vector users)` Update the "reading" and "writing" attributes for a specifical sharing for a user
`void` | `updateXmlServerAvailableSpace(Space sharedSpace)` Update the label of the sharing properties into the database for users

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

Field Detail

### 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

### SharingTool

    public SharingTool()
                throws PropertiesException

  Constructor

Throws:
  `PropertiesException`

Method Detail

### getTargetsOfAvailableSpaceFromAcl

    public java.lang.Object[] getTargetsOfAvailableSpaceFromAcl(Space currentSpace,
                                                                java.lang.String serverUrl)
                                                         throws DataBaseException,
                                                                PropertiesException,
                                                                ServerException,
                                                                AclReadException,
                                                                AclAccessException,
                                                                AclWriteException,
                                                                NotSupportedAclException

  Get the users for whose the resource is shared from the acl

  Parameters:
    `serverUrl` - the url of the server
  Returns:
    an object array composed by one Space and 2 hashtables. The first hashtable contains users, the second contains groups
  Throws:
    `DataBaseException`
    `PropertiesException`
    `ServerException`
    `AclReadException`
    `AclAccessException`
    `AclWriteException`
    `NotSupportedAclException`

### getSpaceOwnerInMetadata

    public UserForPersonalization getSpaceOwnerInMetadata(Space space)
                                                   throws PropertiesException,
                                                          ServerException

  Throws:
    `PropertiesException`
    `ServerException`

### addStorageAvailableSpace

    public void addStorageAvailableSpace(Space currentSpace,
                                         Space sharedSpace,
                                         java.lang.String serverUrl,
                                         java.lang.String fromKey,
                                         java.lang.String path,
                                         java.util.Vector users,
                                         java.util.Vector groups,
                                         java.util.Vector others)
                                  throws DataBaseException,
                                         AclAccessException,
                                         AclWriteException,
                                         AclReadException,
                                         NotSupportedAclException,
                                         PropertiesException

  Add sharing properties for the users and groups into the database

  Parameters:
    `currentSpace` - the current space we are using
    `sharedSpace` - the space we are sharing
    `serverUrl` - the url of the server
    `fromKey` - the key of the people who shares
    `path` - the resource path
    `users` - the target users
    `groups` - the target groups
  Throws:
    `DataBaseException`
    `AclAccessException`
    `AclWriteException`
    `AclReadException`
    `NotSupportedAclException`
    `PropertiesException`

### delStorageAvailableSpaceForUsers

    public void delStorageAvailableSpaceForUsers(Space currentSpace,
                                                 java.util.Vector users,
                                                 java.lang.String serverId)
                                          throws DataBaseException,
                                                 AclAccessException,
                                                 AclWriteException,
                                                 AclReadException,
                                                 NotSupportedAclException,
                                                 PropertiesException

  Delete sharing properties for users into the database

  Parameters:
    `currentSpace` - the current space
    `users` - we want to delete preferences
    `serverId` - the id of the server
  Throws:
    `DataBaseException`
    `AclAccessException`
    `AclWriteException`
    `AclReadException`
    `NotSupportedAclException`
    `PropertiesException`

### delStorageAvailableSpaceForGroups

    public void delStorageAvailableSpaceForGroups(Space currentSpace,
                                                  java.util.Vector groups,
                                                  java.lang.String serverId)
                                           throws DataBaseException,
                                                  AclAccessException,
                                                  AclWriteException,
                                                  AclReadException,
                                                  NotSupportedAclException,
                                                  PropertiesException

  Delete sharing properties for groups into the database

  Parameters:
    `currentSpace` - the current space
    `groups` - the groups we want to delete sharing
    `serverId` - the id of the server
  Throws:
    `DataBaseException`
    `AclAccessException`
    `AclWriteException`
    `AclReadException`
    `NotSupportedAclException`
    `PropertiesException`

### delStorageAvailableSpaceForOthers

    public void delStorageAvailableSpaceForOthers(Space currentSpace,
                                                  java.util.Vector others,
                                                  java.lang.String serverId)
                                           throws DataBaseException,
                                                  AclAccessException,
                                                  AclWriteException,
                                                  AclReadException,
                                                  NotSupportedAclException,
                                                  PropertiesException

  Delete sharing properties for others into the acl

  Parameters:
    `currentSpace` - the current space
    `others` - the others we want to delete sharing
    `serverId` - the id of the server
  Throws:
    `DataBaseException`
    `AclAccessException`
    `AclWriteException`
    `AclReadException`
    `NotSupportedAclException`
    `PropertiesException`

### updateReadAndWriteAndShareSpaceUsers

    public void updateReadAndWriteAndShareSpaceUsers(Space currentSpace,
                                                     java.util.Vector users)
                                              throws DataBaseException,
                                                     AclAccessException,
                                                     AclWriteException,
                                                     AclReadException,
                                                     NotSupportedAclException,
                                                     PropertiesException

  Update the "reading" and "writing" attributes for a specifical sharing for a user

  Parameters:
    `currentSpace` - the current space
    `users` - the target users
  Throws:
    `DataBaseException`
    `AclAccessException`
    `AclWriteException`
    `AclReadException`
    `NotSupportedAclException`
    `PropertiesException`

### updateReadAndWriteAndShareSpaceGroups

    public void updateReadAndWriteAndShareSpaceGroups(Space currentSpace,
                                                      java.util.Vector groups)
                                               throws DataBaseException,
                                                      AclAccessException,
                                                      AclWriteException,
                                                      AclReadException,
                                                      NotSupportedAclException,
                                                      PropertiesException

  Update the "reading" and "writing" attributes for a specifical sharing for a group

  Parameters:
    `currentSpace` - the current space
    `groups` - the target groups
  Throws:
    `DataBaseException`
    `AclAccessException`
    `AclWriteException`
    `AclReadException`
    `NotSupportedAclException`
    `PropertiesException`

### updateReadAndWriteAndShareSpaceOthers

    public void updateReadAndWriteAndShareSpaceOthers(Space currentSpace,
                                                      java.util.Vector others)
                                               throws DataBaseException,
                                                      AclAccessException,
                                                      AclWriteException,
                                                      AclReadException,
                                                      NotSupportedAclException,
                                                      PropertiesException

  Update the "reading" and "writing" attributes for a specifical sharing for an other principal

  Parameters:
    `currentSpace` - the current space
    `others` - the target others
  Throws:
    `DataBaseException`
    `AclAccessException`
    `AclWriteException`
    `AclReadException`
    `NotSupportedAclException`
    `PropertiesException`

### updateXmlServerAvailableSpace

    public void updateXmlServerAvailableSpace(Space sharedSpace)
                                       throws DataBaseException

  Update the label of the sharing properties into the database for users

  Parameters:
    `sharedSpace` - the space we are sharing
  Throws:
    `DataBaseException`

### delStorageAvailableSpaceForSpecifiedPath

    public void delStorageAvailableSpaceForSpecifiedPath(java.lang.String url,
                                                         java.lang.String path)
                                                  throws DataBaseException

  Delete sharing properties for url and path into the database

  Parameters:
    `url` - the url of the space
    `path` - the path of the space
  Throws:
    `DataBaseException`

### deleteAllPrivileges

    public void deleteAllPrivileges(Space currentSpace,
                                    java.lang.String serverId,
                                    java.lang.String spaceId)
                             throws DataBaseException,
                                    NotSupportedAclException,
                                    PropertiesException,
                                    AclAccessException,
                                    AclWriteException,
                                    AclReadException

  Delete all privileges in ACL and Database

  Parameters:
    `currentSpace` - the current space
    `serverId` - the id of the server
    `spaceId` - the id of the space used here
  Throws:
    `DataBaseException`
    `NotSupportedAclException`
    `PropertiesException`
    `AclAccessException`
    `AclWriteException`
    `AclReadException`

### updatePathOfSharing

    public void updatePathOfSharing(java.lang.String url,
                                    java.lang.String oldPath,
                                    java.lang.String newPath)
                             throws DataBaseException

  Update the path of shared spaces

  Parameters:
    `url` - the url of the space
    `oldPath` - the old path of the space
    `newPath` - the new path of the space
  Returns:
    the result of the query
  Throws:
    `DataBaseException`

### setInheritance

    public void setInheritance(Space currentSpace,
                               boolean inheritance)
                        throws AclAccessException,
                               AclWriteException,
                               AclReadException,
                               NotSupportedAclException,
                               PropertiesException

  Update the inheritance

  Parameters:
    `currentSpace` - the current space
    `inheritance` - the inheritance in this directory
  Throws:
    `AclAccessException`
    `AclWriteException`
    `AclReadException`
    `NotSupportedAclException`
    `PropertiesException`

### setPublic

    public void setPublic(Space currentSpace,
                          boolean publicDirectory,
                          Space sharedSpace)
                   throws DataBaseException,
                          AclAccessException,
                          AclWriteException,
                          AclReadException,
                          NotSupportedAclException,
                          PropertiesException

  Update the inheritance

  Parameters:
    `currentSpace` - the current space
    `publicDirectory` - if this directory is public or not
  Throws:
    `AclAccessException`
    `AclWriteException`
    `AclReadException`
    `NotSupportedAclException`
    `PropertiesException`
    `DataBaseException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| CStockage 4.2_beta-RC-1 API Documentation
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD