com.plumtree.server.search.ptapps
Interface IPTSPortalCollection

All Superinterfaces:
IPTSPlumtreeCollection, IPTSSearchableCollection

public interface IPTSPortalCollection
extends IPTSPlumtreeCollection

Factory methods for fields defined by the Plumtree Corporate Portal, and queries that restrict to areas within the portal, such as folders.


Method Summary
 IPTSField AdminACL()
          Returns the IPTSField for portal objects' admin ACL.
 IPTSQuery AdminDirectory()
          Query that restricts to the portal's entire admin directory.
 IPTSQuery AdminDirectory(int folderID, boolean includeSubfolders, java.lang.String[] objTypes)
          Query that restricts to a subtree of the portal's admin directory.
 IPTSQuery AdminDirectory(java.lang.String objType)
          Query that restricts to the portal's entire admin directory.
 IPTSQuery AdminDirectory(java.lang.String[] objTypes)
          Query that restricts to the portal's entire admin directory.
 IPTSField AncestorFolderIDs()
          Returns the IPTSField for portal objects' ancestor folder IDs (all ancestors, not just immediate parents).
 IPTSField Categories()
          Returns the IPTSField for the search-devised categories.
 IPTSField ClassID()
          Returns the IPTSField for portal objects' class ID.
 java.lang.String classIdToObjectType(int classId)
          Helper method to map a portal Class ID value to the String object type codes used here.
 IPTSQuery Community(int communityID)
          Query that restricts to the set of things attached to a community.
 IPTSField CommunityLinks()
          Returns a string IPTSField containing the IDs of communities this item is linked to.
 IPTSField CrawlerTag()
          Returns a string IPTSField containing the crawler tag, if defined, for documents.
 IPTSQuery DocDirectory()
          Query that restricts to the portal's entire Knowledge Directory.
 IPTSQuery DocDirectory(int folderID, boolean includeSubfolders, java.lang.String[] objTypes)
          Query that restricts to a subtree of the portal's Knowledge Directory.
 IPTSQuery DocDirectory(java.lang.String objType)
          Query that restricts to the portal's entire Knowledge Directory.
 IPTSField DocumentTypeID()
          Returns an integer IPTSField containing the document type ID for knowledge directory documents.
 IPTSField DocUploadID()
          Returns a string IPTSField containing the "document upload ID" for certain knowledge directory documents.
 IPTSField DocUploadServer()
          Returns a string IPTSField containing the "document upload server" for certain knowledge directory documents.
 IPTSField EditACL()
          Returns the IPTSField for portal objects' edit ACL.
 IPTSField EmailAddress()
          Returns a string IPTSField containing the email address, if defined, for users.
 IPTSField FolderACL()
          Returns the IPTSField for the ACL on portal objects' parent folders.
 IPTSField FolderDepth()
          Returns an integer IPTSField corresponding to the depth of a folder in the knowledge directory hierarchy.
 IPTSField FolderPath()
          Returns the IPTSField for portal objects' folder path.
 IPTSField NameSortKey()
          Returns a IPTSField for a floating-point value based on the first few characters of document names.
 IPTSField ObjectID()
          Returns the IPTSField for portal objects' object ID.
 IPTSField ParentFolderIDs()
          Returns the IPTSField for portal objects' parent folder ID.
 IPTSField PortletAlignment()
          Returns the IPTSField for portlet alignment.
 IPTSField PortletType()
          Returns the IPTSField for portlet type.
 IPTSQuery portletTypes(int[] portletTypes, int[] portletAlignments, boolean nonCommunityFolderOnly, boolean nonTemplatingPortletsOnly)
          Special factory method to make a query that restricts to specific types of portlets, to support the old API's portlet search options.
 IPTSField PortletUserInterfaces()
          Returns the IPTSField for portlet user interfaces.
 IPTSField Property(int propertyID)
          Returns the IPTSFields corresponding to a portal property; looks up the property by the object ID of the Property object.
 IPTSField Property(java.lang.String propertyName)
          Returns the IPTSFields corresponding to a portal property; looks up the property by name.
 IPTSField ProviderClassUUID()
          Returns a string IPTSField containing the provider UUID for certain types of portal items.
 IPTSField ReadACL()
          Returns the IPTSField for portal objects' ACL.
 IPTSField SelectACL()
          Returns the IPTSField for portal objects' select ACL.
 IPTSQuery specificPortalItem(int classID, int objectID)
          Special factory method to make a query that matches one and only one portal item, identified by class ID and object ID.
 IPTSQuery userTypes(boolean wantRegularUsers, boolean wantGuestUsers)
          Special factory method to make a query that returns users of specific types.
 
Methods inherited from interface com.plumtree.server.search.ptapps.IPTSPlumtreeCollection
Application, CategorizableObjectType, Created, Description, Excerpt, IconURL, IconUUID, Language, LastModified, Name, ObjectType, TextContent, URL
 
Methods inherited from interface com.plumtree.server.search.IPTSSearchableCollection
IsBestBet, Rank, TextQueryDefault
 

Method Detail

Property

IPTSField Property(java.lang.String propertyName)
                   throws PTSInvalidSearchException
Returns the IPTSFields corresponding to a portal property; looks up the property by name. The property may be one of the intrinsic properties that is present when the portal is installed, or may be one that was created (or migrated in) afterwards.

Parameters:
propertyName - the name of the desired property (case sensitive).
Throws:
PTSInvalidSearchException - if the property does not exist, is not searchable by the current user, or if there is more than one property with the provided name

Property

IPTSField Property(int propertyID)
                   throws PTSInvalidSearchException
Returns the IPTSFields corresponding to a portal property; looks up the property by the object ID of the Property object. This may be one of the intrinsic properties that is present when the portal is installed (see the PT_PROPERTY_* values from PT_INTRINSICS, not the values from PT_PROPIDS), or may be a property that was created or migrated in later.

Parameters:
propertyID - object ID of the desired property.
Throws:
PTSInvalidSearchException - if the property does not exist or is not searchable by the current user

ObjectID

IPTSField ObjectID()
Returns the IPTSField for portal objects' object ID. Type int; searchable and retrievable.


ClassID

IPTSField ClassID()
Returns the IPTSField for portal objects' class ID. Type String; searchable and retrievable.


ReadACL

IPTSField ReadACL()
Returns the IPTSField for portal objects' ACL. Type String; retrievable but not searchable. Tokens in this String are whitespace-separated user IDs (prefixed with 'u') and group IDs (no prefix) of users or groups that can read the item.


FolderACL

IPTSField FolderACL()
Returns the IPTSField for the ACL on portal objects' parent folders. Type String; retrievable but not searchable. Tokens in this String are whitespace-separated user IDs (prefixed with 'u') and group IDs (no prefix) of users or groups that can see the item's folder.


SelectACL

IPTSField SelectACL()
Returns the IPTSField for portal objects' select ACL. Type String; retrievable but not searchable. Tokens in this String are whitespace-separated user IDs (prefixed with 'u') and group IDs (no prefix) of users or groups that can select the item.


EditACL

IPTSField EditACL()
Returns the IPTSField for portal objects' edit ACL. Type String; retrievable but not searchable. Tokens in this String are whitespace-separated user IDs (prefixed with 'u') and group IDs (no prefix) of users or groups that can edit the item.


AdminACL

IPTSField AdminACL()
Returns the IPTSField for portal objects' admin ACL. Type String; retrievable but not searchable. Tokens in this String are whitespace-separated user IDs (prefixed with 'u') and group IDs (no prefix) of users or groups that can administer the item.


ParentFolderIDs

IPTSField ParentFolderIDs()
Returns the IPTSField for portal objects' parent folder ID. Type String; retrievable but not searchable (use one of the IPTSQuery objects defined in this interface instead). Format is 'ddX' (where XXX is the folder ID) for document directory items, and 'odX' for admin directory items. Note that document directory items may have more than one immediate parent folder; in this case the IDs will be whitespace-separated.


AncestorFolderIDs

IPTSField AncestorFolderIDs()
Returns the IPTSField for portal objects' ancestor folder IDs (all ancestors, not just immediate parents). Type String; retrievable but not searchable (use one of the IPTSQuery objects defined in this interface instead). Format is 'ddX' (where XXX is the folder ID) for document directory items, and 'odX' for admin directory items. IDs are separated by whitespace.


FolderPath

IPTSField FolderPath()
Returns the IPTSField for portal objects' folder path. This is the full-text version containing folder names, not IDs. Type String; searchable and retrievable, and may be used for group-by (this is the field used for "group by folder" in the portal UI).


Categories

IPTSField Categories()
Returns the IPTSField for the search-devised categories. Categories are created when search applies clustering to results


FolderDepth

IPTSField FolderDepth()
Returns an integer IPTSField corresponding to the depth of a folder in the knowledge directory hierarchy. Defined only for document folder results. Searchable and retrievable.


CommunityLinks

IPTSField CommunityLinks()
Returns a string IPTSField containing the IDs of communities this item is linked to. Defined only for documents and document folders (in the community knowledge directory), users (in the community knowledge directory, not all users that are members of the community), portlets (used on a community page), and communities (related via a subcommunity relationship). Retrieveable but not searchable.. use the query returned by Community instead.


ProviderClassUUID

IPTSField ProviderClassUUID()
Returns a string IPTSField containing the provider UUID for certain types of portal items.


EmailAddress

IPTSField EmailAddress()
Returns a string IPTSField containing the email address, if defined, for users. Equivalent to property 11.


CrawlerTag

IPTSField CrawlerTag()
Returns a string IPTSField containing the crawler tag, if defined, for documents. Equivalent to property 9.


DocumentTypeID

IPTSField DocumentTypeID()
Returns an integer IPTSField containing the document type ID for knowledge directory documents.


DocUploadServer

IPTSField DocUploadServer()
Returns a string IPTSField containing the "document upload server" for certain knowledge directory documents. Equivalent to property 61.


DocUploadID

IPTSField DocUploadID()
Returns a string IPTSField containing the "document upload ID" for certain knowledge directory documents. Equivalent to property 62.


NameSortKey

IPTSField NameSortKey()
Returns a IPTSField for a floating-point value based on the first few characters of document names. Defined only for Knowledge Directory documents.

Plumtree Search does not support ordering by a String field, so you cannot sort by Name, for example. Ordering by this field instead will sometimes provide a "good enough" replacement for sorting by name.


PortletType

IPTSField PortletType()
Returns the IPTSField for portlet type. Defined only for Portlet results. Type String, searchable and retrievable, contains one of the values from PT_GADGET_TYPES.


PortletAlignment

IPTSField PortletAlignment()
Returns the IPTSField for portlet alignment. Defined only for Portlet results. Type String, searchable and retrievable, contains one of the values from PT_GADGET_ALIGNMENTS.


PortletUserInterfaces

IPTSField PortletUserInterfaces()
Returns the IPTSField for portlet user interfaces. Defined only for Portlet results. Type String, searchable and retrievable.


DocDirectory

IPTSQuery DocDirectory()
Query that restricts to the portal's entire Knowledge Directory. May be passed into IPTSQueryRequest.restrictTo, or used as a subquery of an IPTSBooleanQuery.


DocDirectory

IPTSQuery DocDirectory(java.lang.String objType)
Query that restricts to the portal's entire Knowledge Directory. May be passed into IPTSQueryRequest.restrictTo, or used as a subquery of an IPTSBooleanQuery.

Parameters:
objType - Type (PTSConstants.TYPE_KD_DOCUMENTS or PTSConstants.TYPE_KD_FOLDERS) to search for

DocDirectory

IPTSQuery DocDirectory(int folderID,
                       boolean includeSubfolders,
                       java.lang.String[] objTypes)
Query that restricts to a subtree of the portal's Knowledge Directory. May be passed into IPTSQueryRequest.restrictTo, or used as a subquery of an IPTSBooleanQuery.

Parameters:
folderID - ID of folder to be searched.
includeSubfolders - Whether to also search subfolders of folderID.
objTypes - Types (PTSConstants.TYPE_KD_DOCUMENTS and/or PTSConstants.TYPE_KD_FOLDERS) to search for

AdminDirectory

IPTSQuery AdminDirectory()
Query that restricts to the portal's entire admin directory. Any object type in the admin directory may be returned. May be passed into IPTSQueryRequest.restrictTo, or used as a subquery of an IPTSBooleanQuery.


AdminDirectory

IPTSQuery AdminDirectory(java.lang.String objType)
Query that restricts to the portal's entire admin directory. May be passed into IPTSQueryRequest.restrictTo, or used as a subquery of an IPTSBooleanQuery.

Parameters:
objType - A single object type to be returned from the query. Must be an object type from PTSConstants.TYPE_* that can be stored in the Admin Directory (any portal type other than KD_DOCUMENTS and KD_FOLDERS); if not an exception is thrown. If null, any type is returned.

AdminDirectory

IPTSQuery AdminDirectory(java.lang.String[] objTypes)
Query that restricts to the portal's entire admin directory. May be passed into IPTSQueryRequest.restrictTo, or used as a subquery of an IPTSBooleanQuery.

Parameters:
objTypes - Object types to be returned from the query. Must be object types from PTSConstants.TYPE_* that can be stored in the Admin Directory (any portal type other than KD_DOCUMENTS and KD_FOLDERS); if not an exception is thrown. If null, any type is returned. May not be an empty array.

AdminDirectory

IPTSQuery AdminDirectory(int folderID,
                         boolean includeSubfolders,
                         java.lang.String[] objTypes)
Query that restricts to a subtree of the portal's admin directory. May be passed into IPTSQueryRequest.restrictTo, or used as a subquery of an IPTSBooleanQuery.

Parameters:
folderID - ID of folder to be searched.
includeSubfolders - Whether to also search subfolders of folderID.
objTypes - Object types to be returned from the query. Must be object types from PTSConstants.TYPE_* that can be stored in the Admin Directory (any portal type other than KD_DOCUMENTS and KD_FOLDERS); if not an exception is thrown. If null, any type is returned. May not be an empty array.

Community

IPTSQuery Community(int communityID)
Query that restricts to the set of things attached to a community. (can include items linked from the Community Knowledge Directory, and portlets used in the community). May be passed into IPTSQueryRequest.restrictTo, or used as a subquery of an IPTSBooleanQuery. To restrict to particular object types, AND this query with a query returned by AdminDirectory(folderID, includeSubfolders, objTypes) or DocDirectory(folderID, includeSubfolders, objTypes).

Parameters:
communityID - ID of community to search

portletTypes

IPTSQuery portletTypes(int[] portletTypes,
                       int[] portletAlignments,
                       boolean nonCommunityFolderOnly,
                       boolean nonTemplatingPortletsOnly)
Special factory method to make a query that restricts to specific types of portlets, to support the old API's portlet search options. Used by the Add Portlets page.

Parameters:
portletTypes - values from PT_GADGET_TYPES; null to not constrain by type
portletAlignments - values from PT_GADGET_ALIGNMENTS; null to not constrain by alignment
nonCommunityFolderOnly - if true, returned portlets may not be in community folders
nonTemplatingPortletsOnly - if true, returned portlets may not be templating portlets

userTypes

IPTSQuery userTypes(boolean wantRegularUsers,
                    boolean wantGuestUsers)
Special factory method to make a query that returns users of specific types. At least one of wantRegularUsers and wantGuestUsers must be true.

Parameters:
wantRegularUsers - true if non-guest users should be returned by this query.
wantGuestUsers - true if guest users should be returned by this query.

specificPortalItem

IPTSQuery specificPortalItem(int classID,
                             int objectID)
Special factory method to make a query that matches one and only one portal item, identified by class ID and object ID. Note that user security still applies, so either 0 or 1 items will match this query.

Parameters:
classID - class id of the desired item.
objectID - object id of the desired item.

classIdToObjectType

java.lang.String classIdToObjectType(int classId)
Helper method to map a portal Class ID value to the String object type codes used here. Returns null if the class id is invalid or nonsearchable.



Copyright © 2008 Plumtree Software Inc. All Rights Reserved.