java.lang.Object | +--com.ibm.commerce.collaboration.workspaces.helper.CollabCommandHelper
A set of helper methods that are used by the collaborative workspace controller commands.
Field Summary | |
---|---|
static java.lang.String |
className The name of this class |
static java.lang.String |
COPYRIGHT Copyright statement |
Method Summary | |
---|---|
static boolean |
checkUserAccessForCollabSpace(java.lang.String userDN,
java.lang.String collabSpaceId,
CommandContext context) Verifies that a user has the Manager role in the collaborative workspace or has the Site Administrator role in the seller organization. |
static java.lang.String |
DNtoUid(java.lang.String DN) Returns uid part of a given distinguished name (DN) |
static java.lang.String |
getNLName(java.lang.String firstName, java.lang.String lastName,
int langId) Gets and formats the name of a user based on the preferred language. |
static java.lang.String |
getRequesterDN(
CommandContext commandContext) Extracts the requester's distinguished name from the command context object. |
static java.lang.String |
getRequesterUid(
CommandContext commandContext) Extracts the requester's logon id from the command context object. |
static java.lang.String |
getUserDN(java.lang.String origDN) Modifies a user's distinguished name so that the Root Organization field is in lowercase. |
static java.lang.String |
getUserEmailAddress(java.lang.Long userId) Gets the e-mail address associated with a given user. |
static boolean |
isEmailAddressValid(java.lang.String emailAddress) Returns if the e-mail address is an valid one |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String className
Method Detail |
---|
public static boolean checkUserAccessForCollabSpace(java.lang.String userDN, java.lang.String collabSpaceId, CommandContext context)
userDN
- The distinguished name (DN) of a user (ex.
uid=demoUser,o=Root Organization)collabSpaceId
- The unique identifier of the collaborative
workspace.context
- The command context of the request object.public static java.lang.String getRequesterDN(CommandContext commandContext)
commandContext
- The command context from the request
object.public static java.lang.String getRequesterUid(CommandContext commandContext)
commandContext
- The command context from the request
object.public static final java.lang.String getUserDN(java.lang.String origDN)
origDN
- The user's original distinguished name.public static java.lang.String getNLName(java.lang.String firstName, java.lang.String lastName, int langId)
For Asian languages, the name will be LastName FirstName.
For non-Asian languages, the name will be FirstName space LastName.
firstName
- The user's first name.lastName
- The user's last name or family name.langId
- The language ID which specifies the format of the
name that is returned.public static java.lang.String DNtoUid(java.lang.String DN)
DN
- The DNpublic static java.lang.String getUserEmailAddress(java.lang.Long userId)
userId
- The ID of the userpublic static boolean isEmailAddressValid(java.lang.String emailAddress)
emailAddress
- The e-mail address to be validated