com.bea.apps.groupspace.search.savedsearch.controls
Class SavedSearchControlImpl

java.lang.Object
  extended by com.bea.apps.groupspace.controls.generic.ContentControlBaseImpl<T,Folder>
      extended by com.bea.apps.groupspace.controls.generic.GroupSpaceContentControlImpl<T>
          extended by com.bea.apps.groupspace.controls.generic.CM_ControlImpl<SavedSearchBean>
              extended by com.bea.apps.groupspace.search.savedsearch.controls.SavedSearchControlImpl
All Implemented Interfaces
CM_Control<SavedSearchBean>, ContentControlBase<SavedSearchBean,Folder>, GroupSpaceContentControl<SavedSearchBean>, SavedSearchControl, Serializable

public class SavedSearchControlImpl
extends CM_ControlImpl<SavedSearchBean>
implements SavedSearchControl, Serializable

See Also
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.bea.apps.groupspace.controls.generic.ContentControlBase
ContentControlBase.NodeSearchType, ContentControlBase.Params
 
Field Summary
 
Fields inherited from class com.bea.apps.groupspace.controls.generic.CM_ControlImpl
ccCmxControl, folderControl, topNode, topNodeName
 
Fields inherited from class com.bea.apps.groupspace.controls.generic.GroupSpaceContentControlImpl
ALL_TYPES, contentContext
 
Fields inherited from class com.bea.apps.groupspace.controls.generic.ContentControlBaseImpl
beanClass, contentFactory, DEFAULT_SEARCH_LOAD_SIZE, nodeManager, objectClassType, repoID, repoName, searchManager, typeManager
 
Constructor Summary
SavedSearchControlImpl()
           
 
Method Summary
 SavedSearchBean create(String title, String description, CommunityContent.Visibility visibility, String searchType, String resourceType, String allWords, String exactPhrase, String anyWords, String noneWords, String[] names, String[] values, ID parentId, ID[] relatedNodes, Set<CmxControl.PropertyPair> dynamicProps)
           
 SavedSearchBean createDefaultSearch(String title, String description, CommunityContent.Visibility visibility, String resourceType, String allWords, String exactPhrase, String anyWords, String noneWords, ID parentId, ID[] relatedNodes, Set<CmxControl.PropertyPair> dynamicProps)
           
protected  SavedSearchBean createObject(Node node)
          We're creating Links from a Node
 SavedSearchBean createPropertySearch(String title, String description, CommunityContent.Visibility visibility, String resourceType, String[] names, String[] values, ID parentId, ID[] relatedNodes, Set<CmxControl.PropertyPair> dynamicProps)
           
protected  StringBuffer createStringOfOr(String fieldToQuery, Object[] valuesToMatch)
           
 ObjectClass createType()
           
 SortableFilterablePagedResult<SavedSearchBean> findSavedSearch(String[] resourceTypes, CommunityContent.Visibility[] visibilities, SortCriteria[] sortCriteria)
           
protected  String getPersonalContentFolderNodePath()
           
protected  String[] getSearchPathsByVisibility(String expression, String communityPrivatePath, String personalPath)
           
 void onCreate()
          Put any other init params here.
 
Methods inherited from class com.bea.apps.groupspace.controls.generic.CM_ControlImpl
createFolder, getCommunityFolderNode, getDefaultFolder, getFolderByExpression, getPersonalContentFolder, getTopNode, getUserFolder
 
Methods inherited from class com.bea.apps.groupspace.controls.generic.GroupSpaceContentControlImpl
asSet, createFolder, findByDescription, findById, findByTitle, findContentById, findMany, getAll, getAllNodes, getCommunity, getCommunityAndPrivate, getCommunityFolder, getFolder, getImmediateChildrenAsPagedResult, getPersonal, getPrivate, getReferencingContent, getReferencingContent, getRelatedContent, move, promoteToCommunity, remove, removeAll, removeCommunityAndPrivate, removePersonal, removePrivate, update
 
Methods inherited from class com.bea.apps.groupspace.controls.generic.ContentControlBaseImpl
createObjectClass, createObjects, createObjects, findMany, findManyChildren, getAllChildren, getAllPropertyDefinitions, getDefaultStringValue, getImmediateChildren, getImmediateChildren, getObjectClass, getTopFolder, move, recurseRepository, remove, remove, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bea.apps.groupspace.controls.generic.CM_Control
getPersonalContentFolder
 
Methods inherited from interface com.bea.apps.groupspace.controls.generic.GroupSpaceContentControl
asSet, createFolder, createFolder, findByDescription, findByTitle, getCommunity, getCommunityAndPrivate, getCommunityFolder, getPersonal, getPrivate, getReferencingContent, getReferencingContent, getRelatedContent, promoteToCommunity, removeCommunityAndPrivate, removePersonal, removePrivate
 
Methods inherited from interface com.bea.apps.groupspace.controls.generic.ContentControlBase
createObjectClass, createObjects, createObjects, findById, findContentById, findMany, findMany, findManyChildren, getAllPropertyDefinitions, getDefaultStringValue, getFolder, getImmediateChildren, getImmediateChildren, getImmediateChildrenAsPagedResult, getObjectClass, getTopFolder, getTopNode, move, move, remove, remove, remove, removeAll, update, update
 

Constructor Detail

SavedSearchControlImpl

public SavedSearchControlImpl()
Method Detail

createDefaultSearch

public SavedSearchBean createDefaultSearch(String title,
                                           String description,
                                           CommunityContent.Visibility visibility,
                                           String resourceType,
                                           String allWords,
                                           String exactPhrase,
                                           String anyWords,
                                           String noneWords,
                                           ID parentId,
                                           ID[] relatedNodes,
                                           Set<CmxControl.PropertyPair> dynamicProps)
                                    throws NoSuchNodeException,
                                           RepositoryException,
                                           AuthorizationException
Specified by:
createDefaultSearch in interface SavedSearchControl
Throws
NoSuchNodeException
RepositoryException
AuthorizationException

createPropertySearch

public SavedSearchBean createPropertySearch(String title,
                                            String description,
                                            CommunityContent.Visibility visibility,
                                            String resourceType,
                                            String[] names,
                                            String[] values,
                                            ID parentId,
                                            ID[] relatedNodes,
                                            Set<CmxControl.PropertyPair> dynamicProps)
                                     throws NoSuchNodeException,
                                            RepositoryException,
                                            AuthorizationException
Specified by:
createPropertySearch in interface SavedSearchControl
Throws
NoSuchNodeException
RepositoryException
AuthorizationException

create

public SavedSearchBean create(String title,
                              String description,
                              CommunityContent.Visibility visibility,
                              String searchType,
                              String resourceType,
                              String allWords,
                              String exactPhrase,
                              String anyWords,
                              String noneWords,
                              String[] names,
                              String[] values,
                              ID parentId,
                              ID[] relatedNodes,
                              Set<CmxControl.PropertyPair> dynamicProps)
                       throws NoSuchNodeException,
                              RepositoryException,
                              AuthorizationException
Specified by:
create in interface SavedSearchControl
Throws
NoSuchNodeException
RepositoryException
AuthorizationException

createType

public ObjectClass createType()
                       throws NoSuchNodeException,
                              RepositoryException,
                              AuthorizationException
Specified by:
createType in class ContentControlBaseImpl<SavedSearchBean,Folder>
Throws
NoSuchNodeException
RepositoryException
AuthorizationException

findSavedSearch

public SortableFilterablePagedResult<SavedSearchBean> findSavedSearch(String[] resourceTypes,
                                                                      CommunityContent.Visibility[] visibilities,
                                                                      SortCriteria[] sortCriteria)
                                                               throws AuthorizationException,
                                                                      NoSuchNodeException,
                                                                      RepositoryException
Specified by:
findSavedSearch in interface SavedSearchControl
Parameters
resourceTypes - - finds SavedSearches with any of these types, null matches all
visibilities - - finds SavedSearches with any of these visibilities, null matches all
sortCriteria -
Returns
Throws
AuthorizationException
NoSuchNodeException
RepositoryException

createStringOfOr

protected StringBuffer createStringOfOr(String fieldToQuery,
                                        Object[] valuesToMatch)

getSearchPathsByVisibility

protected String[] getSearchPathsByVisibility(String expression,
                                              String communityPrivatePath,
                                              String personalPath)
                                       throws AuthorizationException,
                                              NoSuchNodeException,
                                              RepositoryException
Parameters
expression - - search expression for which search paths are being calculated
communityPrivatePath - - path to the node that acts as the parent for community & private data
personalPath - - path to the node that acts as the parent for personal data
Returns
Array of node paths - uses communityPrivatePath by default
Throws
AuthorizationException
NoSuchNodeException
RepositoryException

getPersonalContentFolderNodePath

protected String getPersonalContentFolderNodePath()
                                           throws AuthorizationException,
                                                  NoSuchNodeException,
                                                  RepositoryException
Throws
AuthorizationException
NoSuchNodeException
RepositoryException

createObject

protected SavedSearchBean createObject(Node node)
We're creating Links from a Node

Specified by:
createObject in class ContentControlBaseImpl<SavedSearchBean,Folder>

onCreate

public void onCreate()
              throws org.apache.beehive.controls.api.ControlException
Put any other init params here. Note they can go on the control interface annotations. See the CM_Control.java file for an example of declaring parameters, and the CM_ControlImpl.jcs file for accessing those parameters

Overrides:
onCreate in class CM_ControlImpl<SavedSearchBean>
Throws
org.apache.beehive.controls.api.ControlException


Copyright © 2006 BEA Systems, Inc. All Rights Reserved