01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18: package org.apache.lenya.cms.publication;
19:
20: import org.apache.lenya.cms.site.SiteStructure;
21:
22: /**
23: * An area.
24: */
25: public interface Area {
26:
27: /**
28: * @return The name of the area ("authoring", "live", etc.).
29: */
30: String getName();
31:
32: /**
33: * @return The publication the area belongs to.
34: */
35: Publication getPublication();
36:
37: /**
38: * @return The site structure of the area.
39: */
40: SiteStructure getSite();
41:
42: /**
43: * @param uuid The UUID.
44: * @param language The language.
45: * @return A document.
46: * @throws PublicationException if the document is not contained.
47: */
48: Document getDocument(String uuid, String language)
49: throws PublicationException;
50:
51: /**
52: * Checks if a document is contained.
53: * @param uuid The UUID.
54: * @param language The language.
55: * @return A boolean value.
56: */
57: boolean contains(String uuid, String language);
58:
59: /**
60: * @return All documents in this area.
61: */
62: Document[] getDocuments();
63:
64: }
|