atg.svc.ui.formhandlers
Class UserChooserFormHandler

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.droplet.EmptyFormHandler
              extended by atg.droplet.GenericFormHandler
                  extended by atg.droplet.TransactionalFormHandler
                      extended by atg.web.formhandlers.ApplicationFormHandler
                          extended by atg.svc.ui.formhandlers.test.TreeTableDelegatingFormHandler
                              extended by atg.svc.ui.formhandlers.ListChooserFormHandler
                                  extended by atg.svc.ui.formhandlers.OrgChooserFormHandler
                                      extended by atg.svc.ui.formhandlers.UserChooserFormHandler
All Implemented Interfaces:
atg.droplet.DropletFormHandler, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, TreeTableFormHandler, Expandable, Listable, Pageable, PartialSelectable, Selectable, java.util.EventListener

public class UserChooserFormHandler
extends OrgChooserFormHandler
implements PartialSelectable, Pageable

Use in User Chooser TreeTable component as data retrieval, tree expansion, selection by delegating. Requires profileRepository property setting into /atg/userprofiling/ProfileAdapterRepository value and retrieves data from it. Allows displaying organization tree along with members of the selected organization.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  java.util.List mSearchResultItems
           
protected static java.util.Comparator userSortInstance
           
 
Fields inherited from class atg.svc.ui.formhandlers.OrgChooserFormHandler
mBaseExpValue, mExpanded, mProfileRepository, ORG_ROOT, ORGANIZATION_VIEW
 
Fields inherited from class atg.svc.ui.formhandlers.ListChooserFormHandler
CONSTRAINT_LANGUAGE, CONSTRAINT_SELFSERVICE_AUDIENCE, editorField, mAdminField, mBaseValue, mFilterKeyword, mItemKey, mRepository, mRepositoryView, mSegmentService, mSelectedKeys, mSolutionService, mViewItems, PROPERTY_DISPLAY_NAME, PROPERTY_REPOSITORY_ID, STATUS_FILTER_RQL, STATUS_VIEW
 
Fields inherited from class atg.svc.ui.formhandlers.test.TreeTableDelegatingFormHandler
mOperation, mParameters, mState, mTreeTableId, mView
 
Fields inherited from class atg.web.formhandlers.ApplicationFormHandler
EQUALS, PARAM_DELIMITER, QUERY_DELIMITER, STATUS_ERROR_REDIRECT, STATUS_ERROR_STAY, STATUS_SUCCESS
 
Fields inherited from class atg.droplet.GenericFormHandler
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.svc.ui.treetable.Selectable
SELECT_MULTIPLE, SELECT_NONE, SELECT_SINGLE
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
UserChooserFormHandler()
           
 
Method Summary
 java.util.Collection expand(java.lang.Object pItemKey)
          Implementation of Expandable interface.
 boolean getItemHasChildren(java.lang.Object pItem)
          Implementation of Expandable interface.
static java.util.Comparator getLoginComparatorInstance()
           
 java.util.List getSubOrganizations(java.lang.String pItemKey)
          Overriden to add organization's 'members' (users).
 int getTotalItemCount()
          Same as ListChooserFormHandler.getTotalItemCount().
 java.util.List getViewItems()
          Create collection of visible organization items.
 boolean isSelectable(java.lang.Object pItemKey)
           
 void page(int pStartIndex, int pPageSize)
           
 void select(java.lang.Object pItemKey, java.lang.String pMode)
          Implementation of Selectable interface.
protected  void sortBranch(java.util.List result)
          Orders provided organization list according to its names.
 
Methods inherited from class atg.svc.ui.formhandlers.OrgChooserFormHandler
getBaseExpValue, getExpandedKeysList, getItemDepth, getProfileRepository, getViewItemCount, resetListValue, setBaseExpValue, setProfileRepository, setState
 
Methods inherited from class atg.svc.ui.formhandlers.ListChooserFormHandler
doStartService, fillSelectedFromState, filterListValues, findStateContainer, getAdminField, getAllRQLWhere, getBaseValue, getEditorConstraintType, getEditorField, getFilterKeyword, getFilterRQLWhere, getItemKey, getItemName, getLanguageProperty, getLanguages, getRepository, getRepositoryView, getSegmentItems, getSegmentService, getSelectedItemsList, getSelectedKeys, getSelectedKeysList, getSiteService, getSolutionService, handleList, isStatusField, prepareSelectedList, saveStateContainer, setAdminField, setBaseValue, setEditorConstraintType, setEditorField, setFilterKeyword, setItemKey, setLanguageProperty, setRepository, setRepositoryView, setSegmentService, setSiteService, setSolutionService, setViewItems, uploadRepositoryItems, uploadViewItems, wrapArray, wrapCollection, wrapProfileGroups, wrapSelfServiceAudienceCollection
 
Methods inherited from class atg.svc.ui.formhandlers.test.TreeTableDelegatingFormHandler
getOperation, getParameters, getState, getTreeTableId, getView, handleResponse, setOperation, setParameters, setTreeTableId, setView, validate
 
Methods inherited from class atg.web.formhandlers.ApplicationFormHandler
addParameterToURLString, beforeGet, beforeSet, checkFormError, checkFormRedirect, checkFormSuccess, formHandlerBeforeGet, formHandlerBeforeSet, formHandlerInit, getErrorURL, getRedirectDelayMS, getString, getString, getString, getSuccessURL, getUserMessagesResourceBundle, handleCancel, processException, processException, processExceptionAndLog, processExceptionAndLog, redirect, setErrorURL, setRedirectDelayMS, setSuccessURL, setUserMessagesResourceBundle
 
Methods inherited from class atg.droplet.TransactionalFormHandler
afterSet, commitTransaction, getTransactionDemarcation, getTransactionStatus, isEnsureTransaction, isRollbackTransaction, isRollbackTransactionOnUnhandledException, isTransactionMarkedAsRollback, setEnsureTransaction, setRollbackTransaction, setRollbackTransactionOnUnhandledException, setTransactionDemarcation
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
 
Methods inherited from class atg.droplet.EmptyFormHandler
afterGet
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


userSortInstance

protected static java.util.Comparator userSortInstance

mSearchResultItems

protected java.util.List mSearchResultItems
Constructor Detail

UserChooserFormHandler

public UserChooserFormHandler()
Method Detail

getLoginComparatorInstance

public static java.util.Comparator getLoginComparatorInstance()

getSubOrganizations

public java.util.List getSubOrganizations(java.lang.String pItemKey)
Overriden to add organization's 'members' (users).

Overrides:
getSubOrganizations in class OrgChooserFormHandler
Parameters:
pItemKey -
Returns:
list of sub orgs

getItemHasChildren

public boolean getItemHasChildren(java.lang.Object pItem)
Description copied from class: OrgChooserFormHandler
Implementation of Expandable interface.

Specified by:
getItemHasChildren in interface Expandable
Overrides:
getItemHasChildren in class OrgChooserFormHandler
Parameters:
pItem - Item object of "items" collection of tree table.
Returns:
true if organization has suborganizations; false otherwise.

isSelectable

public boolean isSelectable(java.lang.Object pItemKey)
Specified by:
isSelectable in interface PartialSelectable
Parameters:
pItemKey - item key
Returns:
false for items that shouldn't be selected, like organizations in user chooser

sortBranch

protected void sortBranch(java.util.List result)
Description copied from class: OrgChooserFormHandler
Orders provided organization list according to its names.

Overrides:
sortBranch in class OrgChooserFormHandler

select

public void select(java.lang.Object pItemKey,
                   java.lang.String pMode)
Description copied from class: ListChooserFormHandler
Implementation of Selectable interface. Called when user selects some new item. Add this new key to List of already selected.

Specified by:
select in interface Selectable
Overrides:
select in class ListChooserFormHandler
Parameters:
pItemKey - key of the newly selected item

expand

public java.util.Collection expand(java.lang.Object pItemKey)
Description copied from class: OrgChooserFormHandler
Implementation of Expandable interface. Called when user expanded some new item. Add this new key to List of already expanded.

Specified by:
expand in interface Expandable
Overrides:
expand in class OrgChooserFormHandler
Parameters:
pItemKey - key of the newly expanded item
Returns:
children of expanded items

getTotalItemCount

public int getTotalItemCount()
Description copied from class: ListChooserFormHandler
Same as ListChooserFormHandler.getTotalItemCount().

Specified by:
getTotalItemCount in interface Listable
Overrides:
getTotalItemCount in class OrgChooserFormHandler
Returns:
Number of all organizations visible to user at this time (taking into account expanded items).

getViewItems

public java.util.List getViewItems()
Description copied from class: OrgChooserFormHandler
Create collection of visible organization items.

Specified by:
getViewItems in interface Listable
Overrides:
getViewItems in class OrgChooserFormHandler
Returns:
created collection of organization.

page

public void page(int pStartIndex,
                 int pPageSize)
Specified by:
page in interface Pageable