|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.channels.BaseChannel
org.esupportail.portal.channels.CStockage.CStockageAdministration
Id: CStockageAdministration.java,v 1.0 2 mai 2005
Copyright (c) 2004 Esup Portail (www.esup-portail.org)
Classes: CStockageAdministration
Original Author: Yohan Colmant
Channel used to manage personal files on a webdav server through the portal
Field Summary | |
private AdministrationTool |
adminTool
The tool used to manage the administration of the servers |
private Server |
currentServer
The server we are editing |
private Space |
currentSpace
The space we are editing |
protected static Log |
log
Logger object |
private java.lang.String |
portalLogin
User login |
private java.util.Vector |
serverAttributes
The attributes to set the server |
private java.util.Vector |
servers
The list of the servers |
private ChannelException |
setStaticDataException
Error at the beginning of the channel |
private org.jasig.portal.IServant |
slave
The servant channel used for groups and users selection |
private java.util.Vector |
spaceAttributes
The attributes to set the space |
private org.jasig.portal.ChannelStaticData |
staticData
|
private java.lang.StringBuffer |
stylesheet
The stylesheet used for the transformation |
private Server |
tempAdminServer
The server we are editing |
private Space |
tempAdminSpace
sharing directory properties used during the sharing management |
Fields inherited from class org.jasig.portal.channels.BaseChannel |
runtimeData |
Constructor Summary | |
CStockageAdministration()
Constructor |
Method Summary | |
private static boolean |
checkServerAttibutes(org.jasig.portal.ChannelRuntimeData runtimeData,
java.util.Vector serverAttributes,
Server server)
Check if the attributes are well set |
private static void |
checkServerAttributesRules(java.util.Vector serverAttributes)
If somme attributes change, we have to change others ones |
private static boolean |
checkSpaceAttibutes(org.jasig.portal.ChannelRuntimeData runtimeData,
java.util.Vector spaceAttributes)
Check if the attributes are well set |
private void |
checkUsersAndGroups(org.jasig.portal.ChannelRuntimeData runtimeData)
When valid the sharing |
private void |
deleteServer(org.jasig.portal.ChannelRuntimeData runtimeData)
delete a server |
private void |
deleteSpace(org.jasig.portal.ChannelRuntimeData runtimeData)
delete a space |
org.jasig.portal.ChannelCacheKey |
generateKey()
|
java.lang.StringBuffer |
getDefaultServerXml(org.jasig.portal.ChannelRuntimeData runtimeData)
Return the xml for the default spaces mode |
java.lang.StringBuffer |
getDefaultSpaceXml(org.jasig.portal.ChannelRuntimeData runtimeData)
Return the xml for the default space mode |
private static java.util.Vector |
getNewServerAttributesList(Server server)
Get a new list of attributes to set to the server |
private static java.util.Vector |
getNewSpaceAttributesList(Space space)
Get a new list of attributes to set to the space |
private static java.lang.StringBuffer |
getServerAttributesXml(java.util.Vector serverAttributes)
Get the XML for the attributes |
private static java.lang.StringBuffer |
getServerSpacesXml(java.util.ArrayList serverSpaces)
Get the XML for the spaces |
private static java.lang.StringBuffer |
getSpaceAttributesXml(java.util.Vector spaceAttributes)
Get the XML for the attributes |
private static java.lang.StringBuffer |
getSpaceUsersAndGroupsXml(DirectorySharingProperties sharingProperties)
Get the XML for the users ans groups |
boolean |
isCacheValid(java.lang.Object validity)
|
private void |
loadServers()
Load the servers from the database |
private void |
renameServer(org.jasig.portal.ChannelRuntimeData runtimeData)
Rename a server |
void |
renderXML(org.xml.sax.ContentHandler out)
Output channel content to the portal |
java.lang.StringBuffer |
renderXmlChannelException(ChannelException e)
Return the xml when we have a ChannelException exception |
private java.lang.StringBuffer |
renderXmlConfirmDeleteServer(org.jasig.portal.ChannelRuntimeData runtimeData)
Confirm when we ask to delete a server |
private java.lang.StringBuffer |
renderXmlConfirmDeleteSpace(org.jasig.portal.ChannelRuntimeData runtimeData)
Confirm when we ask to delete a space |
private java.lang.StringBuffer |
renderXmlConfirmRenameServer(org.jasig.portal.ChannelRuntimeData runtimeData)
Confirm when we ask to rename a server |
java.lang.StringBuffer |
renderXmlDefault(org.jasig.portal.ChannelRuntimeData runtimeData,
ChannelException e)
Return the xml for the default mode |
private java.lang.StringBuffer |
renderXmlDefaultServer(org.jasig.portal.ChannelRuntimeData runtimeData,
org.xml.sax.ContentHandler out)
Return the xml for the default spaces mode |
private java.lang.StringBuffer |
renderXmlDefaultSpace(org.jasig.portal.ChannelRuntimeData runtimeData,
org.xml.sax.ContentHandler out)
Return the xml for the default space mode |
java.lang.StringBuffer |
renderXmlNewServer(org.jasig.portal.ChannelRuntimeData runtimeData,
org.xml.sax.ContentHandler out)
Return the xml for the new server mode |
private java.lang.StringBuffer |
renderXmlShareDirectoryAddGroup(org.jasig.portal.ChannelRuntimeData runtimeData,
org.jasig.portal.ChannelStaticData staticData,
org.xml.sax.ContentHandler out)
When we want to add a group |
private java.lang.StringBuffer |
renderXmlShareDirectoryAddUser(org.jasig.portal.ChannelRuntimeData runtimeData,
org.jasig.portal.ChannelStaticData staticData,
org.xml.sax.ContentHandler out)
When we want to add a user |
private java.lang.StringBuffer |
renderXmlShareDirectoryDeleteGroup(org.jasig.portal.ChannelRuntimeData runtimeData)
When we delete a group |
private java.lang.StringBuffer |
renderXmlShareDirectoryDeleteUser(org.jasig.portal.ChannelRuntimeData runtimeData)
When we delete a user |
private java.lang.StringBuffer |
renderXmlValidServantResults(org.jasig.portal.ChannelRuntimeData runtimeData,
org.jasig.portal.ChannelStaticData staticData,
org.xml.sax.ContentHandler out)
When we check the servant results |
java.lang.StringBuffer |
renderXmlWithInformation(java.lang.String informationCode)
Return the xml when we have to show a information message |
void |
setStaticData(org.jasig.portal.ChannelStaticData sd)
Receive static channel data from the portal. |
private void |
validServer(org.jasig.portal.ChannelRuntimeData runtimeData)
Valid the server's settings |
private void |
validSpace(org.jasig.portal.ChannelRuntimeData runtimeData)
Valid the space's settings |
static void |
xsltTransformation(org.jasig.portal.utils.XSLT xslt,
java.lang.StringBuffer xmlTemp,
org.xml.sax.ContentHandler out,
org.jasig.portal.ChannelRuntimeData runtimeData,
java.lang.StringBuffer stylesheet)
Do the XSLT transformation in the channel |
Methods inherited from class org.jasig.portal.channels.BaseChannel |
getRuntimeProperties, receiveEvent, setRuntimeData |
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 org.jasig.portal.ChannelStaticData staticData
private ChannelException setStaticDataException
private java.lang.StringBuffer stylesheet
private java.lang.String portalLogin
private AdministrationTool adminTool
private org.jasig.portal.IServant slave
private java.util.Vector servers
private Server currentServer
private Server tempAdminServer
private java.util.Vector serverAttributes
private java.util.Vector spaceAttributes
private Space currentSpace
private Space tempAdminSpace
Constructor Detail |
public CStockageAdministration()
Method Detail |
public void setStaticData(org.jasig.portal.ChannelStaticData sd)
setStaticData
in interface org.jasig.portal.IChannel
sd
- ChannelStaticData static channel datapublic void renderXML(org.xml.sax.ContentHandler out) throws org.jasig.portal.PortalException
renderXML
in interface org.jasig.portal.IChannel
out
- a sax document handler
org.jasig.portal.PortalException
public static void xsltTransformation(org.jasig.portal.utils.XSLT xslt, java.lang.StringBuffer xmlTemp, org.xml.sax.ContentHandler out, org.jasig.portal.ChannelRuntimeData runtimeData, java.lang.StringBuffer stylesheet) throws org.jasig.portal.PortalException
xslt
- the XSLT objectxmlTemp
- the XML generatedout
- the ContentHandler objectruntimeData
- the ChannelRuntimeData objectstylesheet
- the stylesheet used
org.jasig.portal.PortalException
public java.lang.StringBuffer renderXmlWithInformation(java.lang.String informationCode) throws PropertiesException
informationCode
- the code for the information message
PropertiesException
public java.lang.StringBuffer renderXmlChannelException(ChannelException e)
e
- the throwed exception
private void loadServers() throws DataBaseException, PropertiesException, ServerException
DataBaseException
PropertiesException
ServerException
public java.lang.StringBuffer renderXmlDefault(org.jasig.portal.ChannelRuntimeData runtimeData, ChannelException e) throws DataBaseException, PropertiesException, ServerException
runtimeData
- the ChannelRuntimeData objecte
- exception throwed
DataBaseException
PropertiesException
ServerException
public java.lang.StringBuffer renderXmlNewServer(org.jasig.portal.ChannelRuntimeData runtimeData, org.xml.sax.ContentHandler out) throws CancelException, StillExistsServerException, DataBaseException, PropertiesException, ServerException, org.jasig.portal.PortalException
runtimeData
- the ChannelRuntimeData object
CancelException
StillExistsServerException
DataBaseException
PropertiesException
ServerException
org.jasig.portal.PortalException
private java.lang.StringBuffer renderXmlDefaultServer(org.jasig.portal.ChannelRuntimeData runtimeData, org.xml.sax.ContentHandler out) throws CancelException, DataBaseException, PropertiesException, ServerException, org.jasig.portal.PortalException
runtimeData
- the ChannelRuntimeData object
CancelException
DataBaseException
PropertiesException
ServerException
org.jasig.portal.PortalException
public java.lang.StringBuffer getDefaultServerXml(org.jasig.portal.ChannelRuntimeData runtimeData)
runtimeData
- the ChannelRuntimeData object
private static java.lang.StringBuffer getServerAttributesXml(java.util.Vector serverAttributes)
serverAttributes
- the list of attributes to set
private static java.lang.StringBuffer getServerSpacesXml(java.util.ArrayList serverSpaces)
serverSpaces
- the list of spaces to set
private void validServer(org.jasig.portal.ChannelRuntimeData runtimeData) throws DataBaseException
runtimeData
-
DataBaseException
private static java.util.Vector getNewServerAttributesList(Server server)
private static boolean checkServerAttibutes(org.jasig.portal.ChannelRuntimeData runtimeData, java.util.Vector serverAttributes, Server server)
runtimeData
- the ChannelRuntimeData objectserverAttributes
- the list of attributes to set
private static void checkServerAttributesRules(java.util.Vector serverAttributes)
serverAttributes
- private java.lang.StringBuffer renderXmlConfirmDeleteServer(org.jasig.portal.ChannelRuntimeData runtimeData)
runtimeData
- the ChannelRuntimeData object
private void deleteServer(org.jasig.portal.ChannelRuntimeData runtimeData) throws DataBaseException
runtimeData
- the ChannelRuntimeData object
DataBaseException
private java.lang.StringBuffer renderXmlConfirmRenameServer(org.jasig.portal.ChannelRuntimeData runtimeData)
runtimeData
- the ChannelRuntimeData object
private void renameServer(org.jasig.portal.ChannelRuntimeData runtimeData) throws DataBaseException, StillExistsServerException
runtimeData
- the ChannelRuntimeData object
DataBaseException
StillExistsServerException
private java.lang.StringBuffer renderXmlDefaultSpace(org.jasig.portal.ChannelRuntimeData runtimeData, org.xml.sax.ContentHandler out) throws DataBaseException, PropertiesException, org.jasig.portal.PortalException, CancelException
runtimeData
- the ChannelRuntimeData object
CancelException
DataBaseException
PropertiesException
org.jasig.portal.PortalException
public java.lang.StringBuffer getDefaultSpaceXml(org.jasig.portal.ChannelRuntimeData runtimeData)
runtimeData
- the ChannelRuntimeData object
private static java.lang.StringBuffer getSpaceAttributesXml(java.util.Vector spaceAttributes)
spaceAttributes
- the list of attributes to set
private static java.lang.StringBuffer getSpaceUsersAndGroupsXml(DirectorySharingProperties sharingProperties)
sharingProperties
- the properties for the sharing
private void validSpace(org.jasig.portal.ChannelRuntimeData runtimeData)
runtimeData
- private static java.util.Vector getNewSpaceAttributesList(Space space)
private static boolean checkSpaceAttibutes(org.jasig.portal.ChannelRuntimeData runtimeData, java.util.Vector spaceAttributes)
runtimeData
- the ChannelRuntimeData objectspaceAttributes
- the list of attributes to set
private void checkUsersAndGroups(org.jasig.portal.ChannelRuntimeData runtimeData)
runtimeData
- private java.lang.StringBuffer renderXmlShareDirectoryAddUser(org.jasig.portal.ChannelRuntimeData runtimeData, org.jasig.portal.ChannelStaticData staticData, org.xml.sax.ContentHandler out) throws PropertiesException, org.jasig.portal.PortalException
runtimeData
- the runtime data object used in this channelstaticData
- the static data object used in this channelout
- the output object used for the rendering
PropertiesException
org.jasig.portal.PortalException
private java.lang.StringBuffer renderXmlShareDirectoryAddGroup(org.jasig.portal.ChannelRuntimeData runtimeData, org.jasig.portal.ChannelStaticData staticData, org.xml.sax.ContentHandler out) throws PropertiesException, org.jasig.portal.PortalException
runtimeData
- the runtime data object used in this channelstaticData
- the static data object used in this channelout
- the output object used for the rendering
PropertiesException
org.jasig.portal.PortalException
private java.lang.StringBuffer renderXmlShareDirectoryDeleteUser(org.jasig.portal.ChannelRuntimeData runtimeData) throws PropertiesException
runtimeData
- the runtime data object used in the channel
PropertiesException
private java.lang.StringBuffer renderXmlShareDirectoryDeleteGroup(org.jasig.portal.ChannelRuntimeData runtimeData) throws PropertiesException
runtimeData
- the runtime data object used in the channel
PropertiesException
private java.lang.StringBuffer renderXmlValidServantResults(org.jasig.portal.ChannelRuntimeData runtimeData, org.jasig.portal.ChannelStaticData staticData, org.xml.sax.ContentHandler out) throws PropertiesException, org.jasig.portal.PortalException, DataBaseException, CancelException
runtimeData
- the runtime data object used in this channelstaticData
- the static data object used in this channel
PropertiesException
org.jasig.portal.PortalException
DataBaseException
CancelException
private java.lang.StringBuffer renderXmlConfirmDeleteSpace(org.jasig.portal.ChannelRuntimeData runtimeData)
runtimeData
- the ChannelRuntimeData object
private void deleteSpace(org.jasig.portal.ChannelRuntimeData runtimeData)
runtimeData
- the ChannelRuntimeData objectpublic org.jasig.portal.ChannelCacheKey generateKey()
generateKey
in interface org.jasig.portal.ICacheable
public boolean isCacheValid(java.lang.Object validity)
isCacheValid
in interface org.jasig.portal.ICacheable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |