|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sapportals.wcm.util.usermanagement.SelectionUserManager
SelectionUserManager
Copyright (c) SAP AG 2001-2002
| Field Summary | |
static java.lang.String |
DISPLAY_GROUP_CLOSE
closing symbol for a selected group. |
static java.lang.String |
DISPLAY_GROUP_OPEN
opening symbol for a selected group. |
static java.lang.String |
DISPLAY_ROLE_CLOSE
closing symbol for a selected role. |
static java.lang.String |
DISPLAY_ROLE_OPEN
opening symbol for a selected role. |
static java.lang.String |
DISPLAY_UNCHECKED_CLOSE
closing symbol for an unchecked user. |
static java.lang.String |
DISPLAY_UNCHECKED_OPEN
opening symbol for an unchecked user. |
static java.lang.String |
SEPARATOR
tag to separate entries in the string export of the users, groups etc. |
static java.lang.String |
TAG_FINALIZER
tag to separate entries in the string export of the users, groups etc. |
static java.lang.String |
TAG_SEPARATOR
this is a tag to separate entries in the string export of the users, groups etc. |
static int |
TYPE_EMAIL
Constant to identify a selected Object's Type (User, Group, Role: from IUMPrincipal) or (email, unchecked) |
static int |
TYPE_GROUP
Constant to identify a selected Object's Type (User, Group, Role: from IUMPrincipal) or (email, unchecked) |
static int |
TYPE_ROLE
Constant to identify a selected Object's Type (User, Group, Role: from IUMPrincipal) or (email, unchecked) |
static int |
TYPE_UNCHECKED
Constant to identify a selected Object's Type (User, Group, Role: from IUMPrincipal) or (email, unchecked) |
static int |
TYPE_USER
Constant to identify a selected Object's Type (User, Group, Role: from IUMPrincipal) or (email, unchecked) |
| Constructor Summary | |
SelectionUserManager()
By default, unchecked Names and email-adresses are not allowed. |
|
SelectionUserManager(boolean allowEmails)
Constructor for the SelectionUserManager object |
|
SelectionUserManager(boolean allowEmails,
boolean allowUncheckedNames)
Constructor for the SelectionUserManager object |
|
| Method Summary | |
boolean |
addEmailFromInput(java.lang.String userList)
Adds a feature to the EmailFromInput attribute of the SelectionUserManager object |
boolean |
addFromInput(java.lang.String userList,
boolean checkInput)
|
java.lang.String[] |
checkForInvalidIDs(java.lang.String userList)
|
java.lang.String[] |
checkForNewInput(java.lang.String userList)
|
java.lang.String[] |
checkForNonUniqueIDs(java.lang.String userList)
|
void |
deleteFromInput(java.lang.String input)
checks, if users who were selected have been deleted in the display |
java.lang.String |
getDisplayString()
Gets the displayString attribute of the SelectionUserManager object |
java.lang.String[] |
getIDs(int typeOfList)
|
java.lang.String |
getInvalidIDs()
Are invalid IDs given? |
java.util.HashMap |
getNonUniqueIDs()
Gets the nonUniqueIDs attribute of the SelectionUserManager object |
java.util.HashMap |
getNonUniqueIDs(java.lang.String userList)
|
java.lang.String |
getSelectionList()
|
java.util.Collection |
getSelectionUsers(int typeOfList)
|
java.util.HashMap |
getUniqueAndValidIDs(java.lang.String userList)
|
void |
handleAll(java.lang.String userInput)
before calling this method, the SelectionUserManager needs to be initialized with the persistent string, via the method initWithString
. |
boolean |
initWithString(java.lang.String persistentString)
|
boolean |
isInvalidIDGiven()
Gets the invalidIDGiven attribute of the SelectionUserManager object |
boolean |
isNonUniqueIDGiven()
Are non UniqueIDsGiven? |
void |
setList(java.lang.String[] ids,
int typeOfList)
fill a collection with ids, create display names |
void |
setList(java.lang.String id,
int typeOfList)
fill a collection with id, create display name |
void |
setList(java.lang.String id,
java.lang.String displayName,
int typeOfList)
fill a collection with id and displayName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int TYPE_USER
public static final int TYPE_ROLE
public static final int TYPE_GROUP
public static final int TYPE_EMAIL
public static final int TYPE_UNCHECKED
public static final java.lang.String TAG_SEPARATOR
public static final java.lang.String TAG_FINALIZER
public static final java.lang.String DISPLAY_GROUP_OPEN
public static final java.lang.String DISPLAY_GROUP_CLOSE
public static final java.lang.String DISPLAY_ROLE_OPEN
public static final java.lang.String DISPLAY_ROLE_CLOSE
public static final java.lang.String DISPLAY_UNCHECKED_CLOSE
public static final java.lang.String DISPLAY_UNCHECKED_OPEN
public static final java.lang.String SEPARATOR
| Constructor Detail |
public SelectionUserManager(boolean allowEmails)
allowEmails - email-adresses (recognized by the "@"-symbol) are
allowed as valid selection
public SelectionUserManager(boolean allowEmails,
boolean allowUncheckedNames)
allowEmails - email-adresses (recognized by the "@"-symbol) are
allowed as valid selectionallowUncheckedNames - names, that are not known by the usermanagement
can be used as valid selectionpublic SelectionUserManager()
| Method Detail |
public void setList(java.lang.String[] ids,
int typeOfList)
throws WcmException
ids - StringArray of User-IDstypeOfList - value to distinguish between groups, roles, users...WcmException - is thrown when problems in UserManagement occur
public void setList(java.lang.String id,
int typeOfList)
throws WcmException
id - User-IDtypeOfList - value to distinguish between groups, roles, users...WcmException - is thrown when problems in UserManagement occur
public void setList(java.lang.String id,
java.lang.String displayName,
int typeOfList)
throws WcmException
id - User-IDdisplayName - DisplayName of the given UsertypeOfList - value to distinguish between groups, roles, users...WcmException - is thrown when problems in UserManagement occurpublic java.util.Collection getSelectionUsers(int typeOfList)
typeOfList - value to distinguish between groups, roles, users...public java.lang.String[] getIDs(int typeOfList)
typeOfList - value to distinguish between groups, roles, users...public java.lang.String getSelectionList()
public java.util.HashMap getNonUniqueIDs(java.lang.String userList)
userList - a List of user-ids, display-names etc. (Usually submitted
from a user-Input)public java.util.HashMap getUniqueAndValidIDs(java.lang.String userList)
userList - a List of user-ids, display-names etc. (Usually submitted
from a user-Input)public java.lang.String getDisplayString()
public boolean isInvalidIDGiven()
public boolean isNonUniqueIDGiven()
public java.util.HashMap getNonUniqueIDs()
public java.lang.String getInvalidIDs()
public boolean initWithString(java.lang.String persistentString)
throws WcmException
persistentString - HtmlB/Wdf-Controls persist the value of User-Input
fields with strings. The SelectionUserManager, which takes care of the
user-selection in controls, offers two methods to initialize itself
with the persistent data from the control (that is this method!) and
to create a String with all information needed, after the user-input
has been submitted to the SelectionUserManager. That is the method
getSelectionList. The String combines User-ID,
descriptionName and Type of User (user, role, group...) in triples and
separates them from the next entry.- Returns:
- flag, if operation successful or not
- Throws:
WcmException - Description of Exceptionpublic java.lang.String[] checkForInvalidIDs(java.lang.String userList)
userList - a list of UserIDs, displaynames etc., ususally coming from
a user-input-fieldpublic java.lang.String[] checkForNonUniqueIDs(java.lang.String userList)
userList - a list of UserIDs, displaynames etc., ususally coming from
a user-input-fieldpublic java.lang.String[] checkForNewInput(java.lang.String userList)
userList - a list of UserIDs, displaynames etc., ususally coming from
a user-input-fieldnull, if all inputs are knownpublic void deleteFromInput(java.lang.String input)
input - Description of Parameter
public boolean addFromInput(java.lang.String userList,
boolean checkInput)
throws WcmException
userList - a list of UserIDs, displaynames etc., ususally coming from
a user-input-fieldcheckInput - flag, if it is needed to check for invalid or nonUnique
IDsWcmException - is thrown when problems in the usermanagement occur
public boolean addEmailFromInput(java.lang.String userList)
throws WcmException
userList - The feature to be added to the EmailFromInput attributeWcmException - Description of Exception
public void handleAll(java.lang.String userInput)
throws WcmException
initWithString
. All information for control logic afterwards (invalid or non
unique users), all actions (delete, add, format displaynames) are performed
in this method. The persistence for the control once again can be exported
via setList> .
- Parameters:
userInput - A list of UserIDs, Displaynames etc. usually coming from a
user-input-field.- Throws:
WcmException - problems occured within the UserManagement
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||