View Javadoc
1   /*
2    * Copyright (C) 2010-2014 Hamburg Sud and the contributors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.aludratest.service.cmdline;
17  
18  import org.aludratest.config.ConfigProperties;
19  import org.aludratest.config.ConfigProperty;
20  import org.aludratest.service.AludraService;
21  import org.aludratest.service.ServiceInterface;
22  
23  /** Provides command line operations, like executíng a program or script and check the results. The service provides an interface
24   * with streams for sending data to the executable and reading results back.
25   * @author Volker Bergmann */
26  @ServiceInterface(name = "Command Line Service", description = "Provides invocation and I/O of command line processes.")
27  @ConfigProperties({ @ConfigProperty(name = "base.directory", type = String.class, description = "The base URL of the service. On a local filesystem, this is a folder path.", defaultValue = "${user.home}", required = true) })
28  public interface CommandLineService extends AludraService {
29  
30      /** Exhibits the service's Interaction implementor */
31      @Override
32      CommandLineInteraction perform();
33  
34      /** Exhibits the service's Verification implementor */
35      @Override
36      CommandLineVerification verify();
37  
38      /** Exhibits the service's Condition implementor */
39      @Override
40      CommandLineCondition check();
41  
42      /**
43       * @return the configured base.directory
44       */
45      String getBaseDirectory();
46  
47  }