001: /**
002: * Copyright 2005 Sun Microsystems, Inc. All
003: * rights reserved. Use of this product is subject
004: * to license terms. Federal Acquisitions:
005: * Commercial Software -- Government Users
006: * Subject to Standard License Terms and
007: * Conditions.
008: *
009: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
010: * are trademarks or registered trademarks of Sun Microsystems,
011: * Inc. in the United States and other countries.
012: */package com.sun.portal.admin.console.search;
013:
014: import java.util.*;
015: import java.io.*;
016:
017: import javax.faces.context.FacesContext;
018: import javax.faces.application.FacesMessage;
019: import javax.faces.component.UIComponent;
020: import javax.faces.event.*;
021: import javax.faces.validator.*;
022: import javax.faces.el.ValueBinding;
023: import javax.servlet.http.HttpServletRequest;
024: import javax.management.*;
025:
026: import com.sun.web.ui.model.*;
027: import com.sun.web.ui.event.*;
028: import com.sun.web.ui.component.*;
029:
030: import com.sun.data.provider.*;
031: import com.sun.data.provider.impl.ObjectListDataProvider;
032:
033: import com.sun.cacao.agent.JmxClient;
034:
035: import com.sun.portal.admin.common.AttrOptionConstants;
036: import com.sun.portal.admin.common.util.*;
037: import com.sun.portal.admin.console.common.PSBaseBean;
038:
039: public class SchedulingBaseBean extends PSBaseBean {
040:
041: public SchedulingBaseBean() {
042: }
043:
044: public Option[] getAvailableDaysOfTheWeek() {
045: Option[] options = new Option[8];
046: options[0] = new Option("", getLocalizedString("search",
047: "search.general.select"));
048: options[1] = new Option("0", getLocalizedString("search",
049: "date.sunday"));
050: options[2] = new Option("1", getLocalizedString("search",
051: "date.monday"));
052: options[3] = new Option("2", getLocalizedString("search",
053: "date.tuesday"));
054: options[4] = new Option("3", getLocalizedString("search",
055: "date.wednesday"));
056: options[5] = new Option("4", getLocalizedString("search",
057: "date.thursday"));
058: options[6] = new Option("5", getLocalizedString("search",
059: "date.friday"));
060: options[7] = new Option("6", getLocalizedString("search",
061: "date.saturday"));
062: return options;
063: }
064:
065: public Option[] getAvailableHours() {
066: Option[] options = new Option[13];
067: options[0] = new Option("", getLocalizedString("search",
068: "search.general.select"));
069: options[1] = new Option("0", getLocalizedString("search",
070: "time.12"));
071: options[2] = new Option("1", getLocalizedString("search",
072: "time.1"));
073: options[3] = new Option("2", getLocalizedString("search",
074: "time.2"));
075: options[4] = new Option("3", getLocalizedString("search",
076: "time.3"));
077: options[5] = new Option("4", getLocalizedString("search",
078: "time.4"));
079: options[6] = new Option("5", getLocalizedString("search",
080: "time.5"));
081: options[7] = new Option("6", getLocalizedString("search",
082: "time.6"));
083: options[8] = new Option("7", getLocalizedString("search",
084: "time.7"));
085: options[9] = new Option("8", getLocalizedString("search",
086: "time.8"));
087: options[10] = new Option("9", getLocalizedString("search",
088: "time.9"));
089: options[11] = new Option("10", getLocalizedString("search",
090: "time.10"));
091: options[12] = new Option("11", getLocalizedString("search",
092: "time.11"));
093: return options;
094: }
095:
096: public Option[] getAvailableMinutes() {
097: Option[] options = new Option[61];
098: options[0] = new Option("", getLocalizedString("search",
099: "search.general.select"));
100: options[1] = new Option("0", getLocalizedString("search",
101: "time.00"));
102: options[2] = new Option("1", getLocalizedString("search",
103: "time.01"));
104: options[3] = new Option("2", getLocalizedString("search",
105: "time.02"));
106: options[4] = new Option("3", getLocalizedString("search",
107: "time.03"));
108: options[5] = new Option("4", getLocalizedString("search",
109: "time.04"));
110: options[6] = new Option("5", getLocalizedString("search",
111: "time.05"));
112: options[7] = new Option("6", getLocalizedString("search",
113: "time.06"));
114: options[8] = new Option("7", getLocalizedString("search",
115: "time.07"));
116: options[9] = new Option("8", getLocalizedString("search",
117: "time.08"));
118: options[10] = new Option("9", getLocalizedString("search",
119: "time.09"));
120: options[11] = new Option("10", getLocalizedString("search",
121: "time.10"));
122: options[12] = new Option("11", getLocalizedString("search",
123: "time.11"));
124: options[13] = new Option("12", getLocalizedString("search",
125: "time.12"));
126: options[14] = new Option("13", getLocalizedString("search",
127: "time.13"));
128: options[15] = new Option("14", getLocalizedString("search",
129: "time.14"));
130: options[16] = new Option("15", getLocalizedString("search",
131: "time.15"));
132: options[17] = new Option("16", getLocalizedString("search",
133: "time.16"));
134: options[18] = new Option("17", getLocalizedString("search",
135: "time.17"));
136: options[19] = new Option("18", getLocalizedString("search",
137: "time.18"));
138: options[20] = new Option("19", getLocalizedString("search",
139: "time.19"));
140: options[21] = new Option("20", getLocalizedString("search",
141: "time.20"));
142: options[22] = new Option("21", getLocalizedString("search",
143: "time.21"));
144: options[23] = new Option("22", getLocalizedString("search",
145: "time.22"));
146: options[24] = new Option("23", getLocalizedString("search",
147: "time.23"));
148: options[25] = new Option("24", getLocalizedString("search",
149: "time.24"));
150: options[26] = new Option("25", getLocalizedString("search",
151: "time.25"));
152: options[27] = new Option("26", getLocalizedString("search",
153: "time.26"));
154: options[28] = new Option("27", getLocalizedString("search",
155: "time.27"));
156: options[29] = new Option("28", getLocalizedString("search",
157: "time.28"));
158: options[30] = new Option("29", getLocalizedString("search",
159: "time.29"));
160: options[31] = new Option("30", getLocalizedString("search",
161: "time.30"));
162: options[32] = new Option("31", getLocalizedString("search",
163: "time.31"));
164: options[33] = new Option("32", getLocalizedString("search",
165: "time.32"));
166: options[34] = new Option("33", getLocalizedString("search",
167: "time.33"));
168: options[35] = new Option("34", getLocalizedString("search",
169: "time.34"));
170: options[36] = new Option("35", getLocalizedString("search",
171: "time.35"));
172: options[37] = new Option("36", getLocalizedString("search",
173: "time.36"));
174: options[38] = new Option("37", getLocalizedString("search",
175: "time.37"));
176: options[39] = new Option("38", getLocalizedString("search",
177: "time.38"));
178: options[40] = new Option("39", getLocalizedString("search",
179: "time.39"));
180: options[41] = new Option("40", getLocalizedString("search",
181: "time.40"));
182: options[42] = new Option("41", getLocalizedString("search",
183: "time.41"));
184: options[43] = new Option("42", getLocalizedString("search",
185: "time.42"));
186: options[44] = new Option("43", getLocalizedString("search",
187: "time.43"));
188: options[45] = new Option("44", getLocalizedString("search",
189: "time.44"));
190: options[46] = new Option("45", getLocalizedString("search",
191: "time.45"));
192: options[47] = new Option("46", getLocalizedString("search",
193: "time.46"));
194: options[48] = new Option("47", getLocalizedString("search",
195: "time.47"));
196: options[49] = new Option("48", getLocalizedString("search",
197: "time.48"));
198: options[50] = new Option("49", getLocalizedString("search",
199: "time.49"));
200: options[51] = new Option("50", getLocalizedString("search",
201: "time.50"));
202: options[52] = new Option("51", getLocalizedString("search",
203: "time.51"));
204: options[53] = new Option("52", getLocalizedString("search",
205: "time.52"));
206: options[54] = new Option("53", getLocalizedString("search",
207: "time.53"));
208: options[55] = new Option("54", getLocalizedString("search",
209: "time.54"));
210: options[56] = new Option("55", getLocalizedString("search",
211: "time.55"));
212: options[57] = new Option("56", getLocalizedString("search",
213: "time.56"));
214: options[58] = new Option("57", getLocalizedString("search",
215: "time.57"));
216: options[59] = new Option("58", getLocalizedString("search",
217: "time.58"));
218: options[60] = new Option("59", getLocalizedString("search",
219: "time.59"));
220: return options;
221: }
222:
223: public Option[] getAvailableMeridiems() {
224: Option[] options = new Option[3];
225: options[0] = new Option("", getLocalizedString("search",
226: "search.general.select"));
227: options[1] = new Option("am", getLocalizedString("search",
228: "time.am"));
229: options[2] = new Option("pm", getLocalizedString("search",
230: "time.pm"));
231: return options;
232: }
233:
234: }
|