Java Doc for CMCFactory.java in  » Portal » Open-Portal » com » sun » portal » community » mc » 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.community.mc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.portal.community.mc.CMCFactory

CMCFactory
public class CMCFactory (Code)
Returns instances of CommunityUser and CommunityNode objects.

The community MC (membership and configuration) system is implemented using the group of responsibility (GoR) pattern. This is a variation on the chain of responsibility (CoR) pattern. CoR defines an ordered set of "handlers", each with the same interface. Clients have a reference to a head handler, and make calls into its interface. To answer question and perform operations, the handler can either return a response, or defer to the next handler (successor) to answer the question. Clients do not know which handler answered the question, only that it was answered. Applying the GoR pattern to this class, there is a set of unordered contributors, and one manager, all of which implement the same interface. This class returns references to the manager, which has references to the contributors. Clients call into the manager, and the manager delegates to one or more of the contributors to answer the question. Clients are unaware of the pattern. They only see the CommunityNode or CommunityUser interface.

This class is configured via a properties file, communitymc.properties. This file must exist on the classpath. communitymc.properties contains configuration for this factory, the manager implementation, and all contributor implementations. The properties are read from the classpath by this class, and passed to the manager, which passes it to each contributor upon initialization.

This class requires the communitymc.properties file to contain the property manager.package that defines the Java package name where the manager CommunityUserImpl and CommunityNodeImpl classes can be found. For example:
 manager.package=com.sun.portal.community.impl.manager
 

See Also:   com.sun.portal.community.mc.CommunityUser
See Also:   com.sun.portal.community.mc.CommunityNode


Field Summary
final public static  StringNODE_CLASS_NAME
     The relative class name that implements the CommunityNode interface.
final public static  StringNODE_MANAGER_CLASS_NAME
     The relative class name that implements the CommunityNodeManager interface.
final public static  StringUSER_CLASS_NAME
     The relative class name that implements the CommunityUser interface.


Method Summary
public  CMCNodegetCMCNode(CMCPrincipal communityPrincipal)
     Get a CommunityNode object.

This method never returns null.
public  CMCNodeManagergetCMCNodeManager()
     Get a CommunityNodeManager object.
public  CMCUsergetCMCUser(String userId)
     Get a CommunityUser object.
public  CMCUsergetCMCUser(String userId, Iterator types)
     Get a CommunityUser object.

The resulting CommunityUser manager object will load only the named CommunityUser contributor types.

public static  CMCFactorygetInstance()
     Get a community factory instance. CommunityFactory is a singleton.

Field Detail
NODE_CLASS_NAME
final public static String NODE_CLASS_NAME(Code)
The relative class name that implements the CommunityNode interface. Community C+M contributor implementations must include a class with this name under the package name of the contributor specified in the community properties file. For example, for a contributor named foo, the community properties file must specify a property foo.package that indicates the package name of the class CommunityNodeImpl that implements the foo community node contributor, as such:
foo.package=some.pkg
Accordingly, the Java class some.pkg.CommunityNodeImpl must be present and implement the CommunityNode interface.



NODE_MANAGER_CLASS_NAME
final public static String NODE_MANAGER_CLASS_NAME(Code)
The relative class name that implements the CommunityNodeManager interface. Community MC contributor implementations must include a class with this name under the package name of the contributor specified in the community properties file. For example, for a contributor named foo, the community properties file must specify a property foo.package that indicates the package name of the class CommunityNodeManagerImpl that implements the foo community node contributor, as such:
foo.package=some.pkg
Accordingly, the Java class some.pkg.CommunityNodeManagerImpl must be present and implement the CommunityNodeManager interface.



USER_CLASS_NAME
final public static String USER_CLASS_NAME(Code)
The relative class name that implements the CommunityUser interface. Community C+M contributor implementations must include a class with this relative name under the package name of the contributor specified in the community properties file. For example, for a contributor named foo, the community properties file must specify a property foo.package that indicates the package name of the class CommunityUserImpl that implements the foo community user contributor, as such:
foo.package=some.pkg
Accordingly, the Java class some.pkg.CommunityUserImpl must be present and implement the CommunityUser interface.





Method Detail
getCMCNode
public CMCNode getCMCNode(CMCPrincipal communityPrincipal) throws CMCException(Code)
Get a CommunityNode object.

This method never returns null. The return value of this method has no bearing on whether the community node exists persistently. To verify existence, clients should call exists() on the CommunityNode after obtaining a refernece via this method. Community nodes are created by calling create() on the CommunityNode. Community nodes are removed by calling remove() on the CommunityNode. A CommunityNode object corresponding to the CommunityPrincipal parameter.
Parameters:
  communityPrincipal - The CommunityPrincipal that identifies the CommunityNode
throws:
  com.sun.portal.community.mc.CommunityException - If there was a problem obtaining the community node object for the given community principal parameter
See Also:   com.sun.portal.community.mc.CommunityNode.create



getCMCNodeManager
public CMCNodeManager getCMCNodeManager() throws CMCException(Code)
Get a CommunityNodeManager object. A CommunityNodeManager object.
throws:
  com.sun.portal.community.mc.CMCException - If there was a problemobtaining the node manager object.



getCMCUser
public CMCUser getCMCUser(String userId) throws CMCException(Code)
Get a CommunityUser object.

The resulting CommunityUser manager object will load all configured CommunityUser contributor types.
Parameters:
  userId - The user identifier that identified the CommunityUser object A CommunityUser object corresponding to the given user ID parameter.
throws:
  com.sun.portal.community.mc.CommunityException - If there was a problem obtaing the CommunityUser object




getCMCUser
public CMCUser getCMCUser(String userId, Iterator types) throws CMCException(Code)
Get a CommunityUser object.

The resulting CommunityUser manager object will load only the named CommunityUser contributor types. The named contributors must be a subset of the configured contributors. A CommunityUser object corresponding to the given user ID parameter.
Parameters:
  types - A Set of Strings, the contributor types to load.
Parameters:
  userId - The user identifier that identified the CommunityUser object
throws:
  com.sun.portal.community.mc.CommunityException - If there was a problem obtaing the CommunityUser object




getInstance
public static CMCFactory getInstance() throws CMCException(Code)
Get a community factory instance. CommunityFactory is a singleton. Instances of this class may only be obtained through this method.
throws:
  com.sun.portal.community.mc.CommunityException - If there is a problem obtaining the factory instance. the factory object.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.