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.om.folder.psml;
18  
19  import org.apache.jetspeed.om.folder.MenuOptionsDefinition;
20  
21  /***
22   * This class implements the MenuOptionsDefinition
23   * interface in a persistent object form for use by
24   * the page manager component.
25   * 
26   * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
27   * @version $Id: MenuOptionsDefinitionImpl.java 516448 2007-03-09 16:25:47Z ate $
28   */
29  public class MenuOptionsDefinitionImpl implements MenuOptionsDefinition
30  {
31      /***
32       * options - comma separated option paths specification for menu
33       */
34      private String options;
35  
36      /***
37       * depth - depth of inclusion for folder options
38       */
39      private int depth;
40  
41      /***
42       * paths - generate ordered path options for options
43       */
44      private boolean paths;
45  
46      /***
47       * regexp - interpret specified optionsas regexp
48       */
49      private boolean regexp;
50  
51      /***
52       * profile - profile locator name filter for options
53       */
54      private String profile;
55      
56      /***
57       * order - comma separated list of ordering patterns for options
58       */
59      private String order;
60      
61      /***
62       * skin - skin name for menu
63       */
64      private String skin;
65      
66      /***
67       * MenuOptionsDefinitionImpl - constructor
68       */
69      public MenuOptionsDefinitionImpl()
70      {
71      }
72  
73      /***
74       * getOptions - get comma separated menu options
75       *
76       * @return option paths specification
77       */
78      public String getOptions()
79      {
80          return options;
81      }
82  
83      /***
84       * setOptions - set comma separated menu options
85       *
86       * @param options option paths specification
87       */
88      public void setOptions(String options)
89      {
90          this.options = options;
91      }
92  
93      /***
94       * getDepth - get depth of inclusion for folder options
95       *
96       * @return inclusion depth
97       */
98      public int getDepth()
99      {
100         return depth;
101     }
102 
103     /***
104      * setDepth - set depth of inclusion for folder options
105      *
106      * @param depth inclusion depth
107      */
108     public void setDepth(int depth)
109     {
110         this.depth = depth;
111     }
112 
113     /***
114      * isPaths - get generate ordered path options
115      *
116      * @return paths options flag
117      */
118     public boolean isPaths()
119     {
120         return paths;
121     }
122     
123     /***
124      * setPaths - set generate ordered path options
125      *
126      * @param paths paths options flag
127      */
128     public void setPaths(boolean paths)
129     {
130         this.paths = paths;
131     }
132     
133     /***
134      * isRegexp - get regexp flag for interpreting options
135      *
136      * @return regexp flag
137      */
138     public boolean isRegexp()
139     {
140         return regexp;
141     }
142 
143     /***
144      * setRegexp - set regexp flag for interpreting options
145      *
146      * @param regexp regexp flag
147      */
148     public void setRegexp(boolean regexp)
149     {
150         this.regexp = regexp;
151     }
152 
153     /***
154      * getProfile - get profile locator used to filter options
155      *
156      * @return profile locator name
157      */
158     public String getProfile()
159     {
160         return profile;
161     }
162 
163     /***
164      * setProfile - set profile locator used to filter options
165      *
166      * @param locatorName profile locator name
167      */
168     public void setProfile(String locatorName)
169     {
170         profile = locatorName;
171     }
172 
173     /***
174      * getOrder - get comma separated regexp ordering patterns
175      *
176      * @return ordering patterns list
177      */
178     public String getOrder()
179     {
180         return order;
181     }
182 
183     /***
184      * setOrder - set comma separated regexp ordering patterns
185      *
186      * @param order ordering patterns list
187      */
188     public void setOrder(String order)
189     {
190         this.order = order;
191     }
192 
193     /***
194      * getSkin - get skin name for options
195      *
196      * @return skin name
197      */
198     public String getSkin()
199     {
200         return skin;
201     }
202 
203     /***
204      * setSkin - set skin name for options
205      *
206      * @param name skin name
207      */
208     public void setSkin(String name)
209     {
210         skin = name;
211     }
212 }