View Javadoc

1   package org.ogf.saga.namespace;
2   
3   import org.apache.log4j.Logger;
4   import org.junit.Before;
5   import org.junit.Test;
6   import org.ogf.saga.error.DoesNotExistException;
7   import org.ogf.saga.namespace.abstracts.AbstractDataMovement;
8   
9   /* ***************************************************
10  * *** Centre de Calcul de l'IN2P3 - Lyon (France) ***
11  * ***             http://cc.in2p3.fr/             ***
12  * ***************************************************
13  * File:   IntegrationClean
14  * Author: Sylvain Reynaud (sreynaud@in2p3.fr)
15  * Date:   18 oct. 2007
16  * ***************************************************
17  * Description:                                      */
18  /**
19   *
20   */
21  public abstract class DataCleanUp extends AbstractDataMovement {
22      protected DataCleanUp(String protocol) throws Exception {
23          super(protocol, protocol);
24      }
25  
26      @Override
27      @Before
28      public void setUp() throws Exception {
29          // do not invoke super.setUp()
30          m_toBeRemoved = true;
31          m_dir = NSFactory.createNSDirectory(m_session, m_dirUrl, Flags.NONE.getValue());
32          if (m_dirUrl2 != null) {
33              try {
34                  m_dir2 = NSFactory.createNSDirectory(m_session, m_dirUrl2, Flags.NONE.getValue());
35              } catch (DoesNotExistException e) {
36                  Logger.getLogger(this.getClass()).warn("Directory does not exist: "+m_dirUrl2, e);
37                  m_dir2 = null;
38              }
39          }
40      }
41  
42      @Test
43      public void do_nothing() {}
44  }