|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.esupportail.portal.channels.CStockage.channelAction.classic.sharing.SharingTool
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 | |
private DirectorySharingProperties |
currentDirectorySharingProperties
The sharing directory properties of the current directory |
private DataBaseAccess |
dbAccess
The object used to access the database |
Constructor Summary | |
SharingTool()
Constructor |
Method Summary | |
void |
addStorageAvailableSpaceGroup(Space currentSpace,
java.lang.String serverUrl,
java.lang.String path,
java.lang.String label,
GroupForSharing group,
java.lang.String ownerUserKey,
java.lang.String xmlSpace)
Add sharing properties for the groups into the database |
void |
addStorageAvailableSpaceUser(Space currentSpace,
java.lang.String serverUrl,
java.lang.String path,
java.lang.String label,
UserForSharing user,
java.lang.String ownerUserKey,
java.lang.String xmlSpace)
Add sharing properties for the user into the database |
void |
addStorageUsersPreferences(java.lang.String id,
java.lang.String userKey)
Add a user preference into the database from a user |
void |
delStorageAvailableSpaceForGroup(Space currentSpace,
GroupForSharing group)
Delete sharing properties for groups into the database |
void |
delStorageAvailableSpaceForSpecifiedPath(java.lang.String url,
java.lang.String path)
Delete sharing properties for url and path into the database |
void |
delStorageAvailableSpaceForUser(Space currentSpace,
UserForSharing user)
Delete sharing properties for users into the database |
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)
Get the available spaces for a group |
private java.util.Vector |
getAvailableSpacesForTarget(java.lang.String targetKey,
boolean targetIsUser,
java.lang.String userPortalLogin)
Get the available spaces for a user or a group |
java.util.Vector |
getAvailableSpacesForUser(java.lang.String targetKey,
java.lang.String userPortalLogin)
Get the available spaces for a user |
DirectorySharingProperties |
getCurrentDirectorySharingProperties()
|
java.util.Vector |
getIdOfSpaceFromPreferencesUser(java.lang.String target)
Get the list of ids of spaces which has already been selected by the current user from users table |
java.util.Vector |
getTargetsOfAvailableSpaceForGroup(java.lang.String serverUrl,
java.lang.String path)
Get the groups for whose the resource is shared |
java.util.Vector |
getTargetsOfAvailableSpaceForUser(java.lang.String serverUrl,
java.lang.String path)
Get the users for whose the resource is shared |
void |
setCurrentDirectorySharingProperties(DirectorySharingProperties currentDirectorySharingProperties)
|
void |
updateLabelAvailableSpace(java.lang.String newLabel,
java.lang.String serverUrl,
java.lang.String path)
Update the label of the sharing properties into the database for users |
void |
updatePathOfSharing(java.lang.String url,
java.lang.String oldPath,
java.lang.String newPath)
Update the path of shared spaces |
void |
updateReadAndWriteAndManageSpaceGroup(Space currentSpace,
java.lang.String serverUrl,
java.lang.String path,
GroupForSharing group)
Update the "reading" and "writing" attributes for a specifical sharing for a group |
void |
updateReadAndWriteAndManageSpaceUser(Space currentSpace,
java.lang.String serverUrl,
java.lang.String path,
UserForSharing user)
Update the "reading" and "writing" attributes for a specifical sharing for a user |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private DataBaseAccess dbAccess
private DirectorySharingProperties currentDirectorySharingProperties
Constructor Detail |
public SharingTool() throws PropertiesException
PropertiesException
Method Detail |
public DirectorySharingProperties getCurrentDirectorySharingProperties()
public void setCurrentDirectorySharingProperties(DirectorySharingProperties currentDirectorySharingProperties)
currentDirectorySharingProperties
- The currentDirectorySharingProperties to set.public void addStorageAvailableSpaceUser(Space currentSpace, java.lang.String serverUrl, java.lang.String path, java.lang.String label, UserForSharing user, java.lang.String ownerUserKey, java.lang.String xmlSpace) throws DataBaseException, AclAccessException, AclWriteException, AclReadException, NotSupportedAclException, PropertiesException
serverUrl
- the url of the serverpath
- the resource pathlabel
- the space's labeluser
- the target userownerUserKey
- the key of the ownerxmlSpace
- the space into an xml format
DataBaseException
AclAccessException
AclWriteException
AclReadException
NotSupportedAclException
PropertiesException
public void addStorageAvailableSpaceGroup(Space currentSpace, java.lang.String serverUrl, java.lang.String path, java.lang.String label, GroupForSharing group, java.lang.String ownerUserKey, java.lang.String xmlSpace) throws DataBaseException, AclAccessException, AclWriteException, AclReadException, NotSupportedAclException, PropertiesException
serverUrl
- the url of the serverpath
- the resource pathlabel
- the space's labelgroup
- the target groupownerUserKey
- the key of the ownerxmlSpace
- the space into an xml format
DataBaseException
AclAccessException
AclWriteException
AclReadException
NotSupportedAclException
PropertiesException
public void delStorageAvailableSpaceForUser(Space currentSpace, UserForSharing user) throws DataBaseException, AclAccessException, AclWriteException, AclReadException, NotSupportedAclException, PropertiesException
currentSpace
- the current spaceuser
- we want to delete preferences
DataBaseException
AclAccessException
AclWriteException
AclReadException
NotSupportedAclException
PropertiesException
public void delStorageAvailableSpaceForGroup(Space currentSpace, GroupForSharing group) throws DataBaseException, AclAccessException, AclWriteException, AclReadException, NotSupportedAclException, PropertiesException
currentSpace
- the current spacegroup
- the group we want to delete sharing
DataBaseException
AclAccessException
AclWriteException
AclReadException
NotSupportedAclException
PropertiesException
public java.util.Vector getTargetsOfAvailableSpaceForUser(java.lang.String serverUrl, java.lang.String path) throws DataBaseException
serverUrl
- the url of the serverpath
- the path of the resource
DataBaseException
public java.util.Vector getTargetsOfAvailableSpaceForGroup(java.lang.String serverUrl, java.lang.String path) throws DataBaseException
serverUrl
- the url of the serverpath
- the path of the resource
DataBaseException
public void updateLabelAvailableSpace(java.lang.String newLabel, java.lang.String serverUrl, java.lang.String path) throws DataBaseException
newLabel
- the new label of the shared spacesserverUrl
- the url of the serverpath
- the resource path
DataBaseException
public void updateReadAndWriteAndManageSpaceUser(Space currentSpace, java.lang.String serverUrl, java.lang.String path, UserForSharing user) throws DataBaseException, AclAccessException, AclWriteException, AclReadException, NotSupportedAclException, PropertiesException
currentSpace
- the current spaceserverUrl
- the url of the serverpath
- the resource pathuser
- the target user
DataBaseException
AclAccessException
AclWriteException
AclReadException
NotSupportedAclException
PropertiesException
public void updateReadAndWriteAndManageSpaceGroup(Space currentSpace, java.lang.String serverUrl, java.lang.String path, GroupForSharing group) throws DataBaseException, AclAccessException, AclWriteException, AclReadException, NotSupportedAclException, PropertiesException
currentSpace
- the current spaceserverUrl
- the url of the serverpath
- the resource pathgroup
- the target group
DataBaseException
AclAccessException
AclWriteException
AclReadException
NotSupportedAclException
PropertiesException
private java.util.Vector getAvailableSpacesForTarget(java.lang.String targetKey, boolean targetIsUser, java.lang.String userPortalLogin) throws PropertiesException, DataBaseException
targetKey
- the key of the targettargetIsUser
- if we get spaces for user, the value is true, for a group, the value is falseuserPortalLogin
- the login of the user in the portal
PropertiesException
DataBaseException
public java.util.Vector getAvailableSpacesForUser(java.lang.String targetKey, java.lang.String userPortalLogin) throws DataBaseException, PropertiesException
targetKey
- the key of the targetuserPortalLogin
- the login of the user in the portal
DataBaseException
PropertiesException
public java.util.Vector getAvailableSpacesForGroup(java.lang.String targetKey, java.lang.String userPortalLogin) throws DataBaseException, PropertiesException
targetKey
- the key of the target
DataBaseException
PropertiesException
public void addStorageUsersPreferences(java.lang.String id, java.lang.String userKey) throws DataBaseException
id
- the id of the sharement in the other databaseuserKey
- the login of the user in the portal
DataBaseException
public java.util.Vector getIdOfSpaceFromPreferencesUser(java.lang.String target) throws DataBaseException
target
- the user or group target key
DataBaseException
public void delStorageUsersPreferencesForUser(java.lang.String id, java.lang.String userKey) throws DataBaseException
id
- the id of the sharement in the other databaseuserKey
- the key of the user
DataBaseException
public void delStorageUsersPreferences(java.lang.String id) throws DataBaseException
id
- the id of the sharement in the other database
DataBaseException
public void delStorageAvailableSpaceForSpecifiedPath(java.lang.String url, java.lang.String path) throws DataBaseException
url
- the url of the spacepath
- the path of the space
DataBaseException
public void updatePathOfSharing(java.lang.String url, java.lang.String oldPath, java.lang.String newPath) throws DataBaseException
url
- the url of the spaceoldPath
- the old path of the spacenewPath
- the new path of the space
DataBaseException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |