Source Code Cross Referenced for UBTLogFileLine.java in  » Portal » Open-Portal » com » sun » portal » ubt » report » data » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » Open Portal » com.sun.portal.ubt.report.data 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
003:         * PROPRIETARY/CONFIDENTIAL.  Use of this product is subject to license terms.
004:         */
005:        package com.sun.portal.ubt.report.data;
006:
007:        import java.util.HashMap;
008:        import java.util.Properties;
009:
010:        /**
011:         * Maps the fields to the value in a log line.
012:         *
013:         */
014:        public class UBTLogFileLine implements  UBTLogLine {
015:            protected static Properties ubtLabels = null;
016:            protected static HashMap ubtLabelIndexMap = new HashMap();
017:            protected String[] labelValues = null;
018:
019:            public String[] getLabelValues() {
020:                return labelValues;
021:            }
022:
023:            public UBTLogFileLine(String[] logLine)
024:                    throws LabelsNoDataException {
025:                if (logLine.length > 0) {
026:                    if (logLine[0].startsWith("!")) {
027:                        //you have new set of labels or log file closed and opened
028:                        logLine[0] = logLine[0].substring(logLine[0]
029:                                .indexOf(":") + 2);
030:                        ubtLabelIndexMap = new HashMap();
031:                        for (int i = 0; i < logLine.length; i++) {
032:                            ubtLabelIndexMap.put(logLine[i], new Integer(i));
033:                        }
034:                        throw new LabelsNoDataException();
035:                    }
036:                }
037:                labelValues = logLine;
038:            }
039:
040:            public HashMap getLabelIndexMap() {
041:                return ubtLabelIndexMap;
042:            }
043:
044:            private String getVal(String label) {
045:                String val = null;
046:                try {
047:                    val = labelValues[((Integer) ubtLabelIndexMap.get(label))
048:                            .intValue()];
049:                } catch (Exception e) {
050:                    //fall through,  data field does not exist
051:                }
052:                if (val != null && val.equals("-")) {
053:                    return null;
054:                } else {
055:                    return val;
056:                }
057:            }
058:
059:            public String getTimestamp() {
060:                return getVal("Timestamp");
061:            }
062:
063:            public String getPortalID() {
064:                return getVal("PortalID");
065:            }
066:
067:            public String getLevel() {
068:                return getVal("Level");
069:            }
070:
071:            public String getUserID() {
072:                return getVal("UserID");
073:            }
074:
075:            public String getEventID() {
076:                return getVal("EventID");
077:            }
078:
079:            public String getComponentName() {
080:                return getVal("ComponentName");
081:            }
082:
083:            public String getChannelName() {
084:                return getVal("ChannelName");
085:            }
086:
087:            public String getProvider() {
088:                return getVal("Provider");
089:            }
090:
091:            public String getTargetProvider() {
092:                return getVal("TargetProvider");
093:            }
094:
095:            public String getContainerName() {
096:                return getVal("ContainerName");
097:            }
098:
099:            public String getAction() {
100:                return getVal("Action");
101:            }
102:
103:            public String getEntityID() {
104:                return getVal("EntityID");
105:            }
106:
107:            public String getMode() {
108:                return getVal("Mode");
109:            }
110:
111:            public String getWindowState() {
112:                return getVal("WindowState");
113:            }
114:
115:            public String getExPortalLink() {
116:                return getVal("ExPortalLink");
117:            }
118:
119:            public String getClientHost() {
120:                return getVal("ClientHost");
121:            }
122:
123:            public String getClientIP() {
124:                return getVal("ClientIP");
125:            }
126:
127:            public String getServerHost() {
128:                return getVal("ServerHost");
129:            }
130:
131:            public String getServerPort() {
132:                return getVal("ServerPort");
133:            }
134:
135:            public String getRequestHeader() {
136:                return getVal("RequestHeader");
137:            }
138:
139:            public String get(String field) {
140:                return getVal(field);
141:            }
142:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.