com.plumtree.server
Interface IPTCommunityInfo


public interface IPTCommunityInfo

Author:
Robert Zhang, Michael DeCourcey

Method Summary
 int GetAccessLevel()
          Get the ACL to this Community for the current user.
 int GetFooterID()
          Get the footer ID assigned to this community from the cache.
 int GetHeaderID()
          Get the header ID assigned to this community from the cache.
 java.lang.String GetName()
          Gets the name of this Community
 int GetObjectID()
          Gets the Object ID of this Community
 IPTPageInfo GetPage(int nPageID)
          Gets the cached IPTPageInfo object for the specified page
 IPTQueryResult GetPages()
          Gets specific or all pages inside this community from the cache.
 IPTQueryResult GetParentCommunity()
          Gets the parent community of this community from the cache.
 IPTQueryResult GetPeerCommunities()
          Gets this Community's peer communities, i.e.
 java.lang.String GetPrimaryName()
          Gets the primary name of this Community
 boolean GetSiteMapDisabled()
          Checks if the community sitemap is disabled for this community from the cache.
 int GetSiteMapRootID()
          Gets the ID root sitemap folder for this community from the cache.
 java.lang.String GetStyleSheet()
          Gets the Stylesheet, stored as an administrative portlet preference on the header portlet assigned to this SubPortal (if any).
 IPTQueryResult GetSubcommunities()
          Gets this Community's subcommunities, i.e.
 java.lang.Object[][] LookupPreference(java.lang.String _strPreferenceName, int _nPortletID, PT_PREF_TYPES _prefType)
          This method looks up a preference.
 java.lang.Object[][] LookupPreferences(java.lang.String[] _astrPreferenceNames, int _nPortletID, PT_PREF_TYPES _prefType)
          This method looks up preferences.
 IPTMyPortal OpenPage(int nPageID)
          Deprecated. Method OpenPage is deprecated. Use GetPage instead, which returns the cached version of the Page, IPTPageInfo.
 IPTMyPortalGadgetContent QueryHeaderAndFooter(java.lang.Object appDateStateObj, java.lang.String strUserInterfaceID, int nGadgetMode, boolean bReturnAllGadgets)
          Deprecated. Use IPTPageInfo.QueryPortletContent instead. If you are not on a Community Page or My Page, then use the IPTPageInfo for the Global Page: PT_INTRINSICS.PT_PAGE_GLOBAL.
 IPTQueryResult QueryPages()
          Deprecated. Use GetPages instead. QueryPages uses more memory than than GetPages.
 IPTQueryResult QueryPrefs()
          Gets Community preference and Community gadget preferences from the cache.
 

Method Detail

QueryPages

IPTQueryResult QueryPages()
Deprecated. Use GetPages instead. QueryPages uses more memory than than GetPages.

Gets specific or all pages inside this community from the cache.

Returns:
QueryResult of the pages in this community with standard properties plus PT_PROPIDS.PT_PROPID_OBJECTID, PT_PROPIDS.PT_PROPID_PAGES_TYPE, PT_PROPIDS.PT_PROPID_PAGES_PAGETEMPLATEID, PT_PROPIDS.PT_PROPID_PAGES_NOTDELETABLE, PT_PROPIDS.PT_PROPID_PAGES_TOPICPOS Querying for all pages returns them in their assigned order (by TOPICPOS).

GetPages

IPTQueryResult GetPages()
Gets specific or all pages inside this community from the cache.

Returns:
QueryResult of the pages in this community with the properties PT_PROPIDS.PT_PROPID_OBJECTID, PT_PROPIDS.PT_PROPID_NAME (localized), PT_PROPIDS.PT_PROPID_DESCRIPTION (localized), PT_PROPIDS.PT_PROPID_PAGES_TOPICPOS. Querying for all pages returns them in their assigned order (by TOPICPOS). To get the other page properties, use the page's object id to get the IPTPageInfo object from the Page Cache by calling IPTPageManager.CachedOpenPageInfo(nPageID, bCheckLastModified).

QueryPrefs

IPTQueryResult QueryPrefs()
Gets Community preference and Community gadget preferences from the cache.

Returns:
IPTQueryResult QueryResult with preferences containing the PT_PROPID_PREFS_GADGETID, PT_PROPID_PREFS_PREFNAME, PT_PROPID_PREFS_PREFVALUETYPE, PT_PROPID_PREFS_PREFVALUE and PT_PROPID_PREFS_PAGENUMBER columns.
See Also:
PT_PROPIDS

OpenPage

IPTMyPortal OpenPage(int nPageID)
Deprecated. Method OpenPage is deprecated. Use GetPage instead, which returns the cached version of the Page, IPTPageInfo.

Gets the PTMyPortal object for the specified page

Parameters:
nPageID - ID of Page to open
Returns:
IPTMyPortal for the specfied page
Throws:
java.lang.Exception - with PT_RESULTCODES.PT_E_INSUFFICIENTROLEACCESS errorcode if the user has insufficient access to the community

GetPage

IPTPageInfo GetPage(int nPageID)
Gets the cached IPTPageInfo object for the specified page

Parameters:
nPageID - ID of Page to get from the cache
Returns:
IPTPageInfo for the specfied page
Throws:
java.lang.Exception - with PT_RESULTCODES.PT_E_INSUFFICIENTROLEACCESS errorcode if the user has insufficient access to the community, or the page

GetParentCommunity

IPTQueryResult GetParentCommunity()
Gets the parent community of this community from the cache.

Returns:
IPTQueryResult

GetPeerCommunities

IPTQueryResult GetPeerCommunities()
Gets this Community's peer communities, i.e. other communities in the same level of the admin folder hierarchy, from the cache.

Returns:
IPTQueryResult

GetSubcommunities

IPTQueryResult GetSubcommunities()
Gets this Community's subcommunities, i.e. other communities in this community's folder, from the cache.

Returns:
IPTQueryResult

GetName

java.lang.String GetName()
Gets the name of this Community

Returns:
String Name of current Community

GetObjectID

int GetObjectID()
Gets the Object ID of this Community

Returns:
Object ID of this Community

GetHeaderID

int GetHeaderID()
Get the header ID assigned to this community from the cache.

Returns:
Header ID assigned to this community

GetFooterID

int GetFooterID()
Get the footer ID assigned to this community from the cache.

Returns:
Footer ID assigned to this community

GetAccessLevel

int GetAccessLevel()
Get the ACL to this Community for the current user.

Returns:
An ACL defined in PT_ACCESS_LEVELS
See Also:
PT_ACCESS_LEVELS

GetSiteMapDisabled

boolean GetSiteMapDisabled()
Checks if the community sitemap is disabled for this community from the cache.

Returns:
true if sitemap is disabled, false otherwise

GetStyleSheet

java.lang.String GetStyleSheet()
Gets the Stylesheet, stored as an administrative portlet preference on the header portlet assigned to this SubPortal (if any).

Returns:
String Stylesheet file name

GetSiteMapRootID

int GetSiteMapRootID()
Gets the ID root sitemap folder for this community from the cache.

Returns:
ID of Root sitemap folder object

QueryHeaderAndFooter

IPTMyPortalGadgetContent QueryHeaderAndFooter(java.lang.Object appDateStateObj,
                                              java.lang.String strUserInterfaceID,
                                              int nGadgetMode,
                                              boolean bReturnAllGadgets)
Deprecated. Use IPTPageInfo.QueryPortletContent instead. If you are not on a Community Page or My Page, then use the IPTPageInfo for the Global Page: PT_INTRINSICS.PT_PAGE_GLOBAL.

Parameters:
appDateStateObj -
strUserInterfaceID -
nGadgetMode -
bReturnAllGadgets -
Returns:
IPTMyPortalGadgetContent

LookupPreference

java.lang.Object[][] LookupPreference(java.lang.String _strPreferenceName,
                                      int _nPortletID,
                                      PT_PREF_TYPES _prefType)
This method looks up a preference.

Parameters:
_strPreferenceName - is the name of the preference to look up.
_nPortletID - is the Portlet the preference is set on. Use 0 if the preference is not a portlet preference.
_prefType - is the type of the preference. Use PT_PREF_TYPE.PT_PREFTYPE_CURRENT_USER if the preference is a preference for just this user. Use PT_PREF_TYPE.PT_PREFTYPE_ALL_USERS if the preference is a preference for all users.
Returns:
An array of Name-Value Pairs of the preferences.

LookupPreferences

java.lang.Object[][] LookupPreferences(java.lang.String[] _astrPreferenceNames,
                                       int _nPortletID,
                                       PT_PREF_TYPES _prefType)
This method looks up preferences.

Parameters:
_astrPreferenceNames - is an array of the names of preferences to look up.
_nPortletID - is the Portlet the preference is set on. Use 0 if the preference is not a portlet preference.
_prefType - is the type of the preference. Use PT_PREF_TYPE.PT_PREFTYPE_CURRENT_USER if the preference is a preference for just this user. Use PT_PREF_TYPE.PT_PREFTYPE_ALL_USERS if the preference is a preference for all users.
Returns:
An array of Name-Value Pairs of the preferences.

GetPrimaryName

java.lang.String GetPrimaryName()
Gets the primary name of this Community

Returns:
String Primary Name of current Community