View Javadoc

1   /*
2    * <cvs:source>$Source: /devel/astrogrid/filestore/common/src/java/org/astrogrid/filestore/common/file/FileStorePropertyFilter.java,v $</cvs:source>
3    * <cvs:author>$Author: jdt $</cvs:author>
4    * <cvs:date>$Date: 2004/11/25 00:19:27 $</cvs:date>
5    * <cvs:version>$Revision: 1.2 $</cvs:version>
6    * <cvs:log>
7    *   $Log: FileStorePropertyFilter.java,v $
8    *   Revision 1.2  2004/11/25 00:19:27  jdt
9    *   Merge from dave-dev-200410061224-200411221626
10   *
11   *   Revision 1.1.2.2  2004/11/06 19:12:18  dave
12   *   Refactored identifier properties ...
13   *
14   *   Revision 1.1.2.1  2004/11/02 23:20:12  dave
15   *   Added property filter and changed method names to make them FileStore specific.
16   *
17   * </cvs:log>
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  		// Return the original property.
57  		return property ;
58  		}
59  	}
60