|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.esupportail.portal.channels.CStockage.channelAction.AbstractChannelAction
org.esupportail.portal.channels.CStockage.channelAction.injac.ChannelAction
Id: ChannelAction.java,v 1.0 27 sept. 2004 Copyright (c) 2004 Esup Portail (www.esup-portail.org) Classes: ChannelAction Original Author: Yohan Colmant Class used to manage the actions when we are in an injac space context
Field Summary | |
private boolean |
creatingNewSpace
If we are creating a new Space |
private java.lang.String |
creatingNewSpaceName
The name of the new space while creating |
private DirectoryProperties |
directoryProperties
Object used to know the properties of the current directory |
protected static Log |
log
Logger object |
private java.util.ArrayList |
metadataToSet
The metadata we have to set |
private InjacSpaceManagementProperties |
smp
Object use to manage an injac space properties |
private java.util.Vector |
userTypeForAdd
The vector used to add people when we use a servant channel |
private java.lang.String |
userTypeForAddName
The name of user type for add: reader_group, ... ? |
Fields inherited from class org.esupportail.portal.channels.CStockage.channelAction.AbstractChannelAction |
buffer, currentSpace, sharingTool, slave, spaces, stylesheet, userGroups, userPortalLogin |
Constructor Summary | |
ChannelAction()
Default constructor |
Method Summary | |
private boolean |
adminSpaceAdd(org.jasig.portal.ChannelRuntimeData runtimeData,
org.jasig.portal.ChannelStaticData staticData,
org.xml.sax.ContentHandler out)
When we want to add a user or a group |
private void |
adminSpaceChangeMetadataFile(java.lang.String choice)
When we change the metadata file |
private void |
adminSpaceChangeRenderType(java.lang.String choice)
When we change the rendering type |
private void |
adminSpaceDelete(org.jasig.portal.ChannelRuntimeData runtimeData)
When we delete a user or a group |
protected void |
checkCurrentDirectoryProperties()
For the selected mode, we check the properties of the current directory |
private void |
createDir(org.jasig.portal.ChannelRuntimeData runtimeData)
Generate the XML String for this mod |
private java.lang.StringBuffer |
createSpace(org.jasig.portal.ChannelRuntimeData runtimeData,
org.jasig.portal.ChannelStaticData staticData,
org.xml.sax.ContentHandler out)
Generate the xml for the creating space mod |
private void |
delete(org.jasig.portal.ChannelRuntimeData runtimeData)
Generate the XML String for this mod |
protected void |
directoryBack()
Go to the parent directory |
void |
init(org.jasig.portal.security.IPerson person,
Space currentSpace,
java.util.ArrayList spaces,
BufferAction buffer,
java.lang.String userPortalLogin,
java.util.Vector userGroups)
Init the object used to manage the actions of the channel |
static boolean |
isUserDocumentOwner(java.lang.String documentPath,
Space currentSpace,
java.lang.String userPortalLogin)
Check if the current user is the owner of the specified document |
static boolean |
isUserEditorInSpace(java.lang.String spacePath,
Space currentSpace,
java.lang.String userPortalLogin,
java.util.Vector userGroups)
Check if the current user is editor in the specified space |
static boolean |
isUserManagerInSpace(java.lang.String spacePath,
Space currentSpace,
java.lang.String userPortalLogin,
java.util.Vector userGroups)
Check if the current user is manager in the specified space |
static boolean |
isUserWriterInSpace(java.lang.String spacePath,
Space currentSpace,
java.lang.String userPortalLogin,
java.util.Vector userGroups)
Check if the current user is writer in the specified space |
private java.lang.StringBuffer |
paste(org.jasig.portal.ChannelRuntimeData runtimeData)
Generate the XML String for this mod |
private void |
rename(org.jasig.portal.ChannelRuntimeData runtimeData)
Generate the XML String for this mod |
private java.lang.StringBuffer |
renderXmlAdminSpace(org.jasig.portal.ChannelRuntimeData runtimeData,
org.jasig.portal.ChannelStaticData staticData,
org.xml.sax.ContentHandler out)
Return XML for the space administration mode |
private java.lang.StringBuffer |
renderXmlAdminSpaceCancel()
When click on cancel |
private java.lang.StringBuffer |
renderXmlAdminSpaceGenerateXml()
Generate xml for the administration rendering |
private java.lang.StringBuffer |
renderXmlAdminSpaceValid(org.jasig.portal.ChannelRuntimeData runtimeData)
When valid the properties |
private java.lang.StringBuffer |
renderXmlAdminSpaceValidServantResults(org.jasig.portal.ChannelStaticData staticData)
When we check the servant results |
protected java.lang.StringBuffer |
renderXmlBadConnexionParametersException(ChannelException e)
Return the xml when we have a BadConnexionParameters exception |
java.lang.StringBuffer |
renderXmlChannelException(ChannelException e)
Return the xml when we have a ChannelException exception |
private java.lang.StringBuffer |
renderXmlConfirmDelete(org.jasig.portal.ChannelRuntimeData runtimeData)
Generate the XML String for this mod |
private java.lang.StringBuffer |
renderXmlConfirmPaste()
Generate the XML String for this mod |
private java.lang.StringBuffer |
renderXmlConfirmRootDocumentSetting(org.jasig.portal.ChannelRuntimeData runtimeData)
Generate the XML when we ask a root document setting confirmation |
private java.lang.StringBuffer |
renderXmlSetNameForRename(org.jasig.portal.ChannelRuntimeData runtimeData)
Generate the XML String for this mod |
protected java.lang.StringBuffer |
renderXmlShowCurrentDir(org.jasig.portal.ChannelRuntimeData runtimeData)
Generate the XML String for this mod |
java.lang.StringBuffer |
renderXmlWithInformation(java.lang.String informationCode)
Return the xml when we have to show a information message |
private void |
rootDocumentSetting(org.jasig.portal.ChannelRuntimeData runtimeData)
Generate the XML String and set the document as root |
private void |
setClipboard(java.lang.String mode,
org.jasig.portal.ChannelRuntimeData runtimeData)
Generate the XML String for this mod |
private void |
setCurrentDirectoryProperties()
Set the properties of the currentDirectory |
private void |
setCurrentDirectoryProperties(java.lang.String injacType)
Set the properties of the currentDirectory |
java.lang.StringBuffer |
specificCheckCalledAction(java.lang.String currentMode,
org.jasig.portal.ChannelStaticData staticData,
org.jasig.portal.ChannelRuntimeData runtimeData,
org.xml.sax.ContentHandler out,
org.jasig.portal.utils.XSLT xslt,
ChannelException setStaticDataException)
Manage the specific actions when refreshing the channel for the specific channel mode |
private void |
upload(org.jasig.portal.ChannelRuntimeData runtimeData)
Start the upload |
private java.lang.StringBuffer |
verifyChoiceForPublishMode(org.jasig.portal.ChannelRuntimeData runtimeData)
When we choose the mode for the publication, we verify the choice |
private java.lang.StringBuffer |
verifyChoiceForSubmitMode(org.jasig.portal.ChannelRuntimeData runtimeData)
When we choose the mode for the submit, we verify the choice |
Methods inherited from class org.esupportail.portal.channels.CStockage.channelAction.AbstractChannelAction |
checkCalledAction |
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 InjacSpaceManagementProperties smp
private DirectoryProperties directoryProperties
private java.util.ArrayList metadataToSet
private boolean creatingNewSpace
private java.lang.String creatingNewSpaceName
private java.util.Vector userTypeForAdd
private java.lang.String userTypeForAddName
Constructor Detail |
public ChannelAction()
Method Detail |
public void init(org.jasig.portal.security.IPerson person, Space currentSpace, java.util.ArrayList spaces, BufferAction buffer, java.lang.String userPortalLogin, java.util.Vector userGroups) throws ChannelException
init
in class AbstractChannelAction
person
- the uportal person objectcurrentSpace
- the current space usedspaces
- all the spaces usedbuffer
- the buffer used to get for example the clipboarduserPortalLogin
- The user login in the portaluserGroups
- The groups of the user in the portal
ChannelException
private void setCurrentDirectoryProperties() throws ServerException
ServerException
private void setCurrentDirectoryProperties(java.lang.String injacType) throws ServerException
injacType
- the type of the directory
ServerException
public static boolean isUserManagerInSpace(java.lang.String spacePath, Space currentSpace, java.lang.String userPortalLogin, java.util.Vector userGroups) throws ServerException
spacePath
- the space access pathcurrentSpace
- the current space useduserPortalLogin
- the uportal access loginuserGroups
- the groups of the user
ServerException
public static boolean isUserWriterInSpace(java.lang.String spacePath, Space currentSpace, java.lang.String userPortalLogin, java.util.Vector userGroups) throws ServerException
spacePath
- the space access pathcurrentSpace
- the current space useduserPortalLogin
- the uportal access loginuserGroups
- the groups of the user
ServerException
public static boolean isUserEditorInSpace(java.lang.String spacePath, Space currentSpace, java.lang.String userPortalLogin, java.util.Vector userGroups) throws ServerException
spacePath
- the space access pathcurrentSpace
- the current space useduserPortalLogin
- the uportal access loginuserGroups
- the groups of the user
ServerException
public static boolean isUserDocumentOwner(java.lang.String documentPath, Space currentSpace, java.lang.String userPortalLogin) throws ServerException
documentPath
- the document access pathcurrentSpace
- the current space useduserPortalLogin
- the uportal access login
ServerException
public java.lang.StringBuffer specificCheckCalledAction(java.lang.String currentMode, org.jasig.portal.ChannelStaticData staticData, org.jasig.portal.ChannelRuntimeData runtimeData, org.xml.sax.ContentHandler out, org.jasig.portal.utils.XSLT xslt, ChannelException setStaticDataException) throws ChannelException, org.jasig.portal.PortalException
specificCheckCalledAction
in class AbstractChannelAction
currentMode
- the current channel modestaticData
- the static data channel objectruntimeData
- the runtime data channel objectout
- the contentHandler used in the renderXmlxslt
- the xslt motor objectsetStaticDataException
- the excpetion throwed in the setStaticData method
org.jasig.portal.PortalException
ChannelException
public java.lang.StringBuffer renderXmlWithInformation(java.lang.String informationCode)
renderXmlWithInformation
in class AbstractChannelAction
protected void checkCurrentDirectoryProperties() throws java.lang.Exception
checkCurrentDirectoryProperties
in class AbstractChannelAction
java.lang.Exception
protected java.lang.StringBuffer renderXmlBadConnexionParametersException(ChannelException e) throws PropertiesException
renderXmlBadConnexionParametersException
in class AbstractChannelAction
e
- the throwed exception
PropertiesException
public java.lang.StringBuffer renderXmlChannelException(ChannelException e)
renderXmlChannelException
in class AbstractChannelAction
e
- the throwed exception
protected java.lang.StringBuffer renderXmlShowCurrentDir(org.jasig.portal.ChannelRuntimeData runtimeData) throws ChannelException
renderXmlShowCurrentDir
in class AbstractChannelAction
runtimeData
- the runtime data channel object
ChannelException
protected void directoryBack() throws ChannelException
directoryBack
in class AbstractChannelAction
ChannelException
private void upload(org.jasig.portal.ChannelRuntimeData runtimeData) throws ChannelException
runtimeData
- the runtime data channel object
ChannelException
private void createDir(org.jasig.portal.ChannelRuntimeData runtimeData) throws CancelException, ApplicationException, CreateDirectoryException, StillExistsException, BadFormatException, NotAuthorizedException, NotAuthorizedNewDirException, NotExistsResourceException, PropertiesException
runtimeData
- the runtime data channel object
CancelException
ApplicationException
CreateDirectoryException
StillExistsException
BadFormatException
NotAuthorizedException
NotAuthorizedNewDirException
NotExistsResourceException
PropertiesException
private java.lang.StringBuffer renderXmlSetNameForRename(org.jasig.portal.ChannelRuntimeData runtimeData) throws ChannelException
runtimeData
- the runtime data channel object
ChannelException
private void rename(org.jasig.portal.ChannelRuntimeData runtimeData) throws ChannelException
runtimeData
- the runtime data channel object
ChannelException
private java.lang.StringBuffer renderXmlConfirmDelete(org.jasig.portal.ChannelRuntimeData runtimeData) throws ChannelException
runtimeData
- the runtime data channel object
ChannelException
private void delete(org.jasig.portal.ChannelRuntimeData runtimeData) throws ChannelException
runtimeData
- the runtime data channel object
ChannelException
private void setClipboard(java.lang.String mode, org.jasig.portal.ChannelRuntimeData runtimeData) throws NoneSelectedResourceException, ApplicationException, NotAuthorizedException
mode
- used: copy or moveruntimeData
- the runtime data channel object
NoneSelectedResourceException
ApplicationException
NotAuthorizedException
private java.lang.StringBuffer renderXmlConfirmPaste() throws ChannelException
ChannelException
private java.lang.StringBuffer paste(org.jasig.portal.ChannelRuntimeData runtimeData) throws ChannelException
runtimeData
- the runtime data channel object
ChannelException
private java.lang.StringBuffer verifyChoiceForSubmitMode(org.jasig.portal.ChannelRuntimeData runtimeData) throws CancelException, ChannelException
runtimeData
- the ChannelRuntimeData object
CancelException
ChannelException
private java.lang.StringBuffer verifyChoiceForPublishMode(org.jasig.portal.ChannelRuntimeData runtimeData) throws CancelException, ChannelException
runtimeData
- the ChannelRuntimeData object
CancelException
ChannelException
private java.lang.StringBuffer renderXmlAdminSpace(org.jasig.portal.ChannelRuntimeData runtimeData, org.jasig.portal.ChannelStaticData staticData, org.xml.sax.ContentHandler out) throws org.jasig.portal.PortalException, ChannelException
runtimeData
- staticData
- out
-
org.jasig.portal.PortalException
ChannelException
private java.lang.StringBuffer renderXmlAdminSpaceCancel() throws CancelException
CancelException
private java.lang.StringBuffer renderXmlAdminSpaceValid(org.jasig.portal.ChannelRuntimeData runtimeData) throws ChannelException
runtimeData
-
ChannelException
private void adminSpaceChangeMetadataFile(java.lang.String choice) throws PropertiesException
choice
- the metadata file choice
PropertiesException
private void adminSpaceChangeRenderType(java.lang.String choice) throws PropertiesException
choice
- the rendering type choice
PropertiesException
private boolean adminSpaceAdd(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 renderXmlAdminSpaceValidServantResults(org.jasig.portal.ChannelStaticData staticData) throws PropertiesException
staticData
- the static data object used in this channel
PropertiesException
private void adminSpaceDelete(org.jasig.portal.ChannelRuntimeData runtimeData) throws PropertiesException
runtimeData
- the runtime data object used in the channel
PropertiesException
private java.lang.StringBuffer renderXmlAdminSpaceGenerateXml() throws PropertiesException
PropertiesException
private java.lang.StringBuffer createSpace(org.jasig.portal.ChannelRuntimeData runtimeData, org.jasig.portal.ChannelStaticData staticData, org.xml.sax.ContentHandler out) throws ChannelException, org.jasig.portal.PortalException
runtimeData
- the runtime data channel objectstaticData
- the static data channel objectout
- the object used for the rendering
ChannelException
org.jasig.portal.PortalException
private java.lang.StringBuffer renderXmlConfirmRootDocumentSetting(org.jasig.portal.ChannelRuntimeData runtimeData) throws ChannelException
runtimeData
- the channel runtimedata object
ChannelException
private void rootDocumentSetting(org.jasig.portal.ChannelRuntimeData runtimeData) throws ChannelException
runtimeData
- the runtime data channel object
ChannelException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |