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


001:        package com.sun.portal.wsrp.producer;
002:
003:        public class ProducerDN {
004:
005:            public static final String WSRP_ROLE_PREFIX = "_WSRPRole_";
006:            public static final String WSRP_ROLE_CN_PREFIX = "cn="
007:                    + WSRP_ROLE_PREFIX;
008:
009:            /**
010:             * Gets the DN for the producers' organizational unit.
011:             * For example: ou=WSRPProducers,dc=sun,dc=com
012:             *
013:             */
014:            public static String getProducersDN(String org, String portalId) {
015:                ISMultiPortalConstants ismpc = null;
016:                if (portalId == null) {
017:                    ismpc = ISMultiPortalConstants.getInstance();
018:                } else {
019:                    ismpc = ISMultiPortalConstants.getInstance(portalId);
020:                }
021:
022:                return "ou=" + ismpc.MP_RDN_PRODUCER + "," + org;
023:            }
024:
025:            /**
026:             * Gets the DN for the producer instance organizational unit.
027:             * For example: ou=default,ou=WSRPProducers,dc=sun,dc=com
028:             */
029:            public static String getProducerDN(String org, String instance,
030:                    String portalId) {
031:                return "ou=" + instance + "," + getProducersDN(org, portalId);
032:            }
033:
034:            /**
035:             * Gets the DN for the consumer (registration) organizational unit.
036:             * For example: ou=aConsumer,ou=default,ou=WSRPProducers,dc=sun,dc=com
037:             */
038:            public static String getConsumerDN(String org, String instance,
039:                    String consumer, String portalId) {
040:                return "ou=" + consumer + ","
041:                        + getProducerDN(org, instance, portalId);
042:            }
043:
044:            /**
045:             * Gets the DN for the consumer (registration) organizational unit.
046:             * For example: ou=aConsumer,ou=default,ou=WSRPProducers,dc=sun,dc=com
047:             */
048:            public static String getConsumerDN(String producerDN,
049:                    String consumer) {
050:                return "ou=" + consumer + "," + producerDN;
051:            }
052:
053:            /**
054:             * Gets the consumer (actually the registration handle) from the
055:             * given consumer DN.
056:             * For example: return aConsumer given ou=aConsumer,ou=default,ou=WSRPProducers,dc=sun,dc=com
057:             */
058:            public static String getConsumer(String consumerDN) {
059:                // separate the RDN from the producer instance DN
060:                int i = consumerDN.indexOf(",");
061:                String rdn = (i < 0) ? consumerDN : consumerDN.substring(0, i);
062:
063:                // strip out "ou="
064:                return rdn.startsWith("ou=") ? rdn.substring(3) : rdn;
065:            }
066:
067:            /**
068:             * Gets the DN for the consumer people container.
069:             * For example: ou=People,ou=aConsumer,ou=default,ou=WSRPProducers,dc=sun,dc=com
070:             */
071:            public static String getConsumerPeopleDN(String org,
072:                    String instance, String consumer, String portalId) {
073:                return "ou=People,"
074:                        + getConsumerDN(org, instance, consumer, portalId);
075:            }
076:
077:            /**
078:             * Gets the DN for the default people container.
079:             * For example: ou=People,ou=default,ou=WSRPProducers,dc=sun,dc=com
080:             */
081:            public static String getDefaultPeopleDN(String org,
082:                    String instance, String portalId) {
083:                return "ou=People," + getProducerDN(org, instance, portalId);
084:            }
085:
086:            /**
087:             * Gets the DN for a producer user entry.
088:             * For example: ou=aUser,ou=People,ou=aConsumer,ou=default,ou=WSRPProducers,dc=sun,dc=com
089:             */
090:            public static String getUserDN(String org, String instance,
091:                    String consumer, String user, String portalId) {
092:                return "uid="
093:                        + user
094:                        + ","
095:                        + getConsumerPeopleDN(org, instance, consumer, portalId);
096:            }
097:
098:            /**
099:             * Gets the DN for the default producer user entry.
100:             * For example: uid=default,ou=People,ou=default,ou=WSRPProducers,dc=sun,dc=com
101:             */
102:            public static String getDefaultUserDN(String org, String instance,
103:                    String portalId) {
104:                return "uid=default,"
105:                        + getDefaultPeopleDN(org, instance, portalId);
106:            }
107:
108:            /**
109:             * Gets the DN for the WSRP producers' Role
110:             * For example: cn=WSRPRole,dc=sun,dc=com
111:             *
112:             */
113:            public static String getProducersRoleDN(String org,
114:                    String instance, String regHandle, String portalId) {
115:                return "cn="
116:                        + getProducersRoleName(instance, regHandle, portalId)
117:                        + "," + org;
118:            }
119:
120:            public static String getProducersRoleName(String instanceName,
121:                    String regHandle, String portalId) {
122:                if (portalId != null) {
123:                    return WSRP_ROLE_PREFIX + portalId + "_" + instanceName
124:                            + "_" + regHandle;
125:                } else {
126:                    ISMultiPortalConstants ismpc = ISMultiPortalConstants
127:                            .getInstance();
128:                    portalId = ismpc.getPortalId();
129:                    if (portalId != null) {
130:                        return WSRP_ROLE_PREFIX + portalId + "_" + instanceName
131:                                + "_" + regHandle;
132:                    }
133:                }
134:                return WSRP_ROLE_PREFIX + instanceName + "_" + regHandle;
135:            }
136:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.