public interface PortalAdministration
| Modifier and Type | Method and Description |
|---|---|
String |
generatePassword()
Generate a unique password following the credential policy of the Password Generator service
|
String |
getBaseFolderPath(String userName,
Locale locale,
String serverName)
Deprecated.
|
Map<String,String> |
getNewLoginInfo(String guid)
Administrative portlets, like the forgotten password admin, need to track login information such as
temporary links to recovery temporary passwords.
|
String |
getPortalURL(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response,
String path)
Provides a common way to generating portal URLs.
|
String |
getUserFolderPath(String userName,
Locale locale,
String serverName)
Deprecated.
|
boolean |
isAdminUser(javax.portlet.PortletRequest request)
Returns true if the current request is made by the special portal admin user.
|
boolean |
isUserInAdminRole(javax.portlet.PortletRequest request)
Returns true if the current request user principal is made by a user in the portal admin role
|
User |
lookupUserFromEmail(String email)
Lookup a Jetspeed user, given an email address
|
void |
putNewLoginInfo(String guid,
Map<String,String> info)
Administrative portlets, like the forgotten password admin, need to track login information such as
temporary links to recovery temporary passwords.
|
void |
registerUser(String userName,
String password)
Register a new user using all default values
|
void |
registerUser(String userName,
String password,
List<String> roles,
List<String> groups,
Map<String,String> userInfo,
Map<String,String> rules,
String template)
Registers and creates a new user, assigning userInfo, roles, groups,
profiling rules and a folder template.
|
void |
registerUser(String userName,
String password,
List<String> roles,
List<String> groups,
Map<String,String> userInfo,
Map<String,String> rules,
String template,
String subsiteFolder)
Registers and creates a new user, assigning userInfo, roles, groups,
profiling rules and a folder template.
|
void |
registerUser(String userName,
String password,
List<String> roles,
List<String> groups,
Map<String,String> userInfo,
Map<String,String> rules,
String folderTemplate,
String subsite,
Locale locale,
String serverName)
Registers and creates a new user, assigning userInfo, roles, groups,
profiling rules and a folder template.
|
void |
removeNewLoginInfo(String guid)
Administrative portlets, like the forgotten password admin, need to track login information such as
temporary links to recovery temporary passwords.
|
void |
sendEmail(javax.portlet.PortletConfig portletConfig,
String emailAddress,
String localizedSubject,
String template,
Map<String,String> userAttributes)
Using the portal's email configuration settings, sends an email to a mail recipient.
|
void |
sendEmail(String from,
String subject,
String to,
String text)
Using the portal's email configuration, sends a simple email to a mail recipient.
|
void registerUser(String userName, String password, List<String> roles, List<String> groups, Map<String,String> userInfo, Map<String,String> rules, String folderTemplate, String subsite, Locale locale, 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 specifiedRegistrationExceptionvoid registerUser(String userName, String password, List<String> roles, List<String> groups, Map<String,String> userInfo, Map<String,String> rules, String template, String subsiteFolder) 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'template - The full PSML path name of a folder to be deep
copied as the new user's set of folders, pages, linkssubsiteFolder - The subsite folder to place the new user inRegistrationExceptionvoid registerUser(String userName, String password, List<String> roles, List<String> groups, Map<String,String> userInfo, Map<String,String> rules, String template) 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'template - The full PSML path name of a folder to be deep
copied as the new user's set of folders, pages, linksRegistrationExceptionvoid registerUser(String userName, String password) throws RegistrationException
userName - Unique user principal identifierpassword - Password for this userRegistrationExceptionString generatePassword()
void sendEmail(javax.portlet.PortletConfig portletConfig,
String emailAddress,
String localizedSubject,
String template,
Map<String,String> userAttributes)
throws AdministrationEmailException
userAttributes parameter for merged values, merging into the mail body from
the configured email templateportletConfig - portlet configurationemailAddress - the email address of the recipientlocalizedSubject - the subject of the email as a localized stringtemplate - portal relative path to the template used to do the mail mergeuserAttributes - map of user attributes to substitute into templateAdministrationEmailExceptionvoid sendEmail(String from, String subject, String to, String text) throws AdministrationEmailException
text parameter as the mail body.from - the email address of the sendersubject - the subject of the emailto - the recipient email addresstext - the message textAdministrationEmailExceptionUser lookupUserFromEmail(String email) throws AdministrationEmailException
email - Given email addressAdministrationEmailExceptionString getPortalURL(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response, String path)
Example:
base URL = http://www.apache.org/jetspeed/portal
path = /system/forgotten-password.psml
Returns:
http://www.apache.org/jetspeed/portal/system/forgotten-password.psml
request - The portlet request.response - The portlet response, used to encode the pathpath - The relative path to a portal resourceMap<String,String> getNewLoginInfo(String guid)
GUID and looks up
the application specific login information associated with that GUID. This information is normally
temporary and may have a short-lived lifespan.guid - the temporary identifier to associate with the login informationguidvoid putNewLoginInfo(String guid, Map<String,String> info)
GUID and stores the
the provided application specific login information associated with that GUID. This information is normally
temporary and may have a short-lived lifespan.guid - the temporary identifier to associate with the login informationinfo - a Map of login information specific to applicationvoid removeNewLoginInfo(String guid)
GUID and removes
application specific login information associated with that GUID. This information is normally
temporary and may have a short-lived lifespan.guid - the temporary identifier to associate with the login informationboolean isAdminUser(javax.portlet.PortletRequest request)
request - the PortletRequest to check the user principal onPortalConfigurationConstants.USERS_DEFAULT_ADMINboolean isUserInAdminRole(javax.portlet.PortletRequest request)
request - the PortletRequest to check the user principal onPortalConfigurationConstants.ROLES_DEFAULT_ADMINString getUserFolderPath(String userName, Locale locale, String serverName)
userName - the portal user namelocale - optional locale, (defaults to system locale, for language
profiling rules)serverName - server name, (required for subsite profiling rules)String getBaseFolderPath(String userName, Locale locale, 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)Copyright © 1999–2016 The Apache Software Foundation. All rights reserved.