01: /*
02: * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.ubt.report.view.report;
06:
07: import com.sun.portal.ubt.report.view.report.UBTReportI;
08:
09: import java.util.Vector;
10:
11: /**
12: *
13: */
14: public class SupportedReports {
15: static String[] supportedReports = get();
16:
17: public static String[] get() {
18: Vector reports = new Vector();
19: reports.add(UBTReportI.PORTAL_CHANNEL_RENDER);
20: reports.add(UBTReportI.PORTAL_CONTAINER_CUSTOMIZATION);
21: reports.add(UBTReportI.PORTAL_CONTAINER_RENDER);
22: reports.add(UBTReportI.PORTAL_USER_CUSTOMIZATION);
23: reports.add(UBTReportI.PORTAL_USER_IDENTITY);
24: reports.add(UBTReportI.PORTAL_USER_LOGIN);
25: reports.add(UBTReportI.PORTLET_ACTIONS);
26: reports.add(UBTReportI.PORTLET_RENDER);
27: return copy(reports.toArray());
28: }
29:
30: private static String[] copy(Object[] objArray) {
31: String[] series = new String[objArray.length];
32: for (int i = 0; i < objArray.length; i++) {
33: series[i] = (String) objArray[i];
34: }
35: return series;
36: }
37:
38: public static boolean isSupported(String name) {
39: boolean supported = false;
40: if (name != null) {
41: for (int i = 0; i < supportedReports.length; i++) {
42: if (supportedReports[i].equals(name))
43: return true;
44: }
45: }
46: return supported;
47: }
48:
49: }
|