|
|||||||||||
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 | |
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 | |
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)
Add sharing properties for the users and groups into the database |
void |
delStorageAvailableSpaceForGroups(Space currentSpace,
java.util.Vector groups,
java.lang.String serverId)
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 |
delStorageAvailableSpaceForUsers(Space currentSpace,
java.util.Vector users,
java.lang.String serverId)
Delete sharing properties for users into the database |
private static java.lang.String |
getServerName(java.lang.String serverUrl,
java.lang.String path)
Return the server name with the url of the server and the path |
java.lang.Object[] |
getTargetsOfAvailableSpace(Space currentSpace,
java.lang.String serverUrl,
java.lang.String path)
Get the users for whose the resource is shared |
private java.lang.Object[] |
getTargetsOfAvailableSpaceFromAcl(Space currentSpace,
java.lang.String serverUrl,
java.lang.String path)
Get the users for whose the resource is shared from the acl |
private java.lang.Object[] |
getTargetsOfAvailableSpaceFromDatabase(Space currentSpace,
java.lang.String serverUrl,
java.lang.String path)
Get the users for whose the resource is shared from the database |
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 |
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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final Log log
private DataBaseAccess dbAccess
public static final java.lang.String ADMINISTRATED_SERVER
Constructor Detail |
public SharingTool() throws PropertiesException
PropertiesException
Method Detail |
private static java.lang.String getServerName(java.lang.String serverUrl, java.lang.String path)
serverUrl
- the url of the serverpath
- the path on the server
public java.lang.Object[] getTargetsOfAvailableSpace(Space currentSpace, java.lang.String serverUrl, java.lang.String path) throws DataBaseException, PropertiesException, ServerException, AclReadException, AclAccessException, AclWriteException, NotSupportedAclException
serverUrl
- the url of the serverpath
- the path of the resource
DataBaseException
PropertiesException
ServerException
AclReadException
AclAccessException
AclWriteException
NotSupportedAclException
private java.lang.Object[] getTargetsOfAvailableSpaceFromDatabase(Space currentSpace, java.lang.String serverUrl, java.lang.String path) throws DataBaseException, PropertiesException, ServerException
serverUrl
- the url of the serverpath
- the path of the resource
DataBaseException
PropertiesException
ServerException
private java.lang.Object[] getTargetsOfAvailableSpaceFromAcl(Space currentSpace, java.lang.String serverUrl, java.lang.String path) throws DataBaseException, PropertiesException, ServerException, AclReadException, AclAccessException, AclWriteException, NotSupportedAclException
serverUrl
- the url of the serverpath
- the path of the resource
DataBaseException
PropertiesException
ServerException
AclReadException
AclAccessException
AclWriteException
NotSupportedAclException
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) throws DataBaseException, AclAccessException, AclWriteException, AclReadException, NotSupportedAclException, PropertiesException
currentSpace
- the current space we are usingsharedSpace
- the space we are sharingserverUrl
- the url of the serverfromKey
- the key of the people who sharespath
- the resource pathusers
- the target usersgroups
- the target groups
DataBaseException
AclAccessException
AclWriteException
AclReadException
NotSupportedAclException
PropertiesException
public void delStorageAvailableSpaceForUsers(Space currentSpace, java.util.Vector users, java.lang.String serverId) throws DataBaseException, AclAccessException, AclWriteException, AclReadException, NotSupportedAclException, PropertiesException
currentSpace
- the current spaceusers
- we want to delete preferencesserverId
- the id of the server
DataBaseException
AclAccessException
AclWriteException
AclReadException
NotSupportedAclException
PropertiesException
public void delStorageAvailableSpaceForGroups(Space currentSpace, java.util.Vector groups, java.lang.String serverId) throws DataBaseException, AclAccessException, AclWriteException, AclReadException, NotSupportedAclException, PropertiesException
currentSpace
- the current spacegroups
- the groups we want to delete sharingserverId
- the id of the server
DataBaseException
AclAccessException
AclWriteException
AclReadException
NotSupportedAclException
PropertiesException
public void updateReadAndWriteAndShareSpaceUsers(Space currentSpace, java.util.Vector users) throws DataBaseException, AclAccessException, AclWriteException, AclReadException, NotSupportedAclException, PropertiesException
currentSpace
- the current spaceusers
- the target users
DataBaseException
AclAccessException
AclWriteException
AclReadException
NotSupportedAclException
PropertiesException
public void updateReadAndWriteAndShareSpaceGroups(Space currentSpace, java.util.Vector groups) throws DataBaseException, AclAccessException, AclWriteException, AclReadException, NotSupportedAclException, PropertiesException
currentSpace
- the current spacegroups
- the target groups
DataBaseException
AclAccessException
AclWriteException
AclReadException
NotSupportedAclException
PropertiesException
public void updateXmlServerAvailableSpace(Space sharedSpace) throws DataBaseException
sharedSpace
- the space we are sharing
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 |