KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > service > cmr > view > Location


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.service.cmr.view;
18
19 import org.alfresco.service.cmr.repository.NodeRef;
20 import org.alfresco.service.cmr.repository.StoreRef;
21 import org.alfresco.service.namespace.QName;
22 import org.alfresco.util.ParameterCheck;
23
24 /**
25  * Importer / Exporter Location
26  *
27  * @author David Caruana
28  */

29 public class Location
30 {
31     private StoreRef storeRef = null;
32     private NodeRef nodeRef = null;
33     private String JavaDoc path = null;
34     private QName childAssocType = null;
35     
36
37     /**
38      * Construct
39      *
40      * @param nodeRef
41      */

42     public Location(NodeRef nodeRef)
43     {
44         ParameterCheck.mandatory("Node Ref", nodeRef);
45         this.storeRef = nodeRef.getStoreRef();
46         this.nodeRef = nodeRef;
47     }
48
49     /**
50      * Construct
51      *
52      * @param storeRef
53      */

54     public Location(StoreRef storeRef)
55     {
56         ParameterCheck.mandatory("Store Ref", storeRef);
57         this.storeRef = storeRef;
58     }
59
60     /**
61      * @return the store ref
62      */

63     public StoreRef getStoreRef()
64     {
65         return storeRef;
66     }
67     
68     /**
69      * @return the node ref
70      */

71     public NodeRef getNodeRef()
72     {
73         return nodeRef;
74     }
75     
76     /**
77      * Sets the location to the specified path
78      *
79      * @param path path relative to store or node reference
80      */

81     public void setPath(String JavaDoc path)
82     {
83         this.path = path;
84     }
85     
86     /**
87      * @return the location
88      */

89     public String JavaDoc getPath()
90     {
91         return path;
92     }
93
94     /**
95      * Sets the child association type
96      *
97      * @param childAssocType child association type
98      */

99     public void setChildAssocType(QName childAssocType)
100     {
101         this.childAssocType = childAssocType;
102     }
103     
104     /**
105      * @return the child association type
106      */

107     public QName getChildAssocType()
108     {
109         return childAssocType;
110     }
111 }
112
Popular Tags