|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortalAdministration
PortalAdministration Aggregate portal administration functions: - Emails - Registration - Password Generation
Method Summary | |
---|---|
java.lang.String |
generatePassword()
Generate a unique password |
java.lang.String |
getBaseFolderPath(java.lang.String userName,
java.util.Locale locale,
java.lang.String serverName)
Returns PSML base folder path for specified user by running full profiler and portal site rules. |
java.util.Map |
getNewLoginInfo(java.lang.String guid)
|
java.lang.String |
getPortalURL(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response,
java.lang.String path)
Provide a common way to get portal URLs Necessary for generating return URLs for features such as forgotten password. |
java.lang.String |
getUserFolderPath(java.lang.String userName,
java.util.Locale locale,
java.lang.String serverName)
Returns PSML user folder path for specified user by running full profiler and portal site rules. |
boolean |
isAdminUser(javax.portlet.PortletRequest request)
Returns true if the current request user principal's name is the name of the portal admin user. |
boolean |
isUserInAdminRole(javax.portlet.PortletRequest request)
Returns true if the current request user principal is in the portal admin role. |
User |
lookupUserFromEmail(java.lang.String email)
Lookup a user given an email address |
void |
putNewLoginInfo(java.lang.String guid,
java.util.Map info)
|
void |
registerUser(java.lang.String userName,
java.lang.String password)
Register a new user using all default values |
void |
registerUser(java.lang.String userName,
java.lang.String password,
java.util.List roles,
java.util.List groups,
java.util.Map userInfo,
java.util.Map rules,
java.lang.String template)
|
void |
registerUser(java.lang.String userName,
java.lang.String password,
java.util.List roles,
java.util.List groups,
java.util.Map userInfo,
java.util.Map rules,
java.lang.String template,
java.lang.String subsiteFolder)
|
void |
registerUser(java.lang.String userName,
java.lang.String password,
java.util.List roles,
java.util.List groups,
java.util.Map userInfo,
java.util.Map rules,
java.lang.String folderTemplate,
java.lang.String subsite,
java.util.Locale locale,
java.lang.String serverName)
Registers and creates a new user, assigning userInfo, roles, groups, profiling rules and a folder template. |
void |
removeNewLoginInfo(java.lang.String guid)
|
void |
sendEmail(javax.portlet.PortletConfig portletConfig,
java.lang.String emailAddress,
java.lang.String localizedSubject,
java.lang.String templatePath,
java.util.Map userAttributes)
Helper to send an email to a recipient |
void |
sendEmail(java.lang.String from,
java.lang.String subject,
java.lang.String to,
java.lang.String text)
Helper to send an email to a recipient without the portal default sender, and without mail merge |
Method Detail |
---|
void registerUser(java.lang.String userName, java.lang.String password, java.util.List roles, java.util.List groups, java.util.Map userInfo, java.util.Map rules, java.lang.String folderTemplate, java.lang.String subsite, java.util.Locale locale, java.lang.String serverName) throws RegistrationException
userName
- Unique user principal identifierpassword
- Password for this userroles
- A list of roles to assign to this usergroups
- A list of groups to assign to this useruserInfo
- Portlet API User Information Attributes name value pairs (PLT.D)rules
- A map of name value pairs of profiling rules.
Well known rules names are 'page' and 'menu'folderTemplate
- The full PSML path name of a folder to be deep
copied as the new user's set of folders, pages, linkssubsite
- The subsite folder to place the new user inlocale
- Optional locale used to compute new user folder path
if subsite not specifiedserverName
- Server name used to compute new user folder path
if subsite not specified
RegistrationException
void registerUser(java.lang.String userName, java.lang.String password, java.util.List roles, java.util.List groups, java.util.Map userInfo, java.util.Map rules, java.lang.String template, java.lang.String subsiteFolder) throws RegistrationException
RegistrationException
void registerUser(java.lang.String userName, java.lang.String password, java.util.List roles, java.util.List groups, java.util.Map userInfo, java.util.Map rules, java.lang.String template) throws RegistrationException
RegistrationException
void registerUser(java.lang.String userName, java.lang.String password) throws RegistrationException
userName
- password
-
RegistrationException
java.lang.String generatePassword()
void sendEmail(javax.portlet.PortletConfig portletConfig, java.lang.String emailAddress, java.lang.String localizedSubject, java.lang.String templatePath, java.util.Map userAttributes) throws AdministrationEmailException
recipient
- the email address of the recipientlocalizedSubject
- the subject of the email as a localized stringmessage
- the email message content
AdministrationEmailException
void sendEmail(java.lang.String from, java.lang.String subject, java.lang.String to, java.lang.String text) throws AdministrationEmailException
from
- the email address of the sendersubject
- the subject of the emailto
- the recipient email addresstext
- the message text
AdministrationEmailException
User lookupUserFromEmail(java.lang.String email) throws AdministrationEmailException
email
- Given email address
User
, or throw exception if not found
AdministrationEmailException
java.lang.String getPortalURL(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response, java.lang.String path)
request
- The portlet request.response
- The portlet response, used to encode the pathpath
- The relative path to a portal resource
java.util.Map getNewLoginInfo(java.lang.String guid)
guid
- The ID which is passed throughte URL to the user
void putNewLoginInfo(java.lang.String guid, java.util.Map info)
guid
- the ID which is passed through the URL to the user..info
- a Map, info from which will be used to reset the password
the password in this case is NOT encrypted, but this should probably
change if this information is stored on disk... ie a databasevoid removeNewLoginInfo(java.lang.String guid)
guid
- the ID which will be removed from the storage when the info is no longer validboolean isAdminUser(javax.portlet.PortletRequest request)
request
-
boolean isUserInAdminRole(javax.portlet.PortletRequest request)
request
-
java.lang.String getUserFolderPath(java.lang.String userName, java.util.Locale locale, java.lang.String serverName)
userName
- existing portal user namelocale
- optional locale, (defaults to system locale, for language
profiling rules)serverName
- server name, (required for subsite profiling rules)
java.lang.String getBaseFolderPath(java.lang.String userName, java.util.Locale locale, java.lang.String serverName)
userName
- existing portal user namelocale
- optional locale, (defaults to system locale, for language
profiling rules)serverName
- server name, (required for subsite profiling rules)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |