01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19: package org.apache.axis2.deployment;
20:
21: import org.apache.axis2.context.ConfigurationContext;
22: import org.apache.axis2.deployment.repository.util.DeploymentFileData;
23:
24: /**
25: * This interface is used to provide the custom deployment mechanism , where you
26: * can write your own Deployer to process a particular type and make that to
27: * a service or a module.
28: */
29: public interface Deployer {
30: /**
31: * Initialize the Deployer
32: * @param configCtx our ConfigurationContext
33: */
34: void init(ConfigurationContext configCtx);
35:
36: /**
37: * Process a file and add it to the configuration
38: * @param deploymentFileData the DeploymentFileData object to deploy
39: * @throws DeploymentException if there is a problem
40: */
41: void deploy(DeploymentFileData deploymentFileData)
42: throws DeploymentException;
43:
44: /**
45: * Set the directory
46: * @param directory directory name
47: */
48: void setDirectory(String directory);
49:
50: /**
51: * Set the extension to look for
52: * TODO: Support multiple extensions?
53: * @param extension the file extension associated with this Deployer
54: */
55: void setExtension(String extension);
56:
57: /**
58: * Remove a given file from the configuration
59: * @param fileName name of item to remove
60: * @throws DeploymentException if there is a problem
61: */
62: void unDeploy(String fileName) throws DeploymentException;
63: }
|