com.plumtree.remote.portlet
Interface IPortletUser


public interface IPortletUser

IPortletUser represents the current user requesting the portlet. Generally, a portlet can obtain an IPortletUser from IPortletContext.getUser().

See Also:
IPortletContext.getUser

Method Summary
 java.util.Enumeration getActivityRights()
          Returns an enumeration of all the Activity Rights associated with the current user.
 CommunityAccessLevel getCurrentCommunityAccessLevel()
          Returns the level of access that the user has for the current Community.
 java.util.Enumeration getSettingsRights()
          Returns an enumeration of the types of SettingTypes that the current user can set in the current context.
 java.lang.String getUserCharacterSet()
          Returns the user's character set.
 int getUserID()
          Returns the portal User object ID for the current user.
 java.lang.String getUserName()
          Returns the portal user name for the current user.
 boolean hasActivityRight(java.lang.String activityRight)
          Returns a flag that indicates whether or not the current user has the specified Activity Right.
 boolean hasSettingsRight(SettingType settingType)
          Returns a flag that indicates whether or not the current user has the right to change the specified setting type.
 boolean isGuestUser()
          Returns whether the current user is a guest user.
 

Method Detail

getUserName

public java.lang.String getUserName()
Returns the portal user name for the current user.

Returns:
the portal user name for the current user
Throws:
NotGatewayedException - if the request is not gatewayed

getUserID

public int getUserID()
Returns the portal User object ID for the current user.

Returns:
the User object ID for the current user
Throws:
NotGatewayedException - if the request is not gatewayed

getUserCharacterSet

public java.lang.String getUserCharacterSet()
Returns the user's character set. This setting is configured by the user in the portal and used for localization.

Returns:
the current user's character set
Throws:
NotGatewayedException - if the request is not gatewayed

hasSettingsRight

public boolean hasSettingsRight(SettingType settingType)
Returns a flag that indicates whether or not the current user has the right to change the specified setting type.

Parameters:
settingType - the type of setting (Admin, Community, CommunityPortlet, Portlet, Session or User)
Throws:
NotGatewayedException - if the request is not gatewayed

getSettingsRights

public java.util.Enumeration getSettingsRights()
Returns an enumeration of the types of SettingTypes that the current user can set in the current context.

Returns:
an enumeration of SettingTypes
Throws:
NotGatewayedException - if the request is not gatewayed

hasActivityRight

public boolean hasActivityRight(java.lang.String activityRight)
Returns a flag that indicates whether or not the current user has the specified Activity Right. Note: If the portal administrator has not configured the portal to send the requested Activity Right to the portlet, this method will return false for all users.

Parameters:
activityRight - the Activity Right
Returns:
true if the user has the Activity Right and false otherwise
Throws:
NotGatewayedException - if the request is not gatewayed

getActivityRights

public java.util.Enumeration getActivityRights()
Returns an enumeration of all the Activity Rights associated with the current user. Note: Only Activity Rights that the administrator has configured the portal to send to the portlet will appear in this enumeration.

Returns:
an enumeration of the Activity Rights for the user

getCurrentCommunityAccessLevel

public CommunityAccessLevel getCurrentCommunityAccessLevel()
Returns the level of access that the user has for the current Community. The administrator must configure the portal to send the Community ACL to the portlet.

Returns:
the Community access level
Throws:
NotGatewayedException - if the request is not gatewayed
ProtocolNotSupportedException - if used with a version of the portal that does not support this feature
NotInCommunityException - if the portlet is not currently displayed in a Community page

isGuestUser

public boolean isGuestUser()
Returns whether the current user is a guest user.

Returns:
true if and only if the user is a guest
Throws:
NotGatewayedException - if the request is not gatewayed


For additional information on the Oracle® WebCenter Interaction Development Kit, including tutorials, blogs, code samples and more, see the Oracle Technology Network (http://www.oracle.com/technology/index.html).

Copyright ©2010 Oracle® Corporation. All Rights Reserved.