KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > repository > data > FactoryDirective


1 /*
2  * Copyright 2004 Apache Software Foundation
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12  * implied.
13  *
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 package org.apache.avalon.repository.data;
19
20 import java.io.Serializable JavaDoc;
21 import java.util.Properties JavaDoc;
22
23 import org.apache.avalon.repository.Artifact;
24
25 /**
26  * A FactoryDirective combines a artifact with a set of properties to be
27  * applied to the factory criteria.
28  *
29  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
30  * @version $Revision: 1.1 $
31  */

32 public class FactoryDirective implements Serializable JavaDoc
33 {
34     //-----------------------------------------------------------
35
// immutable state
36
//-----------------------------------------------------------
37

38     private final Artifact m_artifact;
39
40     private final Properties JavaDoc m_properties;
41
42     //-----------------------------------------------------------
43
// constructor
44
//-----------------------------------------------------------
45

46     /**
47      * Creates a new FactoryDirective.
48      *
49      * @param artifact the factory artifact
50      * @param properties the associated properties
51      */

52     public FactoryDirective( final Artifact artifact, final Properties JavaDoc properties )
53     {
54         m_artifact = artifact;
55         m_properties = properties;
56     }
57
58     //-----------------------------------------------------------
59
// public
60
//-----------------------------------------------------------
61

62    /**
63     * Return the system artifact.
64     * @return the factory artifact reference
65     */

66     public Artifact getArtifact()
67     {
68         return m_artifact;
69     }
70
71    /**
72     * Return the factory properties.
73     * @return the factory properties.
74     */

75     public Properties JavaDoc getProperties()
76     {
77         return m_properties;
78     }
79 }
80
Popular Tags