summaryrefslogtreecommitdiffstats
path: root/sandbox/sebastien/java/sca-node/modules/domain/src/main/java/org/apache/tuscany/sca/domain/spi/SCADomainAPIService.java
blob: d0cde9ae538b6f0cc6610dc6bb347c1142e6d807 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.    
 */

package org.apache.tuscany.sca.domain.spi;

import org.apache.tuscany.sca.domain.DomainException;
import org.osoa.sca.annotations.Remotable;


/**
 * Represents an SCA domain API to be accessed remotely
 * 
 * @version $Rev: 580520 $ $Date: 2007-09-29 00:50:25 +0100 (Sat, 29 Sep 2007) $
 */
@Remotable
public interface SCADomainAPIService {
    
    /**
     * Start all of the services in the domain.
     */
    void start() 
      throws DomainException;  

    /**
     * Stop all of the services in the domain.
     */
    void stop()
      throws DomainException; 

    /**
     * Destroy the SCA domain.
     */
    void destroyDomain()
      throws DomainException;

    /**
     * Returns the URI of the SCA Domain. That URI is the endpoint of the
     * SCA domain administration service.
     * 
     * @return the URI of the SCA Domain
     */
    String getURI();
    
    /**
     * Add an SCA contribution to the domain.
     *  
     * @param contributionURI the URI of the contribution
     * @param contributionURL the URL of the contribution
     * @throws DomainException
     */  
    void addContribution(String contributionURI, String contributionURL)
      throws DomainException;
    
    /**
     * Update an SCA contribution that has previously been added to the domain.
     *  
     * @param contributionURI the URI of the contribution
     * @param contributionURL the URL of the contribution
     * @throws DomainException
     */  
    void updateContribution(String contributionURI, String contributionURL)
      throws DomainException;    
    
    /**
     * Remove a contribution from the domain.
     * 
     * @param contributionURI the URI of the contribution
     * @throws DomainException
     */
    void removeContribution(String contributionURI)
      throws DomainException; 
    
    /**
     * Add the supplied composite XML to the identified contribution
     * 
     * @param contributionURI the URI of the contribution
     * @param compositeXML the XML string of the composite 
     * @throws DomainException
     */
    void addDeploymentComposite(String contributionURI, String compositeXML)
      throws DomainException;
    
    /**
     * Use the supplied composite XML to update the identified contribution
     * 
     * @param contributionURI the URI of the contribution
     * @param compositeXML the XML string of the composite 
     * @throws DomainException
     */
    void updateDeploymentComposite(String contributionURI, String compositeXML)
      throws DomainException;    

    /**
     * Add a deployable composite to the domain.
     * 
     * @param compositeQName the QName of the composite
     * @throws DomainException     
     */
    void addToDomainLevelComposite(String compositeQName)
      throws DomainException;
    
    /**
     * Remove a deployable composite from the domain.
     * 
     * @param compositeQName the QName of the composite
     * @throws DomainException     
     */
    void removeFromDomainLevelComposite(String compositeQName)
      throws DomainException; 
    
    /**
     * Returns an XML string representation of the domain level composite
     * 
     * @return XML representing the domain level composite
     */
    String getDomainLevelComposite()
      throws DomainException;
    
    /**
     * Returns an XML String representation of a artifact from within the 
     * domain namespace formed by the domain level composite
     * 
     * @return XML representing the specified artifact
     */
    String getQNameDefinition(String artifact)
      throws DomainException;
    
    /**
     * Start a composite. The domain is responsible for starting all the
     * components in the composite. It may decompose the composite into
     * one or more smaller composites and load these composites into
     * an appropriate SCA node for execution.
     * 
     * @param compositeQName The QName of the composite
     * @throws DomainException
     */
    void startComposite(String compositeQName)
      throws DomainException;
    
    /**
     * Stop a composite. The domain will stop all the components from the
     * specified composite.
     * 
     * @param compositeQName The QName of the composite
     * @throws DomainException
     */
    void stopComposite(String compositeQName)
      throws DomainException;
}