Merged missing changes to file-servers.xml and file-servers.properties from 13521 in V3.1

Synchronized new file-servers-context.xml with these changes
Debugged NFS and Desktop Action Initialization via Spring

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13831 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2009-04-03 17:31:00 +00:00
parent 0ee6c8038a
commit 7ed214059f
16 changed files with 750 additions and 576 deletions

View File

@@ -1,176 +1,244 @@
<alfresco-config area="file-servers"> <alfresco-config area="file-servers">
<config evaluator="string-compare" condition="CIFS Server"> <config evaluator="string-compare" condition="CIFS Server">
<serverEnable enabled="${cifs.enabled}"/> <serverEnable enabled="${cifs.enabled}"/>
<host name="${cifs.localname}A" domain="${cifs.domain}"/> <host name="${cifs.localname}A" domain="${cifs.domain}"/>
<comment>Alfresco CIFS Server</comment> <comment>Alfresco CIFS Server</comment>
<!-- Set to the broadcast mask for the subnet --> <!-- Set to the broadcast mask for the subnet -->
<broadcast>${cifs.broadcast}</broadcast> <broadcast>${cifs.broadcast}</broadcast>
<!-- Set to the IP for the adapter for Java socket --> <!-- Set to the IP for the adapter for Java socket -->
<bindto>${cifs.bindto}</bindto> <bindto>${cifs.bindto}</bindto>
<!-- Use Java socket based NetBIOS over TCP/IP and native SMB on linux --> <!-- Use Java socket based NetBIOS over TCP/IP and native SMB on linux -->
<tcpipSMB platforms="linux,solaris,macosx"/> <tcpipSMB ipv6="${cifs.ipv6}" platforms="linux,solaris,macosx"/>
<netBIOSSMB bindto="${cifs.bindto}" platforms="linux,solaris,macosx"/> <netBIOSSMB bindto="${cifs.bindto}" platforms="linux,solaris,macosx"/>
<!-- Can be mapped to non-privileged ports, then use firewall rules to forward <!-- Can be mapped to non-privileged ports, then use firewall rules to forward
requests from the standard ports --> requests from the standard ports -->
<!-- <!--
<tcpipSMB port="1445" platforms="linux,solaris,macosx"/> <tcpipSMB port="1445" ipv6="${cifs.ipv6}" platforms="linux,solaris,macosx"/>
<netBIOSSMB sessionPort="1139" namePort="1137" datagramPort="1138" platforms="linux,solaris,macosx"/> <netBIOSSMB sessionPort="1139" namePort="1137" datagramPort="1138" platforms="linux,solaris,macosx"/>
--> -->
<hostAnnounce interval="5"/> <!-- Announce the server to the workgroup/domain -->
<!-- Use enabled="false" attribute to disable announcements -->
<hostAnnounce interval="5" enabled="${cifs.hostannounce}"/>
<!-- Use Win32 NetBIOS interface on Windows --> <!-- Use Win32 NetBIOS interface on Windows -->
<Win32NetBIOS/> <Win32NetBIOS/>
<Win32Announce interval="5"/>
<!-- Announce the server to the workgroup/domain -->
<!-- Use enabled="false" attribute to disable announcements -->
<Win32Announce interval="5" enabled="${cifs.hostannounce}"/>
<!-- CIFS authentication --> <!-- CIFS authentication -->
<authenticator type="enterprise"> <!-- Available types are 'alfresco', 'passthru' and 'enterprise' -->
</authenticator> <authenticator type="enterprise"/>
<!-- <!-- CIFS Passthru authentication sample -->
<!-- Also see the <DomainMappings> config in the 'Filesystem Security' section below -->
<!--
<authenticator type="passthru">
<Server>ALFRESCO\adsrv1,ADOMAIN\adsrv2,adsrv1</Server>
<protocolOrder>TCPIP,NetBIOS</protocolOrder>
<offlineCheckInterval>60</offlineCheckInterval>
</authenticator>
-->
<!-- CIFS Enterprise authentication sample with Kerberos -->
<!--
<authenticator type="enterprise"/>
<KDC>192.168.1.240</KDC>
<Realm>WIN2003.ALFRESCO.ORG</Realm>
<Password>password</Password>
<kerberosDebug/>
</authenticator>
-->
<!-- Disable the use of asynchronous sockets/NIO code -->
<!--
<disableNIO/>
-->
<!-- Disable the use of JNI code -->
<!-- Only currently affects Windows -->
<!--
<disableNativeCode/>
-->
<!-- Session timeout, in seconds -->
<!-- Defaults to 15 minutes, to match the default Windows client setting -->
<!-- If no I/O is received within that time the session is closed by the server -->
<!--
<sessionTimeout>300</sessionTimeout>
-->
<!-- Enable WINS if used for NetBIOS name lookups -->
<!--
<WINS> <WINS>
<primary>1.2.3.4</primary> <primary>1.2.3.4</primary>
<secondary>5.6.7.8</secondary> <secondary>5.6.7.8</secondary>
</WINS> </WINS>
--> -->
<!-- CIFS server debug settings -->
<!-- Enable 'log4j.logger.org.alfresco.fileserver=debug' in log4j.properties file -->
<!--
<sessionDebug flags="Negotiate,Socket"/> <sessionDebug flags="Negotiate,Socket"/>
-->
</config> </config>
<config evaluator="string-compare" condition="FTP Server"> <config evaluator="string-compare" condition="FTP Server">
<serverEnable enabled="${ftp.enabled}"/> <serverEnable enabled="${ftp.enabled}"/>
<!-- Run on a non-privileged port --> <!-- Run on a non-privileged port -->
<!-- <!--
<port>1121</port> <port>1121</port>
--> -->
<!-- FTP authentication --> <!-- FTP authentication -->
<!-- Available types are 'alfresco' and 'passthru' -->
<authenticator type="alfresco"/> <authenticator type="alfresco"/>
<!-- <debug flags="File,Search,Error,Directory,Info,DataPort"/> --> <!-- FTP server debug settings -->
<!-- Enable 'log4j.logger.org.alfresco.fileserver=debug' in log4j.properties file -->
<!--
<debug flags="File,Search,Error,Directory,Info,DataPort"/>
-->
</config> </config>
<config evaluator="string-compare" condition="NFS Server"> <config evaluator="string-compare" condition="NFS Server">
<serverEnable enabled="${nfs.enabled}"/> <serverEnable enabled="${nfs.enabled}"/>
</config>
<config evaluator="string-compare" condition="Filesystems">
<filesystems>
<!-- Map NFS user/group ids to Alfresco users -->
<rpcAuthenticator>
<userMappings>
<user name="admin" uid="0" gid="0"/>
</userMappings>
</rpcAuthenticator>
</config>
<config evaluator="string-compare" condition="Filesystems">
<filesystems>
<!-- Alfresco repository access shared filesystem --> <!-- Alfresco repository access shared filesystem -->
<filesystem name="${filesystem.name}"> <filesystem name="${filesystem.name}">
<store>workspace://SpacesStore</store> <store>workspace://SpacesStore</store>
<rootPath>/app:company_home</rootPath> <rootPath>/app:company_home</rootPath>
<!-- Add a URL file to each folder that links back to the web client --> <!-- Add a URL file to each folder that links back to the web client -->
<urlFile> <urlFile>
<filename>__AlfrescoClient.url</filename> <filename>__Alfresco.url</filename>
<webpath>http://${localname}:8080/alfresco/</webpath> <webpath>http://${localname}:8080/alfresco/</webpath>
</urlFile> </urlFile>
<!-- Mark locked files as offline --> <!-- Mark locked files as offline -->
<offlineFiles/> <offlineFiles/>
<!-- Desktop actions --> <!-- Desktop actions -->
<!-- Uses a client-side application to trigger a server-side action --> <!-- Uses a client-side application to trigger a server-side action -->
<!-- Echo - displays a message echoed from the server --> <!-- Echo - displays a message echoed from the server -->
<!-- URL - launches a URL via the Windows shell --> <!-- URL - launches a URL via the Windows shell -->
<!-- CmdLine - launches the Notepad application --> <!-- CmdLine - launches the Notepad application -->
<!-- CheckInOut - checks files in/out, drag and drop files onto the application --> <!-- CheckInOut - checks files in/out, drag and drop files onto the application -->
<!-- JavaScript - run a server-side script --> <!-- JavaScript - run a server-side script -->
<!-- JavaScriptURL - server-side script that generates a URL to the folder using a ticket --> <!-- JavaScriptURL - server-side script that generates a URL to the folder using a ticket -->
<!-- to avoid having to logon --> <!-- to avoid having to logon -->
<desktopActions>
<global>
<path>alfresco/desktop/Alfresco.exe</path>
<webpath>http://${localname}:8080/alfresco/</webpath>
</global>
<action>
<class>org.alfresco.filesys.repo.desk.CheckInOutDesktopAction</class>
<name>CheckInOut</name>
<filename>__CheckInOut.exe</filename>
</action>
<action>
<class>org.alfresco.filesys.repo.desk.JavaScriptDesktopAction</class>
<name>JavaScriptURL</name>
<filename>__ShowDetails.exe</filename>
<script>alfresco/desktop/showDetails.js</script>
<attributes>anyFiles</attributes>
<preprocess>copyToTarget</preprocess>
</action>
<!-- <!-- Other desktop actions which may be enabled -->
<desktopActions> <!--
<global> <action>
<path>alfresco/desktop/Alfresco.exe</path> <class>org.alfresco.filesys.repo.desk.EchoDesktopAction</class>
<webpath>http://${localname}:8080/alfresco/</webpath> <name>Echo</name>
</global> <filename>__AlfrescoEcho.exe</filename>
<action> </action>
<class>org.alfresco.filesys.repo.desk.EchoDesktopAction</class> <action>
<name>Echo</name> <class>org.alfresco.filesys.repo.desk.URLDesktopAction</class>
<filename>__AlfrescoEcho.exe</filename> <name>URL</name>
</action> <filename>__AlfrescoURL.exe</filename>
<action> </action>
<class>org.alfresco.filesys.repo.desk.URLDesktopAction</class> <action>
<name>URL</name> <class>org.alfresco.filesys.repo.desk.CmdLineDesktopAction</class>
<filename>__AlfrescoURL.exe</filename> <name>CmdLine</name>
</action> <filename>__AlfrescoCmd.exe</filename>
<action> </action>
<class>org.alfresco.filesys.repo.desk.CmdLineDesktopAction</class> <action>
<name>CmdLine</name> <class>org.alfresco.filesys.repo.desk.JavaScriptDesktopAction</class>
<filename>__AlfrescoCmd.exe</filename> <name>JavaScript</name>
</action> <filename>__AlfrescoScript.exe</filename>
<action> <script>alfresco/desktop/dumpRequest.js</script>
<class>org.alfresco.filesys.repo.desk.CheckInOutDesktopAction</class> <attributes>anyFiles, multiplePaths , allowNoParams</attributes>
<name>CheckInOut</name> <preprocess>confirm, copyToTarget</preprocess>
<filename>__AlfrescoCheckInOut.exe</filename> </action>
</action> -->
<action> </desktopActions>
<class>org.alfresco.filesys.repo.desk.JavaScriptDesktopAction</class>
<name>JavaScript</name>
<filename>__AlfrescoScript.exe</filename>
<script>alfresco/desktop/dumpRequest.js</script>
<attributes>anyFiles, multiplePaths , allowNoParams</attributes>
<preprocess>confirm, copyToTarget</preprocess>
</action>
<action>
<class>org.alfresco.filesys.repo.desk.JavaScriptDesktopAction</class>
<name>JavaScriptURL</name>
<filename>__AlfrescoDetails.exe</filename>
<script>alfresco/desktop/showDetails.js</script>
<attributes>anyFiles</attributes>
<preprocess>copyToTarget</preprocess>
</action>
</desktopActions> <!-- Additional access control of the filesystem -->
--> <!-- Access type of 'none' will stop the filesystem from showing up for that user/address/protocol -->
<!--
<!--
<accessControl default="Write"> <accessControl default="Write">
<user name="admin" access="Write"/> <user name="admin" access="Write"/>
<address subnet="90.1.0.0" mask="255.255.0.0" access="Write"/> <address subnet="192.168.1.0" mask="255.255.255.0" access="Write"/>
</accessControl> </accessControl>
--> -->
</filesystem> </filesystem>
<!-- AVM virtualization view of all stores/versions for WCM --> <!-- AVM virtualization view of all stores/versions for WCM -->
<!-- virtual view can be any of the following: normal, site, staging, author, preview --> <!-- virtual view stores filter can be any of the following: normal, site, staging, author, preview -->
<avmfilesystem name="AVM"> <avmfilesystem name="AVM">
<virtualView stores="site,staging,author" /> <virtualView stores="site,staging,author"/>
</avmfilesystem> </avmfilesystem>
</filesystems> </filesystems>
</config> </config>
<config evaluator="string-compare" condition="Filesystem Security"> <config evaluator="string-compare" condition="Filesystem Security">
<!-- Domain mappings used for passthri authentication routing --> <!-- Domain mappings used for passthru authentication routing -->
<!-- Used when the client does not provide a domain name in the NTLM logon -->
<!-- <!--
<DomainMappings> <DomainMappings>
<Domain name="ALFRESCO" subnet="192.168.1.0" mask="192.168.1.255"/> <Domain name="ALFRESCO" subnet="192.168.1.0" mask="192.168.1.255"/>
</DomainMappings> </DomainMappings>
--> -->
<!-- Custom share mapper when multi-tenancy is enabled --> <!-- Custom share mapper when multi-tenancy is enabled -->
<!-- <!--
<shareMapper type="multi-tenant"> <shareMapper type="multi-tenant">
<debug/> <debug/>
</shareMapper> </shareMapper>
--> -->
<!-- <!-- Global access control list -->
<!-- Applied to all filesystems that do not have an <accessControl> block -->
<!-- Access type of 'none' will stop the filesystem from showing up for that user/address/protocol -->
<!--
<globalAccessControl default="None"> <globalAccessControl default="None">
<user name="admin" access="Write"/> <user name="admin" access="Write"/>
<address ip="90.1.0.90" access="Write"/> <address ip="192.168.1.2" access="Write"/>
</globalAccessControl> </globalAccessControl>
--> -->
</config> </config>
</alfresco-config> </alfresco-config>

View File

@@ -3,396 +3,457 @@
"http://www.springframework.org/dtd/spring-beans.dtd"> "http://www.springframework.org/dtd/spring-beans.dtd">
<beans> <beans>
<bean id="fileServerConfiguration" class="org.alfresco.filesys.config.ServerConfigurationBean" parent="fileServerConfigurationBase"> <bean id="fileServerConfiguration" class="org.alfresco.filesys.config.ServerConfigurationBean" parent="fileServerConfigurationBase">
<property name="cifsConfigBean"> <property name="cifsConfigBean">
<ref bean="cifsServerConfig" /> <ref bean="cifsServerConfig" />
</property> </property>
<property name="ftpConfigBean"> <property name="ftpConfigBean">
<ref bean="ftpServerConfig" /> <ref bean="ftpServerConfig" />
</property> </property>
<property name="nfsConfigBean"> <property name="nfsConfigBean">
<ref bean="nfsServerConfig" /> <ref bean="nfsServerConfig" />
</property> </property>
<property name="filesystemContexts"> <property name="filesystemContexts">
<ref bean="filesystemContexts" /> <ref bean="filesystemContexts" />
</property> </property>
<property name="securityConfigBean"> <property name="securityConfigBean">
<ref bean="fileSecurityConfig" /> <ref bean="fileSecurityConfig" />
</property> </property>
</bean> </bean>
<!-- CIFS Server --> <!-- CIFS Server -->
<bean id="cifsServer" class="org.alfresco.filesys.CIFSServerBean" destroy-method="stopServer"> <bean id="cifsServer" class="org.alfresco.filesys.CIFSServerBean" destroy-method="stopServer">
<constructor-arg> <constructor-arg>
<ref local="fileServerConfiguration" /> <ref local="fileServerConfiguration" />
</constructor-arg> </constructor-arg>
<property name="sessionListeners"> <property name="sessionListeners">
<list> <list>
<!-- Allow authentication subsystem to listen for SMB sessions, e.g. for passthru --> <!-- Allow authentication subsystem to listen for SMB sessions, e.g. for passthru -->
<ref bean="authenticationDao" /> <ref bean="authenticationDao" />
</list> </list>
</property> </property>
</bean> </bean>
<!-- FTP Server --> <!-- FTP Server -->
<bean id="ftpServer" class="org.alfresco.filesys.FTPServerBean" destroy-method="stopServer"> <bean id="ftpServer" class="org.alfresco.filesys.FTPServerBean" destroy-method="stopServer">
<constructor-arg> <constructor-arg>
<ref local="fileServerConfiguration" /> <ref local="fileServerConfiguration" />
</constructor-arg> </constructor-arg>
</bean> </bean>
<!-- NFS Server --> <!-- NFS Server -->
<bean id="nfsServer" class="org.alfresco.filesys.NFSServerBean" destroy-method="stopServer"> <bean id="nfsServer" class="org.alfresco.filesys.NFSServerBean" destroy-method="stopServer">
<constructor-arg> <constructor-arg>
<ref local="fileServerConfiguration" /> <ref local="fileServerConfiguration" />
</constructor-arg> </constructor-arg>
</bean> </bean>
<bean id="cifsServerConfig" class="org.alfresco.filesys.config.CIFSConfigBean"> <bean id="cifsServerConfig" class="org.alfresco.filesys.config.CIFSConfigBean">
<property name="serverEnabled"> <property name="serverEnabled">
<value>${cifs.enabled}</value> <value>${cifs.enabled}</value>
</property> </property>
<property name="serverName"> <property name="serverName">
<value>${cifs.serverName}</value> <value>${cifs.serverName}</value>
</property> </property>
<property name="domainName"> <property name="domainName">
<value>${cifs.domain}</value> <value>${cifs.domain}</value>
</property> </property>
<property name="serverComment"> <property name="serverComment">
<value>Alfresco CIFS Server</value> <value>Alfresco CIFS Server</value>
</property> </property>
<!-- Set to the broadcast mask for the subnet --> <!-- Set to the broadcast mask for the subnet -->
<property name="broadcastAddress"> <property name="broadcastAddress">
<value>${cifs.broadcast}</value> <value>${cifs.broadcast}</value>
</property> </property>
<!-- Set to the IP for the adapter for Java socket --> <!-- Set to the IP for the adapter for Java socket -->
<property name="bindToAddress"> <property name="bindToAddress">
<value>${cifs.bindto}</value> <value>${cifs.bindto}</value>
</property> </property>
<!-- Use Java socket based NetBIOS over TCP/IP and native SMB on linux --> <!-- Use Java socket based NetBIOS over TCP/IP and native SMB on linux -->
<property name="tcpipSMB"> <property name="tcpipSMB">
<bean class="org.alfresco.filesys.config.TcpipSMBConfigBean"> <bean class="org.alfresco.filesys.config.TcpipSMBConfigBean">
<!-- <!--
Can be mapped to non-privileged ports, then use firewall rules to forward requests from the standard Can be mapped to non-privileged ports, then use firewall rules to forward requests from the standard
ports ports
--> -->
<property name="port"> <property name="port">
<value>${cifs.tcpipSMB.port}</value> <value>${cifs.tcpipSMB.port}</value>
</property> </property>
<property name="platforms"> <property name="platforms">
<value>linux,solaris,macosx</value> <value>linux,solaris,macosx</value>
</property> </property>
<property name="ipv6Enabled">
<value>${cifs.ipv6.enabled}</value>
</property>
</bean>
</property>
<property name="netBIOSSMB">
<bean class="org.alfresco.filesys.config.NetBIOSSMBConfigBean">
<property name="bindTo">
<value>${cifs.bindto}</value>
</property>
<property name="sessionPort">
<value>${cifs.netBIOSSMB.sessionPort}</value>
</property>
<property name="namePort">
<value>${cifs.netBIOSSMB.namePort}</value>
</property>
<property name="datagramPort">
<value>${cifs.netBIOSSMB.datagramPort}</value>
</property>
<property name="platforms">
<value>linux,solaris,macosx</value>
</property>
</bean>
</property>
<property name="hostAccouncerEnabled">
<value>${cifs.hostannounce}</value>
</property>
<property name="hostAccounceInterval">
<value>5</value>
</property>
<!-- Use Win32 NetBIOS interface on Windows -->
<property name="win32NetBIOS">
<bean class="org.alfresco.filesys.config.Win32NetBIOSConfigBean" />
</property>
<property name="win32HostAnnouncerEnabled">
<value>${cifs.hostannounce}</value>
</property>
<property name="win32HostAnnounceInterval">
<value>5</value>
</property>
<!-- CIFS authentication -->
<property name="authenticator">
<ref bean="cifsAuthenticator" />
</property>
<!-- Disable the use of asynchronous sockets/NIO code -->
<property name="disableNIO">
<value>${cifs.disableNIO}</value>
</property>
<!-- Disable the use of JNI code -->
<!-- Only currently affects Windows -->
<property name="disableNativeCode">
<value>${cifs.disableNativeCode}</value>
</property>
<!-- Session timeout, in seconds -->
<!-- Defaults to 15 minutes, to match the default Windows client setting -->
<!-- If no I/O is received within that time the session is closed by the server -->
<property name="sessionTimeout">
<value>${cifs.sessionTimeout}</value>
</property>
<!-- Enable WINS if used for NetBIOS name lookups -->
<property name="WINSConfig">
<bean class="org.alfresco.filesys.config.WINSConfigBean">
<property name="autoDetectEnabled">
<value>${cifs.WINS.autoDetectEnabled}</value>
</property>
<property name="primary">
<value>${cifs.WINS.primary}</value>
</property>
<property name="secondary">
<value>${cifs.WINS.secondary}</value>
</property>
</bean>
</property>
<!--
<property name="sessionDebugFlags"> <value>Negotiate,Socket</value> </property>
-->
</bean>
<bean id="ftpServerConfig" class="org.alfresco.filesys.config.FTPConfigBean">
<property name="serverEnabled">
<value>${ftp.enabled}</value>
</property>
<property name="port">
<value>${ftp.port}</value>
</property>
<!-- FTP authentication -->
<property name="authenticator">
<ref bean="ftpAuthenticator" />
</property>
<!-- FTP server debug settings -->
<!-- Enable 'log4j.logger.org.alfresco.fileserver=debug' in log4j.properties file -->
<!--
<property name="debugFlags">
<value>File,Search,Error,Directory,Info,DataPort</value>
</property>
-->
</bean>
<bean id="nfsServerConfig" class="org.alfresco.filesys.config.NFSConfigBean">
<property name="serverEnabled">
<value>${nfs.enabled}</value>
</property>
<!-- Map NFS user/group ids to Alfresco users -->
<property name="rpcAuthenticator">
<bean class="org.alfresco.filesys.auth.nfs.AlfrescoRpcAuthenticator">
<property name="userMappings">
<list>
<bean class="org.alfresco.filesys.auth.nfs.UserMapping">
<property name="name">
<value>${alfresco_user_store.adminusername}</value>
</property>
<property name="uid">
<value>0</value>
</property>
<property name="gid">
<value>0</value>
</property>
</bean>
</list>
</property>
</bean>
</property>
</bean>
<bean id="filesystemContexts" class="org.springframework.beans.factory.config.ListFactoryBean">
<property name="sourceList">
<list>
<!-- Alfresco repository access shared filesystem -->
<bean class="org.alfresco.filesys.repo.ContentContext">
<property name="deviceName">
<value>${filesystem.name}</value>
</property>
<property name="storeName">
<value>${spaces.store}</value>
</property>
<property name="rootPath">
<value>/${spaces.company_home.childname}</value>
</property>
<!-- Add a URL file to each folder that links back to the web client -->
<property name="URLFileName">
<value>__Alfresco.url</value>
</property>
<property name="URLPrefix">
<value>${cifs.urlfile.prefix}</value>
</property>
<!-- Mark locked files as offline -->
<property name="offlineFiles">
<value>true</value>
</property>
<!-- Desktop actions -->
<!-- Uses a client-side application to trigger a server-side action -->
<!-- Echo - displays a message echoed from the server -->
<!-- URL - launches a URL via the Windows shell -->
<!-- CmdLine - launches the Notepad application -->
<!-- CheckInOut - checks files in/out, drag and drop files onto the application -->
<!-- JavaScript - run a server-side script -->
<!-- JavaScriptURL - server-side script that generates a URL to the folder using a ticket -->
<!-- to avoid having to logon -->
<property name="globalDesktopActionConfig">
<bean class="org.alfresco.filesys.config.GlobalDesktopActionConfigBean">
<property name="path">
<value>alfresco/desktop/Alfresco.exe</value>
</property>
<property name="webpath">
<value>${cifs.urlfile.prefix}</value>
</property>
</bean>
</property>
<property name="desktopActionList">
<list>
<bean class="org.alfresco.filesys.repo.desk.CheckInOutDesktopAction">
<property name="name">
<value>CheckInOut</value>
</property>
<property name="filename">
<value>__CheckInOut.exe</value>
</property>
</bean>
<bean class="org.alfresco.filesys.repo.desk.JavaScriptDesktopAction">
<property name="name">
<value>JavaScriptURL</value>
</property>
<property name="filename">
<value>__ShowDetails.exe</value>
</property>
<property name="scriptName">
<value>alfresco/desktop/showDetails.js</value>
</property>
<property name="attributeList">
<value>anyFiles</value>
</property>
<property name="preprocess">
<value>copyToTarget</value>
</property>
</bean>
<!-- Other desktop actions which may be enabled -->
<!--
<bean class="org.alfresco.filesys.repo.desk.EchoDesktopAction">
<property name="name">
<value>Echo</value>
</property>
<property name="filename">
<value>__AlfrescoEcho.exe</value>
</property>
</bean>
<bean class="org.alfresco.filesys.repo.desk.URLDesktopAction">
<property name="name">
<value>URL</value>
</property>
<property name="filename">
<value>__AlfrescoURL.exe</value>
</property>
</bean>
<bean class="org.alfresco.filesys.repo.desk.CmdLineDesktopAction">
<property name="name">
<value>CmdLine</value>
</property>
<property name="filename">
<value>__AlfrescoCmd.exe</value>
</property>
</bean>
<bean class="org.alfresco.filesys.repo.desk.JavaScriptDesktopAction">
<property name="name">
<value>JavaScript</value>
</property>
<property name="filename">
<value>__AlfrescoScript.exe</value>
</property>
<property name="scriptName">
<value>alfresco/desktop/dumpRequest.js</value>
</property>
<property name="attributeList">
<value>anyFiles, multiplePaths, allowNoParams</value>
</property>
<property name="preprocess">
<value>confirm, copyToTarget</value>
</property>
</bean>
-->
</list>
</property>
<!-- Additional access control of the filesystem -->
<!-- Access type of 'none' will stop the filesystem from showing up for that user/address/protocol -->
<!--
<property name="defaultAccessLevel">
<value>Write</value>
</property>
<property name="accessControl">
<list>
<bean class="org.alfresco.jlan.server.auth.acl.UserAccessControl">
<property name="name">
<value>admin</value>
</property>
<property name="access">
<value>Write</value>
</property>
</bean>
<bean class="org.alfresco.jlan.server.auth.acl.IpAddressAccessControl">
<property name="subNet">
<value>192.168.1.0</value>
</property>
<property name="netMask">
<value>255.255.255.0</value>
</property>
<property name="access">
<value>Write</value>
</property>
</bean>
</list>
</property>
-->
</bean> </bean>
</property> <!-- AVM virtualization view of all stores/versions for WCM -->
<property name="netBIOSSMB"> <!-- virtual view stores filter can be any of the following: normal, site, staging, author, preview -->
<bean class="org.alfresco.filesys.config.NetBIOSSMBConfigBean"> <bean class="org.alfresco.filesys.avm.AVMContext">
<property name="bindTo"> <property name="deviceName">
<value>${cifs.bindto}</value> <value>AVM</value>
</property> </property>
<property name="sessionPort"> <property name="virtualView">
<value>${cifs.netBIOSSMB.sessionPort}</value> <value>true</value>
</property> </property>
<property name="namePort"> <property name="stores">
<value>${cifs.netBIOSSMB.namePort}</value> <value>site,staging,author</value>
</property> </property>
<property name="datagramPort">
<value>${cifs.netBIOSSMB.datagramPort}</value>
</property>
<property name="platforms">
<value>linux,solaris,macosx</value>
</property>
</bean> </bean>
</property> </list>
</property>
</bean>
<property name="hostAccouncerEnabled"> <bean id="fileSecurityConfig" class="org.alfresco.filesys.config.SecurityConfigBean">
<value>true</value> <!-- Domain mappings used for passthru authentication routing -->
</property> <!-- Used when the client does not provide a domain name in the NTLM logon -->
<property name="hostAccounceInterval"> <!--
<value>5</value> <property name="domainMappings">
</property> <list>
<bean class="org.alfresco.filesys.config.DomainMappingConfigBean">
<!-- Use Win32 NetBIOS interface on Windows --> <property name="name">
<property name="win32NetBIOS"> <value>ALFRESCO</value>
<bean class="org.alfresco.filesys.config.Win32NetBIOSConfigBean" /> </property>
</property> <property name="subnet">
<property name="win32HostAnnouncerEnabled"> <value>192.168.1.0</value>
<value>true</value> </property>
</property> <property name="mask">
<property name="win32HostAnnounceInterval"> <value>192.168.1.255</value>
<value>5</value> </property>
</property>
<!-- CIFS authentication -->
<property name="authenticator">
<ref bean="cifsAuthenticator" />
</property>
<property name="WINSConfig">
<bean class="org.alfresco.filesys.config.WINSConfigBean">
<property name="autoDetectEnabled">
<value>${cifs.WINS.autoDetectEnabled}</value>
</property>
<property name="primary">
<value>${cifs.WINS.primary}</value>
</property>
<property name="secondary">
<value>${cifs.WINS.secondary}</value>
</property>
</bean> </bean>
</property> </list>
</property>
-->
<property name="sessionDebugFlags"> <!-- Custom share mapper when multi-tenancy is enabled -->
<value>Negotiate,Socket</value> <!--
</property> <property name="shareMapper">
</bean> <bean class="org.alfresco.filesys.alfresco.MultiTenantShareMapper">
<property name="serverConfiguration">
<ref bean="fileServerConfiguration" />
</property>
<property name="debug">
<value>true</value>
</property>
</bean>
</property>
-->
<bean id="ftpServerConfig" class="org.alfresco.filesys.config.FTPConfigBean"> <!-- Global access control list -->
<property name="serverEnabled"> <!-- Applied to all filesystems that do not have an accessControl property -->
<value>${ftp.enabled}</value> <!-- Access type of 'none' will stop the filesystem from showing up for that user/address/protocol -->
</property> <!--
<property name="globalDefaultAccessLevel">
<property name="port"> <value>None</value>
<value>${ftp.port}</value> </property>
</property> <property name="globalAccessControl">
<list>
<!-- FTP authentication --> <bean class="org.alfresco.jlan.server.auth.acl.UserAccessControl">
<property name="authenticator"> <property name="name">
<ref bean="ftpAuthenticator" /> <value>admin</value>
</property> </property>
<property name="access">
<!--property name="debugFlags"> <value>Write</value>
<value>File,Search,Error,Directory,Info,DataPort</value> </property>
</property-->
</bean>
<bean id="nfsServerConfig" class="org.alfresco.filesys.config.NFSConfigBean">
<property name="serverEnabled">
<value>${nfs.enabled}</value>
</property>
</bean>
<bean id="filesystemContexts" class="org.springframework.beans.factory.config.ListFactoryBean">
<property name="sourceList">
<list>
<!-- Alfresco repository access shared filesystem -->
<bean class="org.alfresco.filesys.repo.ContentContext">
<property name="deviceName">
<value>${filesystem.name}</value>
</property>
<property name="storeName">
<value>workspace://SpacesStore</value>
</property>
<property name="rootPath">
<value>/app:company_home</value>
</property>
<!-- Add a URL file to each folder that links back to the web client -->
<property name="URLFileName">
<value>__AlfrescoClient.url</value>
</property>
<property name="URLPrefix">
<value>http://${localname}:8080/alfresco/</value>
</property>
<!-- Mark locked files as offline -->
<property name="offlineFiles">
<value>true</value>
</property>
<!-- Desktop actions -->
<!-- Uses a client-side application to trigger a server-side action -->
<!-- Echo - displays a message echoed from the server -->
<!-- URL - launches a URL via the Windows shell -->
<!-- CmdLine - launches the Notepad application -->
<!-- CheckInOut - checks files in/out, drag and drop files onto the application -->
<!-- JavaScript - run a server-side script -->
<!-- JavaScriptURL - server-side script that generates a URL to the folder using a ticket -->
<!-- to avoid having to logon -->
<!--
<property name="globalDesktopActionConfig">
<bean class="org.alfresco.filesys.config.GlobalDesktopActionConfigBean">
<property name="path">
<value>alfresco/desktop/Alfresco.exe</value>
</property>
<property name="webpath">
<value>http://${localname}:8080/alfresco/</value>
</property>
</bean>
</property>
<property name="desktopActions">
<list>
<bean class="org.alfresco.filesys.repo.desk.EchoDesktopAction">
<property name="name">
<value>Echo</value>
</property>
<property name="filename">
<value>__AlfrescoEcho.exe</value>
</property>
</bean>
<bean class="org.alfresco.filesys.repo.desk.URLDesktopAction">
<property name="name">
<value>URL</value>
</property>
<property name="filename">
<value>__AlfrescoURL.exe</value>
</property>
</bean>
<bean class="org.alfresco.filesys.repo.desk.CmdLineDesktopAction">
<property name="name">
<value>CmdLine</value>
</property>
<property name="filename">
<value>__AlfrescoCmd.exe</value>
</property>
</bean>
<bean class="org.alfresco.filesys.repo.desk.CheckInOutDesktopAction">
<property name="name">
<value>CheckInOut</value>
</property>
<property name="filename">
<value>__AlfrescoCheckInOut.exe</value>
</property>
</bean>
<bean class="org.alfresco.filesys.repo.desk.JavaScriptDesktopAction">
<property name="name">
<value>JavaScript</value>
</property>
<property name="filename">
<value>__AlfrescoScript.exe</value>
</property>
<property name="scriptName">
<value>alfresco/desktop/dumpRequest.js</value>
</property>
<property name="attributes">
<value>anyFiles, multiplePaths, allowNoParams</value>
</property>
<property name="preProcessActions">
<value>confirm, copyToTarget</value>
</property>
</bean>
<bean class="org.alfresco.filesys.repo.desk.JavaScriptDesktopAction">
<property name="name">
<value>JavaScriptURL</value>
</property>
<property name="filename">
<value>__AlfrescoDetails.exe</value>
</property>
<property name="scriptName">
<value>alfresco/desktop/showDetails.js</value>
</property>
<property name="attributes">
<value>anyFiles</value>
</property>
<property name="preProcessActions">
<value>copyToTarget</value>
</property>
</bean>
</list>
</property>
-->
<!--
<property name="defaultAccessLevel">
<value>Write</value>
</property>
<property name="accessControl">
<list>
<bean class="org.alfresco.jlan.server.auth.acl.UserAccessControl">
<property name="name">
<value>admin</value>
</property>
<property name="access">
<value>Write</value>
</property>
</bean>
<bean class="org.alfresco.jlan.server.auth.acl.IpAddressAccessControl">
<property name="subNet">
<value>90.1.0.0</value>
</property>
<property name="netMask">
<value>255.255.0.0</value>
</property>
<property name="access">
<value>Write</value>
</property>
</bean>
</list>
</property>
-->
</bean>
<!-- AVM virtualization view of all stores/versions for WCM -->
<!-- virtual view can be any of the following: normal, site, staging, author, preview -->
<bean class="org.alfresco.filesys.avm.AVMContext">
<property name="deviceName">
<value>AVM</value>
</property>
<property name="virtualView">
<value>true</value>
</property>
<property name="stores">
<value>site,staging,author</value>
</property>
</bean>
</list>
</property>
</bean>
<bean id="fileSecurityConfig" class="org.alfresco.filesys.config.SecurityConfigBean">
<!-- Domain mappings used for passthru authentication routing -->
<!--
<property name="domainMappings">
<list>
<bean class="org.alfresco.filesys.config.DomainMappingConfigBean">
<property name="name">
<value>ALFRESCO</value>
</property>
<property name="subnet">
<value>192.168.1.0</value>
</property>
<property name="mask">
<value>192.168.1.255</value>
</property>
</bean>
</list>
</property>
<property name="shareMapper">
<bean class="org.alfresco.filesys.alfresco.MultiTenantShareMapper">
<property name="serverConfiguration">
<ref bean="fileServerConfiguration" />
</property>
<property name="debug">
<value>true</value>
</property>
</bean> </bean>
</property> <bean class="org.alfresco.jlan.server.auth.acl.IpAddressAccessControl">
<property name="globalDefaultAccessLevel"> <property name="subNet">
<value>None</value> <value>192.168.1.2</value>
</property> </property>
<property name="globalAccessControl"> <property name="netMask">
<list> <value>255.255.255.0</value>
<bean class="org.alfresco.jlan.server.auth.acl.UserAccessControl"> </property>
<property name="name"> <property name="access">
<value>admin</value> <value>Write</value>
</property> </property>
<property name="access"> </bean>
<value>Write</value> </list>
</property> </property>
</bean> -->
<bean class="org.alfresco.jlan.server.auth.acl.IpAddressAccessControl"> </bean>
<property name="subNet">
<value>90.1.0.0</value>
</property>
<property name="netMask">
<value>90.1.0.90</value>
</property>
<property name="access">
<value>Write</value>
</property>
</bean>
</list>
</property>
-->
</bean>
</beans> </beans>

View File

@@ -6,6 +6,16 @@ cifs.domain=
cifs.broadcast=255.255.255.255 cifs.broadcast=255.255.255.255
# An empty value indicates bind to all available network adapters # An empty value indicates bind to all available network adapters
cifs.bindto= cifs.bindto=
cifs.ipv6.enabled=false
cifs.hostannounce=true
# Enable the use of asynchronous sockets/NIO code
cifs.disableNIO=false
# Disable the use of JNI code. Only currently affects Windows
cifs.disableNativeCode=false
# Session timeout, in seconds. Defaults to 15 minutes, to match the default Windows client setting.
# If no I/O is received within that time the session is closed by the server
cifs.sessionTimeout=900
# Can be mapped to non-privileged ports, then use firewall rules to forward requests from the standard ports # Can be mapped to non-privileged ports, then use firewall rules to forward requests from the standard ports
cifs.tcpipSMB.port=445 cifs.tcpipSMB.port=445
cifs.netBIOSSMB.sessionPort=139 cifs.netBIOSSMB.sessionPort=139
@@ -21,3 +31,5 @@ ftp.enabled=true
ftp.port=21 ftp.port=21
nfs.enabled=false nfs.enabled=false
cifs.urlfile.prefix=http://${localname}:8080/alfresco/

View File

@@ -136,6 +136,9 @@
<property name="protocolOrder"> <property name="protocolOrder">
<value>${ldap.passthru.authentication.protocolOrder}</value> <value>${ldap.passthru.authentication.protocolOrder}</value>
</property> </property>
<property name="nullDomainUseAnyServer">
<value>true</value>
</property>
</bean> </bean>
<!-- CIFS authentication and SMB session listener --> <!-- CIFS authentication and SMB session listener -->

View File

@@ -39,6 +39,9 @@
<property name="protocolOrder"> <property name="protocolOrder">
<value>${passthru.authentication.protocolOrder}</value> <value>${passthru.authentication.protocolOrder}</value>
</property> </property>
<property name="nullDomainUseAnyServer">
<value>true</value>
</property>
</bean> </bean>
<!-- The authentication component. --> <!-- The authentication component. -->

View File

@@ -37,7 +37,6 @@ import org.alfresco.jlan.server.filesys.DiskInterface;
import org.alfresco.jlan.server.filesys.FileSystem; import org.alfresco.jlan.server.filesys.FileSystem;
import org.alfresco.jlan.server.filesys.SrvDiskInfo; import org.alfresco.jlan.server.filesys.SrvDiskInfo;
import org.alfresco.jlan.server.filesys.pseudo.PseudoFileInterface; import org.alfresco.jlan.server.filesys.pseudo.PseudoFileInterface;
import org.springframework.beans.factory.InitializingBean;
/** /**
@@ -47,7 +46,7 @@ import org.springframework.beans.factory.InitializingBean;
* *
* @author GKSpencer * @author GKSpencer
*/ */
public abstract class AlfrescoContext extends DiskDeviceContext implements InitializingBean public abstract class AlfrescoContext extends DiskDeviceContext
{ {
// Token name to substitute current servers DNS name or TCP/IP address into the webapp URL // Token name to substitute current servers DNS name or TCP/IP address into the webapp URL
@@ -71,6 +70,7 @@ public abstract class AlfrescoContext extends DiskDeviceContext implements Initi
private GlobalDesktopActionConfigBean m_globalDesktopActionConfig = new GlobalDesktopActionConfigBean(); private GlobalDesktopActionConfigBean m_globalDesktopActionConfig = new GlobalDesktopActionConfigBean();
private DesktopActionTable m_desktopActions; private DesktopActionTable m_desktopActions;
private List<DesktopAction> m_desktopActionsToInitialize;
// I/O control handler // I/O control handler
@@ -94,10 +94,29 @@ public abstract class AlfrescoContext extends DiskDeviceContext implements Initi
enableChangeHandler(!disableChangeNotification); enableChangeHandler(!disableChangeNotification);
} }
public void afterPropertiesSet() /**
{ * Complete initialization by registering with a disk driver
*/
public void initialize(AlfrescoDiskDriver filesysDriver)
{
if (m_desktopActionsToInitialize != null)
{
for (DesktopAction desktopAction : m_desktopActionsToInitialize)
{
// Initialize the desktop action
try
{
desktopAction.initializeAction(filesysDriver, this);
}
catch (DesktopActionException ex)
{
throw new AlfrescoRuntimeException("Failed to initialize desktop action", ex);
}
addDesktopAction(desktopAction);
}
}
} }
/** /**
* Return the filesystem type, either FileSystem.TypeFAT or FileSystem.TypeNTFS. * Return the filesystem type, either FileSystem.TypeFAT or FileSystem.TypeNTFS.
* *
@@ -400,19 +419,12 @@ public abstract class AlfrescoContext extends DiskDeviceContext implements Initi
* *
* @param desktopActions DesktopAction List * @param desktopActions DesktopAction List
*/ */
public final void setDesktopActions(List<DesktopAction> desktopActions) public final void setDesktopActionList(List<DesktopAction> desktopActions)
{ {
// Enumerate the desktop actions and add to this filesystem m_desktopActionsToInitialize = desktopActions;
for (DesktopAction desktopAction : desktopActions)
{
addDesktopAction(desktopAction);
}
// Note it is assumed that a AlfrescoDiskDriver.register() call will initialise the I/O control handler
} }
protected void setGlobalDesktopActionConfig(GlobalDesktopActionConfigBean desktopActionConfig) public void setGlobalDesktopActionConfig(GlobalDesktopActionConfigBean desktopActionConfig)
{ {
m_globalDesktopActionConfig = desktopActionConfig; m_globalDesktopActionConfig = desktopActionConfig;
} }
@@ -422,6 +434,8 @@ public abstract class AlfrescoContext extends DiskDeviceContext implements Initi
{ {
return m_globalDesktopActionConfig; return m_globalDesktopActionConfig;
} }
/** /**

View File

@@ -29,6 +29,8 @@ import javax.transaction.UserTransaction;
import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.filesys.state.FileStateReaper; import org.alfresco.filesys.state.FileStateReaper;
import org.alfresco.jlan.server.SrvSession; import org.alfresco.jlan.server.SrvSession;
import org.alfresco.jlan.server.core.DeviceContext;
import org.alfresco.jlan.server.core.DeviceContextException;
import org.alfresco.jlan.server.filesys.IOControlNotImplementedException; import org.alfresco.jlan.server.filesys.IOControlNotImplementedException;
import org.alfresco.jlan.server.filesys.IOCtlInterface; import org.alfresco.jlan.server.filesys.IOCtlInterface;
import org.alfresco.jlan.server.filesys.NetworkFile; import org.alfresco.jlan.server.filesys.NetworkFile;
@@ -346,4 +348,20 @@ public abstract class AlfrescoDiskDriver implements IOCtlInterface, Transactiona
sess.setTransaction( this); sess.setTransaction( this);
} }
/**
* Registers a device context object for this instance
* of the shared device. The same DeviceInterface implementation may be used for multiple
* shares. In this base class, we initialize all desktop actions.
*
* @param ctx the context
* @exception DeviceContextException
*/
public void registerContext(DeviceContext ctx) throws DeviceContextException
{
if (ctx instanceof AlfrescoContext)
{
((AlfrescoContext) ctx).initialize(this);
}
}
} }

View File

@@ -30,21 +30,20 @@ import java.net.InetAddress;
import java.net.URL; import java.net.URL;
import java.net.URLDecoder; import java.net.URLDecoder;
import org.alfresco.config.ConfigElement;
import org.alfresco.jlan.server.filesys.DiskSharedDevice; import org.alfresco.jlan.server.filesys.DiskSharedDevice;
import org.alfresco.jlan.server.filesys.pseudo.LocalPseudoFile; import org.alfresco.jlan.server.filesys.pseudo.LocalPseudoFile;
import org.alfresco.jlan.server.filesys.pseudo.PseudoFile; import org.alfresco.jlan.server.filesys.pseudo.PseudoFile;
import org.alfresco.config.ConfigElement;
import org.alfresco.service.ServiceRegistry; import org.alfresco.service.ServiceRegistry;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
/** /**
* Desktop Action Class * Desktop Action Class
* *
* @author gkspencer * @author gkspencer
*/ */
public abstract class DesktopAction implements InitializingBean{ public abstract class DesktopAction {
// Logging // Logging
@@ -118,7 +117,6 @@ public abstract class DesktopAction implements InitializingBean{
// Filesystem driver and context // Filesystem driver and context
private DiskSharedDevice m_diskSharedDevice;
private AlfrescoDiskDriver m_filesysDriver; private AlfrescoDiskDriver m_filesysDriver;
private AlfrescoContext m_filesysContext; private AlfrescoContext m_filesysContext;
@@ -312,13 +310,14 @@ public abstract class DesktopAction implements InitializingBean{
public void initializeAction(ConfigElement global, ConfigElement config, DiskSharedDevice fileSys) public void initializeAction(ConfigElement global, ConfigElement config, DiskSharedDevice fileSys)
throws DesktopActionException throws DesktopActionException
{ {
if ( !(fileSys.getContext() instanceof AlfrescoContext))
throw new DesktopActionException("Desktop action requires an Alfresco filesystem driver");
// Perform standard initialization // Perform standard initialization
standardInitialize(global, config, fileSys); standardInitialize(global, config, fileSys);
// Complete initialization // Complete initialization
initializeAction((AlfrescoDiskDriver) fileSys.getDiskInterface(), (AlfrescoContext) fileSys.getDiskContext());
afterPropertiesSet();
} }
/** /**
@@ -332,8 +331,6 @@ public abstract class DesktopAction implements InitializingBean{
public void standardInitialize(ConfigElement global, ConfigElement config, DiskSharedDevice fileSys) public void standardInitialize(ConfigElement global, ConfigElement config, DiskSharedDevice fileSys)
throws DesktopActionException throws DesktopActionException
{ {
setDiskSharedDevice(fileSys);
// Check for standard config values // Check for standard config values
ConfigElement elem = config.getChild("name"); ConfigElement elem = config.getChild("name");
if ( elem != null && elem.getValue().length() > 0) if ( elem != null && elem.getValue().length() > 0)
@@ -380,20 +377,17 @@ public abstract class DesktopAction implements InitializingBean{
} }
public void afterPropertiesSet() throws DesktopActionException /**
* Initialize the desktop action
*
* @exception DesktopActionException
*/
public void initializeAction(AlfrescoDiskDriver filesysDriver, AlfrescoContext filesysContext) throws DesktopActionException
{ {
if (m_diskSharedDevice == null)
throw new DesktopActionException("Desktop action requires an Alfresco filesystem driver");
// Save the filesystem device and I/O handler // Save the filesystem device and I/O handler
if ( m_diskSharedDevice.getContext() instanceof AlfrescoContext) m_filesysDriver = filesysDriver;
{ m_filesysContext = filesysContext;
m_filesysDriver = (AlfrescoDiskDriver) m_diskSharedDevice.getDiskInterface();
m_filesysContext = (AlfrescoContext) m_diskSharedDevice.getDiskContext();
}
else
throw new DesktopActionException("Desktop action requires an Alfresco filesystem driver");
// Check for standard config values // Check for standard config values
@@ -602,15 +596,6 @@ public abstract class DesktopAction implements InitializingBean{
m_debug = ena; m_debug = ena;
} }
/**
* Sets the disk shared device.
* @param diskSharedDevice
*/
public void setDiskSharedDevice(DiskSharedDevice diskSharedDevice)
{
m_diskSharedDevice = diskSharedDevice;
}
/** /**
* Set the webapp URL * Set the webapp URL
* *
@@ -663,4 +648,5 @@ public abstract class DesktopAction implements InitializingBean{
return str.toString(); return str.toString();
} }
} }

View File

@@ -68,6 +68,8 @@ public class PassthruServerFactory implements FactoryBean, InitializingBean, Dis
private Integer offlineCheckInterval; private Integer offlineCheckInterval;
private PassthruServers passthruServers; private PassthruServers passthruServers;
private boolean nullDomainUseAnyServer;
/** /**
* Sets the timeout for opening a session to an authentication server * Sets the timeout for opening a session to an authentication server
@@ -123,6 +125,17 @@ public class PassthruServerFactory implements FactoryBean, InitializingBean, Dis
{ {
this.offlineCheckInterval = offlineCheckInterval; this.offlineCheckInterval = offlineCheckInterval;
} }
/**
* Set the null domain to use any available server option
*
* @param nullDomain boolean
*/
public final void setNullDomainUseAnyServer( boolean nullDomain)
{
this.nullDomainUseAnyServer = nullDomain;
}
/** /**
* Set the protocol order for passthru connections * Set the protocol order for passthru connections
@@ -233,6 +246,8 @@ public class PassthruServerFactory implements FactoryBean, InitializingBean, Dis
passthruServers.setConnectionTimeout(this.timeout); passthruServers.setConnectionTimeout(this.timeout);
} }
passthruServers.setNullDomainUseAnyServer(this.nullDomainUseAnyServer);
// Check if a server name has been specified // Check if a server name has been specified

View File

@@ -479,40 +479,33 @@ public class AlfrescoRpcAuthenticator implements RpcAuthenticator, InitializingB
for ( UserMapping userElem : this.userMappings) for ( UserMapping userElem : this.userMappings)
{ {
// Validate the element type // Get the user name, user id and group id
if ( userElem.getName().equalsIgnoreCase( "user")) String userName = userElem.getName();
if ( userName == null || userName.length() == 0)
throw new InvalidConfigurationException("Empty user name, or name not specified");
// Check if the mapping already exists
Integer idKey = new Integer(( userElem.getGid() << 16) + userElem.getUid());
if ( m_idMap.containsKey( idKey) == false)
{ {
// Get the user name, user id and group id // Add the username uid/gid mapping
String userName = userElem.getName(); m_idMap.put( idKey, userName);
if ( userName == null || userName.length() == 0) // DEBUG
throw new InvalidConfigurationException("Empty user name, or name not specified");
// Check if the mapping already exists if ( logger.isDebugEnabled())
logger.debug("Added RPC user mapping for user " + userName + " uid=" + userElem.getUid() + ", gid=" + userElem.getGid());
Integer idKey = new Integer(( userElem.getGid() << 16) + userElem.getUid()); }
if ( m_idMap.containsKey( idKey) == false) else if ( logger.isDebugEnabled())
{ {
// Add the username uid/gid mapping // DEBUG
m_idMap.put( idKey, userName); logger.debug("Ignored duplicate mapping for uid=" + userElem.getUid() + ", gid=" + userElem.getGid());
// DEBUG
if ( logger.isDebugEnabled())
logger.debug("Added RPC user mapping for user " + userName + " uid=" + userElem.getUid() + ", gid=" + userElem.getGid());
}
else if ( logger.isDebugEnabled())
{
// DEBUG
logger.debug("Ignored duplicate mapping for uid=" + userElem.getUid() + ", gid=" + userElem.getGid());
}
} }
else
throw new InvalidConfigurationException( "Invalid user mapping, " + userElem.getName());
} }
} }

View File

@@ -29,6 +29,7 @@ import java.util.StringTokenizer;
import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.filesys.alfresco.AlfrescoContext; import org.alfresco.filesys.alfresco.AlfrescoContext;
import org.alfresco.filesys.alfresco.AlfrescoDiskDriver;
import org.alfresco.filesys.alfresco.IOControlHandler; import org.alfresco.filesys.alfresco.IOControlHandler;
import org.alfresco.filesys.state.FileState; import org.alfresco.filesys.state.FileState;
import org.alfresco.filesys.state.FileStateTable; import org.alfresco.filesys.state.FileStateTable;
@@ -126,8 +127,6 @@ public class AVMContext extends AlfrescoContext
// Set the store version to use // Set the store version to use
setVersion(version); setVersion(version);
afterPropertiesSet();
} }
/** /**
@@ -146,8 +145,6 @@ public class AVMContext extends AlfrescoContext
// Enable the virtualization view // Enable the virtualization view
setVirtualView(true); setVirtualView(true);
setShowOptions(showOptions); setShowOptions(showOptions);
afterPropertiesSet();
} }
public void setStorePath(String path) public void setStorePath(String path)
@@ -213,10 +210,10 @@ public class AVMContext extends AlfrescoContext
m_createStore = createStore; m_createStore = createStore;
} }
@Override @Override
public void afterPropertiesSet() public void initialize(AlfrescoDiskDriver filesysDriver)
{ {
if (m_virtualView) if (m_virtualView)
{ {
// A context for a view onto all stores/versions within AVM. // A context for a view onto all stores/versions within AVM.
@@ -241,7 +238,7 @@ public class AVMContext extends AlfrescoContext
setShareName(m_storePath + "(" + m_version + ")"); setShareName(m_storePath + "(" + m_version + ")");
} }
super.afterPropertiesSet(); super.initialize(filesysDriver);
} }
/** /**

View File

@@ -426,9 +426,12 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface
* @param context the device context * @param context the device context
* @exception DeviceContextException * @exception DeviceContextException
*/ */
@Override
public void registerContext(DeviceContext ctx) public void registerContext(DeviceContext ctx)
throws DeviceContextException throws DeviceContextException
{ {
super.registerContext(ctx);
AVMContext context = (AVMContext)ctx; AVMContext context = (AVMContext)ctx;
// Use the system user as the authenticated context for the filesystem initialization // Use the system user as the authenticated context for the filesystem initialization
@@ -625,7 +628,6 @@ public class AVMDiskDriver extends AlfrescoDiskDriver implements DiskInterface
{ {
AuthenticationUtil.popAuthentication(); AuthenticationUtil.popAuthentication();
} }
} }
/** /**

View File

@@ -499,7 +499,7 @@ public class CIFSConfigBean
* *
* @return the session timeout * @return the session timeout
*/ */
protected Integer getSessionTimeout() public Integer getSessionTimeout()
{ {
return sessionTimeout; return sessionTimeout;
} }
@@ -510,7 +510,7 @@ public class CIFSConfigBean
* @param sessionTimeout * @param sessionTimeout
* the new session timeout * the new session timeout
*/ */
protected void setSessionTimeout(Integer sessionTimeout) public void setSessionTimeout(Integer sessionTimeout)
{ {
this.sessionTimeout = sessionTimeout; this.sessionTimeout = sessionTimeout;
} }

View File

@@ -28,6 +28,7 @@ import java.util.List;
import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.filesys.alfresco.AlfrescoContext; import org.alfresco.filesys.alfresco.AlfrescoContext;
import org.alfresco.filesys.alfresco.AlfrescoDiskDriver;
import org.alfresco.filesys.alfresco.IOControlHandler; import org.alfresco.filesys.alfresco.IOControlHandler;
import org.alfresco.jlan.server.auth.acl.AccessControl; import org.alfresco.jlan.server.auth.acl.AccessControl;
import org.alfresco.jlan.server.core.DeviceContextException; import org.alfresco.jlan.server.core.DeviceContextException;
@@ -100,8 +101,6 @@ public class ContentContext extends AlfrescoContext
setStoreName(storeName); setStoreName(storeName);
setRootPath(rootPath); setRootPath(rootPath);
setRootNodeRef(rootNodeRef); setRootNodeRef(rootNodeRef);
afterPropertiesSet();
} }
public void setStoreName(String name) public void setStoreName(String name)
@@ -148,9 +147,9 @@ public class ContentContext extends AlfrescoContext
@Override @Override
public void afterPropertiesSet() public void initialize(AlfrescoDiskDriver filesysDriver)
{ {
super.afterPropertiesSet(); super.initialize(filesysDriver);
if (m_storeName == null || m_storeName.length() == 0) if (m_storeName == null || m_storeName.length() == 0)
{ {

View File

@@ -426,8 +426,6 @@ public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterfa
context.setDisableNodeMonitor(true); context.setDisableNodeMonitor(true);
} }
context.afterPropertiesSet();
registerContext(context); registerContext(context);
// Return the context for this shared filesystem // Return the context for this shared filesystem
@@ -444,8 +442,11 @@ public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterfa
* @param ctx the context * @param ctx the context
* @exception DeviceContextException * @exception DeviceContextException
*/ */
@Override
public void registerContext(DeviceContext ctx) throws DeviceContextException public void registerContext(DeviceContext ctx) throws DeviceContextException
{ {
super.registerContext(ctx);
ContentContext context = (ContentContext)ctx; ContentContext context = (ContentContext)ctx;
// Wrap the initialization in a transaction // Wrap the initialization in a transaction

View File

@@ -35,6 +35,8 @@ import java.util.Map;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import org.alfresco.config.ConfigElement; import org.alfresco.config.ConfigElement;
import org.alfresco.filesys.alfresco.AlfrescoContext;
import org.alfresco.filesys.alfresco.AlfrescoDiskDriver;
import org.alfresco.filesys.alfresco.DesktopAction; import org.alfresco.filesys.alfresco.DesktopAction;
import org.alfresco.filesys.alfresco.DesktopActionException; import org.alfresco.filesys.alfresco.DesktopActionException;
import org.alfresco.filesys.alfresco.DesktopParams; import org.alfresco.filesys.alfresco.DesktopParams;
@@ -42,7 +44,6 @@ import org.alfresco.filesys.alfresco.DesktopResponse;
import org.alfresco.jlan.server.filesys.DiskSharedDevice; import org.alfresco.jlan.server.filesys.DiskSharedDevice;
import org.alfresco.scripts.ScriptException; import org.alfresco.scripts.ScriptException;
import org.alfresco.service.cmr.repository.ScriptService; import org.alfresco.service.cmr.repository.ScriptService;
import org.alfresco.service.transaction.TransactionService;
/** /**
* Javascript Desktop Action Class * Javascript Desktop Action Class
@@ -126,7 +127,7 @@ public class JavaScriptDesktopAction extends DesktopAction {
throw new DesktopActionException("Empty desktop action attributes"); throw new DesktopActionException("Empty desktop action attributes");
// Parse the attribute string // Parse the attribute string
setAttributes(elem.getValue()); setAttributeList(elem.getValue());
} }
// Check if the desktop action pre-processing options have been specified // Check if the desktop action pre-processing options have been specified
@@ -134,16 +135,17 @@ public class JavaScriptDesktopAction extends DesktopAction {
elem = config.getChild("preprocess"); elem = config.getChild("preprocess");
if ( elem != null) if ( elem != null)
{ {
setPreProcessActions(elem.getValue()); setPreprocess(elem.getValue());
} }
} }
@Override @Override
public void afterPropertiesSet() throws DesktopActionException public void initializeAction(AlfrescoDiskDriver filesysDriver, AlfrescoContext filesysContext)
throws DesktopActionException
{ {
// Perform standard initialization // Perform standard initialization
super.afterPropertiesSet(); super.initializeAction(filesysDriver, filesysContext);
// Get the script file name and check that it exists // Get the script file name and check that it exists
@@ -368,7 +370,7 @@ public class JavaScriptDesktopAction extends DesktopAction {
* *
* @param name String * @param name String
*/ */
protected final void setScriptName(String name) public final void setScriptName(String name)
{ {
m_scriptName = name; m_scriptName = name;
} }
@@ -379,7 +381,7 @@ public class JavaScriptDesktopAction extends DesktopAction {
* @param attributes String * @param attributes String
* @throws DesktopActionException * @throws DesktopActionException
*/ */
protected void setAttributes(String attributes) throws DesktopActionException public void setAttributeList(String attributes) throws DesktopActionException
{ {
// Check if the attribute string is empty // Check if the attribute string is empty
if ( attributes == null || attributes.length() == 0) if ( attributes == null || attributes.length() == 0)
@@ -431,7 +433,7 @@ public class JavaScriptDesktopAction extends DesktopAction {
* @param preProcessActions String * @param preProcessActions String
* @throws DesktopActionException * @throws DesktopActionException
*/ */
protected void setPreProcessActions(String preProcessActions) throws DesktopActionException public void setPreprocess(String preProcessActions) throws DesktopActionException
{ {
// Check if the pre-process string is empty // Check if the pre-process string is empty