Source Code Cross Referenced for NetFileModelImpl.java in  » Portal » Open-Portal » com » sun » portal » netfile » admin » model » 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.netfile.admin.model 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Copyright 2002 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:         *
013:         * Author: Anurag Gupta
014:         */package com.sun.portal.netfile.admin.model;
015:
016:        // JDK classes
017:        import java.util.Iterator;
018:        import com.sun.portal.log.common.PortalLogger;
019:        import java.util.Map;
020:        import java.util.Set;
021:        import java.util.HashSet;
022:        import java.util.ArrayList;
023:        import java.security.AccessController;
024:
025:        import com.sun.identity.security.DecryptAction;
026:
027:        // Servlet classes
028:        import javax.servlet.http.HttpServletRequest;
029:
030:        // iDS/AME classes
031:        import com.iplanet.sso.SSOException;
032:        import com.iplanet.am.console.service.model.SMDataModelImpl;
033:        import com.iplanet.am.console.base.model.AMConsoleException; //import com.iplanet.sm.ServiceSchemaManager;
034:        //import com.iplanet.sm.SMSException;
035:        import com.sun.identity.sm.ServiceSchemaManager;
036:        import com.sun.identity.sm.SMSException;
037:
038:        // NetFile admin console classes
039:        import com.sun.portal.netfile.admin.NetFileAdminModelManager;
040:
041:        public class NetFileModelImpl extends SMDataModelImpl implements 
042:                NetFileModel {
043:
044:            private String propsURL = "";
045:
046:            public NetFileModelImpl(HttpServletRequest req, String rbName,
047:                    Map map, String svcName, boolean processTemplate) {
048:                super (req, rbName, map, svcName, processTemplate);
049:                try {
050:                    ServiceSchemaManager svcSchemaMgr = new ServiceSchemaManager(
051:                            svcName, ssoToken);
052:                    if (svcSchemaMgr != null) {
053:                        propsURL = svcSchemaMgr.getPropertiesViewBeanURL();
054:                    }
055:                    NetFileAdminModelManager
056:                            .debugMessage("NetFileModelImpl: Properties view bean URL -> "
057:                                    + propsURL);
058:                } catch (SSOException ssoe) {
059:                    NetFileAdminModelManager.debugError(
060:                            "NetFileModelImpl: Error retrieving view bean URL",
061:                            ssoe);
062:                } catch (SMSException smse) {
063:                    NetFileAdminModelManager.debugError(
064:                            "NetFileModelImpl: Error retrieving view bean URL",
065:                            smse);
066:                }
067:            }
068:
069:            public int getNetFileAttributeIndex(String attr) {
070:                String aName = "";
071:                int attrIndex = -1;
072:
073:                for (int i = 0; i < dynSize; i++) {
074:                    setCurrentRow(DYNAMIC_TYPE, i);
075:                    aName = getAttrName();
076:
077:                    if (aName.equals(attr)) {
078:                        attrIndex = i;
079:                        break;
080:                    }
081:                }
082:                return attrIndex;
083:            }
084:
085:            public int getNetFileHostsIndex() {
086:                String aName = "";
087:                int hostsIndex = -1;
088:
089:                for (int i = 0; i < dynSize; i++) {
090:                    setCurrentRow(DYNAMIC_TYPE, i);
091:                    aName = getAttrName();
092:                    NetFileAdminModelManager.debugMessage("hostname[" + i
093:                            + "] = " + aName);
094:                    if (aName.equals("sunPortalNetFileCommonHostData")) {
095:                        hostsIndex = i;
096:                        break;
097:                    }
098:                }
099:                NetFileAdminModelManager.debugMessage("netfile hosts index = "
100:                        + hostsIndex);
101:                return hostsIndex;
102:            }
103:
104:            public Set getNetFileHosts() {
105:                int NetFileHostsIndex = getNetFileHostsIndex();
106:                setCurrentRow(DYNAMIC_TYPE, NetFileHostsIndex);
107:                Set value = getAttrValues();
108:                Set netFileHosts = new HashSet();
109:                if (value != null) {
110:                    ArrayList encryptedNetFileHosts = new ArrayList(value);
111:                    if (!encryptedNetFileHosts.isEmpty()) {
112:                        Iterator hosts = encryptedNetFileHosts.iterator();
113:                        while (hosts.hasNext()) {
114:                            netFileHosts
115:                                    .add(getDecryptedHostInfo((String) hosts
116:                                            .next()));
117:                        }
118:                    }
119:                }
120:
121:                return netFileHosts;
122:            }
123:
124:            public int getNetFileHostsCount() {
125:                Set s = getNetFileHosts();
126:                return s == null ? 0 : s.size();
127:            }
128:
129:            public String getNetFileHostsI18NKey() {
130:                int index = getNetFileHostsIndex();
131:                setCurrentRow(DYNAMIC_TYPE, index);
132:                return getDynamicGUI().getLabel();
133:            }
134:
135:            public String getHelpAnchorTag(String docName) {
136:                return super .getHelpAnchorTag(docName);
137:            }
138:
139:            public String getPropsUrl() {
140:                return propsURL;
141:            }
142:
143:            public void process() {
144:                try {
145:                    super .process();
146:                } catch (Exception ex) {
147:                }
148:            }
149:
150:            public void store(int viewType, Map newMap) {
151:                try {
152:                    super .store(viewType, newMap);
153:                } catch (Exception ex) {
154:                    NetFileAdminModelManager.debugError("Exception : ", ex);
155:                }
156:            }
157:
158:            public String getHelpUrl(String docName) {
159:                return getHelpURL(docName);
160:            }
161:
162:            String getDecryptedHostInfo(String szEncryptedHostInfo) {
163:                return (String) AccessController
164:                        .doPrivileged(new DecryptAction(szEncryptedHostInfo));
165:            }
166:
167:            public String getHelpDocURL() {
168:                return super.getHelpDocURL(resBundle);
169:            }
170:
171:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.