You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2014/04/09 01:32:34 UTC
svn commit: r1585864 [3/3] - in /openmeetings: branches/3.0.x/docs/
branches/3.0.x/src/axis/java/org/apache/openmeetings/axis/services/
branches/3.0.x/src/db/java/org/apache/openmeetings/db/dao/basic/
branches/3.0.x/src/db/java/org/apache/openmeetings/...
Modified: openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/RoomWebService.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/RoomWebService.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/RoomWebService.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/RoomWebService.java Tue Apr 8 23:32:32 2014
@@ -19,7 +19,6 @@
package org.apache.openmeetings.axis.services;
import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
-import static org.apache.openmeetings.web.app.WebSession.getBaseUrl;
import java.util.ArrayList;
import java.util.Calendar;
@@ -1683,8 +1682,7 @@ public class RoomWebService {
User invitee = userDao.getContact(username, username, username, users_id);
Invitation invitation = invitationManager.getInvitation(invitee, roomDao.get(room_id),
isPasswordProtected, invitationpass, Valid.fromInt(valid)
- , userDao.get(users_id), "", 1L,
- dFrom, dTo, null);
+ , userDao.get(users_id), 1L, dFrom, dTo, null);
if (invitation != null) {
return invitation.getHash();
@@ -1714,9 +1712,6 @@ public class RoomWebService {
* @param message
* the Message in the Email Body send with the invitation if
* sendMail is true
- * @param baseurl
- * the baseURL for the Infivations link in the Mail Body if
- * sendMail is true
* @param email
* the Email to send the invitation to if sendMail is true
* @param subject
@@ -1756,7 +1751,7 @@ public class RoomWebService {
* @throws AxisFault
*/
public String sendInvitationHash(String SID, String username,
- String message, String baseurl, String email, String subject,
+ String message, String email, String subject,
Long room_id, String conferencedomain, Boolean isPasswordProtected,
String invitationpass, Integer valid, String validFromDate,
String validFromTime, String validToDate, String validToTime,
@@ -1815,7 +1810,7 @@ public class RoomWebService {
User invitee = userDao.getContact(email, users_id);
Invitation invitation = invitationManager.getInvitation(invitee, roomDao.get(room_id),
isPasswordProtected, invitationpass, Valid.fromInt(valid)
- , userDao.get(users_id), baseurl, language_id,
+ , userDao.get(users_id), language_id,
dFrom, dTo, null);
if (invitation != null) {
@@ -1851,9 +1846,6 @@ public class RoomWebService {
* @param message
* the Message in the Email Body send with the invitation if
* sendMail is true
- * @param baseurl
- * the baseURL for the Infivations link in the Mail Body if
- * sendMail is true
* @param email
* the Email to send the invitation to if sendMail is true
* @param subject
@@ -1887,7 +1879,7 @@ public class RoomWebService {
* @throws AxisFault
*/
public String sendInvitationHashWithDateObject(String SID, String username,
- String message, String baseurl, String email, String subject,
+ String message, String email, String subject,
Long room_id, String conferencedomain, Boolean isPasswordProtected,
String invitationpass, Integer valid, Date fromDate, Date toDate,
Long language_id, Boolean sendMail) throws AxisFault {
@@ -1914,8 +1906,7 @@ public class RoomWebService {
User invitee = userDao.getContact(email, users_id);
Invitation invitation = invitationManager.getInvitation(invitee, roomDao.get(room_id),
isPasswordProtected, invitationpass, Valid.fromInt(valid)
- , userDao.get(users_id), baseurl, language_id,
- dFrom, dTo, null);
+ , userDao.get(users_id), language_id, dFrom, dTo, null);
if (invitation != null) {
if (sendMail) {
@@ -2187,7 +2178,7 @@ public class RoomWebService {
a.setPasswordProtected(isPasswordProtected);
a.setPassword(password);
a.setLanguageId(1L); //TODO check
- appointmentDao.update(a, getBaseUrl(), users_id); //FIXME verify !!!
+ appointmentDao.update(a, users_id); //FIXME verify !!!
return rooms_id;
@@ -2217,9 +2208,6 @@ public class RoomWebService {
* The last name of the meeting member
* @param email
* The email of the Meeting member
- * @param baseUrl
- * The baseUrl, this is important to send the correct link in the
- * invitation to the meeting member
* @param language_id
* The ID of the language, for the email that is send to the
* meeting member
@@ -2228,9 +2216,8 @@ public class RoomWebService {
* @throws AxisFault
*/
public Long addMeetingMemberRemindToRoom(String SID, Long room_id,
- String firstname, String lastname, String email, String baseUrl,
- Long language_id) throws AxisFault {
- return addExternalMeetingMemberRemindToRoom(SID, room_id, firstname, lastname, email, baseUrl, language_id, null, null);
+ String firstname, String lastname, String email, Long language_id) throws AxisFault {
+ return addExternalMeetingMemberRemindToRoom(SID, room_id, firstname, lastname, email, language_id, null, null);
}
/**
@@ -2247,9 +2234,6 @@ public class RoomWebService {
* The last name of the meeting member
* @param email
* The email of the Meeting member
- * @param baseUrl
- * The baseUrl, this is important to send the correct link in the
- * invitation to the meeting member
* @param language_id
* The ID of the language, for the email that is send to the
* meeting member
@@ -2262,7 +2246,7 @@ public class RoomWebService {
* @throws AxisFault
*/
public Long addExternalMeetingMemberRemindToRoom(String SID, Long room_id,
- String firstname, String lastname, String email, String baseUrl,
+ String firstname, String lastname, String email,
Long language_id, String jNameTimeZone, String invitorName)
throws AxisFault {
try {
@@ -2284,7 +2268,7 @@ public class RoomWebService {
mm.setAppointment(a);
mm.setUser(userDao.getContact(email, firstname, lastname, language_id, jNameTimeZone, users_id));
a.getMeetingMembers().add(mm);
- appointmentDao.update(a, baseUrl, users_id);
+ appointmentDao.update(a, users_id);
return mm.getId(); //FIXME check to return ID
} else {
Modified: openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/RoomWebServiceFacade.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/RoomWebServiceFacade.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/RoomWebServiceFacade.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/RoomWebServiceFacade.java Tue Apr 8 23:32:32 2014
@@ -451,9 +451,6 @@ public class RoomWebServiceFacade extend
* @param message
* the Message in the Email Body send with the invitation if
* sendMail is true
- * @param baseurl
- * the baseURL for the Infivations link in the Mail Body if
- * sendMail is true
* @param email
* the Email to send the invitation to if sendMail is true
* @param subject
@@ -493,13 +490,13 @@ public class RoomWebServiceFacade extend
* @throws AxisFault
*/
public String sendInvitationHash(String SID, String username,
- String message, String baseurl, String email, String subject,
+ String message, String email, String subject,
Long room_id, String conferencedomain, Boolean isPasswordProtected,
String invitationpass, Integer valid, String validFromDate,
String validFromTime, String validToDate, String validToTime,
Long language_id, Boolean sendMail) throws AxisFault {
return getBean(RoomWebService.class).sendInvitationHash(SID, username,
- message, baseurl, email, subject, room_id, conferencedomain,
+ message, email, subject, room_id, conferencedomain,
isPasswordProtected, invitationpass, valid, validFromDate,
validFromTime, validToDate, validToTime, language_id, sendMail);
}
@@ -517,9 +514,6 @@ public class RoomWebServiceFacade extend
* @param message
* the Message in the Email Body send with the invitation if
* sendMail is true
- * @param baseurl
- * the baseURL for the Infivations link in the Mail Body if
- * sendMail is true
* @param email
* the Email to send the invitation to if sendMail is true
* @param subject
@@ -553,12 +547,12 @@ public class RoomWebServiceFacade extend
* @throws AxisFault
*/
public String sendInvitationHashWithDateObject(String SID, String username,
- String message, String baseurl, String email, String subject,
+ String message, String email, String subject,
Long room_id, String conferencedomain, Boolean isPasswordProtected,
String invitationpass, Integer valid, Date fromDate, Date toDate,
Long language_id, Boolean sendMail) throws AxisFault {
return getBean(RoomWebService.class).sendInvitationHashWithDateObject(SID,
- username, message, baseurl, email, subject, room_id,
+ username, message, email, subject, room_id,
conferencedomain, isPasswordProtected, invitationpass, valid,
fromDate, toDate, language_id, sendMail);
}
@@ -595,18 +589,18 @@ public class RoomWebServiceFacade extend
}
public Long addMeetingMemberRemindToRoom(String SID, Long room_id,
- String firstname, String lastname, String email, String phone,
- String baseUrl, Long language_id) throws AxisFault {
+ String firstname, String lastname, String email,
+ Long language_id) throws AxisFault {
return getBean(RoomWebService.class).addMeetingMemberRemindToRoom(SID,
- room_id, firstname, lastname, email, phone, language_id);
+ room_id, firstname, lastname, email, language_id);
}
public Long addExternalMeetingMemberRemindToRoom(String SID, Long room_id,
- String firstname, String lastname, String email, String baseUrl,
+ String firstname, String lastname, String email,
Long language_id, String jNameTimeZone, String invitorName)
throws AxisFault {
return getBean(RoomWebService.class).addExternalMeetingMemberRemindToRoom(
- SID, room_id, firstname, lastname, email, baseUrl, language_id,
+ SID, room_id, firstname, lastname, email, language_id,
jNameTimeZone, invitorName);
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/UserWebService.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/UserWebService.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/UserWebService.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/UserWebService.java Tue Apr 8 23:32:32 2014
@@ -189,10 +189,6 @@ public class UserWebService {
* any town
* @param language_id
* the language_id
- * @param baseURL
- * the baseURL is needed to send the Initial Email correctly to
- * that User, otherwise the Link in the EMail that the new User
- * will reveive is not valid
*
* @return - id of the user added or error code
* @throws AxisFault
@@ -200,7 +196,7 @@ public class UserWebService {
public Long addNewUser(String SID, String username, String userpass,
String lastname, String firstname, String email,
String additionalname, String street, String zip, String fax,
- long states_id, String town, long language_id, String baseURL)
+ long states_id, String town, long language_id)
throws AxisFault {
try {
Long users_id = sessiondataDao.checkSession(SID);
@@ -213,7 +209,7 @@ public class UserWebService {
Long user_id = userManagement.registerUser(username, userpass,
lastname, firstname, email, new Date(), street,
additionalname, fax, zip, states_id, town, language_id,
- "", false, baseURL, true, // generate SIP Data if the config is enabled
+ "", false, true, // generate SIP Data if the config is enabled
jName_timeZone);
if (user_id == null || user_id < 0) {
@@ -269,10 +265,6 @@ public class UserWebService {
* any town
* @param language_id
* the language_id
- * @param baseURL
- * the baseURL is needed to send the Initial Email correctly to
- * that User, otherwise the Link in the EMail that the new User
- * will reveive is not valid
* @param jNameTimeZone
* the name of the timezone for the user
*
@@ -282,7 +274,7 @@ public class UserWebService {
public Long addNewUserWithTimeZone(String SID, String username,
String userpass, String lastname, String firstname, String email,
String additionalname, String street, String zip, String fax,
- long states_id, String town, long language_id, String baseURL,
+ long states_id, String town, long language_id,
String jNameTimeZone) throws AxisFault {
try {
Long users_id = sessiondataDao.checkSession(SID);
@@ -293,7 +285,7 @@ public class UserWebService {
Long user_id = userManagement.registerUser(username, userpass,
lastname, firstname, email, new Date(), street,
additionalname, fax, zip, states_id, town, language_id,
- "", false, baseURL, true, // generate
+ "", false, true, // generate
// SIP
// Data
// if
Modified: openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/UserWebServiceFacade.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/UserWebServiceFacade.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/UserWebServiceFacade.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-axis/src/main/java/org/apache/openmeetings/axis/services/UserWebServiceFacade.java Tue Apr 8 23:32:32 2014
@@ -65,21 +65,21 @@ public class UserWebServiceFacade extend
public Long addNewUser(String SID, String username, String userpass,
String lastname, String firstname, String email,
String additionalname, String street, String zip, String fax,
- long states_id, String town, long language_id, String baseURL)
+ long states_id, String town, long language_id)
throws AxisFault {
return getBean(UserWebService.class).addNewUser(SID, username, userpass,
lastname, firstname, email, additionalname, street, zip, fax,
- states_id, town, language_id, baseURL);
+ states_id, town, language_id);
}
public Long addNewUserWithTimeZone(String SID, String username,
String userpass, String lastname, String firstname, String email,
String additionalname, String street, String zip, String fax,
- long states_id, String town, long language_id, String baseURL,
+ long states_id, String town, long language_id,
String jNameTimeZone) throws AxisFault {
return getBean(UserWebService.class).addNewUserWithTimeZone(SID, username,
userpass, lastname, firstname, email, additionalname, street,
- zip, fax, states_id, town, language_id, baseURL, jNameTimeZone);
+ zip, fax, states_id, town, language_id, jNameTimeZone);
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/calendar/management/AppointmentLogic.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/calendar/management/AppointmentLogic.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/calendar/management/AppointmentLogic.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/calendar/management/AppointmentLogic.java Tue Apr 8 23:32:32 2014
@@ -18,6 +18,10 @@
*/
package org.apache.openmeetings.core.data.calendar.management;
+import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_APPLICATION_BASE_URL;
+import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_APPOINTMENT_REMINDER_MINUTES;
+import static org.apache.openmeetings.util.OpenmeetingsVariables.DEFAULT_BASE_URL;
+import static org.apache.openmeetings.util.OpenmeetingsVariables.DEFAULT_MINUTES_REMINDER_SEND;
import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
import java.util.ArrayList;
@@ -43,6 +47,7 @@ import org.apache.openmeetings.db.entity
import org.apache.openmeetings.db.entity.room.Invitation;
import org.apache.openmeetings.db.entity.room.Invitation.MessageType;
import org.apache.openmeetings.db.entity.room.Room;
+import org.apache.openmeetings.db.entity.user.User;
import org.apache.openmeetings.db.util.TimezoneUtil;
import org.apache.openmeetings.util.CalendarPatterns;
import org.red5.logging.Red5LoggerFactory;
@@ -79,8 +84,6 @@ public class AppointmentLogic {
@Autowired
private RoomTypeDao roomTypeDao;
- private static int DEFAULT_MINUTES_REMINDER_SEND = 15;
-
public List<Appointment> getTodaysAppointmentsForUser(Long userId) {
try {
log.debug("getTodaysAppointmentsForUser");
@@ -136,6 +139,44 @@ public class AppointmentLogic {
return null;
}
+ private void sendReminder(User u, Appointment a) throws Exception {
+ Invitation i = new Invitation();
+ i.setInvitedBy(u);
+ i.setInvitee(u);
+ i.setAppointment(a);
+ sendReminder(u, a, i);
+ }
+
+ private void sendReminder(User u, Appointment a, Invitation inv) throws Exception {
+ if (inv == null) {
+ log.error(String.format("Error retrieving Invitation for member %s in Appointment %s"
+ , u.getAdresses().getEmail(), a.getTitle()));
+ return;
+ }
+
+ TimeZone tZone = timezoneUtil.getTimeZone(u.getTimeZoneId());
+
+ long language_id = u.getLanguage_id();
+ // Get the required labels one time for all meeting members. The
+ // Language of the email will be the system default language
+ String labelid1158 = fieldManager.getString(1158L, language_id);
+ String labelid1153 = fieldManager.getString(1153L, language_id);
+ String labelid1154 = fieldManager.getString(1154L, language_id);
+
+ String subject = generateSubject(labelid1158, a, tZone);
+ String smsSubject = generateSMSSubject(labelid1158, a);
+
+ String message = generateMessage(labelid1158, a, language_id, labelid1153, labelid1154, tZone);
+
+ invitationManager.sendInvitionLink(inv, MessageType.Create, subject, message, false);
+
+ invitationManager.sendInvitationReminderSMS(u.getAdresses().getPhone(), smsSubject, language_id);
+ if (inv.getHash() != null) {
+ inv.setUpdated(new Date());
+ invitationDao.update(inv);
+ }
+ }
+
/**
* Sending Reminder in Simple mail format 5 minutes before Meeting begins
*/
@@ -143,7 +184,12 @@ public class AppointmentLogic {
public void doScheduledMeetingReminder() throws Exception {
// log.debug("doScheduledMeetingReminder");
- Integer minutesReminderSend = configurationDao.getConfValue("number.minutes.reminder.send", Integer.class
+ String baseUrl = configurationDao.getConfValue(CONFIG_APPLICATION_BASE_URL, String.class, DEFAULT_BASE_URL);
+ if (baseUrl == null || baseUrl.length() < 1) {
+ log.error("Error retrieving baseUrl for application");
+ return;
+ }
+ Integer minutesReminderSend = configurationDao.getConfValue(CONFIG_APPOINTMENT_REMINDER_MINUTES, Integer.class
, "" + DEFAULT_MINUTES_REMINDER_SEND);
if (minutesReminderSend == null) {
throw new Exception("minutesReminderSend is null!");
@@ -169,7 +215,7 @@ public class AppointmentLogic {
Calendar aNow = Calendar.getInstance(ownerZone);
Calendar aStart = a.startCalendar(ownerZone);
aStart.add(Calendar.MINUTE, -minutesReminderSend);
- if (aStart.before(aNow)) {
+ if (aStart.after(aNow)) {
// to early to send reminder
continue;
}
@@ -179,6 +225,7 @@ public class AppointmentLogic {
List<MeetingMember> members = a.getMeetingMembers();
+ sendReminder(a.getOwner(), a);
if (members == null) {
log.debug("doScheduledMeetingReminder : no members in meeting!");
continue;
@@ -191,36 +238,7 @@ public class AppointmentLogic {
Invitation inv = mm.getInvitation();
- if (inv == null) {
- log.error(String.format("Error retrieving Invitation for member %s in Appointment %s"
- , mm.getUser().getAdresses().getEmail(), a.getTitle()));
- continue;
- }
-
- if (inv.getBaseUrl() == null || inv.getBaseUrl().length() < 1) {
- log.error("Error retrieving baseUrl from Invitation ID : " + inv.getId());
- continue;
- }
-
- TimeZone tZone = timezoneUtil.getTimeZone(mm.getTimeZoneId());
-
- long language_id = mm.getUser().getLanguage_id();
- // Get the required labels one time for all meeting members. The
- // Language of the email will be the system default language
- String labelid1158 = fieldManager.getString(1158L, language_id);
- String labelid1153 = fieldManager.getString(1153L, language_id);
- String labelid1154 = fieldManager.getString(1154L, language_id);
-
- String subject = generateSubject(labelid1158, a, tZone);
- String smsSubject = generateSMSSubject(labelid1158, a);
-
- String message = generateMessage(labelid1158, a, language_id, labelid1153, labelid1154, tZone);
-
- invitationManager.sendInvitionLink(inv, MessageType.Create, subject, message, false);
-
- invitationManager.sendInvitationReminderSMS(mm.getUser().getAdresses().getPhone(), smsSubject, language_id);
- inv.setUpdated(new Date());
- invitationDao.update(inv);
+ sendReminder(mm.getUser(), a, inv);
}
}
}
@@ -258,7 +276,7 @@ public class AppointmentLogic {
StringBuilder message = new StringBuilder(labelid1158);
message.append(" ").append(ment.getTitle());
- if (ment.getDescription().length() != 0) {
+ if (ment.getDescription() != null && ment.getDescription().length() > 0) {
message.append(fieldManager.getString(1152L, language_id)).append(ment.getDescription());
}
@@ -276,7 +294,7 @@ public class AppointmentLogic {
Calendar appointmentstart, Calendar appointmentend,
Boolean isDaily, Boolean isWeekly, Boolean isMonthly,
Boolean isYearly, Long categoryId, Long remind, String[] mmClient,
- Long roomType, String baseUrl, Long languageId,
+ Long roomType, Long languageId,
Boolean isPasswordProtected, String password, long roomId, Long users_id) {
Appointment a = new Appointment();
a.setTitle(appointmentName);
Modified: openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/ldap/LdapLoginManagement.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/ldap/LdapLoginManagement.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/ldap/LdapLoginManagement.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/ldap/LdapLoginManagement.java Tue Apr 8 23:32:32 2014
@@ -687,7 +687,6 @@ public class LdapLoginManagement impleme
// Ids
phone,
false,
- "",// BaseURL is empty as we do not send an Email here
false,// send verification code
iCalTz,
false, // forceTimeZoneCheck
Modified: openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/InvitationService.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/InvitationService.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/InvitationService.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/InvitationService.java Tue Apr 8 23:32:32 2014
@@ -66,24 +66,12 @@ public class InvitationService implement
log.debug("InvitationService resultReceived" + arg0);
}
- private String getBaseUrl(String baseUrl) {
- String url = null;
- if (baseUrl != null) {
- url = baseUrl.toLowerCase();
- if (url.endsWith("swf")) {
- url = url.substring(0, url.length() - 4);
- }
- }
- return url;
- }
-
/**
* send an invitation to another user by Mail
*
* @param SID
* @param username
* @param message
- * @param baseurl
* @param email
* @param subject
* @param room_id
@@ -100,7 +88,7 @@ public class InvitationService implement
* @return - invitation object in case of success, "Sys - Error" string or null in case of error
*/
public Object sendInvitationHash(String SID, String username,
- String message, String baseurl, String email, String subject,
+ String message, String email, String subject,
Long room_id, String conferencedomain, Boolean isPasswordProtected,
String invitationpass, Integer valid, Date validFromDate,
String validFromTime, Date validToDate, String validToTime,
@@ -154,8 +142,7 @@ public class InvitationService implement
User invitee = userDao.getContact(email, users_id);
Invitation invitation = invitationManager.getInvitation(invitee, roomDao.get(room_id),
isPasswordProtected, invitationpass, Valid.fromInt(valid)
- , userDao.get(users_id), getBaseUrl(baseurl), language_id,
- dFrom, dTo, null);
+ , userDao.get(users_id), language_id, dFrom, dTo, null);
if (invitation != null) {
if (sendMail) {
@@ -177,14 +164,13 @@ public class InvitationService implement
return null;
}
- public String sendInvitationByHash(String SID, String invitationHash, String message, String baseurl, String subject
+ public String sendInvitationByHash(String SID, String invitationHash, String message, String subject
, Long language_id) throws Exception {
Long users_id = sessiondataDao.checkSession(SID);
Long user_level = userManager.getUserLevelByID(users_id);
if (AuthLevelUtil.checkUserLevel(user_level)) {
Invitation inv = (Invitation)invitationManager.getInvitationByHashCode(invitationHash, true);
- inv.setBaseUrl(getBaseUrl(baseurl));
inv.getInvitee().setLanguage_id(language_id);
invitationManager.sendInvitionLink(inv, MessageType.Create, subject, message, false);
} else {
Modified: openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/AbstractJUnitDefaults.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/AbstractJUnitDefaults.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/AbstractJUnitDefaults.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/AbstractJUnitDefaults.java Tue Apr 8 23:32:32 2014
@@ -44,7 +44,6 @@ import org.springframework.beans.factory
public abstract class AbstractJUnitDefaults extends AbstractSpringTest {
private static final Logger log = Red5LoggerFactory.getLogger(AbstractJUnitDefaults.class);
- public static final String OM_URL = "http://testserver.apache.org/openmeetings";
protected static final String username = "swagner";
protected static final String userpass = "qweqwe";
Modified: openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/calendar/TestAppointmentAddAppointment.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/calendar/TestAppointmentAddAppointment.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/calendar/TestAppointmentAddAppointment.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/calendar/TestAppointmentAddAppointment.java Tue Apr 8 23:32:32 2014
@@ -66,15 +66,14 @@ public class TestAppointmentAddAppointme
"first" + i + ".last" + i + "@webbase-design.de", "Etc/GMT+1");
}
Long language_id = 1L;
- String baseUrl = "http://localhost:5080/openmeetings/";
Long roomType = 1L;
Appointment a = appointmentLogic.getAppointment(appointmentName,
appointmentLocation, appointmentDescription,
start, end, isDaily, isWeekly,
isMonthly, isYearly, categoryId, remind, mmClient,
- roomType, baseUrl, language_id, false, "", -1, users_id);
- a = appointmentDao.update(a, baseUrl, users_id);
+ roomType, language_id, false, "", -1, users_id);
+ a = appointmentDao.update(a, users_id);
Thread.sleep(3000);
Modified: openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/calendar/TestDatabaseStructureGetAppointmentByRange.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/calendar/TestDatabaseStructureGetAppointmentByRange.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/calendar/TestDatabaseStructureGetAppointmentByRange.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/calendar/TestDatabaseStructureGetAppointmentByRange.java Tue Apr 8 23:32:32 2014
@@ -77,9 +77,9 @@ public class TestDatabaseStructureGetApp
mm3.setAppointment(a3);
a3.getMeetingMembers().add(mm3);
- a1 = appointmentDao.update(a1, OM_URL, userId);
- a2 = appointmentDao.update(a2, OM_URL, userId);
- a3 = appointmentDao.update(a3, OM_URL, userId);
+ a1 = appointmentDao.update(a1, userId);
+ a2 = appointmentDao.update(a2, userId);
+ a3 = appointmentDao.update(a3, userId);
int a1found = 0, a2found = 0, a3found = 0;
for (Appointment a : appointmentDao.getAppointmentsByRange(userId, rangeStart.getTime(), rangeEnd.getTime())) {
Modified: openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/calendar/TestGetAppointment.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/calendar/TestGetAppointment.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/calendar/TestGetAppointment.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/calendar/TestGetAppointment.java Tue Apr 8 23:32:32 2014
@@ -48,7 +48,7 @@ public class TestGetAppointment extends
Appointment a1 = getAppointment(now.getTime(), a1End.getTime());
a1.setTitle("GetAppointment");
- a1 = appointmentDao.update(a1, OM_URL, userId);
+ a1 = appointmentDao.update(a1, userId);
Appointment a = appointmentDao.get(a1.getId());
assertNotNull("Failed to get Appointment By id", a);
Modified: openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/invitiation/TestInvitation.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/invitiation/TestInvitation.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/invitiation/TestInvitation.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-core/src/test/java/org/apache/openmeetings/test/invitiation/TestInvitation.java Tue Apr 8 23:32:32 2014
@@ -49,7 +49,7 @@ public class TestInvitation extends Abst
User us = (User) userManager.loginUser(sessionData.getSession_id(), username, userpass, null, null, false);
- invitationService.sendInvitationHash(sessionData.getSession_id(), username, "message", "baseurl", "sebawagner@apache.org",
+ invitationService.sendInvitationHash(sessionData.getSession_id(), username, "message", "sebawagner@apache.org",
"subject", 1L, "", false, "", 1, new Date(), "12:00", new Date(), "14:00", 1L, us.getTimeZoneId(), true);
} catch (Exception err) {
Modified: openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java Tue Apr 8 23:32:32 2014
@@ -18,8 +18,10 @@
*/
package org.apache.openmeetings.db.dao.basic;
+import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_APPLICATION_BASE_URL;
import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_CRYPT_KEY;
import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_MAX_UPLOAD_SIZE_KEY;
+import static org.apache.openmeetings.util.OpenmeetingsVariables.DEFAULT_BASE_URL;
import static org.apache.openmeetings.util.OpenmeetingsVariables.configKeyCryptClassName;
import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
import static org.apache.openmeetings.util.OpenmeetingsVariables.whiteboardDrawStatus;
@@ -68,8 +70,7 @@ public class ConfigurationDao implements
private AdminUserDao adminUserDao;
/**
- * @deprecated Dao's are not the place to store session variables, also
- * updates to the key won't update this variable
+ * @deprecated Dao's are not the place to store session variables
*/
@Deprecated
private String appName = null;
@@ -180,56 +181,21 @@ public class ConfigurationDao implements
return update(c, userId);
}
- /**
- * @deprecated please use {@link ConfigurationDao#update(Configuration, Long)}
- */
- public Long addConfig(Configuration conf) {
- try {
- conf = em.merge(conf);
- Long configuration_id = conf.getConfiguration_id();
- return configuration_id;
- } catch (Exception ex2) {
- log.error("[updateConfByUID]: ", ex2);
- }
- return new Long(-1);
- }
-
- /**
- * @deprecated please use {@link ConfigurationDao#update(Configuration, Long)}
- * @param conf
- * @return
- */
- public Long updateConfig(Configuration conf) {
- try {
- if (conf.getConfiguration_id() == null
- || conf.getConfiguration_id() == 0
- || conf.getConfiguration_id() == 0L) {
- em.persist(conf);
- } else {
- if (!em.contains(conf)) {
- conf = em.merge(conf);
- }
- }
- if (CONFIG_CRYPT_KEY.equals(conf.getConf_key())) {
- configKeyCryptClassName = conf.getConf_value();
- } else if ("show.whiteboard.draw.status".equals(conf.getConf_key())) {
- whiteboardDrawStatus = "1".equals(conf.getConf_value());
- }
- return conf.getConfiguration_id();
- } catch (Exception ex2) {
- log.error("[updateConfByUID]: ", ex2);
- }
- return new Long(-1);
- }
-
public String getAppName() {
if (appName == null) {
- appName = getConfValue("application.name", String.class,
- ConfigurationDao.DEFAULT_APP_NAME);
+ appName = getConfValue("application.name", String.class, DEFAULT_APP_NAME);
}
return appName;
}
+ public String getBaseUrl() {
+ String val = getConfValue(CONFIG_APPLICATION_BASE_URL, String.class, DEFAULT_BASE_URL);
+ if (val != null && !val.endsWith("/")) {
+ val += "/";
+ }
+ return val;
+ }
+
public Configuration get(long id) {
if (id <= 0) {
return null;
Modified: openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/calendar/AppointmentDao.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/calendar/AppointmentDao.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/calendar/AppointmentDao.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/calendar/AppointmentDao.java Tue Apr 8 23:32:32 2014
@@ -144,7 +144,7 @@ public class AppointmentDao {
return null;
}
- public Appointment update(Appointment a, String baseUrl, Long userId) {
+ public Appointment update(Appointment a, Long userId) {
Room r = a.getRoom();
if (r.getRooms_id() == null) {
r.setName(a.getTitle());
@@ -165,25 +165,25 @@ public class AppointmentDao {
if (mmList != null){
for (MeetingMember mm : mmList) {
if (mm.getId() == null || !mmIds.contains(mm.getId())) {
- invitationManager.processInvitation(a, mm, MessageType.Create, baseUrl);
+ invitationManager.processInvitation(a, mm, MessageType.Create);
} else {
mmIds.remove(mm.getId());
- invitationManager.processInvitation(a, mm, MessageType.Update, baseUrl, sendMail);
+ invitationManager.processInvitation(a, mm, MessageType.Update, sendMail);
}
}
}
for (long id : mmIds) {
- invitationManager.processInvitation(a, meetingMemberDao.get(id), MessageType.Cancel, baseUrl);
+ invitationManager.processInvitation(a, meetingMemberDao.get(id), MessageType.Cancel);
}
//notify owner
MeetingMember owner = new MeetingMember();
owner.setUser(a.getOwner());
if (a.getId() == null) {
- invitationManager.processInvitation(a, owner, MessageType.Create, baseUrl);
+ invitationManager.processInvitation(a, owner, MessageType.Create);
} else if (a.isDeleted()) {
- invitationManager.processInvitation(a, owner, MessageType.Cancel, baseUrl);
+ invitationManager.processInvitation(a, owner, MessageType.Cancel);
} else if (sendMail) {
- invitationManager.processInvitation(a, owner, MessageType.Update, baseUrl, sendMail);
+ invitationManager.processInvitation(a, owner, MessageType.Update, sendMail);
}
if (a.getId() == null) {
a.setInserted(new Date());
@@ -227,14 +227,14 @@ public class AppointmentDao {
// ----------------------------------------------------------------------------------------------------------
- public void delete(Appointment a, String baseUrl, Long userId) {
+ public void delete(Appointment a, Long userId) {
a.setUpdated(new Date());
a.setDeleted(true);
a.setMeetingMembers(null);
if (Boolean.TRUE.equals(a.getRoom().getAppointment())) {
a.getRoom().setDeleted(true);
}
- update(a, baseUrl, userId);
+ update(a, userId);
}
public List<Appointment> getAppointmentsByRange(Long userId, Date start, Date end) {
Modified: openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/IInvitationManager.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/IInvitationManager.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/IInvitationManager.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/IInvitationManager.java Tue Apr 8 23:32:32 2014
@@ -29,18 +29,18 @@ import org.apache.openmeetings.db.entity
import org.apache.openmeetings.db.entity.user.User;
public interface IInvitationManager {
- void processInvitation(Appointment a, MeetingMember member, MessageType type, String baseUrl);
+ void processInvitation(Appointment a, MeetingMember member, MessageType type);
- void processInvitation(Appointment a, MeetingMember mm, MessageType type, String baseUrl, boolean sendMail);
+ void processInvitation(Appointment a, MeetingMember mm, MessageType type, boolean sendMail);
Invitation getInvitation(Invitation _invitation, User inveetee, Room room
, boolean isPasswordProtected, String invitationpass, Valid valid,
- User createdBy, String baseUrl, Long language_id, Date gmtTimeStart, Date gmtTimeEnd
+ User createdBy, Long language_id, Date gmtTimeStart, Date gmtTimeEnd
, Appointment appointment);
Invitation getInvitation(User inveetee, Room room
, boolean isPasswordProtected, String invitationpass, Valid valid,
- User createdBy, String baseUrl, Long language_id, Date gmtTimeStart, Date gmtTimeEnd
+ User createdBy, Long language_id, Date gmtTimeStart, Date gmtTimeEnd
, Appointment appointment);
void sendInvitionLink(Invitation i, MessageType type, String subject, String message, boolean ical) throws Exception ;
Modified: openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/user/IUserManager.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/user/IUserManager.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/user/IUserManager.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/user/IUserManager.java Tue Apr 8 23:32:32 2014
@@ -34,7 +34,7 @@ public interface IUserManager {
Long registerUser(String login, String Userpass, String lastname,
String firstname, String email, Date age, String street,
String additionalname, String fax, String zip, long states_id,
- String town, long language_id, String phone, boolean sendSMS, String baseURL,
+ String town, long language_id, String phone, boolean sendSMS,
boolean generateSipUserData, String jNameTimeZone);
Long registerUserInit(long user_level, long level_id, int availible,
@@ -42,7 +42,7 @@ public interface IUserManager {
String firstname, String email, Date age, String street,
String additionalname, String fax, String zip, long states_id,
String town, long language_id, boolean sendWelcomeMessage,
- List<Long> organisations, String phone, boolean sendSMS, String baseURL,
+ List<Long> organisations, String phone, boolean sendSMS,
Boolean sendConfirmation,
TimeZone timezone, Boolean forceTimeZoneCheck,
String userOffers, String userSearchs, Boolean showContactData,
@@ -53,7 +53,7 @@ public interface IUserManager {
String firstname, String email, Date age, String street,
String additionalname, String fax, String zip, long states_id,
String town, long language_id, boolean sendWelcomeMessage,
- List<Long> organisations, String phone, boolean sendSMS, String baseURL,
+ List<Long> organisations, String phone, boolean sendSMS,
Boolean sendConfirmation, String iCalTz, Boolean forceTimeZoneCheck,
String userOffers, String userSearchs, Boolean showContactData,
Boolean showContactDataToContacts) throws Exception;
Modified: openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/calendar/Appointment.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/calendar/Appointment.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/calendar/Appointment.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/calendar/Appointment.java Tue Apr 8 23:32:32 2014
@@ -71,9 +71,9 @@ import org.simpleframework.xml.Root;
+ " )"
)
, @NamedQuery(name="appointmentsInRangeRemind",
- query="SELECT a FROM MeetingMember mm INNER JOIN mm.appointment a "
+ query="SELECT a FROM Appointment a "
//only ReminderType simple mail is concerned!
- + "WHERE mm.deleted = false AND a.deleted = false AND a.reminderEmailSend = false"
+ + "WHERE a.deleted = false AND a.reminderEmailSend = false"
+ " AND (a.remind.typId = 2 OR a.remind.typId = 3) "
+ " AND ( "
+ " (a.start BETWEEN :starttime AND :endtime) "
Modified: openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/calendar/MeetingMember.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/calendar/MeetingMember.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/calendar/MeetingMember.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/calendar/MeetingMember.java Tue Apr 8 23:32:32 2014
@@ -89,13 +89,6 @@ public class MeetingMember implements Se
@ForeignKey(enabled = true)
private Invitation invitation;
- /**
- * java.util.TimeZone Id
- */
- @Column(name = "time_zone_id")
- @Element(data = true, required = false)
- private String timeZoneId;
-
@Column(name = "is_connected_event")
private boolean connectedEvent;
@@ -170,13 +163,4 @@ public class MeetingMember implements Se
public void setConnectedEvent(boolean connectedEvent) {
this.connectedEvent = connectedEvent;
}
-
- public String getTimeZoneId() {
- return timeZoneId;
- }
-
- public void setTimeZoneId(String timeZoneId) {
- this.timeZoneId = timeZoneId;
- }
-
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Invitation.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Invitation.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Invitation.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Invitation.java Tue Apr 8 23:32:32 2014
@@ -128,11 +128,6 @@ public class Invitation implements Seria
@ForeignKey(enabled = true)
private Appointment appointment;
- // BaseuRL defined at creation of InvitationLink - used for chronological
- // reminders on serverside (updates)
- @Column(name = "base_url")
- private String baseUrl;
-
//variable used in Flash
private boolean allowEntry = true;
@@ -240,14 +235,6 @@ public class Invitation implements Seria
this.used = used;
}
- public String getBaseUrl() {
- return baseUrl;
- }
-
- public void setBaseUrl(String baseUrl) {
- this.baseUrl = baseUrl;
- }
-
public Appointment getAppointment() {
return appointment;
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/installation/ImportInitvalues.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/installation/ImportInitvalues.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/installation/ImportInitvalues.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/installation/ImportInitvalues.java Tue Apr 8 23:32:32 2014
@@ -19,6 +19,8 @@
package org.apache.openmeetings.installation;
import static org.apache.openmeetings.db.dao.basic.ConfigurationDao.DEFAULT_MAX_UPLOAD_SIZE;
+import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_APPLICATION_BASE_URL;
+import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_APPOINTMENT_REMINDER_MINUTES;
import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_CRYPT_KEY;
import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_DASHBOARD_SHOW_MYROOMS_KEY;
import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_DASHBOARD_SHOW_RSS_KEY;
@@ -368,14 +370,12 @@ public class ImportInitvalues {
configurationDao.add("ffmpeg_path", cfg.ffmpegPath, null,
"Path To FFMPEG");
- configurationDao
- .add(
+ configurationDao.add(
"office.path",
cfg.officePath,
null,
"The path to OpenOffice/LibreOffice (optional) please set this to the real path in case jodconverter is unable to find OpenOffice/LibreOffice installation automatically");
- configurationDao
- .add(
+ configurationDao.add(
"jod.path",
cfg.jodPath,
null,
@@ -387,13 +387,11 @@ public class ImportInitvalues {
configurationDao.add(CONFIG_RSS_FEED2_KEY, cfg.urlFeed2, null,
"Feed URL 2");
- configurationDao
- .add("sendEmailAtRegister", cfg.sendEmailAtRegister,
+ configurationDao.add("sendEmailAtRegister", cfg.sendEmailAtRegister,
null,
"User get a EMail with their Account data. Values: 0(No) or 1(Yes)");
- configurationDao
- .add(
+ configurationDao.add(
"sendEmailWithVerficationCode",
cfg.sendEmailWithVerficationCode,
null,
@@ -402,8 +400,7 @@ public class ImportInitvalues {
+ "It makes no sense to make this(sendEmailWithVerficationCode) 1(Yes) while "
+ "sendEmailAtRegister is 0(No) cause you need"
+ "to send a EMail.");
- configurationDao
- .add(
+ configurationDao.add(
"default_export_font",
cfg.defaultExportFont,
null,
@@ -413,6 +410,8 @@ public class ImportInitvalues {
configurationDao.add("default.rpc.userid", "" + 1, null,
"The User-Id of the Control User in OpenMeetings");
+ configurationDao.add(CONFIG_APPLICATION_BASE_URL, cfg.baseUrl, null, "Base URL your OPenmeetings installation will be accessible at.");
+
// ***************************************
// ***************************************
// red5SIP Integration Coniguration Values
@@ -473,7 +472,7 @@ public class ImportInitvalues {
configurationDao
.add(
- "number.minutes.reminder.send",
+ CONFIG_APPOINTMENT_REMINDER_MINUTES,
"15",
null,
"The number of minutes before reminder emails are send. Set to 0 to disable reminder emails");
@@ -514,7 +513,7 @@ public class ImportInitvalues {
"A hot key code for the 'mute/unmute audio' functionality. Keycode 118 is F7");
// system-wide ldap params
- configurationDao.add("ldap_default_id", "0", null,
+ configurationDao.add(CONFIG_DEFAULT_LDAP_ID, "0", null,
"Ldap domain selected by default in the login screen");
// set inviter's email address as ReplyTo in email invitations
@@ -652,12 +651,11 @@ public class ImportInitvalues {
org.setStarttime(new Date());
org = organisationDao.update(org, null);
- // BaseUrl as param is empty as we do not send an EMAIL here
Long user_id = userManager.registerUserInit(new Long(3), 3, 1,
1, cfg.username, cfg.password, "lastname", "firstname", cfg.email,
new java.util.Date(), "street", "no", "fax", "zip", 1,
"town", default_lang_id, false,
- Arrays.asList(org.getOrganisation_id()), "phone", false, "", false,
+ Arrays.asList(org.getOrganisation_id()), "phone", false, false,
timezoneUtil.getTimeZone(cfg.ical_timeZone),
false, "", "", false, true, null);
Modified: openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-install/src/main/java/org/apache/openmeetings/installation/InstallationConfig.java Tue Apr 8 23:32:32 2014
@@ -18,12 +18,15 @@
*/
package org.apache.openmeetings.installation;
+import static org.apache.openmeetings.util.OpenmeetingsVariables.DEFAULT_BASE_URL;
+
import java.io.Serializable;
import org.apache.openmeetings.util.crypt.MD5Implementation;
public class InstallationConfig implements Serializable {
- private static final long serialVersionUID = 8833208340193880562L;
+ private static final long serialVersionUID = 1L;
+
public String appName = "Openmeetings";
public String username;
public String password;
@@ -61,6 +64,7 @@ public class InstallationConfig implemen
public String red5SipRoomPrefix = "400";
public String red5SipExtenContext = "rooms";
public String replyToOrganizer = "1";
+ public String baseUrl = DEFAULT_BASE_URL;
@Override
public String toString() {
Modified: openmeetings/trunk/singlewebapp/openmeetings-service/src/main/java/org/apache/openmeetings/service/room/InvitationManager.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-service/src/main/java/org/apache/openmeetings/service/room/InvitationManager.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-service/src/main/java/org/apache/openmeetings/service/room/InvitationManager.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-service/src/main/java/org/apache/openmeetings/service/room/InvitationManager.java Tue Apr 8 23:32:32 2014
@@ -30,6 +30,7 @@ import java.util.Vector;
import org.apache.openmeetings.core.data.basic.FieldManager;
import org.apache.openmeetings.core.mail.MailHandler;
import org.apache.openmeetings.core.mail.SMSHandler;
+import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
import org.apache.openmeetings.db.dao.room.IInvitationManager;
import org.apache.openmeetings.db.dao.room.InvitationDao;
import org.apache.openmeetings.db.entity.basic.MailMessage;
@@ -70,6 +71,8 @@ public class InvitationManager implement
private SMSHandler smsHandler;
@Autowired
private TimezoneUtil timezoneUtil;
+ @Autowired
+ private ConfigurationDao configDao;
private String formatSubject(Long langId, Appointment a, TimeZone tz) {
@@ -221,7 +224,7 @@ public class InvitationManager implement
}
public void sendInvitionLink(Invitation i, MessageType type, String subject, String message, boolean ical) throws Exception {
- String invitation_link = LinkHelper.getInvitationLink(i);
+ String invitation_link = LinkHelper.getInvitationLink(configDao.getBaseUrl(), i);
User owner = i.getInvitedBy();
String invitorName = owner.getFirstname() + " " + owner.getLastname();
@@ -389,11 +392,11 @@ public class InvitationManager implement
return new Long(-1);
}
- public void processInvitation(Appointment a, MeetingMember member, MessageType type, String baseUrl) {
- processInvitation(a, member, type, baseUrl, true);
+ public void processInvitation(Appointment a, MeetingMember member, MessageType type) {
+ processInvitation(a, member, type, true);
}
- public void processInvitation(Appointment a, MeetingMember mm, MessageType type, String baseUrl, boolean sendMail) {
+ public void processInvitation(Appointment a, MeetingMember mm, MessageType type, boolean sendMail) {
if (a.getRemind() == null) {
log.error("Appointment doesn't have reminder set!");
return;
@@ -413,7 +416,7 @@ public class InvitationManager implement
try {
mm.setInvitation(getInvitation(mm.getInvitation()
, mm.getUser(), a.getRoom(), a.isPasswordProtected(), a.getPassword()
- , Valid.Period, a.getOwner(), baseUrl, null, a.getStart(), a.getEnd(), a));
+ , Valid.Period, a.getOwner(), null, a.getStart(), a.getEnd(), a));
if (sendMail) {
sendInvitionLink(a, mm, type, remindType > 2);
}
@@ -425,7 +428,7 @@ public class InvitationManager implement
public Invitation getInvitation(Invitation _invitation, User inveetee, Room room
, boolean isPasswordProtected, String invitationpass, Valid valid,
- User createdBy, String baseUrl, Long language_id, Date gmtTimeStart, Date gmtTimeEnd
+ User createdBy, Long language_id, Date gmtTimeStart, Date gmtTimeEnd
, Appointment appointment) {
Invitation invitation = _invitation;
@@ -446,10 +449,6 @@ public class InvitationManager implement
}
invitation.setUsed(false);
- log.debug(baseUrl);
- if (baseUrl != null) {
- invitation.setBaseUrl(baseUrl);
- }
invitation.setValid(valid);
// valid period of Invitation
@@ -478,13 +477,11 @@ public class InvitationManager implement
return invitation;
}
- public Invitation getInvitation(User inveetee, Room room
- , boolean isPasswordProtected, String invitationpass, Valid valid,
- User createdBy, String baseUrl, Long language_id, Date gmtTimeStart, Date gmtTimeEnd
- , Appointment appointment)
+ public Invitation getInvitation(User inveetee, Room room, boolean isPasswordProtected, String invitationpass, Valid valid,
+ User createdBy, Long language_id, Date gmtTimeStart, Date gmtTimeEnd, Appointment appointment)
{
Invitation i = getInvitation((Invitation)null, inveetee, room, isPasswordProtected, invitationpass, valid, createdBy
- , baseUrl, language_id, gmtTimeStart, gmtTimeEnd, appointment);
+ , language_id, gmtTimeStart, gmtTimeEnd, appointment);
i = invitationDao.update(i);
return i;
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-service/src/main/java/org/apache/openmeetings/service/user/UserManager.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-service/src/main/java/org/apache/openmeetings/service/user/UserManager.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-service/src/main/java/org/apache/openmeetings/service/user/UserManager.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-service/src/main/java/org/apache/openmeetings/service/user/UserManager.java Tue Apr 8 23:32:32 2014
@@ -493,17 +493,17 @@ public class UserManager implements IUse
public Long registerUser(String login, String Userpass, String lastname,
String firstname, String email, Date age, String street,
String additionalname, String fax, String zip, long states_id,
- String town, long language_id, String phone, boolean sendSMS, String baseURL,
+ String town, long language_id, String phone, boolean sendSMS,
boolean generateSipUserData, String jNameTimeZone) {
+ String baseURL = configurationDao.getBaseUrl();
boolean sendConfirmation = baseURL != null
&& !baseURL.isEmpty()
- && 1 == configurationDao.getConfValue(
- "sendEmailWithVerficationCode", Integer.class, "0");
+ && 1 == configurationDao.getConfValue("sendEmailWithVerficationCode", Integer.class, "0");
return registerUser(login, Userpass, lastname, firstname, email, age,
street, additionalname, fax, zip, states_id, town, language_id,
- phone, sendSMS, baseURL, generateSipUserData, jNameTimeZone, sendConfirmation);
+ phone, sendSMS, generateSipUserData, jNameTimeZone, sendConfirmation);
}
public Long registerUserNoEmail(String login, String Userpass,
@@ -514,13 +514,13 @@ public class UserManager implements IUse
return registerUser(login, Userpass, lastname, firstname, email, age,
street, additionalname, fax, zip, states_id, town, language_id,
- phone, sendSMS, "", generateSipUserData, jNameTimeZone, false);
+ phone, sendSMS, generateSipUserData, jNameTimeZone, false);
}
private Long registerUser(String login, String Userpass, String lastname,
String firstname, String email, Date age, String street,
String additionalname, String fax, String zip, long states_id,
- String town, long language_id, String phone, boolean sendSMS, String baseURL,
+ String town, long language_id, String phone, boolean sendSMS,
boolean generateSipUserData, String jNameTimeZone, Boolean sendConfirmation) {
try {
// Checks if FrontEndUsers can register
@@ -533,8 +533,7 @@ public class UserManager implements IUse
additionalname, fax, zip, states_id, town, language_id,
true, Arrays.asList(configurationDao.getConfValue(
"default_domain_id", Long.class, null)), phone,
- sendSMS, baseURL,
- sendConfirmation, jNameTimeZone, false, "", "", false, true);
+ sendSMS, sendConfirmation, jNameTimeZone, false, "", "", false, true);
if (user_id > 0 && sendConfirmation) {
return new Long(-40);
@@ -578,7 +577,7 @@ public class UserManager implements IUse
String firstname, String email, Date age, String street,
String additionalname, String fax, String zip, long states_id,
String town, long language_id, boolean sendWelcomeMessage,
- List<Long> organisations, String phone, boolean sendSMS, String baseURL,
+ List<Long> organisations, String phone, boolean sendSMS,
Boolean sendConfirmation, String iCalTz, Boolean forceTimeZoneCheck,
String userOffers, String userSearchs, Boolean showContactData,
Boolean showContactDataToContacts) throws Exception {
@@ -587,8 +586,7 @@ public class UserManager implements IUse
firstname, email, age, street,
additionalname, fax, zip, states_id,
town, language_id, sendWelcomeMessage,
- organisations, phone, sendSMS, baseURL,
- sendConfirmation,
+ organisations, phone, sendSMS, sendConfirmation,
timezoneUtil.getTimeZone(iCalTz),
forceTimeZoneCheck,
userOffers, userSearchs, showContactData,
@@ -617,7 +615,6 @@ public class UserManager implements IUse
* @param organisations
* @param phone
* @param sendSMS
- * @param baseURL
* @param sendConfirmation
* @param timezone
* @param forceTimeZoneCheck
@@ -635,8 +632,7 @@ public class UserManager implements IUse
String firstname, String email, Date age, String street,
String additionalname, String fax, String zip, long states_id,
String town, long language_id, boolean sendWelcomeMessage,
- List<Long> organisations, String phone, boolean sendSMS, String baseURL,
- Boolean sendConfirmation,
+ List<Long> organisations, String phone, boolean sendSMS, Boolean sendConfirmation,
TimeZone timezone, Boolean forceTimeZoneCheck,
String userOffers, String userSearchs, Boolean showContactData,
Boolean showContactDataToContacts, String activatedHash) throws Exception {
@@ -652,19 +648,16 @@ public class UserManager implements IUse
boolean checkEmail = usersDao.checkUserEMail(email, null);
if (checkName && checkEmail) {
- String link = baseURL;
+ String link = configurationDao.getBaseUrl();
String hash = activatedHash;
if (hash == null){
hash = ManageCryptStyle.getInstanceOfCrypt().createPassPhrase(login
+ CalendarPatterns.getDateWithTimeByMiliSeconds(new Date()));
- link += baseURL + "activateUser?u=" + hash;
+ link += "activateUser?u=" + hash;
}
if (sendWelcomeMessage && email.length() != 0) {
- // We need to pass the baseURL to check if this is
- // really set to be send
- String sendMail = emailManagement.sendMail(login,
- password, email, link, sendConfirmation);
+ String sendMail = emailManagement.sendMail(login, password, email, link, sendConfirmation);
if (!sendMail.equals("success"))
return new Long(-19);
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-util/src/main/java/org/apache/openmeetings/util/OpenmeetingsVariables.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-util/src/main/java/org/apache/openmeetings/util/OpenmeetingsVariables.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-util/src/main/java/org/apache/openmeetings/util/OpenmeetingsVariables.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-util/src/main/java/org/apache/openmeetings/util/OpenmeetingsVariables.java Tue Apr 8 23:32:32 2014
@@ -33,8 +33,14 @@ public class OpenmeetingsVariables {
public static final String CONFIG_IGNORE_BAD_SSL = "oauth2.ignore_bad_ssl";
public static final String CONFIG_DEFAULT_LANDING_ZONE = "default.landing.zone";
public static final String CONFIG_DEFAULT_LDAP_ID = "ldap_default_id";
- public static final String WEB_DATE_PATTERN = "dd.MM.yyyy HH:mm:ss"; //FIXME need to be made locale based
public static final String CONFIG_REDIRECT_URL_FOR_EXTERNAL_KEY = "redirect.url.for.external.users";
+ public static final String CONFIG_APPOINTMENT_REMINDER_MINUTES = "number.minutes.reminder.send";
+ public static final String CONFIG_APPLICATION_BASE_URL = "application.base.url";
+
+ public static int DEFAULT_MINUTES_REMINDER_SEND = 15;
+ public static String DEFAULT_BASE_URL = "http://localhost:5080/openmeetings/";
+
+ public static final String WEB_DATE_PATTERN = "dd.MM.yyyy HH:mm:ss"; //FIXME need to be made locale based
public static String webAppRootKey = null;
public static String webAppRootPath = null;
public static String configKeyCryptClassName = null;
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/WebSession.java Tue Apr 8 23:32:32 2014
@@ -94,7 +94,6 @@ public class WebSession extends Abstract
private DateFormat ISO8601FORMAT = new SimpleDateFormat(ISO8601_FORMAT_STRING); //FIXME not thread safe
private DateFormat sdf;
private Dashboard dashboard;
- private String baseUrl = null;
private Locale browserLocale = null;
private Long recordingId;
private Long loginError = null;
@@ -372,14 +371,6 @@ public class WebSession extends Abstract
return d;
}
- public static String getBaseUrl() {
- return get().baseUrl;
- }
-
- public void setBaseUrl(String baseUrl){
- this.baseUrl = baseUrl;
- }
-
public Locale getBrowserLocale(){
return browserLocale;
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/MainPage.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/MainPage.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/MainPage.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/MainPage.java Tue Apr 8 23:32:32 2014
@@ -45,7 +45,6 @@ import org.apache.openmeetings.web.commo
import org.apache.openmeetings.web.common.menu.MenuPanel;
import org.apache.openmeetings.web.user.AboutDialog;
import org.apache.openmeetings.web.user.ChatPanel;
-import org.apache.openmeetings.web.util.BaseUrlAjaxBehavior;
import org.apache.openmeetings.web.util.OmUrlFragment;
import org.apache.wicket.Component;
import org.apache.wicket.MarkupContainer;
@@ -157,8 +156,6 @@ public class MainPage extends BaseInited
WebSession.get().setArea(null);
}
});
-
- add(new BaseUrlAjaxBehavior());
}
private List<MenuItem> getMainMenu() {
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/ForgetPasswordDialog.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/ForgetPasswordDialog.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/ForgetPasswordDialog.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/ForgetPasswordDialog.java Tue Apr 8 23:32:32 2014
@@ -20,13 +20,13 @@ package org.apache.openmeetings.web.page
import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
import static org.apache.openmeetings.web.app.Application.getBean;
-import static org.apache.openmeetings.web.app.WebSession.getBaseUrl;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import org.apache.openmeetings.core.mail.MailHandler;
+import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
import org.apache.openmeetings.db.dao.user.AdminUserDao;
import org.apache.openmeetings.db.entity.user.User;
import org.apache.openmeetings.util.crypt.ManageCryptStyle;
@@ -188,7 +188,7 @@ public class ForgetPasswordDialog extend
@Override
protected void onSubmit(AjaxRequestTarget target) {
resetUser(type == Type.email ? name : "", type == Type.login ? name : ""
- , getBaseUrl() + getRequestCycle().urlFor(ResetPage.class, new PageParameters()).toString().substring(2));
+ , getBean(ConfigurationDao.class).getBaseUrl() + getRequestCycle().urlFor(ResetPage.class, new PageParameters()).toString().substring(2));
}
/**
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/RegisterDialog.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/RegisterDialog.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/RegisterDialog.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/RegisterDialog.java Tue Apr 8 23:32:32 2014
@@ -23,7 +23,6 @@ import static org.apache.openmeetings.db
import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
import static org.apache.openmeetings.web.app.Application.getBean;
import static org.apache.openmeetings.web.app.WebSession.AVAILABLE_TIMEZONES;
-import static org.apache.openmeetings.web.app.WebSession.getBaseUrl;
import static org.apache.wicket.validation.validator.StringValidator.minimumLength;
import java.util.Arrays;
@@ -41,7 +40,6 @@ import org.apache.openmeetings.db.entity
import org.apache.openmeetings.util.CalendarPatterns;
import org.apache.openmeetings.util.crypt.ManageCryptStyle;
import org.apache.openmeetings.web.app.WebSession;
-import org.apache.openmeetings.web.pages.ActivatePage;
import org.apache.openmeetings.web.pages.MainPage;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
@@ -56,7 +54,6 @@ import org.apache.wicket.markup.html.pan
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
@@ -153,9 +150,8 @@ public class RegisterDialog extends Abst
}
public void onOpen(AjaxRequestTarget target) {
- String baseURL = getBaseUrl();
- sendEmailAtRegister = 1 == getBean(ConfigurationDao.class).getConfValue("sendEmailAtRegister", Integer.class,
- "0");
+ String baseURL = getBean(ConfigurationDao.class).getBaseUrl();
+ sendEmailAtRegister = 1 == getBean(ConfigurationDao.class).getConfValue("sendEmailAtRegister", Integer.class, "0");
sendConfirmation = baseURL != null
&& !baseURL.isEmpty()
&& 1 == getBean(ConfigurationDao.class)
@@ -199,15 +195,12 @@ public class RegisterDialog extends Abst
String hash = ManageCryptStyle.getInstanceOfCrypt().createPassPhrase(
login + CalendarPatterns.getDateWithTimeByMiliSeconds(new Date()));
- String redirectPage = getRequestCycle().urlFor(ActivatePage.class, new PageParameters().add("u", hash))
- .toString().substring(2);
- String baseURL = getBaseUrl() + redirectPage;
try {
getBean(IUserManager.class).registerUserInit(3, 1, 0, 1, login, password, lastName, firstName, email,
null /* age/birthday */, "" /* street */, "" /* additionalname */, "" /* fax */, "" /* zip */, state.getState_id(),
"" /* town */, lang.getLanguage_id(), true /* sendWelcomeMessage */,
Arrays.asList(getBean(ConfigurationDao.class).getConfValue("default_domain_id", Long.class, null)),
- "" /* phone */, false, baseURL, sendConfirmation, TimeZone.getTimeZone(tzModel.getObject()),
+ "" /* phone */, false, sendConfirmation, TimeZone.getTimeZone(tzModel.getObject()),
false /* forceTimeZoneCheck */, "" /* userOffers */, "" /* userSearchs */, false /* showContactData */,
true /* showContactDataToContacts */, hash);
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInDialog.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInDialog.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInDialog.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInDialog.java Tue Apr 8 23:32:32 2014
@@ -38,7 +38,6 @@ import org.apache.openmeetings.web.app.A
import org.apache.openmeetings.web.app.OmAuthenticationStrategy;
import org.apache.openmeetings.web.app.WebSession;
import org.apache.openmeetings.web.pages.SwfPage;
-import org.apache.openmeetings.web.util.BaseUrlAjaxBehavior;
import org.apache.wicket.AttributeModifier;
import org.apache.wicket.RestartResponseException;
import org.apache.wicket.ajax.AjaxClientInfoBehavior;
@@ -90,7 +89,6 @@ public class SignInDialog extends Abstra
public SignInDialog(String id) {
super(id, WebSession.getString(108));
add(form = new SignInForm("signin"));
- add(new BaseUrlAjaxBehavior());
add(new AjaxClientInfoBehavior());
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java Tue Apr 8 23:32:32 2014
@@ -20,7 +20,6 @@ package org.apache.openmeetings.web.user
import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
import static org.apache.openmeetings.web.app.Application.getBean;
-import static org.apache.openmeetings.web.app.WebSession.getBaseUrl;
import static org.apache.openmeetings.web.app.WebSession.getLanguage;
import static org.apache.openmeetings.web.app.WebSession.getUserId;
import static org.apache.openmeetings.web.util.RoomTypeDropDown.getRoomTypes;
@@ -136,7 +135,7 @@ public class AppointmentDialog extends A
}
protected void deleteAppointment(AjaxRequestTarget target) {
- getBean(AppointmentDao.class).delete(getModelObject(), getBaseUrl(), getUserId());
+ getBean(AppointmentDao.class).delete(getModelObject(), getUserId());
calendar.refresh(target);
}
@@ -209,7 +208,7 @@ public class AppointmentDialog extends A
}
}
a.setMeetingMembers(attendees);
- getBean(AppointmentDao.class).update(a, getBaseUrl(), getUserId());
+ getBean(AppointmentDao.class).update(a, getUserId());
target.add(feedback);
calendar.refresh(target);
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarPanel.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarPanel.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarPanel.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarPanel.java Tue Apr 8 23:32:32 2014
@@ -20,7 +20,6 @@ package org.apache.openmeetings.web.user
import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
import static org.apache.openmeetings.web.app.Application.getBean;
-import static org.apache.openmeetings.web.app.WebSession.getBaseUrl;
import static org.apache.openmeetings.web.app.WebSession.getClientTimeZone;
import static org.apache.openmeetings.web.app.WebSession.getUserId;
@@ -229,7 +228,7 @@ public class CalendarPanel extends UserP
cal.add(java.util.Calendar.MILLISECOND, (int)delta); //FIXME?
a.setEnd(cal.getTime());
- dao.update(a, getBaseUrl(), getUserId());
+ dao.update(a, getUserId());
//FIXME add feedback info
}
@@ -242,7 +241,7 @@ public class CalendarPanel extends UserP
cal.add(java.util.Calendar.MILLISECOND, (int)delta); //FIXME?
a.setEnd(cal.getTime());
- dao.update(a, getBaseUrl(), getUserId());
+ dao.update(a, getUserId());
//FIXME add feedback info
}
};
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessageDialog.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessageDialog.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessageDialog.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessageDialog.java Tue Apr 8 23:32:32 2014
@@ -21,7 +21,6 @@ package org.apache.openmeetings.web.user
import static org.apache.openmeetings.db.entity.user.PrivateMessage.INBOX_FOLDER_ID;
import static org.apache.openmeetings.db.entity.user.PrivateMessage.SENT_FOLDER_ID;
import static org.apache.openmeetings.web.app.Application.getBean;
-import static org.apache.openmeetings.web.app.WebSession.getBaseUrl;
import static org.apache.openmeetings.web.app.WebSession.getUserId;
import static org.apache.openmeetings.web.util.RoomTypeDropDown.getRoomTypes;
@@ -32,6 +31,7 @@ import java.util.Date;
import java.util.List;
import org.apache.openmeetings.core.mail.MailHandler;
+import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
import org.apache.openmeetings.db.dao.room.IInvitationManager;
import org.apache.openmeetings.db.dao.room.RoomDao;
import org.apache.openmeetings.db.dao.user.PrivateMessagesDao;
@@ -208,10 +208,10 @@ public class MessageDialog extends Abstr
if (p.isBookedRoom()) {
Invitation i = getBean(IInvitationManager.class).getInvitation(to, p.getRoom(),
false, null, Valid.Period
- , userDao.get(getUserId()), getBaseUrl(), userDao.get(getUserId()).getLanguage_id(),
+ , userDao.get(getUserId()), userDao.get(getUserId()).getLanguage_id(),
modelStart.getObject(), modelEnd.getObject(), null);
- invitation_link = LinkHelper.getInvitationLink(i);
+ invitation_link = LinkHelper.getInvitationLink(getBean(ConfigurationDao.class).getBaseUrl(), i);
if (invitation_link == null) {
invitation_link = "";
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/LinkHelper.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/LinkHelper.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/LinkHelper.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/LinkHelper.java Tue Apr 8 23:32:32 2014
@@ -25,19 +25,21 @@ import org.apache.openmeetings.db.entity
public class LinkHelper {
- public static String getInvitationLink(Invitation i) {
- String link = i.getBaseUrl();
+ public static String getInvitationLink(String baseUrl, Invitation i) {
+ String link = baseUrl;
if (link == null) {
return null;
}
- if (i.getInvitee().getType() == Type.contact) {
- link += "?invitationHash=" + i.getHash();
-
- if (i.getInvitee().getLanguage_id() > 0) {
- link += "&language=" + i.getInvitee().getLanguage_id().toString();
+ if (i.getRoom() != null) {
+ if (i.getInvitee().getType() == Type.contact) {
+ link += "?invitationHash=" + i.getHash();
+
+ if (i.getInvitee().getLanguage_id() > 0) {
+ link += "&language=" + i.getInvitee().getLanguage_id().toString();
+ }
+ } else {
+ link = getRoomUrlFragment(i.getRoom().getRooms_id()).getLink();
}
- } else {
- link = getRoomUrlFragment(i.getRoom().getRooms_id()).getLink(i.getBaseUrl());
}
return link;
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/OmUrlFragment.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/OmUrlFragment.java?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/OmUrlFragment.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/OmUrlFragment.java Tue Apr 8 23:32:32 2014
@@ -20,7 +20,6 @@ package org.apache.openmeetings.web.util
import static org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_DEFAULT_LANDING_ZONE;
import static org.apache.openmeetings.web.app.Application.getBean;
-import static org.apache.openmeetings.web.app.WebSession.getBaseUrl;
import static org.apache.openmeetings.web.app.WebSession.getLanguage;
import static org.apache.openmeetings.web.app.WebSession.getSid;
import static org.apache.openmeetings.web.user.profile.SettingsPanel.EDIT_PROFILE_TAB_ID;
@@ -297,10 +296,6 @@ public class OmUrlFragment implements Se
}
public String getLink() {
- return getLink(getBaseUrl());
- }
-
- public String getLink(String baseUrl) {
- return baseUrl + "#" + getArea().name() + "/" + getType();
+ return getBean(ConfigurationDao.class).getBaseUrl() + "#" + getArea().name() + "/" + getType();
}
}
Modified: openmeetings/trunk/singlewebapp/xdocs/GeneralConfiguration.xml
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/xdocs/GeneralConfiguration.xml?rev=1585864&r1=1585863&r2=1585864&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/xdocs/GeneralConfiguration.xml (original)
+++ openmeetings/trunk/singlewebapp/xdocs/GeneralConfiguration.xml Tue Apr 8 23:32:32 2014
@@ -177,6 +177,12 @@
<td style="border: 1px solid rgb(204, 204, 204); padding: 5px;"> Is user register available via SOAP/REST </td>
<td style="border: 1px solid rgb(204, 204, 204); padding: 5px;"> 3.0.x </td>
</tr>
+ <tr>
+ <td style="border: 1px solid rgb(204, 204, 204); padding: 5px;"> application.base.url </td>
+ <td style="border: 1px solid rgb(204, 204, 204); padding: 5px;"> http://localhost:5080/openmeetings </td>
+ <td style="border: 1px solid rgb(204, 204, 204); padding: 5px;"> Base URL your OPenmeetings installation will be accessible at. </td>
+ <td style="border: 1px solid rgb(204, 204, 204); padding: 5px;"> 3.0.x </td>
+ </tr>
</table>
</section>