|
CStockage 4.2_beta-RC-1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.esupportail.portal.channels.CStockage.spacesPersonalization.DataBaseAccess
Id: DataBaseAccess.java,v 1.0 13 janv. 2005 Copyright (c) 2005 Esup Portail (www.esup-portail.org) Classes: DataBaseAccess Original Author: Yohan Colmant This class manage the access to the database, for the sharing actions.
Field Summary | |
static boolean |
initialized
If the database parameters are still initialized |
static java.lang.String |
TARGET_ALL
|
static java.lang.String |
TARGET_IS_ALL
|
static java.lang.String |
TARGET_IS_GROUP
|
static java.lang.String |
TARGET_IS_USER
|
Constructor Summary | |
DataBaseAccess()
Constructor Initialize the parameters for a connexion to the database |
Method Summary | |
int |
addStorageAvailableSpace(java.lang.String id,
java.lang.String serverName,
java.lang.String xmlServer,
java.lang.String fromKey,
java.lang.String owner,
java.lang.String rootPath)
Add sharing properties into the database |
int |
addStorageAvailableSpaceTarget(java.lang.String targetKey,
java.lang.String targetType,
java.lang.String serverId,
java.lang.String spaceKey,
boolean obliged)
Add sharing properties into the database |
int |
addStorageUsersPreferences(java.lang.String id,
java.lang.String userKey)
Add a user preference into the database |
int |
delStorageAvailableSpace(java.lang.String id)
Delete sharing properties into the database |
int |
delStorageAvailableSpaceTarget(java.lang.String id)
Delete sharing properties into the database |
int |
delStorageAvailableSpaceTargetAll(java.lang.String serverId,
java.lang.String spaceId)
Delete sharing properties into the database |
int |
delStorageUsersPreferences(java.lang.String id)
Delete users preferences for a shared space from the database |
int |
delStorageUsersPreferencesForUser(java.lang.String id,
java.lang.String userKey)
Delete a user preference from the database |
java.util.Vector |
getAdministratedSpaces()
Get the servers and spaces set into the administration database |
java.util.Vector |
getAvailableSpace(java.lang.String serverName)
Get the users for whose the resource is shared |
java.util.Vector |
getAvailableSpacesForTarget(java.lang.String targetKey,
java.lang.String targetType,
boolean obliged)
Get the available spaces for a group or a user |
java.util.Vector[] |
getIdAndXmlOfSharing(java.lang.String serverName)
Get the id of shared spaces from url and path |
java.util.Vector[] |
getIdOfSpacesWithServerName(java.lang.String serverName)
Get the id of shared spaces from url and path |
java.util.Vector |
getKeyOfSpacesFromPreferences(java.lang.String targetKey)
Get the list of ids of spaces which has already been selected by the current user |
java.util.Vector |
getTargetsOfAdministratedSpaces(java.lang.String idStorageAvailableSpaces,
java.lang.String spaceKey)
Get the targets set into the administration database |
java.util.Vector |
getTargetsOfAvailableSpace(java.lang.String serverName)
Get the users for whose the resource is shared |
java.util.Vector |
getTargetsOfSpace(java.lang.String serverId,
java.lang.String spaceId)
Get the users for whose the resource is shared |
boolean |
isAlreadyAvailableForTarget(org.esupportail.portal.utils.database.Query queryManager,
java.lang.String serverId,
java.lang.String targetKey,
java.lang.String targetType,
java.lang.String spaceKey)
Check if the space is already shared for a specified user |
int |
updatePathOfSharing(java.lang.String serverName,
java.lang.String xml,
java.lang.String id)
Update the path of shared spaces |
int |
updateServerNameAvailableSpace(java.lang.String serverId,
java.lang.String newName)
Update the name of the server of the sharing properties into the database |
int |
updateXmlServerAvailableSpace(java.lang.String xmlServer,
java.lang.String id)
Update the label of the sharing properties into the database |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean initialized
public static final java.lang.String TARGET_IS_USER
public static final java.lang.String TARGET_IS_GROUP
public static final java.lang.String TARGET_IS_ALL
public static final java.lang.String TARGET_ALL
Constructor Detail |
public DataBaseAccess() throws PropertiesException
PropertiesException
Method Detail |
public java.util.Vector getAvailableSpace(java.lang.String serverName) throws DataBaseException
serverName
- the name of the server
DataBaseException
public java.util.Vector getTargetsOfAvailableSpace(java.lang.String serverName) throws DataBaseException
serverName
- the name of the server
DataBaseException
public java.util.Vector getTargetsOfSpace(java.lang.String serverId, java.lang.String spaceId) throws DataBaseException
serverId
- the id of the serverspaceId
- the id of the space
DataBaseException
public boolean isAlreadyAvailableForTarget(org.esupportail.portal.utils.database.Query queryManager, java.lang.String serverId, java.lang.String targetKey, java.lang.String targetType, java.lang.String spaceKey) throws DataBaseException
queryManager
- the query manager for the database access. can be nullserverId
- the id of the servertargetKey
- the key of the user we want to checktargetType
- to know if the target of this sharing is a user or otherspaceKey
- the key of the space
DataBaseException
public int addStorageAvailableSpace(java.lang.String id, java.lang.String serverName, java.lang.String xmlServer, java.lang.String fromKey, java.lang.String owner, java.lang.String rootPath) throws DataBaseException
id
- the id of the serverserverName
- the name of the serverxmlServer
- the server into an xml formatfromKey
- the key of the people who shares
DataBaseException
public int addStorageAvailableSpaceTarget(java.lang.String targetKey, java.lang.String targetType, java.lang.String serverId, java.lang.String spaceKey, boolean obliged) throws DataBaseException
targetKey
- the key of the target usertargetType
- if the target is a user or notserverId
- theid of the serverspaceKey
- the key of the spaceobliged
- if we are obliged to see this space
DataBaseException
public int delStorageAvailableSpaceTarget(java.lang.String id) throws DataBaseException
id
- the space id
DataBaseException
public int delStorageAvailableSpaceTargetAll(java.lang.String serverId, java.lang.String spaceId) throws DataBaseException
serverId
- the server idspaceId
- the space id
DataBaseException
public int delStorageAvailableSpace(java.lang.String id) throws DataBaseException
id
- the space id
DataBaseException
public int delStorageUsersPreferences(java.lang.String id) throws DataBaseException
id
- the id of the sharement in the other database
DataBaseException
public int updateXmlServerAvailableSpace(java.lang.String xmlServer, java.lang.String id) throws DataBaseException
xmlServer
- the xml of the serverid
- the id of the server
DataBaseException
public java.util.Vector[] getIdOfSpacesWithServerName(java.lang.String serverName) throws DataBaseException
serverName
- the name of the server
DataBaseException
public java.util.Vector[] getIdAndXmlOfSharing(java.lang.String serverName) throws DataBaseException
serverName
- the name of the server
DataBaseException
public int updatePathOfSharing(java.lang.String serverName, java.lang.String xml, java.lang.String id) throws DataBaseException
serverName
- the name of the serverxml
- the xml for the serverid
- the name of the server
DataBaseException
public java.util.Vector getAvailableSpacesForTarget(java.lang.String targetKey, java.lang.String targetType, boolean obliged) throws DataBaseException
targetKey
- the key of the targettargetType
- to know if the target of this sharing is a user or not
DataBaseException
public int addStorageUsersPreferences(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 who wants to add preference into the database
DataBaseException
public java.util.Vector getKeyOfSpacesFromPreferences(java.lang.String targetKey) throws DataBaseException
targetKey
- the user or group target key
DataBaseException
public int 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 java.util.Vector getAdministratedSpaces() throws DataBaseException
DataBaseException
public java.util.Vector getTargetsOfAdministratedSpaces(java.lang.String idStorageAvailableSpaces, java.lang.String spaceKey) throws DataBaseException
idStorageAvailableSpaces
- the id of storage targetspaceKey
- the key of the space
DataBaseException
public int updateServerNameAvailableSpace(java.lang.String serverId, java.lang.String newName) throws DataBaseException
serverId
- the id of the servernewName
- the new name of the server administration
DataBaseException
|
CStockage 4.2_beta-RC-1 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |