View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    * 
9    *      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  package org.apache.jetspeed.page.document;
18  
19  import java.util.Locale;
20  
21  import org.apache.jetspeed.om.common.GenericMetadata;
22  import org.apache.jetspeed.om.page.BaseElement;
23  
24  /***
25   * <p>
26   * Node
27   * </p>
28   * <p>
29   *
30   * </p>
31   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
32   * @version $Id: Node.java 516448 2007-03-09 16:25:47Z ate $
33   *
34   */
35  public interface Node extends BaseElement
36  {
37      String PATH_SEPARATOR = "/";
38      char PATH_SEPARATOR_CHAR = '/';
39  
40      /***
41       * 
42       * <p>
43       * getParent
44       * </p>
45       *
46       * @return
47       */
48      Node getParent();
49      
50      /***
51       * 
52       * <p>
53       * setParent
54       * </p>
55       *
56       * @param parent
57       */
58      void setParent(Node parent);
59      
60      /***
61       * 
62       * <p>
63       * getPath
64       * </p>
65       *
66       * @return
67       */
68      String getPath();
69  
70      /***
71       * 
72       * <p>
73       * getName
74       * </p>
75       * 
76       * Returns the name of this node relative to 
77       * <code>Node.getParent().getPath()</code>
78       *
79       * @return Name, relative to the parent node.
80       */
81      String getName();
82      
83      /***
84       * 
85       * <p>
86       * setPath
87       * </p>
88       * Sets the full-qualified path of this node.
89       *
90       * @param path
91       */
92      void setPath(String path);
93      
94     
95      /***
96       * 
97       * <p>
98       * getMetadata
99       * </p>
100      *
101      * @return
102      */
103     GenericMetadata getMetadata();
104 
105     /***
106      * 
107      * <p>
108      * getTitle
109      * </p>
110      * Returns the title for the specified locale.
111      *
112      * @param locale
113      * @return localized title of this Node.
114      */
115     String getTitle(Locale locale);
116 
117     /***
118      * 
119      * <p>
120      * getShortTitle
121      * </p>
122      * Returns the short title for the specified locale.
123      *
124      * @param locale
125      * @return localized title of this Node.
126      */
127     String getShortTitle(Locale locale);
128 
129     /***
130      * 
131      * <p>
132      * getType
133      * </p>
134      * 
135      * @return
136      */
137     String getType();
138     
139     /***
140      * 
141      * <p>
142      * getUrl
143      * </p>
144      * 
145      * @return
146      */
147     String getUrl();
148     
149     /***
150      * 
151      * <p>
152      * isHidden
153      * </p>
154      * <p>
155      *  Whether or not this Node should be hidden in terms of the view.  This MUST NOT restrict
156      *  the presence of this node in terms of being returned in 
157      *  {@link NodeSets org.apache.jetspeed.page.document.NodeSet}. 
158      * </p>
159      * @return hidden flag
160      */
161     boolean isHidden();
162 
163     /***
164      * 
165      * <p>
166      * setHidden
167      * </p>
168      * <p>
169      *  Whether or not this Node should be hidden in terms of the view.
170      * </p>
171      * @param hidden flag
172      */
173     void setHidden(boolean hidden);
174 }