com.plumtree.server
Interface IPTSessionInfo


public interface IPTSessionInfo

This object caches the user specific items on the IPTSession (specifically, on its InternalSession). The methods on this interface access cached information that might otherwise be expensive to query from the database every time.


Method Summary
 void AddPersonalSetting(java.lang.String strPersonalSetting, double dValue)
          Adds a preference for the current user.
 void AddPersonalSetting(java.lang.String strPersonalSetting, float fValue)
          Adds a preference for the current user.
 void AddPersonalSetting(java.lang.String strPersonalSetting, int iValue)
          Adds a preference for the current user.
 void AddPersonalSetting(java.lang.String strPersonalSetting, java.lang.Object oValue)
          Adds a preference for the current user.
 void AddPersonalSetting(java.lang.String strPersonalSetting, java.lang.String strValue)
          Adds a preference for the current user.
 void AddPersonalSetting(java.lang.String strPersonalSetting, com.plumtree.openfoundation.util.XPDateTime ptdtValue)
          Adds a preference for the current user.
 boolean CheckCurrentUserIsAdmin()
          Checks whether the current user is a member of the built-in Administrators group.
 boolean CheckForActivityRight(int iActivityID)
          Checks whether the current user has the specified activity right.
 boolean CheckForActivityRight(java.lang.String strActivityURI)
          Checks whether the current user has the specified activity right.
 int CheckGadgetAccess(int nGadgetID)
          Retrieves the current user's access level to the specified Gadget (Portlet).
 boolean CheckPropertySearchRight(int nPropertyID)
          Checks whether the current user has rights to search the indicated property.
 int CheckWebServiceAccess(int nWebServiceID)
          Retrieves the current user's access level to the specified Web Service.
 void ClearCurrentActivityRightsCache()
          Purges the cache specifying the current user's activity rights.
 void ClearCurrentCommunityMembershipCache()
          Purges the cache containing current user's community memberships.
 void ClearCurrentMyPagesCache()
          Purges the cache of the current user's MyPages.
 void ClearSearchablePropertyCache()
          Purges the cache of searchable properties for the current user.
 java.lang.String GetCurrentAuthUniqueName()
          Retrieves the current user's auth unique name.
 java.lang.Object GetCurrentCollabRoleMemberships()
          Retrieves the current user's Collab role memberships.
 IPTQueryResult GetCurrentCommunityMembership()
          Retrieves the current user's community memberships.
 IPTQueryResult GetCurrentMyPages()
          Retrieves the MyPages for the current user.
 int GetCurrentUserAdminFolderID()
          Retrieves the admin folder ID where the current user's User object resides.
 IPTQueryResult GetCurrentUserCachedPluggablePages()
          Retrieves a cached IPTQueryResult of web services visible to the current user that support one or more of the 3 types of pluggable pages (personal, community, or admin).
 IPTSubPortalInfo GetCurrentUserCachedSubPortalInfo()
          Retrieves the IPTSubPortalInfo for the current user.
 java.lang.Object GetCurrentUserGroupIDs()
          Retrieves the current user's group memberships as an array of group IDs.
 int GetCurrentUserID()
          Retrieves the current user's ID.
 java.lang.String GetCurrentUserLoginName()
          Retrieves the current user's login name.
 java.lang.String GetCurrentUserName()
          Retrieves the current user's display name.
 java.lang.Object[][] LookupPersonalSettings()
          Retrieves the preferences for the current user.
 IPTQueryResult QueryActivityRights()
          Retrieves the activity rights held by the current user.
 IPTMyPortalGadgetContent QueryHeaderAndFooter(java.lang.Object AppDataStateObject, java.lang.String strUserInterfaceID, int iMode, boolean bReturnAllGadgets)
          Queries for the header and footer for the current user.
 void RemovePersonalSetting(java.lang.String strPersonalSetting)
          Removes a preference for the current user.
 

Method Detail

GetCurrentUserID

public int GetCurrentUserID()
Retrieves the current user's ID.
Returns:
The user ID.

GetCurrentUserName

public java.lang.String GetCurrentUserName()
Retrieves the current user's display name.
Returns:
The display name.

GetCurrentUserGroupIDs

public java.lang.Object GetCurrentUserGroupIDs()
Retrieves the current user's group memberships as an array of group IDs.
Returns:
The current user's group memberships, as an int[].

GetCurrentCommunityMembership

public IPTQueryResult GetCurrentCommunityMembership()
Retrieves the current user's community memberships.
Returns:
An IPTQueryResult containing the community IDs and localized names of the current user's communities. These can be extracted from the IPTQueryResult using PT_PROPIDS.PT_PROPID_OBJECTID and PT_PROPIDS.PT_PROPID_NAME, respectively.

ClearCurrentCommunityMembershipCache

public void ClearCurrentCommunityMembershipCache()
Purges the cache containing current user's community memberships.

GetCurrentMyPages

public IPTQueryResult GetCurrentMyPages()
Retrieves the MyPages for the current user. Note that this is different from calling IPTSession.GetMyPages(), because this is a cached version.
Returns:
An IPTQueryResult containing page name, page ID, and page type of the current user's MyPages. These can be extracted from the IPTQueryResult using PT_PROPIDS.PT_PROPID_NAME, PT_PROPIDS.PT_PROPID_PAGES_PAGEID, and PT_PROPIDS.PT_PROPID_PAGES_TYPE, respectively.

ClearCurrentMyPagesCache

public void ClearCurrentMyPagesCache()
Purges the cache of the current user's MyPages.

CheckGadgetAccess

public int CheckGadgetAccess(int nGadgetID)
Retrieves the current user's access level to the specified Gadget (Portlet).
Parameters:
nGadgetID - - The ID of the gadget.
Returns:
A value from the PT_ACCESSLEVELS enumeration indicating the access level this user has on the gadget.

GetCurrentAuthUniqueName

public java.lang.String GetCurrentAuthUniqueName()
Retrieves the current user's auth unique name.
Returns:
The auth unique name.

LookupPersonalSettings

public java.lang.Object[][] LookupPersonalSettings()
Retrieves the preferences for the current user. This information is not cached, so a roundtrip to the database is always incurred.
Returns:
The preferences as a 2-D array of name-value pairs.

AddPersonalSetting

public void AddPersonalSetting(java.lang.String strPersonalSetting,
                               int iValue)
Adds a preference for the current user. This information is not cached, but rather is persisted immediately.
Parameters:
strPersonalSetting - - The name of the preference to set.
iValue - - The value to associated with the above preference.

AddPersonalSetting

public void AddPersonalSetting(java.lang.String strPersonalSetting,
                               java.lang.String strValue)
Adds a preference for the current user. This information is not cached, but rather is persisted immediately.
Parameters:
strPersonalSetting - - The name of the preference to set.
strValue - - The value to associated with the above preference.

AddPersonalSetting

public void AddPersonalSetting(java.lang.String strPersonalSetting,
                               com.plumtree.openfoundation.util.XPDateTime ptdtValue)
Adds a preference for the current user. This information is not cached, but rather is persisted immediately.
Parameters:
strPersonalSetting - - The name of the preference to set.
ptdtValue - - The value to associated with the above preference.

AddPersonalSetting

public void AddPersonalSetting(java.lang.String strPersonalSetting,
                               float fValue)
Adds a preference for the current user. This information is not cached, but rather is persisted immediately.
Parameters:
strPersonalSetting - - The name of the preference to set.
fValue - - The value to associated with the above preference.

AddPersonalSetting

public void AddPersonalSetting(java.lang.String strPersonalSetting,
                               double dValue)
Adds a preference for the current user. This information is not cached, but rather is persisted immediately.
Parameters:
strPersonalSetting - - The name of the preference to set.
dValue - - The value to associated with the above preference.

AddPersonalSetting

public void AddPersonalSetting(java.lang.String strPersonalSetting,
                               java.lang.Object oValue)
Adds a preference for the current user. This information is not cached, but rather is persisted immediately.
Parameters:
strPersonalSetting - - The name of the preference to set.
oValue - - The value to associated with the above preference.

RemovePersonalSetting

public void RemovePersonalSetting(java.lang.String strPersonalSetting)
Removes a preference for the current user. This information is not cached, but rather is persisted immediately.

QueryActivityRights

public IPTQueryResult QueryActivityRights()
Retrieves the activity rights held by the current user. This information is not cached, and incurs a database roundtrip every time it is called.
Returns:
IPTQueryResult containing the activity rights held by the current user. The IPTQueryResult contains name, description, objectid, and URI information that can be extracted using PT_PROPIDS.PT_PROPID_NAME, PT_PROPIDS.PT_PROPID_DESCRIPTION, PT_PROPIDS.PT_PROPID_OBJECTID, and PT_PROPIDS.PT_PROPID_URI, respectively.

CheckForActivityRight

public boolean CheckForActivityRight(int iActivityID)
Checks whether the current user has the specified activity right.
Parameters:
iActivityID - - The ID of the activity right to check for.
Returns:
true if the current user has the specified right, false otherwise.

CheckForActivityRight

public boolean CheckForActivityRight(java.lang.String strActivityURI)
Checks whether the current user has the specified activity right.
Parameters:
strActivityURI - - The URI of the activity right to check for.
Returns:
true if the current user has the specified right, false otherwise.

QueryHeaderAndFooter

public IPTMyPortalGadgetContent QueryHeaderAndFooter(java.lang.Object AppDataStateObject,
                                                     java.lang.String strUserInterfaceID,
                                                     int iMode,
                                                     boolean bReturnAllGadgets)
Queries for the header and footer for the current user.
Parameters:
AppDataStateObject - - The AppData passed in by the UI.
strUserInterfaceID - - The User Interface identifier, can pass null for default user interface.
iMode - - The mode, from the PT_GADGET_MODES enumeration.
bReturnAllGadgets - - True to return all gadgets, false to return only header and footer.
Returns:
IPTMyPortalGadgetContent describing the portlets on the user's MyPage.

GetCurrentUserCachedSubPortalInfo

public IPTSubPortalInfo GetCurrentUserCachedSubPortalInfo()
Retrieves the IPTSubPortalInfo for the current user.
Returns:
IPTSubPortalInfo

GetCurrentUserLoginName

public java.lang.String GetCurrentUserLoginName()
Retrieves the current user's login name.
Returns:
The login name.

ClearCurrentActivityRightsCache

public void ClearCurrentActivityRightsCache()
Purges the cache specifying the current user's activity rights.

CheckWebServiceAccess

public int CheckWebServiceAccess(int nWebServiceID)
Retrieves the current user's access level to the specified Web Service.
Parameters:
nWebServiceID - - The ID of the Web Service to check.
Returns:
A value from the PT_ACCESSLEVELS enumeration indicating the access level this user has on the web service.

GetCurrentUserCachedPluggablePages

public IPTQueryResult GetCurrentUserCachedPluggablePages()
Retrieves a cached IPTQueryResult of web services visible to the current user that support one or more of the 3 types of pluggable pages (personal, community, or admin).
Returns:
IPTQueryResult

CheckPropertySearchRight

public boolean CheckPropertySearchRight(int nPropertyID)
Checks whether the current user has rights to search the indicated property. The check is performed against a cached set of properties that the user can search.
Parameters:
nPropertyID - - The ID of the property for which access is being checked.
Returns:
true if the current user can search the property, false otherwise.

ClearSearchablePropertyCache

public void ClearSearchablePropertyCache()
Purges the cache of searchable properties for the current user.

GetCurrentCollabRoleMemberships

public java.lang.Object GetCurrentCollabRoleMemberships()
Retrieves the current user's Collab role memberships.
Returns:
The user's Collab roles as an int[].

GetCurrentUserAdminFolderID

public int GetCurrentUserAdminFolderID()
Retrieves the admin folder ID where the current user's User object resides.
Returns:
The admin folder ID.

CheckCurrentUserIsAdmin

public boolean CheckCurrentUserIsAdmin()
Checks whether the current user is a member of the built-in Administrators group.
Returns:
true if the user is a member of the Administrators group, false otherwise.


Copyright © 2003 Plumtree Software Inc. All Rights Reserved.