1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.astrogrid.filestore.common.file ;
21
22 /***
23 * This filter excludes properties that should be set by the local FileStore service.
24 * This prevents external entities from changing the local properties.
25 *
26 *
27 */
28 public class FileStorePropertyFilter
29 implements PropertyFilter
30 {
31 /***
32 * Public constructor.
33 *
34 */
35 public FileStorePropertyFilter()
36 {
37 }
38
39 /***
40 * Filter a property.
41 * @param property The property to filter.
42 * @return The filtered property value, or null if the whole property has been filtered out.
43 *
44 */
45 public FileProperty filter(FileProperty property)
46 {
47 if (FileProperties.STORE_RESOURCE_IVORN.equals(property.getName()))
48 {
49 return null ;
50 }
51 if (FileProperties.STORE_RESOURCE_URL.equals(property.getName()))
52 {
53 return null ;
54 }
55
56
57 return property ;
58 }
59 }
60