com.sapportals.wcm.control.util

Interface IPeoplePickerWrapper


public interface IPeoplePickerWrapper


Nested Class Summary
static class IPeoplePickerWrapper.WrapperPeopleSelectionMode
           
static class IPeoplePickerWrapper.WrapperUMEPrincipalType
           
 
Method Summary
 String getButtonText()
          gets the button text
 int getCols()
          gets the visible number of columns for this TextEdit in multi selection mode
 String getDocumentRid()
          Returns the document rid
 String getErrorMessage()
          Returns the error message provided by the PeoplePicker.
 String getHeight()
          gets the height for the TextEdit in multi selection mode
 com.sapportals.htmlb.LabeledComponent getLabeledComponent()
          Returns the component which has to be labeled to enable accessibility (input field or text edit) Caution: setPeopleSelectionMode() has to be called before this method in order to determine if an input field or an text edit has to be returned as labeled component
 IPeoplePickerWrapper.WrapperPeopleSelectionMode getPeopleWrapperSelectionMode()
          Returns the people selection mode (single or multiple people).
 int getResolvedUserIdsCount()
           
 int getResolvedUserIdsCount(int maxAllowedCount)
           
 int getResolvedUserIdsCount(int maxAllowedCount, HashSet<String> peopleIdsSet)
           
 int getRows()
          gets the visible number of rows for the TextEdit in multi selection mode
 ArrayList<String> getSelectedExternalEmailAddresses()
          Returns selected external email addresses (String).
 ArrayList<String> getSelectedPeopleIds()
          Returns selected principal IDs (String) for all UME principal types.
 int getSize()
          gets the size of the InputField.
 String getTooltip()
          gets the Tooltip for this TextView.
 String getWidth()
          get the width of the people picker input field
 ArrayList<String> getWrapperSelectedPeopleIds(IPeoplePickerWrapper.WrapperUMEPrincipalType peopleType)
          Returns selected principal IDs (String) according to the specified UME principal type.
 boolean isAllowExternalEmailAddresses()
          Returns if the PeoplePicker can select external email addresses.
 boolean isAutomaticValidation()
          indicates if the PeoplePicker calls a popup automatically in case of being rendered with a not valid people selection state (usecase: enduser enters not valid users and triggers an application event directly)
 boolean isDuplicatePeopleSelection()
          Returns if duplicate people selection is allowed
 boolean isEnabled()
          Sets whether this component is disabled.
 boolean isLabeled()
          indicates if the PeoplePicker is labeled
 boolean isMessageVisible()
          Indicates if the message is displayed in the PeoplePicker component.
 boolean isOnlineStateVisible()
          Returns if the user awareness state is displayed in the PeopleFinder popup.
 boolean isRequired()
          indicates if the PeoplePicker is required so that at least one people has to be entered
 boolean isValid()
          Returns if all people are identified
 boolean isWrapperSearchFor(IPeoplePickerWrapper.WrapperUMEPrincipalType peopleType)
          Returns if the PeoplePicker can select specified principal type.
 void setAllowExternalEmailAddresses(boolean externalAllowed)
          Defines if the PeoplePicker can select external email addresses.
 void setAutomaticValidation(boolean automaticValidation)
          Defines if the PeoplePicker calls a popup automatically in case of being rendered with a not valid people selection state (for example: enduser enters not valid users and triggers an application event directly)
 void setButtonText(String text)
          sets the button text
 void setCols(int cols)
          sets the visible number of columns for this TextEdit in multi selection mode
 void setDocumentRidPath(String docRid)
          Sets the documents rid.
 void setDuplicatePeopleSelection(boolean duplicatePeopleSelection)
          Sets if duplicate people selection is allowed.
 void setEnabled(boolean enabled)
          sets this component enabled
 void setErrorMessage(String message)
          Sets error message provided by the application.
 void setEventAfterValidation(String eventName, String id)
          sets the name of an event and the id of the component which triggers the event.
 void setExternalEmailAddresses(ArrayList<String> externalAddresses)
          Sets the external email addresses (String) to be displayed initially.
 void setExternalRequiredCheck(boolean isExternalRequiredCheck)
          sets that PeoplePicker will be check for empty values from the component that use it
 void setHeight(String height)
          sets the height for the TextEdit in multi selection mode
 void setInputFieldsValid(boolean valid)
          Defines if the input fields should be marked as invalid.
 void setLabeled(boolean isLabeled)
          set if the PeoplePicker is labeled
 void setLabelText(String text)
          Sets the label text which has to be provided by the application.
 void setMessageVisible(boolean messageVisible)
          Sets if the message is displayed in the PeoplePicker component.
 void setOnlineStateVisible(boolean visible)
          Sets if the user awareness state is displayed in the PeopleFinder popup.
 void setPeopleIds(ArrayList<String> peopleIds)
          Sets the principal IDs (com.sap.security.api.IUser, com.sap.security.api.IGroup,com.sap.security.api.IRole) for people to be displayed initially.
 void setPeopleWrapperSelectionMode(IPeoplePickerWrapper.WrapperPeopleSelectionMode selectionMode)
          Sets the people selection mode (single or multiple people).
 void setRequired(boolean isRequired)
          sets if the PeoplePicker is required so that at least one people has to be entered
 void setRows(int rows)
          sets the visible number of rows for this TextEdit in multi selection mode
 void setSearchedTypeSelectable(boolean isSelectable)
           
 void setSize(int size)
          sets the size of the InputField.
 void setTooltip(String tooltip)
          sets the Tooltip for this TextView.
 void setWidth(String width)
          set the width of the people picker input field
 void setWrapperDefaultSearchedType(IPeoplePickerWrapper.WrapperUMEPrincipalType peopleType)
           
 void setWrapperSearchFor(IPeoplePickerWrapper.WrapperUMEPrincipalType peopleType, boolean searchFor)
          Defines which principal types can be entered in the PeoplePicker.
 

Method Detail

isValid

boolean isValid()
Returns if all people are identified

Returns:
boolean true if all people are identified

setInputFieldsValid

void setInputFieldsValid(boolean valid)
Defines if the input fields should be marked as invalid. Notice: Input fields are marked invalid in any case when the people could not be identified!

Parameters:
valid - sets the input fields invalid

getPeopleWrapperSelectionMode

IPeoplePickerWrapper.WrapperPeopleSelectionMode getPeopleWrapperSelectionMode()
Returns the people selection mode (single or multiple people).

Returns:
PeopleSelectionMode people selection mode

setPeopleWrapperSelectionMode

void setPeopleWrapperSelectionMode(IPeoplePickerWrapper.WrapperPeopleSelectionMode selectionMode)
Sets the people selection mode (single or multiple people).

Parameters:
selectionMode - people selection mode

setPeopleIds

void setPeopleIds(ArrayList<String> peopleIds)
Sets the principal IDs (com.sap.security.api.IUser, com.sap.security.api.IGroup,com.sap.security.api.IRole) for people to be displayed initially.

Parameters:
peopleIds - ArrayList with people ids (String)

getWrapperSelectedPeopleIds

ArrayList<String> getWrapperSelectedPeopleIds(IPeoplePickerWrapper.WrapperUMEPrincipalType peopleType)
Returns selected principal IDs (String) according to the specified UME principal type.

Parameters:
peopleType - people type
Returns:
Array List list of selected principal IDs (String).

getSelectedPeopleIds

ArrayList<String> getSelectedPeopleIds()
Returns selected principal IDs (String) for all UME principal types.

Returns:
Array List list of selected principal IDs (String).

getResolvedUserIdsCount

int getResolvedUserIdsCount()
Returns:
int - count of unique users contained in all searchable principal types

getResolvedUserIdsCount

int getResolvedUserIdsCount(int maxAllowedCount)
Parameters:
maxAllowedCount - - Maximal allowed count for user IDs
Returns:
int - count of unique users contained in all searchable principal types or -1 if the count is bigger than allowed.

getResolvedUserIdsCount

int getResolvedUserIdsCount(int maxAllowedCount,
                            HashSet<String> peopleIdsSet)
Parameters:
maxAllowedCount - - Maximal allowed count for user IDs
peopleIdsSet - - HashSet that will be fill up with resolved User Ids, if the count <= maxAllowedCount. If the count > maxAllowedCount, peopleIdsSet will be empty.
Returns:
int - count of unique users contained in all searchable principal types or -1 if the count is bigger than allowed.

setExternalEmailAddresses

void setExternalEmailAddresses(ArrayList<String> externalAddresses)
Sets the external email addresses (String) to be displayed initially.

Parameters:
externalAddresses - list with external email addresses (String)

getSelectedExternalEmailAddresses

ArrayList<String> getSelectedExternalEmailAddresses()
Returns selected external email addresses (String).

Returns:
Array List list of external email addresses (String).

setWrapperSearchFor

void setWrapperSearchFor(IPeoplePickerWrapper.WrapperUMEPrincipalType peopleType,
                         boolean searchFor)
Defines which principal types can be entered in the PeoplePicker. Default: only users are allowed

Parameters:
peopleType - principal type
searchFor - defines if the PeoplePicker can select the specified principal type

isWrapperSearchFor

boolean isWrapperSearchFor(IPeoplePickerWrapper.WrapperUMEPrincipalType peopleType)
Returns if the PeoplePicker can select specified principal type.

Parameters:
peopleType - principal type
Returns:
boolean true if the PeoplePicker can select specified principal type.

setAllowExternalEmailAddresses

void setAllowExternalEmailAddresses(boolean externalAllowed)
Defines if the PeoplePicker can select external email addresses. Default: false

Parameters:
externalAllowed - defines if the PeoplePicker can select external email addresses

isAllowExternalEmailAddresses

boolean isAllowExternalEmailAddresses()
Returns if the PeoplePicker can select external email addresses.

Returns:
boolean true if the PeoplePicker can select external email addresses.

isOnlineStateVisible

boolean isOnlineStateVisible()
Returns if the user awareness state is displayed in the PeopleFinder popup.

Returns:
boolean people awareness state is displayed

setOnlineStateVisible

void setOnlineStateVisible(boolean visible)
Sets if the user awareness state is displayed in the PeopleFinder popup. Default: false

Parameters:
visible - sets if people awareness state is displayed

getSize

int getSize()
gets the size of the InputField. The size is measured in characters. Optical user agents try to fit the actual width and height to the size of the used font. Usually, user agents ignore this value if you set a width explicitly.

Returns:
the size of the InputField in characters

setSize

void setSize(int size)
sets the size of the InputField. The size is measured in characters. Optical user agents try to fit the actual width and height to the size of the used font. Usually, user agents ignore this value if you set a width explicitly.

Parameters:
size - the size of the InputField in characters
See Also:
setWidth(String)

getTooltip

String getTooltip()
gets the Tooltip for this TextView. Tooltips can not contain HTML coding.

Returns:
the tooltip text

setTooltip

void setTooltip(String tooltip)
sets the Tooltip for this TextView. Tooltips can not contain HTML coding.

Parameters:
tooltip - the tooltip text

setEventAfterValidation

void setEventAfterValidation(String eventName,
                             String id)
sets the name of an event and the id of the component which triggers the event. The event will be triggered automatically by the PeopleFinder popup after the last validation step. Caution: This event is triggered only in validation mode (for example: enduser types a wrong user name in the PeoplePicker and presses the Save button of the application. This will open a PeopleFinder popup in validation mode) If an enduser presses the value help button and searches for users (PeopleFinder NOT in validation mode) this event won't be triggered.

Parameters:
eventName - name of the event
id - id of the component which triggers the event

getWidth

String getWidth()
get the width of the people picker input field

Returns:
the width of the input field

setWidth

void setWidth(String width)
set the width of the people picker input field

Parameters:
width - the width of the people picker input field

setLabeled

void setLabeled(boolean isLabeled)
set if the PeoplePicker is labeled

Parameters:
isLabeled - indicator if the people picker is labeled

isRequired

boolean isRequired()
indicates if the PeoplePicker is required so that at least one people has to be entered

Returns:
boolean indicator if the people picker is required

setRequired

void setRequired(boolean isRequired)
sets if the PeoplePicker is required so that at least one people has to be entered

Parameters:
isRequired - indicator if the people picker is required

setExternalRequiredCheck

void setExternalRequiredCheck(boolean isExternalRequiredCheck)
sets that PeoplePicker will be check for empty values from the component that use it

Parameters:
isExternalRequiredCheck - indicator if the people picker will be checked externally for empty values

isLabeled

boolean isLabeled()
indicates if the PeoplePicker is labeled

Returns:
boolean indicator if the people picker is labeled

isEnabled

boolean isEnabled()
Sets whether this component is disabled.

Returns:
boolean true if the InputField is enabled

setEnabled

void setEnabled(boolean enabled)
sets this component enabled

Parameters:
enabled - true if the InputField is enabled

getHeight

String getHeight()
gets the height for the TextEdit in multi selection mode

Returns:
String height.

setHeight

void setHeight(String height)
sets the height for the TextEdit in multi selection mode

Parameters:
height - height of TextEdit.

getRows

int getRows()
gets the visible number of rows for the TextEdit in multi selection mode

Returns:
int the number of rows.

setRows

void setRows(int rows)
sets the visible number of rows for this TextEdit in multi selection mode

Parameters:
rows - the number of rows.

getCols

int getCols()
gets the visible number of columns for this TextEdit in multi selection mode

Returns:
int number of columns of the TextEdit.

setCols

void setCols(int cols)
sets the visible number of columns for this TextEdit in multi selection mode

Parameters:
cols - the number of columns.

getButtonText

String getButtonText()
gets the button text

Returns:
String button text.

setButtonText

void setButtonText(String text)
sets the button text

Parameters:
text - button text

setAutomaticValidation

void setAutomaticValidation(boolean automaticValidation)
Defines if the PeoplePicker calls a popup automatically in case of being rendered with a not valid people selection state (for example: enduser enters not valid users and triggers an application event directly)

Parameters:
automaticValidation - boolean flag

isAutomaticValidation

boolean isAutomaticValidation()
indicates if the PeoplePicker calls a popup automatically in case of being rendered with a not valid people selection state (usecase: enduser enters not valid users and triggers an application event directly)

Returns:
boolean automaticValidation

getErrorMessage

String getErrorMessage()
Returns the error message provided by the PeoplePicker.

Returns:
String error message

setErrorMessage

void setErrorMessage(String message)
Sets error message provided by the application. The message is displayed directly underneath the input field or text edit. Notice: The error message is displayed only when all people are identified correctly otherwise the messages detected by the PeoplePicker are displayed.

Parameters:
message - error message defined by the application

getDocumentRid

String getDocumentRid()
Returns the document rid

Returns:
String document rid set in the CM permission dialog

setDocumentRidPath

void setDocumentRidPath(String docRid)
Sets the documents rid. Use this method only in the CM permission dialog!

Parameters:
docRid - rid path document rid path set by the CM permission dialog

setLabelText

void setLabelText(String text)
Sets the label text which has to be provided by the application. The label text is needed in accessibility mode

Parameters:
text - label text defined by the application

isMessageVisible

boolean isMessageVisible()
Indicates if the message is displayed in the PeoplePicker component.

Returns:
boolean defines if the error message is displayed

setMessageVisible

void setMessageVisible(boolean messageVisible)
Sets if the message is displayed in the PeoplePicker component. Default: true

Parameters:
messageVisible - defines if the error message is displayed

getLabeledComponent

com.sapportals.htmlb.LabeledComponent getLabeledComponent()
Returns the component which has to be labeled to enable accessibility (input field or text edit) Caution: setPeopleSelectionMode() has to be called before this method in order to determine if an input field or an text edit has to be returned as labeled component

Returns:
LabeledComponent component to be labeled

isDuplicatePeopleSelection

boolean isDuplicatePeopleSelection()
Returns if duplicate people selection is allowed

Returns:
boolean

setDuplicatePeopleSelection

void setDuplicatePeopleSelection(boolean duplicatePeopleSelection)
Sets if duplicate people selection is allowed.

Parameters:
duplicatePeopleSelection - Sets if duplicate people selection is allowed

setSearchedTypeSelectable

void setSearchedTypeSelectable(boolean isSelectable)

setWrapperDefaultSearchedType

void setWrapperDefaultSearchedType(IPeoplePickerWrapper.WrapperUMEPrincipalType peopleType)
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/nonwduideprecated api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice