Home | History | Annotate | Download | only in resources
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3  Copyright 2008 the original author or authors.
      4  
      5  Licensed under the Apache License, Version 2.0 (the "License");
      6  you may not use this file except in compliance with the License.
      7  You may obtain a copy of the License at
      8   
      9        http://www.apache.org/licenses/LICENSE-2.0
     10   
     11  Unless required by applicable law or agreed to in writing, software
     12  distributed under the License is distributed on an "AS IS" BASIS,
     13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  See the License for the specific language governing permissions and
     15  limitations under the License.
     16 -->
     17 
     18 <!-- Spring Framework configuration for FakeFtpServer -->
     19 <!-- The FakeFtpServerSpringCofigurationTest class has dependencies on
     20 		several of the bean names and values configured within this file -->
     21 
     22 <beans xmlns="http://www.springframework.org/schema/beans"
     23        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     24        xsi:schemaLocation="http://www.springframework.org/schema/beans 
     25        		http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
     26 
     27     <bean id="fakeFtpServer" class="org.mockftpserver.fake.FakeFtpServer">
     28         <property name="serverControlPort" value="9981"/>
     29         <property name="userAccounts">
     30             <list>
     31                 <bean class="org.mockftpserver.fake.UserAccount">
     32                     <property name="username" value="joe"/>
     33                     <property name="password" value="password"/>
     34                     <property name="homeDirectory" value="c:\"/>
     35                 </bean>
     36             </list>
     37         </property>
     38 
     39         <property name="fileSystem">
     40             <bean class="org.mockftpserver.fake.filesystem.WindowsFakeFileSystem">
     41                 <property name="createParentDirectoriesAutomatically" value="false"/>
     42                 <property name="entries">
     43                     <list>
     44                         <bean class="org.mockftpserver.fake.filesystem.DirectoryEntry">
     45                             <property name="path" value="c:\"/>
     46                             <property name="permissionsFromString" value="rwxrwxrwx"/>
     47                             <property name="owner" value="joe"/>
     48                             <property name="group" value="users"/>
     49                         </bean>
     50                         <bean class="org.mockftpserver.fake.filesystem.FileEntry">
     51                             <property name="path" value="c:\File1.txt"/>
     52                             <property name="contents" value="1234567890"/>
     53                             <property name="permissionsFromString" value="rwxrwxrwx"/>
     54                             <property name="owner" value="peter"/>
     55                             <property name="group" value="users"/>
     56                         </bean>
     57                         <bean class="org.mockftpserver.fake.filesystem.FileEntry">
     58                             <property name="path" value="c:\File2.txt"/>
     59                             <property name="contents" value="abcdefghijklmnopqrstuvwxyz"/>
     60                             <property name="permissions">
     61                                 <bean class="org.mockftpserver.fake.filesystem.Permissions">
     62                                     <constructor-arg value="rwx------"/>
     63                                 </bean>
     64                             </property>
     65                             <property name="owner" value="peter"/>
     66                             <property name="group" value="users"/>
     67                         </bean>
     68                     </list>
     69                 </property>
     70             </bean>
     71         </property>
     72 
     73     </bean>
     74 
     75 </beans>