org.exoplatform.social.webui.space
Class UISpaceSearch

java.lang.Object
  extended by org.exoplatform.webui.core.UIComponent
      extended by org.exoplatform.webui.core.UIContainer
          extended by org.exoplatform.webui.form.UIForm
              extended by org.exoplatform.social.webui.space.UISpaceSearch

public class UISpaceSearch
extends org.exoplatform.webui.form.UIForm

Searches space by space name that input by user.
- Search action is listened and information for search space is processed.
- After spaces is requested is returned, the search process is completed, - Search event is broadcasted to the form that added search form as child.
Author : hanhvi hanhvq@gmail.com Oct 28, 2009


Nested Class Summary
static class UISpaceSearch.AddSpaceActionListener
          This action is triggered when user clicks on AddSpace

UIAddSpaceForm will be displayed in a popup window

static class UISpaceSearch.SearchActionListener
          Listens to search event is broadcasted from search form, then processes search condition and set search result to the result variable.
- Gets space name from request.
- Searches spaces that have name like input space name.
- Sets matched space into result list.
 
Nested classes/interfaces inherited from class org.exoplatform.webui.core.UIContainer
org.exoplatform.webui.core.UIContainer.SelectTabActionListener
 
Field Summary
static String DEFAULT_SPACE_NAME_SEARCH
          DEFAULT SPACE NAME SEARCH.
static String SEARCH
          SEARCH.
static String SPACE_SEARCH
          SPACE SEARCH.
 
Fields inherited from class org.exoplatform.webui.form.UIForm
ACTION, SUBCOMPONENT_ID
 
Fields inherited from class org.exoplatform.webui.core.UIComponent
AJAX_ASYNC, config, OBJECTID, UICOMPONENT, uiparent
 
Constructor Summary
UISpaceSearch()
          Initializes search form fields.
 
Method Summary
 String getCurrentUserName()
          Get current user name.
protected  String getPortalName()
          Get portal name.
protected  String getRestContextName()
          Get current rest context name.
 List<org.exoplatform.social.core.space.model.Space> getSpaceList()
          Gets list of searching.
 String getSpaceNameSearch()
          Gets input space name search input.
 int getSpaceNum()
          Gets number of matching spaces.
 String getSpaceURL()
          Gets space url.
 String getTypeOfRelation()
          Gets type of relation with current user.
 boolean isNewSearch()
           
 void setNewSearch(boolean isNewSearch)
           
 void setSpaceList(List<org.exoplatform.social.core.space.model.Space> spaceList)
          Sets result of searching to list.
 void setSpaceNameSearch(String spaceNameSearch)
          Sets input space name search.
 void setSpaceNum(int spaceNum)
          Sets number of matching spaces.
 void setSpaceURL(String spaceURL)
          Sets space url.
 void setTypeOfRelation(String typeOfRelation)
          Sets type of relation with current user to variable.
 
Methods inherited from class org.exoplatform.webui.form.UIForm
addUIComponentInput, addUIFormInput, addUIFormInput, begin, end, event, event, event, getActions, getLabel, getLabel, getSubmitAction, getUICheckBoxInput, getUIComponentName, getUIFormCheckBoxInput, getUIFormDateTimeInput, getUIFormInputInfo, getUIFormSelectBox, getUIFormTextAreaInput, getUIInput, getUIStringInput, invokeGetBindingBean, invokeSetBindingBean, isMultipart, processRender, renderField, renderField, reset, setActions, setMultiPart, setSubmitAction, url
 
Methods inherited from class org.exoplatform.webui.core.UIContainer
addChild, addChild, findComponentById, findComponentOfType, findFirstComponentOfType, getChild, getChild, getChildById, getChildren, hasChildren, removeChild, removeChildById, renderChild, renderChild, renderChild, renderChild, renderChildren, renderChildren, renderUIComponent, replaceChild, replaceChild, setChildren, setRenderedChild, setRenderedChild, setRenderedChildrenOfTypes
 
Methods inherited from class org.exoplatform.webui.core.UIComponent
broadcast, createEvent, createUIComponent, createUIComponent, createUIComponent, doAsync, event, getAncestorOfType, getApplicationComponent, getComponentConfig, getId, getName, getParent, getTemplate, getTemplateResourceResolver, isRendered, loadConfirmMesssage, processAction, processDecode, renderEventURL, setComponentConfig, setComponentConfig, setId, setParent, setRendered, setRenderSibling, url, url
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPACE_SEARCH

public static final String SPACE_SEARCH
SPACE SEARCH.

See Also:
Constant Field Values

SEARCH

public static final String SEARCH
SEARCH.

See Also:
Constant Field Values

DEFAULT_SPACE_NAME_SEARCH

public static final String DEFAULT_SPACE_NAME_SEARCH
DEFAULT SPACE NAME SEARCH.

See Also:
Constant Field Values
Constructor Detail

UISpaceSearch

public UISpaceSearch()
              throws Exception
Initializes search form fields.

Throws:
Exception
Method Detail

getSpaceNameSearch

public String getSpaceNameSearch()
Gets input space name search input.

Returns:
Name of space.

setSpaceNameSearch

public void setSpaceNameSearch(String spaceNameSearch)
Sets input space name search.

Parameters:
spaceNameSearch - A String

getSpaceNum

public int getSpaceNum()
Gets number of matching spaces.

Returns:
the spaceNum

setSpaceNum

public void setSpaceNum(int spaceNum)
Sets number of matching spaces.

Parameters:
spaceNum - the spaceNum to set

getTypeOfRelation

public String getTypeOfRelation()
Gets type of relation with current user.


setTypeOfRelation

public void setTypeOfRelation(String typeOfRelation)
Sets type of relation with current user to variable.

Parameters:
typeOfRelation - char

getSpaceURL

public String getSpaceURL()
Gets space url.


setSpaceURL

public void setSpaceURL(String spaceURL)
Sets space url.

Parameters:
spaceURL - char

getCurrentUserName

public String getCurrentUserName()
Get current user name.

Returns:

getRestContextName

protected String getRestContextName()
Get current rest context name.

Returns:

getPortalName

protected String getPortalName()
Get portal name.

Returns:

setSpaceList

public void setSpaceList(List<org.exoplatform.social.core.space.model.Space> spaceList)
Sets result of searching to list.

Parameters:
spaceList - The list of space. A List

getSpaceList

public List<org.exoplatform.social.core.space.model.Space> getSpaceList()
                                                                 throws Exception
Gets list of searching.

Returns:
List of space.
Throws:
Exception

isNewSearch

public boolean isNewSearch()

setNewSearch

public void setNewSearch(boolean isNewSearch)


Copyright © 2013 eXo Platform SAS. All Rights Reserved.