View Javadoc

1   package fr.in2p3.jsaga.sync.logicalfile;
2   
3   import fr.in2p3.jsaga.sync.namespace.SyncNSDirectory;
4   import org.ogf.saga.error.*;
5   import org.ogf.saga.url.URL;
6   
7   import java.util.List;
8   
9   /**
10   * This interface represents a container for logical files in a logical file
11   * name space.
12   */
13  public interface SyncLogicalDirectory extends SyncNSDirectory {
14  
15      /**
16       * Tests the name for being a logical file. Is an alias for
17       * {@link SyncNSDirectory#isEntrySync}.
18       *
19       * @param name
20       *            to be tested.
21       * @return <code>true</code> if the name represents a non-directory entry.
22       */
23      public boolean isFileSync(URL name) throws NotImplementedException,
24              IncorrectURLException, AuthenticationFailedException,
25              AuthorizationFailedException, PermissionDeniedException,
26              BadParameterException, DoesNotExistException,
27              IncorrectStateException, TimeoutException, NoSuccessException;
28  
29      /**
30       * Finds entries in the current directory and possibly below, with matching
31       * names and matching meta data.
32       *
33       * @param namePattern
34       *            pattern for names of entries to be found.
35       * @param attrPattern
36       *            pattern for meta data keys/values of entries to be found.
37       * @param flags
38       *            flags defining the operation modus.
39       * @return the list of matching entries.
40       */
41      public List<URL> findSync(String namePattern, String[] attrPattern, int flags)
42              throws NotImplementedException, AuthenticationFailedException,
43              AuthorizationFailedException, PermissionDeniedException,
44              BadParameterException, IncorrectStateException, TimeoutException,
45              NoSuccessException;
46  
47      /**
48       * Finds entries in the current directory and below, with matching names and
49       * matching meta data.
50       *
51       * @param namePattern
52       *            pattern for names of entries to be found.
53       * @param attrPattern
54       *            pattern for meta data keys/values of entries to be found.
55       * @return the list of matching entries.
56       */
57      public List<URL> findSync(String namePattern, String[] attrPattern)
58              throws NotImplementedException, AuthenticationFailedException,
59              AuthorizationFailedException, PermissionDeniedException,
60              BadParameterException, IncorrectStateException, TimeoutException,
61              NoSuccessException;
62  }