| 1 | package org.dcache.vehicles; |
| 2 | |
| 3 | import diskCacheV111.util.PnfsId; |
| 4 | import diskCacheV111.vehicles.PnfsMessage; |
| 5 | |
| 6 | /** |
| 7 | * Vehicle for setting files combined attributes. |
| 8 | * |
| 9 | * @since 1.9.4 |
| 10 | */ |
| 11 | public class PnfsSetFileAttributes extends PnfsMessage { |
| 12 | |
| 13 | private static final long serialVersionUID = -6750531802534981651L; |
| 14 | |
| 15 | private FileAttributes _fileAttributes; |
| 16 | |
| 17 | /** |
| 18 | * Construct request by PnfsId. |
| 19 | * |
| 20 | * @param pnfsid |
| 21 | * @param attr |
| 22 | */ |
| 23 | public PnfsSetFileAttributes(PnfsId pnfsid, FileAttributes attr) { |
| 24 | super(pnfsid); |
| 25 | _fileAttributes = attr; |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Construct request by path. |
| 30 | * |
| 31 | * @param path |
| 32 | * @param attr |
| 33 | */ |
| 34 | public PnfsSetFileAttributes(String path, FileAttributes attr) { |
| 35 | setPnfsPath(path); |
| 36 | _fileAttributes = attr; |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * Get requested attributes. |
| 41 | * |
| 42 | * @return |
| 43 | */ |
| 44 | public FileAttributes getFileAttributes() { |
| 45 | return _fileAttributes; |
| 46 | } |
| 47 | |
| 48 | } |