Skip to content

Commit

Permalink
Update the latest changes to prepare the new release soon
Browse files Browse the repository at this point in the history
  • Loading branch information
hainguyen committed Aug 30, 2018
1 parent dd4d994 commit 768ca2b
Show file tree
Hide file tree
Showing 73 changed files with 747 additions and 671 deletions.
14 changes: 8 additions & 6 deletions mycollab-app-community/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
</properties>

<dependencies>
<dependency>
<groupId>com.mycollab</groupId>
<artifactId>mycollab-client-api</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.mycollab</groupId>
Expand Down Expand Up @@ -83,6 +78,12 @@
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -294,7 +295,7 @@
</copy>
<copy todir="${installer.staging.dir}/config">
<fileset dir="${basedir}/src/main/config">
<exclude name="mycollab.properties"/>
<exclude name="application.properties"/>
</fileset>
</copy>
<copy todir="${installer.staging.dir}/logs">
Expand All @@ -306,6 +307,7 @@
<copy todir="${installer.staging.dir}/lib">
<fileset dir="${basedir}/src/main/lib"/>
</copy>
<chmod dir="${installer.staging.dir}/bin/" includes="*.sh" perm="700"/>
</target>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#=====================================================
# You can visit link http://community.mycollab.com/configuration/
# You can visit link https://community.mycollab.com/docs/hosting-mycollab-on-your-own-server/advanced-configuration/
# to get all configuration fieldBuilder and their meanings
#=====================================================

Expand All @@ -10,9 +10,9 @@ app.siteName=${sitename}
app.notifyEmail=${mailNotify}

server.address=${serveraddress}
server.apiUrl=http://api.mycollab.com/api/
server.apiUrl=https://api.mycollab.com/
server.storageSystem=file
server.siteUrl=http://%s:%d
server.siteUrl=http://%s:%d/
server.resourceDownloadUrl=http://%s:%d/file/
server.cdnUrl=http://%s:%d/assets/

Expand Down
9 changes: 9 additions & 0 deletions mycollab-app-community/src/main/resources/banner.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

===================================================================================================================
___ ___ _ _ ___ ___ __ __ ___ ____ ___ ___ ___ ___ ___ ___ __ __ __ __ __ ______ _ _
||\\//|| \\// // // \\ || || // \\ || )) // // \\ ||\\//|| ||\\//|| || || ||\ || || | || | \\//
|| \/ || )/ (( (( )) || || ||=|| ||=) (( (( )) || \/ || || \/ || || || ||\\|| || || )/
|| || // \\__ \\_// ||__| ||__| || || ||_)) \\__ \\_// || || || || \\_// || \|| || || //

Version 6.0.0
===================================================================================================================
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion mycollab-app-community/src/main/scripts/mycollab.bat
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ rem Required to run the with the "debug" argument.
rem ---------------------------------------------------------------------------

set _RUNJAVA=java
set MYCOLLAB_PORT=9090
set MYCOLLAB_OPTS=-noverify -server -Xms394m -Xmx768m -XX:NewSize=128m -XX:+DisableExplicitGC -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC

rem Suppress Terminate batch job on CTRL+C
Expand Down Expand Up @@ -85,7 +86,7 @@ goto execCmd

rem Execute Java with the applicable properties
cd ..
%_EXECJAVA% -jar executor.jar %* %MYCOLLAB_OPTS%
%_EXECJAVA% -jar executor.jar %* %MYCOLLAB_OPTS% -Dserver.port=%MYCOLLAB_PORT%
goto end

:end
3 changes: 2 additions & 1 deletion mycollab-app-community/src/main/scripts/mycollab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# -----------------------------------------------------------------------------
# OS specific support. $var _must_ be set to either true or false.

export MYCOLLAB_PORT=9090
export MYCOLLAB_OPTS=-noverify -server -Xms394m -Xmx768m -XX:NewSize=128m -XX:+DisableExplicitGC -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC

cygwin=false
Expand Down Expand Up @@ -153,7 +154,7 @@ if [ "$1" = "--start" ] ; then
shift
touch "$MYCOLLAB_OUT"
cd ..
eval \"$_RUNJAVA\" -jar $MYCOLLAB_HOME/executor.jar $MYCOLLAB_OPTS &
eval \"$_RUNJAVA\" -jar $MYCOLLAB_HOME/executor.jar $MYCOLLAB_OPTS -Dserver.port=$MYCOLLAB_PORT &

if [ ! -z "$MYCOLLAB_PID" ]; then
echo $! > "$MYCOLLAB_PID"
Expand Down
31 changes: 0 additions & 31 deletions mycollab-client-api/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions mycollab-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>

<dependency>
<groupId>org.jasypt</groupId>
<artifactId>jasypt</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,17 @@

/**
* This file contains all constants define in system properties file
* mycollab.properties read at system started.
* application.properties read at system started.
*
* @author MyCollab Ltd.
* @since 1.0
*/
public class ApplicationProperties {
private static final String RESOURCE_PROPERTIES = "mycollab.properties";
private static final String RESOURCE_PROPERTIES = "application.properties";
private static final String DECRYPT_PASS = "esofthead321";

private static Properties properties;

public static final String MAIL_SMTPHOST = "mail.smtphost";
public static final String MAIL_PORT = "mail.port";
public static final String MAIL_USERNAME = "mail.username";
public static final String MAIL_PASSWORD = "mail.password";
public static final String MAIL_IS_TLS = "mail.isTLS";
public static final String MAIL_IS_SSL = "mail.isSSL";
public static final String MAIL_NOTIFY = "mail.notify";

public static final String DROPBOX_AUTH_LINK = "dropbox.callbackUrl";

public static final String BI_ENDECRYPT_PASSWORD = "endecryptPassword";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,12 @@ package com.mycollab.core
* @author MyCollab Ltd
* @since 5.1.3
*/
abstract class AbstractNotification(val scope: String, val kind: String) {

val isGlobalScope: Boolean
get() = SCOPE_GLOBAL == scope
abstract class AbstractNotification(val kind: String) {

companion object {

@JvmField
val WARNING = "warning"

@JvmField
val NEWS = "news"

@JvmField
val SCOPE_GLOBAL = "global"
const val WARNING = "warning"

@JvmField
val SCOPE_USER = "user"
const val NEWS = "news"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ package com.mycollab.core
* @author MyCollab Ltd
* @since 5.3.5
*/
class BroadcastMessage(val sAccountId: Int?, val targetUser: String?, val wrapObj: Any) {
class BroadcastMessage(val scope:String, val sAccountId: Int?, val targetUser: String?, val wrapObj: Any) {

constructor(wrapObj: Any) : this(null, null, wrapObj)
constructor(scope:String, wrapObj: Any) : this(scope, null, null, wrapObj)

companion object {
const val SCOPE_GLOBAL = "global"

const val SCOPE_USER = "user"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package com.mycollab.core
* @author MyCollab Ltd
* @since 5.1.3
*/
class NewUpdateAvailableNotification(val version: String, val autoDownloadLink: String?, val manualDownloadLink: String, val installerFile: String?) : AbstractNotification(AbstractNotification.SCOPE_GLOBAL, AbstractNotification.NEWS) {
class NewUpdateAvailableNotification(val version: String, val autoDownloadLink: String?, val manualDownloadLink: String, val installerFile: String?) : AbstractNotification(AbstractNotification.NEWS) {

override fun equals(other: Any?): Boolean {
if (this === other) return true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class TimezoneVal(val id: String?) : Comparable<TimezoneVal> {
val areas: Array<String>
get() {
val keys = ArrayList(cacheTimezones.keys)
Collections.sort(keys)
keys.sort()
return keys.toTypedArray()
}

Expand Down
19 changes: 9 additions & 10 deletions mycollab-dao/src/main/java/com/mycollab/db/query/NumberParam.kt
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,19 @@ class NumberParam(id: String, table: String, column: String) : ColumnParam(id, t
OneValueSearchField(oper, String.format(LESS_THAN_EXPR, this.table, this.column), value)

private fun buildParamIsLessThanEqual(oper: String, value: Any): OneValueSearchField =
OneValueSearchField(oper, String.format(
LESS_THAN_EQUAL_EXPR, this.table, this.column), value)
OneValueSearchField(oper, String.format(LESS_THAN_EQUAL_EXPR, this.table, this.column), value)

companion object {

@JvmField val OPTIONS = arrayOf(EQUAL, NOT_EQUAL, LESS_THAN, LESS_THAN_EQUAL, GREATER_THAN, GREATER_THAN_EQUAL, IS_EMPTY, IS_NOT_EMPTY)

private val EQUAL_EXPR = "%s.%s = "
private val NOT_EQUAL_EXPR = "%s.%s <> "
private val NULL_EXPR = "%s.%s is null"
private val NOT_NULL_EXPR = "%s.%s is not null"
private val GREATER_THAN_EXPR = "%s.%s > "
private val GREATER_THAN_EQUAL_EXPR = "%s.%s >= "
private val LESS_THAN_EXPR = "%s.%s < "
private val LESS_THAN_EQUAL_EXPR = "%s.%s <= "
private const val EQUAL_EXPR = "%s.%s = "
private const val NOT_EQUAL_EXPR = "%s.%s <> "
private const val NULL_EXPR = "%s.%s is null"
private const val NOT_NULL_EXPR = "%s.%s is not null"
private const val GREATER_THAN_EXPR = "%s.%s > "
private const val GREATER_THAN_EQUAL_EXPR = "%s.%s >= "
private const val LESS_THAN_EXPR = "%s.%s < "
private const val LESS_THAN_EQUAL_EXPR = "%s.%s <= "
}
}
1 change: 0 additions & 1 deletion mycollab-deployer-community/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<module>../mycollab-scheduler</module>
<module>../mycollab-scheduler-community</module>
<module>../mycollab-servlet</module>
<module>../mycollab-client-api</module>
<module>../mycollab-ui</module>
<module>../mycollab-web</module>
<module>../mycollab-mobile</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class AccountCreatedCommand(private val optionValService: OptionValService,
val project = Project()
project.saccountid = accountId
project.description = "Sample project"
project.homepage = "http://www.mycollab.com"
project.homepage = "https://www.mycollab.com"
project.name = "Sample project"
project.projectstatus = StatusI18nEnum.Open.name
project.shortname = "SP1"
Expand Down Expand Up @@ -204,7 +204,7 @@ class AccountCreatedCommand(private val optionValService: OptionValService,
val folder = Folder()
folder.name = "Requirements"
folder.description = "Sample folder"
folder.path = PathUtils.getProjectDocumentPath(accountId, projectId) + "/" + StringUtils.generateSoftUniqueId()
folder.path = "${PathUtils.getProjectDocumentPath(accountId, projectId)}/${StringUtils.generateSoftUniqueId()}"
pageService.createFolder(folder, initialUser)

val timer = Timer("Set member notification")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.google.common.eventbus.Subscribe
import com.mycollab.common.EntryUpdateNotification
import com.mycollab.common.service.NotificationItemService
import com.mycollab.core.BroadcastMessage
import com.mycollab.core.BroadcastMessage.Companion.SCOPE_USER
import com.mycollab.core.Broadcaster
import com.mycollab.module.esb.GenericCommand
import com.mycollab.module.project.event.BatchInsertNotificationItemsEvent
Expand All @@ -23,7 +24,7 @@ class BatchInsertProjectNotificationItemsCommand(private val notificationItemsSe
if (event.notifyUsers.isNotEmpty()) {
notificationItemsService.batchInsertItems(event.notifyUsers, event.module, event.type, event.typeId, event.messages, event.sAccountId)
event.notifyUsers.forEachIndexed { index, notifyUser ->
Broadcaster.broadcast(BroadcastMessage(event.sAccountId, notifyUser,
Broadcaster.broadcast(BroadcastMessage(SCOPE_USER, event.sAccountId, notifyUser,
EntryUpdateNotification(notifyUser, event.module, event.type, event.typeId, event.messages[index])))
}
}
Expand Down
Loading

0 comments on commit 768ca2b

Please sign in to comment.