public class SignupPlugin extends de.deepamehta.plugins.webactivator.WebActivatorPlugin implements SignupPluginService, PostUpdateTopicListener
bundle, dms
Constructor and Description |
---|
SignupPlugin() |
Modifier and Type | Method and Description |
---|---|
private String |
createSimpleUserAccount(String username,
String password,
String mailbox) |
private void |
createUserValidationToken(String username,
String password,
String mailbox) |
com.sun.jersey.api.view.Viewable |
getAccountCreationOKView() |
com.sun.jersey.api.view.Viewable |
getAccountCreationPendingView() |
com.sun.jersey.api.view.Viewable |
getConfirmationInfoView() |
private Topic |
getCurrentSignupConfiguration()
The sign-up configuration object is loaded once when this bundle/plugin
is initialized by the framework and as soon as one configuration was
edited.
|
com.sun.jersey.api.view.Viewable |
getFailureView() |
com.sun.jersey.api.view.Viewable |
getLoginFormView() |
String |
getMailboxAvailability(String email) |
com.sun.jersey.api.view.Viewable |
getSignupFormView() |
String |
getUsernameAvailability(String username)
Checks for a Topic with the exact "username" value.
|
com.sun.jersey.api.view.Viewable |
handleSignupRequest(String username,
String password,
String mailbox)
Handles a sign-up request in regards to whether an Email based confirmation process is configured (true|false)
in the resp.
|
com.sun.jersey.api.view.Viewable |
handleTokenRequest(String key) |
void |
init() |
private boolean |
isMailboxTaken(String email) |
private boolean |
isUsernameTaken(String username) |
void |
postUpdateTopic(Topic topic,
TopicModel tm,
TopicModel tm1) |
private void |
prepareSignupPage() |
private Topic |
reloadConfiguration()
Loads the next sign-up configuration topic for this plugin.
|
private void |
sendConfirmationMail(String key,
String username,
String mailbox) |
private void |
sendNotificationMail(String username,
String mailbox) |
private void |
sendSystemMail(String subject,
String message,
String recipient) |
getTemplateEngine, initTemplateEngine, serviceRequestFilter, view, viewData
getBundleContext, getPluginName, getStaticResource, getUri, preInstall, publishFileSystem, serviceArrived, serviceGone, setCoreService, shutdown, start, stop, toString
public static final String MAILBOX_TYPE_URI
public static final String DM4_HOST_URL
public static final boolean DM4_ACCOUNTS_ENABLED
public static final String CONFIG_TOPIC_ACCOUNT_ENABLED
private final String SIGN_UP_PLUGIN_TOPIC_URI
private final String SIGN_UP_CONFIG_TYPE_URI
private final String CONFIG_PROJECT_TITLE
private final String CONFIG_WEBAPP_TITLE
private final String CONFIG_LOGO_PATH
private final String CONFIG_CSS_PATH
private final String CONFIG_READ_MORE_URL
private final String CONFIG_PAGES_FOOTER
private final String CONFIG_TOS_LABEL
private final String CONFIG_TOS_DETAILS
private final String CONFIG_PD_LABEL
private final String CONFIG_PD_DETAILS
private final String CONFIG_FROM_MAILBOX
private final String CONFIG_ADMIN_MAILBOX
private final String CONFIG_EMAIL_CONFIRMATION
private Topic currentModuleConfiguration
private AccessControlService acService
private WorkspacesService wsService
@Context javax.ws.rs.core.UriInfo uri
static DeepaMehtaEvent USER_ACCOUNT_CREATE_LISTENER
public SignupPlugin()
public void init()
init
in interface PluginContext
init
in class PluginActivator
public String getUsernameAvailability(String username)
SignupPluginService
getUsernameAvailability
in interface SignupPluginService
public String getMailboxAvailability(String email)
public com.sun.jersey.api.view.Viewable handleSignupRequest(String username, String password, String mailbox) throws javax.ws.rs.WebApplicationException
SignupPluginService
Sign-up Configuration
topic.
To check whether a username is already taken you *must* use the getUsernameAvailability() call before issueing
an account creation request via this method.handleSignupRequest
in interface SignupPluginService
username
- String Unique username.password
- String SHA256 encoded password with a prefix of "-SHA26-"mailbox
- String containing a valid Email address related to the account creation request.javax.ws.rs.WebApplicationException
public com.sun.jersey.api.view.Viewable handleTokenRequest(String key)
public com.sun.jersey.api.view.Viewable getSignupFormView()
public com.sun.jersey.api.view.Viewable getLoginFormView()
public com.sun.jersey.api.view.Viewable getAccountCreationOKView()
public com.sun.jersey.api.view.Viewable getAccountCreationPendingView()
public com.sun.jersey.api.view.Viewable getFailureView()
public com.sun.jersey.api.view.Viewable getConfirmationInfoView()
private void createUserValidationToken(String username, String password, String mailbox)
private String createSimpleUserAccount(String username, String password, String mailbox)
private Topic reloadConfiguration()
init()
,
postUpdateTopic()
private void sendConfirmationMail(String key, String username, String mailbox)
private void sendNotificationMail(String username, String mailbox)
private void sendSystemMail(String subject, String message, String recipient)
subject
- String Subject text for the message.message
- String Text content of the message.recipient
- String of Email Address message is sent to **must not** be NULL.private boolean isUsernameTaken(String username)
private boolean isMailboxTaken(String email)
private Topic getCurrentSignupConfiguration()
reloadConfiguration()
private void prepareSignupPage()
public void postUpdateTopic(Topic topic, TopicModel tm, TopicModel tm1)
postUpdateTopic
in interface PostUpdateTopicListener
Copyright © 2015. All Rights Reserved.