org.olat.repository
Class SearchForm

java.lang.Object
  extended by org.olat.core.gui.components.Component
      extended by org.olat.core.gui.components.form.Form
          extended by org.olat.repository.SearchForm

public class SearchForm
extends Form

Initial Date: 08.07.2003

Author:
Mike Stock Comment: The search form captures data to search for a repository entry. The form can be restricted to a special type

Field Summary
 
Fields inherited from class org.olat.core.gui.components.form.Form
CANCEL_IDENTIFICATION, ELEM_BUTTON_COMMAND_ID, EVNT_FORM_CANCELLED, EVNT_VALIDATION_NOK, EVNT_VALIDATION_OK, SUBMIT_IDENTIFICATION
 
Constructor Summary
SearchForm(java.lang.String name, Translator translator)
          Generic search form.
SearchForm(java.lang.String name, Translator translator, boolean withCancel, boolean isAdmin, java.lang.String limitType)
          Generic search form.
SearchForm(java.lang.String name, Translator translator, boolean withCancel, boolean isAdmin, java.lang.String[] limitTypes)
          Generic search form.
SearchForm(java.lang.String name, Translator translator, boolean withCancel, boolean isAdmin, java.lang.String[] limitTypes, java.lang.String limitUser)
          Generic search form.
SearchForm(java.lang.String name, Translator translator, boolean withCancel, boolean isAdmin, java.lang.String limitType, java.lang.String limitUser)
          Generic search form.
 
Method Summary
 java.lang.String getAuthor()
           
 java.lang.String getDescription()
           
 java.lang.String getDisplayName()
           
 int getId()
           
 java.util.Set getRestrictedTypes()
           
 boolean hasId()
           
 void init()
          Initialize search form.
 void setLimitTypes(java.lang.String[] limitTypes)
          Limit searches to a specific type.
 boolean validate()
           
 
Methods inherited from class org.olat.core.gui.components.form.Form
addFormElement, addSubmitKey, addSubmitKey, addVisibilityDependsOnSelectionRule, getCheckBoxElement, getDateElement, getElementCount, getFormElement, getHTMLRendererSingleton, getIntegerElement, getMultipleSelectionElement, getNameIterator, getPasswordElement, getRadioButtonElement, getSelectedSubmitKey, getSingleSelectionElement, getTextAreaElement, getTextElement, getVisibilityDependsOnSelectionRules, getWikiMarkupTextAreaElement, hasMandatoryFields, hasWikiMarkupFields, isDisplayOnly, isValid, removeCancelButton, removeFormElements, setAllFormElements, setCancelButton, setCancelKey, setDisplayOnly, setSubmitKey, validate
 
Methods inherited from class org.olat.core.gui.components.Component
addListener, debuginfoGetListeners, dispatchRequest, getAndClearLatestFiredEvent, getComponentName, getDispatchID, getExtendedDebugInfo, getLatestDispatchedController, getListenerInfo, getParent, getSpanAsDomReplaceable, getTimestamp, getTranslator, isDirty, isDirtyForUser, isDomReplaceable, isEnabled, isVisible, setDirty, setDomReplaceable, setEnabled, setSpanAsDomReplaceable, setVisible, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SearchForm

public SearchForm(java.lang.String name,
                  Translator translator)
Generic search form.

Parameters:
name -
translator -

SearchForm

public SearchForm(java.lang.String name,
                  Translator translator,
                  boolean withCancel,
                  boolean isAdmin,
                  java.lang.String limitType,
                  java.lang.String limitUser)
Generic search form.

Parameters:
name - Internal form name.
translator - Translator
withCancel - Display a cancel button?
isAdmin - Is calling identity an administrator? If yes, allow search by ID
limitType - Limit searches to a specific type.
limitUser - Limit searches to a specific user.

SearchForm

public SearchForm(java.lang.String name,
                  Translator translator,
                  boolean withCancel,
                  boolean isAdmin,
                  java.lang.String[] limitTypes,
                  java.lang.String limitUser)
Generic search form.

Parameters:
name - Internal form name.
translator - Translator
withCancel - Display a cancel button?
isAdmin - Is calling identity an administrator? If yes, allow search by ID
limitTypes - Limit searches to specific types.
limitUser - Limit searches to a specific user.

SearchForm

public SearchForm(java.lang.String name,
                  Translator translator,
                  boolean withCancel,
                  boolean isAdmin,
                  java.lang.String limitType)
Generic search form.

Parameters:
name - Internal form name.
translator - Translator
withCancel - Display a cancel button?
isAdmin - Is calling identity an administrator? If yes, allow search by ID
limitType - Limit searches to a specific type.

SearchForm

public SearchForm(java.lang.String name,
                  Translator translator,
                  boolean withCancel,
                  boolean isAdmin,
                  java.lang.String[] limitTypes)
Generic search form.

Parameters:
name - Internal form name.
translator - Translator
withCancel - Display a cancel button?
isAdmin - Is calling identity an administrator? If yes, allow search by ID
limitTypes - Limit searches to specific types.
Method Detail

init

public void init()
Initialize search form.


validate

public boolean validate()
Specified by:
validate in class Form
Returns:
true: form validates, false: form contains invalid data
See Also:
org.olat.core.gui.components.Form#validate(org.olat.core.gui.UserRequest)

setLimitTypes

public void setLimitTypes(java.lang.String[] limitTypes)
Limit searches to a specific type.

Parameters:
limitType -

hasId

public boolean hasId()
Returns:
Is ID field available?

getId

public int getId()
Returns:
Return value of ID field.

getDisplayName

public java.lang.String getDisplayName()
Returns:
Display name filed value.

getAuthor

public java.lang.String getAuthor()
Returns:
Author field value.

getDescription

public java.lang.String getDescription()
Returns:
Descritpion field value.

getRestrictedTypes

public java.util.Set getRestrictedTypes()
Returns:
Limiting type selections.