001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.jetspeed.page.document;
018:
019: import java.util.Locale;
020:
021: import org.apache.jetspeed.om.common.GenericMetadata;
022: import org.apache.jetspeed.om.page.BaseElement;
023:
024: /**
025: * <p>
026: * Node
027: * </p>
028: * <p>
029: *
030: * </p>
031: * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
032: * @version $Id: Node.java 516448 2007-03-09 16:25:47Z ate $
033: *
034: */
035: public interface Node extends BaseElement {
036: String PATH_SEPARATOR = "/";
037: char PATH_SEPARATOR_CHAR = '/';
038:
039: /**
040: *
041: * <p>
042: * getParent
043: * </p>
044: *
045: * @return
046: */
047: Node getParent();
048:
049: /**
050: *
051: * <p>
052: * setParent
053: * </p>
054: *
055: * @param parent
056: */
057: void setParent(Node parent);
058:
059: /**
060: *
061: * <p>
062: * getPath
063: * </p>
064: *
065: * @return
066: */
067: String getPath();
068:
069: /**
070: *
071: * <p>
072: * getName
073: * </p>
074: *
075: * Returns the name of this node relative to
076: * <code>Node.getParent().getPath()</code>
077: *
078: * @return Name, relative to the parent node.
079: */
080: String getName();
081:
082: /**
083: *
084: * <p>
085: * setPath
086: * </p>
087: * Sets the full-qualified path of this node.
088: *
089: * @param path
090: */
091: void setPath(String path);
092:
093: /**
094: *
095: * <p>
096: * getMetadata
097: * </p>
098: *
099: * @return
100: */
101: GenericMetadata getMetadata();
102:
103: /**
104: *
105: * <p>
106: * getTitle
107: * </p>
108: * Returns the title for the specified locale.
109: *
110: * @param locale
111: * @return localized title of this Node.
112: */
113: String getTitle(Locale locale);
114:
115: /**
116: *
117: * <p>
118: * getShortTitle
119: * </p>
120: * Returns the short title for the specified locale.
121: *
122: * @param locale
123: * @return localized title of this Node.
124: */
125: String getShortTitle(Locale locale);
126:
127: /**
128: *
129: * <p>
130: * getType
131: * </p>
132: *
133: * @return
134: */
135: String getType();
136:
137: /**
138: *
139: * <p>
140: * getUrl
141: * </p>
142: *
143: * @return
144: */
145: String getUrl();
146:
147: /**
148: *
149: * <p>
150: * isHidden
151: * </p>
152: * <p>
153: * Whether or not this Node should be hidden in terms of the view. This MUST NOT restrict
154: * the presence of this node in terms of being returned in
155: * {@link NodeSets org.apache.jetspeed.page.document.NodeSet}.
156: * </p>
157: * @return hidden flag
158: */
159: boolean isHidden();
160:
161: /**
162: *
163: * <p>
164: * setHidden
165: * </p>
166: * <p>
167: * Whether or not this Node should be hidden in terms of the view.
168: * </p>
169: * @param hidden flag
170: */
171: void setHidden(boolean hidden);
172: }
|