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: package org.apache.jetspeed.portalsite.menu;
18:
19: import org.apache.jetspeed.om.folder.impl.StandardMenuDefinitionImpl;
20:
21: /**
22: * This class provides a menu definition for default menus
23: * constructed from folders within menus with depth expansion
24: * specified.
25: *
26: * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
27: * @version $Id: DefaultMenuDefinition.java 516448 2007-03-09 16:25:47Z ate $
28: */
29: public class DefaultMenuDefinition extends StandardMenuDefinitionImpl {
30: /**
31: * options - options path specification for menu
32: */
33: private String options;
34:
35: /**
36: * depth - inclusion depth for menu
37: */
38: private int depth;
39:
40: /**
41: * profile - profile locator for menu and its elements
42: */
43: private String profile;
44:
45: /**
46: * DefaultMenuDefinition - constructor
47: */
48: public DefaultMenuDefinition(String options, int depth,
49: String locatorName) {
50: super ();
51: this .options = options;
52: this .depth = depth;
53: this .profile = locatorName;
54: }
55:
56: /**
57: * getOptions - get comma separated menu options if not specified as elements
58: *
59: * @return option paths specification
60: */
61: public String getOptions() {
62: return options;
63: }
64:
65: /**
66: * getDepth - get depth of inclusion for folder menu options
67: *
68: * @return inclusion depth
69: */
70: public int getDepth() {
71: return depth;
72: }
73:
74: /**
75: * getProfile - get profile locator used to filter specified options
76: *
77: * @return profile locator name
78: */
79: public String getProfile() {
80: return profile;
81: }
82: }
|