Java Doc for CMCUser.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) 


com.sun.portal.community.mc.CMCUser

All known Subclasses:   com.sun.portal.community.mc.impl.am.org.CMCUserImpl,  com.sun.portal.community.mc.impl.am.global.CMCUserImpl,  com.sun.portal.community.mc.impl.jdo.CMCUserImpl,  com.sun.portal.community.mc.impl.am.role.CMCUserImpl,  com.sun.portal.community.mc.impl.am.frole.CMCUserImpl,  com.sun.portal.community.mc.test.impl.file.dynamic.CMCUserImpl,  com.sun.portal.community.mc.impl.am.CMCUserImplBase,
CMCUser
public interface CMCUser (Code)
Describes the relationship between a user and communities.

Clients obtain instances of CommunityUser objects through a CommunityFactory factory object.

CommunityUser objects operate from the perspective of the user. For example, the client has a user ID, and they want to ask questions about the user's relationship with communities. Contrast this with a CommunityNode object. CommunityNode objects operate from the perspective of a given community. For example, the client has community principal, and they want to ask questions and perform operations on that given community node identified by the community principal.

Community user implementations are not expected to be thread-safe; the same CommunityUser object should not be used by multiple threads concurrently.

The lifecycle of a community user is under control of the client application. The lifecycle usage pattern depends on the type of application, but must be determined with the knowledge that any particular community user cannot be assumed to be thread safe. For example, a single-threaded, single-user application can safely use the same community user object for the lifetime of the application. A web application should obtain a new community user object for each request (in other words, each thread).

Persistent changes affected through this interface commit immediately.




Method Summary
public  SetgetAvailable()
     Get the all communities accessible to the user.
public  ConfigTablegetDPDocuments(ConfigTable lastReadTimes)
     Get the Display Profile documents for the community user, for all member communities, for all roles that the user has within these communities.

The values in the returned ConfigTable object are byte[] objects.

public  ConfigTablegetDPDocuments(ConfigTable lastReadTimes, Set membership)
    
public  SetgetMembership()
     Get the community membership for the community user, for all possible roles.

Calling this method is equivalent to calling getMembership(null).
public  SetgetMembership(Set rolePrincipals)
     Get the community user's membership for the given set of roles.

Calling this method with a null rolePrincipals parameter is equivalent to calling getMembership() (no argument).
Parameters:
  rolePrincipals - A Set of RolePrincipals, the roles to check for membership.
throws:
  com.sun.portal.community.mc.CommunityException - If there was a problem getting the membership communities for thecommunity user.
public  SetgetMembershipByName()
     Get the community membership for the community user, for all possible roles.
public  SetgetMembershipByName(Set rolePrincipals)
     Get the community user's membership for the given set of roles.
public  SetgetMembershipByRole()
     Get the community membership for the community user, for all possible roles.
public  SetgetMembershipByRole(Set rolePrincipals)
     Get the community user's membership for the given set of roles.
public  longgetRoleCreationTime(CMCPrincipal cp, CMCRolePrincipal rolePrincipal)
     Returns the time when a user was assigned to a role in community.
throws:
  com.sun.portal.community.mc.CommunityException - if there was a problem determining if this setDPDocuments()operation is supported in this community.
public  StringgetUserId()
     Get the user ID of the community user.
public  booleanhasRole(CMCPrincipal communityPrincipal, CMCRolePrincipal rolePrincipal)
     Does this community user have the given role in the given community?
Parameters:
  communityPrincipal - A CommunityPrincipal object, the community principal to check.
Parameters:
  rolePrincipal - A RolePrincipal object, the role to check.
throws:
  com.sun.portal.community.mc.CommunityException - If there was a problem checking if this community user has the role.
public  voidinit(Properties properties, String userId)
     Initialize this CommunityUser object.

CommunityUser objects must be initialized before they are used.



Method Detail
getAvailable
public Set getAvailable() throws CMCException(Code)
Get the all communities accessible to the user. A Set of CommunityPrincipalobjects, the communities that this communityuser may join.
throws:
  com.sun.portal.community.mc.CommunityException - If a problem occured getting the communities that this community usermay join.



getDPDocuments
public ConfigTable getDPDocuments(ConfigTable lastReadTimes) throws CMCException(Code)
Get the Display Profile documents for the community user, for all member communities, for all roles that the user has within these communities.

The values in the returned ConfigTable object are byte[] objects. The byte[] is a UTF-8 encoded character stream.
Parameters:
  lastReadTimes - A ConfigTable of Long objects describing the time that the client lastread the DP documents for the user.

The community user implementation uses the last read times to optimize it's access to the persistent store. It must notreturn DP documents that have not been modified since thelast read time specified.

If the client wants to retrieve DP document irrespectiveof the time it was last read, it should pass an emptyConfigTable in place of this parameter.
throws:
  com.sun.portal.community.mc.CommunityException - If there was a problem getting the DP documents for the user. A ConfigTable containing byte[] objects, the DP documents for the user.




getDPDocuments
public ConfigTable getDPDocuments(ConfigTable lastReadTimes, Set membership) throws CMCException(Code)



getMembership
public Set getMembership() throws CMCException(Code)
Get the community membership for the community user, for all possible roles.

Calling this method is equivalent to calling getMembership(null). This method simply combines the result of getMembershipByName() and getMembershipByRole(). A Set of ConfigKey objects, the community principal - role tuples indicating the user's role in their member communities.
throws:
  com.sun.portal.community.mc.CommunityException - If a problem occured getting the membership.
See Also:   CMCUser.getMembership(Set)
See Also:   CMCUser.getMembershipByName()
See Also:   CMCUser.getMembershipByRole()



getMembership
public Set getMembership(Set rolePrincipals) throws CMCException(Code)
Get the community user's membership for the given set of roles.

Calling this method with a null rolePrincipals parameter is equivalent to calling getMembership() (no argument).
Parameters:
  rolePrincipals - A Set of RolePrincipals, the roles to check for membership.
throws:
  com.sun.portal.community.mc.CommunityException - If there was a problem getting the membership communities for thecommunity user. A Set of ConfigKey objects,the community principal - role tuples indicating the user's role in their member communities.
See Also:   CMCUser.getMembership()
See Also:   CMCUser.getMembershipByName(Set)
See Also:   CMCUser.getMembershipByRole(Set)



getMembershipByName
public Set getMembershipByName() throws CMCException(Code)
Get the community membership for the community user, for all possible roles. This method only returns the user's user roles, not the user's community roles.

Calling this method is equivalent to calling getMembershipByName(null). A Set of ConfigKey objects, the community principal - role tuples indicating the user's role in their member communities.
throws:
  com.sun.portal.community.mc.CommunityException - If a problem occured getting the membership.
See Also:   CMCUser.getMembershipByName(Set)



getMembershipByName
public Set getMembershipByName(Set rolePrincipals) throws CMCException(Code)
Get the community user's membership for the given set of roles. This method only returns the user roles, and not community roles.

Calling this method with a null rolePrincipals parameter is equivalent to calling getMembershipByName() (no argument).
Parameters:
  rolePrincipals - A Set of RolePrincipals, the roles to check for membership.
throws:
  com.sun.portal.community.mc.CommunityException - If there was a problem getting the membership. A Set of ConfigKey objects,the community principal - role tuples indicating the user's role in their member communities.
See Also:   CMCUser.getMembershipByName()



getMembershipByRole
public Set getMembershipByRole() throws CMCException(Code)
Get the community membership for the community user, for all possible roles. This method only returns the user's community roles, not the user's user roles.

Calling this method is equivalent to calling getMembershipByRole(null). A Set of ConfigKey objects, the community principal - role tuples indicating the user's role in their member communities.
throws:
  com.sun.portal.community.mc.CommunityException - If a problem occured getting the membership.
See Also:   CMCUser.getMembershipByRole(Set)



getMembershipByRole
public Set getMembershipByRole(Set rolePrincipals) throws CMCException(Code)
Get the community user's membership for the given set of roles. This method only returns the community roles, and not user roles.

Calling this method with a null rolePrincipals parameter is equivalent to calling getMembershipByRole() (no argument).
Parameters:
  rolePrincipals - A Set of RolePrincipals, the roles to check for membership.
throws:
  com.sun.portal.community.mc.CommunityException - If there was a problem getting the membership. A Set of ConfigKey objects,the community principal - role tuples indicating the user's role in their member communities.
See Also:   CMCUser.getMembershipByName()



getRoleCreationTime
public long getRoleCreationTime(CMCPrincipal cp, CMCRolePrincipal rolePrincipal) throws CMCException(Code)
Returns the time when a user was assigned to a role in community.
throws:
  com.sun.portal.community.mc.CommunityException - if there was a problem determining if this setDPDocuments()operation is supported in this community. time in milliseconds when a user was assigned to a role in community. Returns -1 if the time is unknownuser is not in the role or time is unknown



getUserId
public String getUserId()(Code)
Get the user ID of the community user. A String, the community user ID.



hasRole
public boolean hasRole(CMCPrincipal communityPrincipal, CMCRolePrincipal rolePrincipal) throws CMCException(Code)
Does this community user have the given role in the given community?
Parameters:
  communityPrincipal - A CommunityPrincipal object, the community principal to check.
Parameters:
  rolePrincipal - A RolePrincipal object, the role to check.
throws:
  com.sun.portal.community.mc.CommunityException - If there was a problem checking if this community user has the role. A boolean indicating if this community user has the given role in the given community.



init
public void init(Properties properties, String userId) throws CMCException(Code)
Initialize this CommunityUser object.

CommunityUser objects must be initialized before they are used. This method is called either directly or indirectly by the CommunityFactory object before it returns CommunityUser instances. Clients should not call this method directly.

The properties required are community user implementation dependent.
Parameters:
  properties - Properties used by the community user implementation to initialize the object instance. The exact properties used are community user implementation dependent.
throws:
  com.sun.portal.community.mc.CommunityException - If there was a problem initializing this community user.
Parameters:
  userId - A String, the user ID of the community user.



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