|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CommunityContextControl
Control for contextual Community functionality-- functionality pertaining to the currently authenticated user and the currently viewed community. Because users may not be allowed to view disabled communities or view communities if their membership is not active, some operations are not possible to expose through this control as it only pertains to the currently viewed community and currently authenticated user.
CommunityManagerControl
,
CommunityMemberControl
,
CommunityInvitationControl
,
CommunityContext
,
CommunityUserContext
Method Summary | |
---|---|
void |
activateMember(com.bea.portal.tools.common.ResourceContext context)
Activates the CommunityMember associated with the currently authenticated user
globally for all Communities. |
void |
addMembershipCapability(com.bea.netuix.application.communities.MembershipCapability capability,
com.bea.portal.tools.common.ResourceContext context)
Adds a capability to the CommunityMembership
associated with the currently viewed desktop and authenticated user. |
com.bea.netuix.application.communities.CommunityMember |
createMember(boolean active,
boolean external,
com.bea.portal.tools.common.ResourceContext context)
Creates a new CommunityMember for the currently authenticated user. |
void |
deactivateCommunity(com.bea.portal.tools.common.ResourceContext context)
Sets the state of the community associated with the currently viewed desktop to INACTIVE. |
void |
disableMember(com.bea.portal.tools.common.ResourceContext context)
Disables the CommunityMember associated with the currently authenticated user
globally for all Communities. |
void |
disableMembership(com.bea.portal.tools.common.ResourceContext context)
Disables the CommunityMembership associated with the currently
viewed desktop and authenticated user. |
void |
disablePersonalPages(com.bea.portal.tools.common.ResourceContext context)
Disables members from adding personal pages to the community associated with the currently viewed desktop. |
void |
enablePersonalPages(com.bea.portal.tools.common.ResourceContext context)
Enables members to add personal pages to the community associated with the currently viewed desktop. |
com.bea.netuix.application.definition.CommunityDefinition |
getCommunity(com.bea.portal.tools.common.ResourceContext context)
Retrieves the CommunityDefinition for the community currently being viewed,
or null if no community is currently being viewed. |
com.bea.netuix.servlets.manager.communities.CommunityContext |
getCommunityContext(com.bea.netuix.application.identifier.CommunityDefinitionId communityId,
com.bea.portal.tools.common.ResourceContext context)
Returns the CommunityContext object associated with the specified
CommunityDefinitionId . |
com.bea.netuix.servlets.manager.communities.CommunityContext |
getCommunityContext(com.bea.netuix.application.identifier.CommunityURI communityUri,
com.bea.portal.tools.common.ResourceContext context)
Returns the CommunityContext object associated with the specified community. |
com.bea.netuix.servlets.manager.communities.CommunityContext |
getCommunityContext(com.bea.portal.tools.common.ResourceContext context)
Retrieves the "default" CommunityContext object if it is appropriate. |
com.bea.portlet.GenericURL |
getCommunityURL(HttpServletResponse response,
com.bea.netuix.application.identifier.CommunityURI community,
com.bea.portal.tools.common.ResourceContext context)
Returns a URL to the specified community, if the URL can be determined. |
com.bea.netuix.application.communities.CommunityMember |
getMember(com.bea.portal.tools.common.ResourceContext context)
Retrieves the CommunityMember object populated with information for the
community member currently logged in. |
com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.netuix.application.communities.CommunityMembership> |
getMemberCommunityMemberships(com.bea.netuix.application.communities.MemberMembershipCriteria criteria,
int pageSize,
com.bea.portal.tools.common.ResourceContext context)
Returns a paginated set of all CommunityMembership objects for a specified
user or the currently authenticated user that meet the specified criteria. |
com.bea.netuix.application.communities.MemberMembershipCriteria |
getMemberMembershipCriteria(com.bea.portal.tools.common.ResourceContext context)
Returns a MemberMembershipCriteria object for the currently authenticated user. |
com.bea.netuix.application.communities.CommunityMembership |
getMembership(com.bea.portal.tools.common.ResourceContext context)
Retrieves the CommunityMembership object assicated with this
CommunityContext object, if a membership exists. |
boolean |
isMembershipActive(com.bea.portal.tools.common.ResourceContext context)
Determines if the member and membership records associated with the authenticated principal (logged-in user) and the currently-viewed community are active or disabled. |
void |
removeMember(com.bea.portal.tools.common.ResourceContext context)
Removes the CommunityMember associated with the currently authenticated user
globally for all Communities. |
void |
removeMembership(com.bea.portal.tools.common.ResourceContext context)
Destroys the CommunityMembership associated with the
currently viewed desktop and authenticated user. |
void |
removeMembershipCapability(com.bea.netuix.application.communities.MembershipCapability capability,
com.bea.portal.tools.common.ResourceContext context)
Removes a capability from the CommunityMembership
associated with the currently viewed desktop and authenticated user. |
void |
setCommunityExpirationDate(Date expirationDate,
com.bea.portal.tools.common.ResourceContext context)
Sets the expiration date for the community associated with the currently viewed desktop. |
com.bea.netuix.application.definition.CommunityDefinition |
updateCommunity(com.bea.netuix.application.definition.CommunityDefinition communityDefinition,
com.bea.portal.tools.common.ResourceContext context)
Updates the CommunityDefinition for the community associated with the currently
viewed desktop. |
long |
updateLastAccessDate(com.bea.portal.tools.common.ResourceContext context)
Updates the last access date for the membership associated with the currently viewed desktop and authenticated user. |
Method Detail |
---|
void activateMember(com.bea.portal.tools.common.ResourceContext context) throws com.bea.netuix.application.exception.ObjectNotFoundException, com.bea.portal.tools.common.exceptions.ToolsException
CommunityMember
associated with the currently authenticated user
globally for all Communities.
context
- the resource context
com.bea.netuix.application.exception.ObjectNotFoundException
- if no member record exists for the
currently-logged-in user or if no user is currently logged in.
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.communities.CommunityMember createMember(boolean active, boolean external, com.bea.portal.tools.common.ResourceContext context) throws com.bea.portal.tools.common.exceptions.ToolsException, com.bea.netuix.application.exception.DuplicateObjectException, com.bea.netuix.application.exception.NotEntitledException
CommunityMember
for the currently authenticated user.
active
- true
if the CommunityMember
should be
created with active status.external
- the external
flag for the new CommunityMember
,
which may be useful for tracking purposes in some
situations but is not used in the framework.context
- the resource context
CommunityMember
object
com.bea.netuix.application.exception.DuplicateObjectException
- if a CommunityMember
already exists
for the currently-logged-in user.
com.bea.netuix.application.exception.NotEntitledException
- if no user is currently logged in.
com.bea.portal.tools.common.exceptions.ToolsException
void disableMember(com.bea.portal.tools.common.ResourceContext context) throws com.bea.netuix.application.exception.ObjectNotFoundException, com.bea.portal.tools.common.exceptions.ToolsException
CommunityMember
associated with the currently authenticated user
globally for all Communities.
context
- the resource context
com.bea.netuix.application.exception.ObjectNotFoundException
- if no member record exists for the
currently-logged-in user or if no user is currently logged in.
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.communities.CommunityMember getMember(com.bea.portal.tools.common.ResourceContext context)
CommunityMember
object populated with information for the
community member currently logged in. If there is no WLS user currently
logged in, or if the user is not a community member, null is returned.
context
- the resource context
CommunityMember
object for the currently-logged-in WLS user,
or null if the user is not a community member or if no user is logged in.com.bea.netuix.application.communities.MemberMembershipCriteria getMemberMembershipCriteria(com.bea.portal.tools.common.ResourceContext context) throws com.bea.netuix.application.exception.NotEntitledException
getMemberCommunityMemberships()
method.
context
- the resource context
com.bea.netuix.application.exception.NotEntitledException
- if no user is logged in.MemberMembershipCriteria
com.bea.p13n.pagination.SortableFilterablePagedResult<com.bea.netuix.application.communities.CommunityMembership> getMemberCommunityMemberships(com.bea.netuix.application.communities.MemberMembershipCriteria criteria, int pageSize, com.bea.portal.tools.common.ResourceContext context) throws com.bea.portal.tools.common.exceptions.ToolsException, com.bea.netuix.application.exception.NotEntitledException
CommunityMembership
objects for a specified
user or the currently authenticated user that meet the specified criteria.
If the returned SortableFilterablePagedResult is re-filtered using the reFilter()
method, the filter specified is used in addition to the original filter criteria
specified in the MemberMembershipCriteria object. If the filter criteria
specified in the reFilter() method conflicts with a criteria specified in the original
MemberMembershipCriteria object, the newly specified filter criteria is used in
place of the original MemberMembershipCriteria for that field only; all other
field criteria specified in the MemberMembershipCriteria object will still be
used as filter criteria.
criteria
- the criteria CommunityMemberships must match to be returned.
If null
, a MemberMembershipCriteria object is created
specifying the currently authenticated user. Also see the
getMemberMembershipCriteria()
method to get a
MemberMembershipCriteria object for the currently authenticated user.pageSize
- the number of membership objects to return per result page.context
- the resource context
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.NotEntitledException
- if no user is logged in.MemberMembershipCriteria
void removeMember(com.bea.portal.tools.common.ResourceContext context) throws com.bea.netuix.application.exception.ObjectNotFoundException, com.bea.portal.tools.common.exceptions.ToolsException
CommunityMember
associated with the currently authenticated user
globally for all Communities.
context
- the resource context
com.bea.netuix.application.exception.ObjectNotFoundException
- if no member record exists for the
currently-logged-in user or if no user is currently logged in.
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.servlets.manager.communities.CommunityContext getCommunityContext(com.bea.portal.tools.common.ResourceContext context)
CommunityContext
object if it is appropriate.
This is the CommunityContext
appropriate for the Desktop
viewed by the Request associated with this CommunityUserContext
.
context
- the resource context
CommunityContext
object associated with the request, or null
if the desktop
associated with the request is not a community desktop.com.bea.netuix.servlets.manager.communities.CommunityContext getCommunityContext(com.bea.netuix.application.identifier.CommunityURI communityUri, com.bea.portal.tools.common.ResourceContext context)
CommunityContext
object associated with the specified community.
communityUri
- the URI for the community.context
- the resource context
CommunityContext
object, or null if no
community with the specified URI exists.
com.bea.netuix.servlets.manager.communities.CommunityContext getCommunityContext(com.bea.netuix.application.identifier.CommunityDefinitionId communityId, com.bea.portal.tools.common.ResourceContext context)
CommunityContext
object associated with the specified
CommunityDefinitionId
.
communityId
- the community ID.context
- the resource context
CommunityContext
object.com.bea.portlet.GenericURL getCommunityURL(HttpServletResponse response, com.bea.netuix.application.identifier.CommunityURI community, com.bea.portal.tools.common.ResourceContext context)
null
will be returned.
response
- the response object.community
- the community to get a URL to.context
- the resource context
null
will be returned.boolean isMembershipActive(com.bea.portal.tools.common.ResourceContext context) throws IllegalStateException
context
- the resource context
true
if both the CommunityMember
and CommunityMembership
associated with the currently authenticated user and viewed community are active;
false
if the member
or membership record does not exist or are disabled.
IllegalStateException
- if the currently-viewed desktop is not a community.com.bea.netuix.application.definition.CommunityDefinition getCommunity(com.bea.portal.tools.common.ResourceContext context)
CommunityDefinition
for the community currently being viewed,
or null
if no community is currently being viewed.
context
- the resource context
CommunityDefinition
object for the community associated with this
request, or null
if no community is associated with the request.com.bea.netuix.application.communities.CommunityMembership getMembership(com.bea.portal.tools.common.ResourceContext context)
CommunityMembership
object assicated with this
CommunityContext
object, if a membership exists.
context
- the resource context
CommunityMembership
object for the currently-logged-in user
for the community associated with this CommunityContext
object,
or null if no such membership exists or if the currently viewed desktop is
not a community.com.bea.netuix.application.definition.CommunityDefinition updateCommunity(com.bea.netuix.application.definition.CommunityDefinition communityDefinition, com.bea.portal.tools.common.ResourceContext context) throws com.bea.netuix.application.exception.ObjectNotFoundException, com.bea.netuix.application.exception.NotEntitledException, com.bea.netuix.application.exception.IllegalOperationException, com.bea.netuix.application.exception.ObjectInUseException, com.bea.portal.tools.common.exceptions.ToolsException, IllegalStateException
CommunityDefinition
for the community associated with the currently
viewed desktop.
communityDefinition
- community definition with updated
attributescontext
- the resource context
CommunityDefinition
com.bea.netuix.application.exception.ObjectNotFoundException
- if community to be updated does not exist
com.bea.netuix.application.exception.NotEntitledException
- if current user does not have permission
to update this community
com.bea.netuix.application.exception.IllegalOperationException
- if part of or all of the update is illegal
based on the current state of the community
for e.g. if the update tries to set expirationDate on
or activate a community that is marked as
a template
com.bea.netuix.application.exception.ObjectInUseException
- if the update tries to point the community
to a desktop that is already in use by another
community
com.bea.portal.tools.common.exceptions.ToolsException
IllegalStateException
- if the currently-viewed desktop is not a community.void deactivateCommunity(com.bea.portal.tools.common.ResourceContext context) throws IllegalArgumentException, com.bea.netuix.application.exception.ObjectNotFoundException, com.bea.netuix.application.exception.NotEntitledException, com.bea.netuix.application.communities.exception.CommunityCallbackException, com.bea.portal.tools.common.exceptions.ToolsException, IllegalStateException
context
- the resource context
com.bea.netuix.application.exception.ObjectNotFoundException
- if community to be deactivated does not
exist
com.bea.netuix.application.exception.NotEntitledException
- if current user does not have permission
to deactivate this community
com.bea.netuix.application.communities.exception.CommunityCallbackException
- if an error occurs when making a
community callback
com.bea.portal.tools.common.exceptions.ToolsException
IllegalStateException
- if the currently-viewed desktop is not a community.
IllegalArgumentException
void setCommunityExpirationDate(Date expirationDate, com.bea.portal.tools.common.ResourceContext context) throws IllegalArgumentException, com.bea.netuix.application.exception.ObjectNotFoundException, com.bea.netuix.application.exception.NotEntitledException, com.bea.netuix.application.exception.IllegalOperationException, com.bea.portal.tools.common.exceptions.ToolsException, IllegalStateException
expirationDate
- The new expiration date.context
- the resource context
IllegalArgumentException
- If the expirationDate
is before current
date
com.bea.netuix.application.exception.ObjectNotFoundException
- if specified community does not exist
com.bea.netuix.application.exception.NotEntitledException
- if current user does not have permission
to set the expirationDate for this community
com.bea.netuix.application.exception.IllegalOperationException
- if this community is a template
com.bea.portal.tools.common.exceptions.ToolsException
IllegalStateException
- if the currently-viewed desktop is not a community.void enablePersonalPages(com.bea.portal.tools.common.ResourceContext context) throws com.bea.netuix.application.exception.ObjectNotFoundException, com.bea.netuix.application.exception.NotEntitledException, com.bea.portal.tools.common.exceptions.ToolsException, IllegalStateException
context
- the resource context
com.bea.netuix.application.exception.ObjectNotFoundException
- if specified community does not exist
com.bea.netuix.application.exception.NotEntitledException
- if current user does not have permission
to perform this operation
com.bea.portal.tools.common.exceptions.ToolsException
IllegalStateException
- if the currently-viewed desktop is not a community.void disablePersonalPages(com.bea.portal.tools.common.ResourceContext context) throws com.bea.netuix.application.exception.ObjectNotFoundException, com.bea.netuix.application.exception.NotEntitledException, com.bea.portal.tools.common.exceptions.ToolsException, IllegalStateException
context
- the resource context
com.bea.netuix.application.exception.ObjectNotFoundException
- if specified community does not exist
com.bea.netuix.application.exception.NotEntitledException
- if current user does not have permission
to perform this operation
com.bea.portal.tools.common.exceptions.ToolsException
IllegalStateException
- if the currently-viewed desktop is not a community.void removeMembership(com.bea.portal.tools.common.ResourceContext context) throws com.bea.portal.tools.common.exceptions.ToolsException, com.bea.netuix.application.exception.ObjectNotFoundException, IllegalStateException
CommunityMembership
associated with the
currently viewed desktop and authenticated user.
context
- the resource context
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.ObjectNotFoundException
- if there is no CommunityMembership
associated
with this community for the authenticated user.
IllegalStateException
- if the currently-viewed desktop is not a community.void disableMembership(com.bea.portal.tools.common.ResourceContext context) throws com.bea.portal.tools.common.exceptions.ToolsException, com.bea.netuix.application.exception.ObjectNotFoundException, IllegalStateException
CommunityMembership
associated with the currently
viewed desktop and authenticated user.
context
- the resource context
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.ObjectNotFoundException
- if no membership exists for the currently authenticated
user for this community.
IllegalStateException
- if the currently-viewed desktop is not a community.long updateLastAccessDate(com.bea.portal.tools.common.ResourceContext context) throws com.bea.netuix.application.exception.ObjectNotFoundException, com.bea.portal.tools.common.exceptions.ToolsException, IllegalStateException
context
- the resource context
com.bea.netuix.application.exception.ObjectNotFoundException
- if no membership is associated with the
currently authenticated user.
com.bea.portal.tools.common.exceptions.ToolsException
IllegalStateException
- if the currently-viewed desktop is not a community.void addMembershipCapability(com.bea.netuix.application.communities.MembershipCapability capability, com.bea.portal.tools.common.ResourceContext context) throws com.bea.portal.tools.common.exceptions.ToolsException, com.bea.netuix.application.exception.ObjectNotFoundException, IllegalArgumentException, IllegalStateException
CommunityMembership
associated with the currently viewed desktop and authenticated user.
capability
- the capability to add to the membershipcontext
- the resource context
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.ObjectNotFoundException
- if there is no CommunityMembership
associated
with the authenticated user.
IllegalArgumentException
- if the capability specified is not valid.
IllegalStateException
- if the currently-viewed desktop is not a community.void removeMembershipCapability(com.bea.netuix.application.communities.MembershipCapability capability, com.bea.portal.tools.common.ResourceContext context) throws com.bea.portal.tools.common.exceptions.ToolsException, com.bea.netuix.application.exception.ObjectNotFoundException, IllegalArgumentException, IllegalStateException
CommunityMembership
associated with the currently viewed desktop and authenticated user.
capability
- the capability to remove from the membershipcontext
- the resource context
com.bea.portal.tools.common.exceptions.ToolsException
com.bea.netuix.application.exception.ObjectNotFoundException
- if there is no CommunityMembership
associated
with the authenticated user.
IllegalArgumentException
- if the capability specified is not valid.
IllegalStateException
- if the currently-viewed desktop is not a community.
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |