diff --git a/com.dotcms.override.user/.gradle/4.10.2/fileChanges/last-build.bin b/com.dotcms.override.user/.gradle/4.10.2/fileChanges/last-build.bin
new file mode 100644
index 0000000..f76dd23
Binary files /dev/null and b/com.dotcms.override.user/.gradle/4.10.2/fileChanges/last-build.bin differ
diff --git a/com.dotcms.override.user/.gradle/4.10.2/fileContent/fileContent.lock b/com.dotcms.override.user/.gradle/4.10.2/fileContent/fileContent.lock
new file mode 100644
index 0000000..39c4411
Binary files /dev/null and b/com.dotcms.override.user/.gradle/4.10.2/fileContent/fileContent.lock differ
diff --git a/com.dotcms.override.user/.gradle/4.10.2/fileHashes/fileHashes.bin b/com.dotcms.override.user/.gradle/4.10.2/fileHashes/fileHashes.bin
new file mode 100644
index 0000000..23241ef
Binary files /dev/null and b/com.dotcms.override.user/.gradle/4.10.2/fileHashes/fileHashes.bin differ
diff --git a/com.dotcms.override.user/.gradle/4.10.2/fileHashes/fileHashes.lock b/com.dotcms.override.user/.gradle/4.10.2/fileHashes/fileHashes.lock
new file mode 100644
index 0000000..1577850
Binary files /dev/null and b/com.dotcms.override.user/.gradle/4.10.2/fileHashes/fileHashes.lock differ
diff --git a/com.dotcms.override.user/.gradle/4.10.2/gc.properties b/com.dotcms.override.user/.gradle/4.10.2/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/com.dotcms.override.user/.gradle/4.10.2/javaCompile/classAnalysis.bin b/com.dotcms.override.user/.gradle/4.10.2/javaCompile/classAnalysis.bin
new file mode 100644
index 0000000..5a48fc1
Binary files /dev/null and b/com.dotcms.override.user/.gradle/4.10.2/javaCompile/classAnalysis.bin differ
diff --git a/com.dotcms.override.user/.gradle/4.10.2/javaCompile/javaCompile.lock b/com.dotcms.override.user/.gradle/4.10.2/javaCompile/javaCompile.lock
new file mode 100644
index 0000000..d479207
Binary files /dev/null and b/com.dotcms.override.user/.gradle/4.10.2/javaCompile/javaCompile.lock differ
diff --git a/com.dotcms.override.user/.gradle/4.10.2/javaCompile/taskHistory.bin b/com.dotcms.override.user/.gradle/4.10.2/javaCompile/taskHistory.bin
new file mode 100644
index 0000000..98ffc58
Binary files /dev/null and b/com.dotcms.override.user/.gradle/4.10.2/javaCompile/taskHistory.bin differ
diff --git a/com.dotcms.override.user/.gradle/4.10.2/taskHistory/taskHistory.bin b/com.dotcms.override.user/.gradle/4.10.2/taskHistory/taskHistory.bin
new file mode 100644
index 0000000..d160aaa
Binary files /dev/null and b/com.dotcms.override.user/.gradle/4.10.2/taskHistory/taskHistory.bin differ
diff --git a/com.dotcms.override.user/.gradle/4.10.2/taskHistory/taskHistory.lock b/com.dotcms.override.user/.gradle/4.10.2/taskHistory/taskHistory.lock
new file mode 100644
index 0000000..8c3473b
Binary files /dev/null and b/com.dotcms.override.user/.gradle/4.10.2/taskHistory/taskHistory.lock differ
diff --git a/com.dotcms.override.user/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock b/com.dotcms.override.user/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock
new file mode 100644
index 0000000..1c264da
Binary files /dev/null and b/com.dotcms.override.user/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock differ
diff --git a/com.dotcms.override.user/.gradle/7.2/dependencies-accessors/gc.properties b/com.dotcms.override.user/.gradle/7.2/dependencies-accessors/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/com.dotcms.override.user/.gradle/7.2/fileChanges/last-build.bin b/com.dotcms.override.user/.gradle/7.2/fileChanges/last-build.bin
new file mode 100644
index 0000000..f76dd23
Binary files /dev/null and b/com.dotcms.override.user/.gradle/7.2/fileChanges/last-build.bin differ
diff --git a/com.dotcms.override.user/.gradle/7.2/fileHashes/fileHashes.lock b/com.dotcms.override.user/.gradle/7.2/fileHashes/fileHashes.lock
new file mode 100644
index 0000000..ef1663f
Binary files /dev/null and b/com.dotcms.override.user/.gradle/7.2/fileHashes/fileHashes.lock differ
diff --git a/com.dotcms.override.user/.gradle/7.2/gc.properties b/com.dotcms.override.user/.gradle/7.2/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/com.dotcms.override.user/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/com.dotcms.override.user/.gradle/buildOutputCleanup/buildOutputCleanup.lock
new file mode 100644
index 0000000..5ec7df1
Binary files /dev/null and b/com.dotcms.override.user/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/com.dotcms.override.user/.gradle/buildOutputCleanup/cache.properties b/com.dotcms.override.user/.gradle/buildOutputCleanup/cache.properties
new file mode 100644
index 0000000..1453602
--- /dev/null
+++ b/com.dotcms.override.user/.gradle/buildOutputCleanup/cache.properties
@@ -0,0 +1,2 @@
+#Tue Dec 07 14:03:39 CST 2021
+gradle.version=4.10.2
diff --git a/com.dotcms.override.user/.gradle/buildOutputCleanup/outputFiles.bin b/com.dotcms.override.user/.gradle/buildOutputCleanup/outputFiles.bin
new file mode 100644
index 0000000..b69b020
Binary files /dev/null and b/com.dotcms.override.user/.gradle/buildOutputCleanup/outputFiles.bin differ
diff --git a/com.dotcms.override.user/.gradle/checksums/checksums.lock b/com.dotcms.override.user/.gradle/checksums/checksums.lock
new file mode 100644
index 0000000..00ccd78
Binary files /dev/null and b/com.dotcms.override.user/.gradle/checksums/checksums.lock differ
diff --git a/com.dotcms.override.user/.gradle/vcs-1/gc.properties b/com.dotcms.override.user/.gradle/vcs-1/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/com.dotcms.override.user/.idea/.gitignore b/com.dotcms.override.user/.idea/.gitignore
new file mode 100644
index 0000000..73f69e0
--- /dev/null
+++ b/com.dotcms.override.user/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/com.dotcms.override.user/.idea/codeStyles/Project.xml b/com.dotcms.override.user/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..1954981
--- /dev/null
+++ b/com.dotcms.override.user/.idea/codeStyles/Project.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/com.dotcms.override.user/.idea/codeStyles/codeStyleConfig.xml b/com.dotcms.override.user/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..a55e7a1
--- /dev/null
+++ b/com.dotcms.override.user/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/com.dotcms.override.user/.idea/compiler.xml b/com.dotcms.override.user/.idea/compiler.xml
new file mode 100644
index 0000000..61a9130
--- /dev/null
+++ b/com.dotcms.override.user/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/com.dotcms.override.user/.idea/gradle.xml b/com.dotcms.override.user/.idea/gradle.xml
new file mode 100644
index 0000000..e296464
--- /dev/null
+++ b/com.dotcms.override.user/.idea/gradle.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/com.dotcms.override.user/.idea/jarRepositories.xml b/com.dotcms.override.user/.idea/jarRepositories.xml
new file mode 100644
index 0000000..9b7c205
--- /dev/null
+++ b/com.dotcms.override.user/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/com.dotcms.override.user/.idea/misc.xml b/com.dotcms.override.user/.idea/misc.xml
new file mode 100644
index 0000000..c3df5ec
--- /dev/null
+++ b/com.dotcms.override.user/.idea/misc.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/com.dotcms.override.user/.idea/vcs.xml b/com.dotcms.override.user/.idea/vcs.xml
new file mode 100644
index 0000000..b2bdec2
--- /dev/null
+++ b/com.dotcms.override.user/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/com.dotcms.override.user/README.md b/com.dotcms.override.user/README.md
new file mode 100644
index 0000000..77e7097
--- /dev/null
+++ b/com.dotcms.override.user/README.md
@@ -0,0 +1,95 @@
+# README
+
+This bundle plugin is an example of how to override dotCMS classes with our bundle plugin.
+
+## How to build this example
+
+To install all you need to do is build the JAR. to do this run
+`./gradlew jar`
+
+This will build two jars in the `build/libs` directory: a bundle fragment (in order to expose needed 3rd party libraries from dotCMS) and the plugin jar
+
+* **To install this bundle:**
+
+ Copy the bundle jar files inside the Felix OSGI container (*dotCMS/felix/load*).
+
+ OR
+
+ Upload the bundle jars files using the dotCMS UI (*CMS Admin->Dynamic Plugins->Upload Plugin*).
+
+* **To uninstall this bundle:**
+
+ Remove the bundle jars files from the Felix OSGI container (*dotCMS/felix/load*).
+
+ OR
+
+ Undeploy the bundle jars using the dotCMS UI (*CMS Admin->Dynamic Plugins->Undeploy*).
+
+## How to create a bundle plugin to override dotCMS classes
+
+In order to create this OSGI plugin, you must create a `META-INF/MANIFEST` to be inserted into OSGI jar.
+This file is being created for you by Gradle. If you need you can alter our config for this but in general our out of the box config should work.
+The Gradle plugin uses BND to generate the Manifest. The main reason you need to alter the config is when you need to exclude a package you are including on your Bundle-ClassPath
+
+If you are building the MANIFEST on your own or desire more info on it below is a description of what is required in this MANIFEST you must specify (see template plugin):
+
+```
+ Bundle-Name: The name of your bundle
+ Bundle-SymbolicName: A short an unique name for the bundle
+ Bundle-Activator: Package and name of your Activator class (example: com.dotmarketing.osgi.override.Activator)
+ Override-Classes: Comma separated list of classes.
+ List of classes we are trying to override, in order to override any dotCMS class is mandatory to add it to this list because dotCMS implementation of the class will be already loaded by the dotCMS class loader so if we don't explicit specify the classes to override the class loader wont try to load them.
+ Export-Package: Declares the packages that are visible outside the plugin. Any package not declared here has visibility only within the bundle.
+ Import-Package: This is a comma separated list of the names of packages to import. In this list there must be the packages that you are using inside your osgi bundle plugin and are exported and exposed by the dotCMS runtime.
+```
+
+## Beware (!)
+
+In order to work inside the Apache Felix OSGI runtime, the import and export directive must be bidirectional, there are two ways to accomplish this:
+
+* **Exported Packages**
+
+ The dotCMS must declare the set of packages that will be available to the OSGI plugins by changing the file: *dotCMS/WEB-INF/felix/osgi-extra.conf*.
+This is possible also using the dotCMS UI (*CMS Admin->Dynamic Plugins->Exported Packages*).
+
+ Only after that exported packages are defined in this list, a plugin can Import the packages to use them inside the OSGI blundle.
+
+* **Fragment**
+
+ A Bundle fragment, is a bundle whose contents are made available to another bundles exporting 3rd party libraries from dotCMS.
+One notable difference is that fragments do not participate in the lifecycle of the bundle, and therefore cannot have an Bundle-Activator.
+As it not contain a Bundle-Activator a fragment cannot be started so after deploy it will have its state as Resolved and NOT as Active as a normal bundle plugin.
+
+---
+## Components
+
+### com.dotmarketing.portlets.folders.model.Folder
+
+Copy of the original *com.dotmarketing.portlets.folders.model.Folder* that lives inside dotCMS but with small changes (Just logging code) inside the `getPath()` method in order to demonstrate we can override a dotCMS class with our implementation.
+
+### Activator
+
+This bundle activator extends from *com.dotmarketing.osgi.GenericBundleActivator* and implements `BundleActivator.start()`.
+
+* PLEASE note the `initializeServices( context )` call, this call is MANDATORY (!) as it will allow us to share resources between the bundle and the host container (dotCMS) and override classes.
+
+---
+## Testing
+
+For our redefinition of the class *com.dotmarketing.portlets.folders.model.Folder* we modified the body of the `getPath()` method, we added some debugging lines in order to prove it is working.
+The *Folder* class is call it by our activator (*com.dotmarketing.osgi.override.Activator*) which prove the OSGI bundle is using our redefinition of the Folder class, but in order to demonstrate the dotCMS context is using it too go to:
+*dotCMS Admin -> Site Browser -> Select any folder on the tree -> Add Folder*.
+
+The *Add Folder* uses the *Folder* class and if you deployed your OSGI plugin the debugging code we added should be visible on the logs.
+
+---
+
+## Limitations (!)
+
+There are limitations on the hot deploy functionality for the OSGI Override plugin, there are some rules for the code you can modify on the redefined classes in order to see those changes when you upload the plugin.
+
+In order to support the overriding of a class inside ours OSGI plugins we use the java hot swapping, it allows to redefine classes, unfortunately, this redefinition is limited only to changing method bodies:
+
+> The redefinition may change method bodies, the constant pool and attributes. The redefinition must not add, remove or rename fields or methods, change the signatures of methods, or change inheritance.
+
+As long as you don't add, remove or change methods (ONLY the methods bodies) for your redefined classes you will have an OSGI plugin that will reflect you changes when a deploy is done.
\ No newline at end of file
diff --git a/com.dotcms.override.user/build.gradle b/com.dotcms.override.user/build.gradle
new file mode 100644
index 0000000..6719587
--- /dev/null
+++ b/com.dotcms.override.user/build.gradle
@@ -0,0 +1,103 @@
+plugins {
+ id 'biz.aQute.bnd.builder' version '3.3.0'
+}
+
+sourceCompatibility = '1.8'
+version = '0.2'
+
+repositories {
+ maven { url "http://repo.dotcms.com/artifactory/libs-release" }
+}
+
+dependencies {
+ compile('com.dotcms:dotcms:21.11') { transitive = true }
+}
+
+import java.util.jar.*
+
+/////////////////////////
+//Plugin jar
+/////////////////////////
+jar {
+ manifest {
+ attributes (
+ 'Bundle-Vendor': 'dotCMS',
+ 'Bundle-Description': 'dotCMS - Override class example',
+ 'Bundle-DocURL': 'https://dotcms.com/',
+ 'Bundle-Activator': 'com.dotmarketing.osgi.override.Activator',
+ 'Override-Classes': 'com.liferay.portal.model.UserModel',
+ 'Import-Package': '!com.liferay.portal.model,*;version=0'
+ )
+ }
+}
+jar.finalizedBy 'fragmentJar'
+
+/////////////////////////
+//Fragment jar
+/////////////////////////
+
+ext {
+ bundleName = "dotCMS Override fragment"
+ bundleDescription = "dotCMS - Override fragment"
+ fragmentHost = "system.bundle; extension:=framework"
+ bundleSymbolicName = "" //Auto generated based on the plugin jar
+ bundleVersion = "" //Auto generated based on the plugin jar
+ importPackage = "" //Auto generated based on the plugin jar
+ bundleManifestVersion = "" //Auto generated based on the plugin jar
+ bundleDocURL = "" //Auto generated based on the plugin jar
+ bundleVendor = "" //Auto generated based on the plugin jar
+}
+/**
+ * The import generates versions like this: version="[1.8,2)"
+ * That format does not work for the export, so we need to replace it
+ * to: version=0
+ */
+ext.fixVersionNumber = {importValue ->
+ return importValue.replaceAll("\"\\[[0-9.,]+\\)\"", "0")
+}
+
+/**
+ * Reads the Manifest file of the just created plugin jar in order to get the required info
+ * to automatically create the fragment jar.
+ */
+task readManifesttAttributes {
+ doFirst {
+ File file = configurations.baseline.singleFile
+ JarFile jar = new JarFile(file)
+ Attributes manifest = jar.getManifest().getMainAttributes()
+ bundleSymbolicName = "${manifest.getValue('Bundle-SymbolicName')}"
+ bundleVersion = "${manifest.getValue('Bundle-Version')}"
+ importPackage = "${manifest.getValue('Import-Package')}"
+ bundleManifestVersion = "${manifest.getValue('Bundle-ManifestVersion')}"
+ bundleDocURL = "${manifest.getValue('Bundle-DocURL')}"
+ bundleVendor = "${manifest.getValue('Bundle-Vendor')}"
+ }
+}
+task fragmentJar(type: Jar) {
+
+ doFirst {
+ //Setting the fragment jar name
+ baseName = project.name
+ archiveName = "${baseName}.fragment-${version}.jar"
+ importPackage = fixVersionNumber(importPackage)
+
+ manifest {
+ attributes (
+ 'Bundle-Name': "${bundleName}",
+ 'Bundle-Description': "${bundleDescription}",
+ 'Bundle-Vendor': "${bundleVendor}",
+ 'Bundle-Version': "${version}",
+ 'Bundle-SymbolicName': "${baseName}.fragment",
+ 'Bundle-ManifestVersion': "${bundleManifestVersion}",
+ 'Bundle-DocURL': "${bundleDocURL}",
+ 'Fragment-Host': "${fragmentHost}",
+ 'Export-Package': "${importPackage}"
+ )
+ }
+ }
+}
+fragmentJar.dependsOn 'readManifesttAttributes'
+
+task wrapper(type: Wrapper) {
+ gradleVersion = '4.10.2'
+}
diff --git a/com.dotcms.override.user/build/libs/com.dotcms.override.user-0.2.jar b/com.dotcms.override.user/build/libs/com.dotcms.override.user-0.2.jar
new file mode 100644
index 0000000..49910a3
Binary files /dev/null and b/com.dotcms.override.user/build/libs/com.dotcms.override.user-0.2.jar differ
diff --git a/com.dotcms.override.user/build/libs/com.dotcms.override.user.fragment-0.2.jar b/com.dotcms.override.user/build/libs/com.dotcms.override.user.fragment-0.2.jar
new file mode 100644
index 0000000..cb2f2ca
Binary files /dev/null and b/com.dotcms.override.user/build/libs/com.dotcms.override.user.fragment-0.2.jar differ
diff --git a/com.dotcms.override.user/gradlew b/com.dotcms.override.user/gradlew
new file mode 100755
index 0000000..cccdd3d
--- /dev/null
+++ b/com.dotcms.override.user/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/com.dotcms.override.user/gradlew.bat b/com.dotcms.override.user/gradlew.bat
new file mode 100644
index 0000000..e95643d
--- /dev/null
+++ b/com.dotcms.override.user/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/com.dotcms.override.user/src/main/java/com/dotmarketing/osgi/override/Activator.java b/com.dotcms.override.user/src/main/java/com/dotmarketing/osgi/override/Activator.java
new file mode 100644
index 0000000..35e644a
--- /dev/null
+++ b/com.dotcms.override.user/src/main/java/com/dotmarketing/osgi/override/Activator.java
@@ -0,0 +1,43 @@
+package com.dotmarketing.osgi.override;
+
+import com.dotmarketing.loggers.Log4jUtil;
+import com.dotmarketing.osgi.GenericBundleActivator;
+import com.dotmarketing.portlets.folders.model.Folder;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Created by Jonathan Gamba
+ * Date: 6/18/12
+ */
+public class Activator extends GenericBundleActivator {
+
+ private LoggerContext pluginLoggerContext;
+
+ @SuppressWarnings ("unchecked")
+ public void start ( BundleContext context ) throws Exception {
+
+ //Initializing log4j...
+ LoggerContext dotcmsLoggerContext = Log4jUtil.getLoggerContext();
+ //Initialing the log4j context of this plugin based on the dotCMS logger context
+ pluginLoggerContext = (LoggerContext) LogManager
+ .getContext(this.getClass().getClassLoader(),
+ false,
+ dotcmsLoggerContext,
+ dotcmsLoggerContext.getConfigLocation());
+
+ //Initializing services...
+ initializeServices( context );
+ }
+
+ public void stop ( BundleContext context ) throws Exception {
+
+ //Unpublish bundle services
+ unpublishBundleServices();
+
+ //Shutting down log4j in order to avoid memory leaks
+ Log4jUtil.shutdown(pluginLoggerContext);
+ }
+
+}
diff --git a/com.dotcms.override.user/src/main/java/com/liferay/portal/model/UserModel.java b/com.dotcms.override.user/src/main/java/com/liferay/portal/model/UserModel.java
new file mode 100644
index 0000000..2642e57
--- /dev/null
+++ b/com.dotcms.override.user/src/main/java/com/liferay/portal/model/UserModel.java
@@ -0,0 +1,1070 @@
+/**
+ * Copyright (c) 2000-2005 Liferay, LLC. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package com.liferay.portal.model;
+
+import com.dotmarketing.util.Logger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.liferay.portal.util.PropsUtil;
+import com.liferay.util.GetterUtil;
+import com.liferay.util.Xss;
+
+import java.util.Date;
+import java.util.Map;
+
+/**
+ * View Source
+ *
+ * @author Brian Wing Shun Chan
+ * @version $Revision: 1.93 $
+ *
+ */
+public class UserModel extends BaseModel {
+ public static boolean CACHEABLE = GetterUtil.get(PropsUtil.get(
+ "value.object.cacheable.com.liferay.portal.model.User"),
+ VALUE_OBJECT_CACHEABLE);
+ public static int MAX_SIZE = GetterUtil.get(PropsUtil.get(
+ "value.object.max.size.com.liferay.portal.model.User"),
+ VALUE_OBJECT_MAX_SIZE);
+ public static boolean XSS_ALLOW_BY_MODEL = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User"), XSS_ALLOW);
+ public static boolean XSS_ALLOW_USERID = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.userId"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_COMPANYID = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.companyId"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_PASSWORD = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.password"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_FIRSTNAME = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.firstName"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_MIDDLENAME = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.middleName"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_LASTNAME = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.lastName"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_NICKNAME = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.nickName"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_EMAILADDRESS = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.emailAddress"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_SMSID = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.smsId"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_AIMID = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.aimId"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_ICQID = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.icqId"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_MSNID = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.msnId"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_YMID = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.ymId"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_FAVORITEACTIVITY = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.favoriteActivity"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_FAVORITEBIBLEVERSE = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.favoriteBibleVerse"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_FAVORITEFOOD = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.favoriteFood"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_FAVORITEMOVIE = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.favoriteMovie"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_FAVORITEMUSIC = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.favoriteMusic"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_LANGUAGEID = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.languageId"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_TIMEZONEID = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.timeZoneId"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_SKINID = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.skinId"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_GREETING = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.greeting"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_RESOLUTION = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.resolution"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_REFRESHRATE = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.refreshRate"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_LAYOUTIDS = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.layoutIds"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_COMMENTS = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.comments"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_LOGINIP = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.loginIP"),
+ XSS_ALLOW_BY_MODEL);
+ public static boolean XSS_ALLOW_LASTLOGINIP = GetterUtil.get(PropsUtil.get(
+ "xss.allow.com.liferay.portal.model.User.lastLoginIP"),
+ XSS_ALLOW_BY_MODEL);
+ public static long LOCK_EXPIRATION_TIME = GetterUtil.getLong(PropsUtil.get(
+ "lock.expiration.time.com.liferay.portal.model.UserModel"));
+
+ public UserModel() {
+ }
+
+ public UserModel(String userId) {
+ _userId = userId;
+ setNew(true);
+ }
+
+ public UserModel(String userId, String companyId, String password,
+ boolean passwordEncrypted, Date passwordExpirationDate,
+ boolean passwordReset, String firstName, String middleName,
+ String lastName, String nickName, boolean male, Date birthday,
+ String emailAddress, String smsId, String aimId, String icqId,
+ String msnId, String ymId, String favoriteActivity,
+ String favoriteBibleVerse, String favoriteFood, String favoriteMovie,
+ String favoriteMusic, String languageId, String timeZoneId,
+ String skinId, boolean dottedSkins, boolean roundedSkins,
+ String greeting, String resolution, String refreshRate,
+ String layoutIds, String comments, Date createDate, Date loginDate,
+ String loginIP, Date lastLoginDate, String lastLoginIP,
+ int failedLoginAttempts, boolean agreedToTermsOfUse, boolean active,
+ boolean deleteInProgress, Date deleteDate) {
+ _userId = userId;
+ _companyId = companyId;
+ _password = password;
+ _passwordEncrypted = passwordEncrypted;
+ _passwordExpirationDate = passwordExpirationDate;
+ _passwordReset = passwordReset;
+ _firstName = firstName;
+ _middleName = middleName;
+ _lastName = lastName;
+ _nickName = nickName;
+ _male = male;
+ _birthday = birthday;
+ _emailAddress = emailAddress;
+ _smsId = smsId;
+ _aimId = aimId;
+ _icqId = icqId;
+ _msnId = msnId;
+ _ymId = ymId;
+ _favoriteActivity = favoriteActivity;
+ _favoriteBibleVerse = favoriteBibleVerse;
+ _favoriteFood = favoriteFood;
+ _favoriteMovie = favoriteMovie;
+ _favoriteMusic = favoriteMusic;
+ _languageId = languageId;
+ _timeZoneId = timeZoneId;
+ _skinId = skinId;
+ _dottedSkins = dottedSkins;
+ _roundedSkins = roundedSkins;
+ _greeting = greeting;
+ _resolution = resolution;
+ _refreshRate = refreshRate;
+ _layoutIds = layoutIds;
+ _comments = comments;
+ _createDate = createDate;
+ _loginDate = loginDate;
+ _loginIP = loginIP;
+ _lastLoginDate = lastLoginDate;
+ _lastLoginIP = lastLoginIP;
+ _failedLoginAttempts = failedLoginAttempts;
+ _agreedToTermsOfUse = agreedToTermsOfUse;
+ _active = active;
+ _deleteInProgress = deleteInProgress;
+ _deleteDate = deleteDate;
+ }
+
+ public String getPrimaryKey() {
+ return _userId;
+ }
+
+ public String getUserId() {
+ return _userId;
+ }
+
+ public void setUserId(String userId) {
+
+ if (null == this.getUserId()) {
+
+ if (!XSS_ALLOW_USERID) {
+ userId = Xss.strip(userId);
+ }
+
+ _userId = userId;
+ setModified(true);
+ Logger.info(this, "User id has bee modified");
+ } else {
+ Logger.info(this, "User id has not been modified");
+ }
+ }
+
+ public String getCompanyId() {
+ return _companyId;
+ }
+
+ public void setCompanyId(String companyId) {
+ if (((companyId == null) && (_companyId != null)) ||
+ ((companyId != null) && (_companyId == null)) ||
+ ((companyId != null) && (_companyId != null) &&
+ !companyId.equals(_companyId))) {
+ if (!XSS_ALLOW_COMPANYID) {
+ companyId = Xss.strip(companyId);
+ }
+
+ _companyId = companyId;
+ setModified(true);
+ }
+ }
+
+ public String getPassword() {
+ return _password;
+ }
+
+ public void setPassword(String password) {
+ if (((password == null) && (_password != null)) ||
+ ((password != null) && (_password == null)) ||
+ ((password != null) && (_password != null) &&
+ !password.equals(_password))) {
+ if (!XSS_ALLOW_PASSWORD) {
+ password = Xss.strip(password);
+ }
+
+ _password = password;
+ setModified(true);
+ }
+ }
+
+ public boolean getPasswordEncrypted() {
+ return true;
+ }
+
+ public boolean isPasswordEncrypted() {
+ return true;
+ }
+
+ public void setPasswordEncrypted(boolean passwordEncrypted) {
+ if (passwordEncrypted != _passwordEncrypted) {
+ _passwordEncrypted = passwordEncrypted;
+ setModified(true);
+ }
+ }
+
+ public Date getPasswordExpirationDate() {
+ return _passwordExpirationDate;
+ }
+
+ public void setPasswordExpirationDate(Date passwordExpirationDate) {
+ if (((passwordExpirationDate == null) &&
+ (_passwordExpirationDate != null)) ||
+ ((passwordExpirationDate != null) &&
+ (_passwordExpirationDate == null)) ||
+ ((passwordExpirationDate != null) &&
+ (_passwordExpirationDate != null) &&
+ !passwordExpirationDate.equals(_passwordExpirationDate))) {
+ _passwordExpirationDate = passwordExpirationDate;
+ setModified(true);
+ }
+ }
+
+ public boolean getPasswordReset() {
+ return _passwordReset;
+ }
+
+ public boolean isPasswordReset() {
+ return _passwordReset;
+ }
+
+ public void setPasswordReset(boolean passwordReset) {
+ if (passwordReset != _passwordReset) {
+ _passwordReset = passwordReset;
+ setModified(true);
+ }
+ }
+
+ public String getFirstName() {
+ return _firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ if (((firstName == null) && (_firstName != null)) ||
+ ((firstName != null) && (_firstName == null)) ||
+ ((firstName != null) && (_firstName != null) &&
+ !firstName.equals(_firstName))) {
+ if (!XSS_ALLOW_FIRSTNAME) {
+ firstName = Xss.strip(firstName);
+ }
+
+ _firstName = firstName;
+ setModified(true);
+ }
+ }
+
+ public String getMiddleName() {
+ return _middleName;
+ }
+
+ public void setMiddleName(String middleName) {
+ if (((middleName == null) && (_middleName != null)) ||
+ ((middleName != null) && (_middleName == null)) ||
+ ((middleName != null) && (_middleName != null) &&
+ !middleName.equals(_middleName))) {
+ if (!XSS_ALLOW_MIDDLENAME) {
+ middleName = Xss.strip(middleName);
+ }
+
+ _middleName = middleName;
+ setModified(true);
+ }
+ }
+
+ public String getLastName() {
+ return _lastName;
+ }
+
+ public void setLastName(String lastName) {
+ if (((lastName == null) && (_lastName != null)) ||
+ ((lastName != null) && (_lastName == null)) ||
+ ((lastName != null) && (_lastName != null) &&
+ !lastName.equals(_lastName))) {
+ if (!XSS_ALLOW_LASTNAME) {
+ lastName = Xss.strip(lastName);
+ }
+
+ _lastName = lastName;
+ setModified(true);
+ }
+ }
+
+ public String getNickName() {
+ return _nickName;
+ }
+
+ public void setNickName(String nickName) {
+ if (((nickName == null) && (_nickName != null)) ||
+ ((nickName != null) && (_nickName == null)) ||
+ ((nickName != null) && (_nickName != null) &&
+ !nickName.equals(_nickName))) {
+ if (!XSS_ALLOW_NICKNAME) {
+ nickName = Xss.strip(nickName);
+ }
+
+ _nickName = nickName;
+ setModified(true);
+ }
+ }
+
+ public boolean getMale() {
+ return _male;
+ }
+
+ public boolean isMale() {
+ return _male;
+ }
+
+ public void setMale(boolean male) {
+ if (male != _male) {
+ _male = male;
+ setModified(true);
+ }
+ }
+
+ public Date getBirthday() {
+ return _birthday;
+ }
+
+ public void setBirthday(Date birthday) {
+ if (((birthday == null) && (_birthday != null)) ||
+ ((birthday != null) && (_birthday == null)) ||
+ ((birthday != null) && (_birthday != null) &&
+ !birthday.equals(_birthday))) {
+ _birthday = birthday;
+ setModified(true);
+ }
+ }
+
+ public String getEmailAddress() {
+ return _emailAddress;
+ }
+
+ public void setEmailAddress(String emailAddress) {
+ if (((emailAddress == null) && (_emailAddress != null)) ||
+ ((emailAddress != null) && (_emailAddress == null)) ||
+ ((emailAddress != null) && (_emailAddress != null) &&
+ !emailAddress.equals(_emailAddress))) {
+ if (!XSS_ALLOW_EMAILADDRESS) {
+ emailAddress = Xss.strip(emailAddress);
+ }
+
+ _emailAddress = emailAddress;
+ setModified(true);
+ }
+ }
+
+ public String getSmsId() {
+ return _smsId;
+ }
+
+ public void setSmsId(String smsId) {
+ if (((smsId == null) && (_smsId != null)) ||
+ ((smsId != null) && (_smsId == null)) ||
+ ((smsId != null) && (_smsId != null) && !smsId.equals(_smsId))) {
+ if (!XSS_ALLOW_SMSID) {
+ smsId = Xss.strip(smsId);
+ }
+
+ _smsId = smsId;
+ setModified(true);
+ }
+ }
+
+ public String getAimId() {
+ return _aimId;
+ }
+
+ public void setAimId(String aimId) {
+ if (((aimId == null) && (_aimId != null)) ||
+ ((aimId != null) && (_aimId == null)) ||
+ ((aimId != null) && (_aimId != null) && !aimId.equals(_aimId))) {
+ if (!XSS_ALLOW_AIMID) {
+ aimId = Xss.strip(aimId);
+ }
+
+ _aimId = aimId;
+ setModified(true);
+ }
+ }
+
+ public String getIcqId() {
+ return _icqId;
+ }
+
+ public void setIcqId(String icqId) {
+ if (((icqId == null) && (_icqId != null)) ||
+ ((icqId != null) && (_icqId == null)) ||
+ ((icqId != null) && (_icqId != null) && !icqId.equals(_icqId))) {
+ if (!XSS_ALLOW_ICQID) {
+ icqId = Xss.strip(icqId);
+ }
+
+ _icqId = icqId;
+ setModified(true);
+ }
+ }
+
+ public String getMsnId() {
+ return _msnId;
+ }
+
+ public void setMsnId(String msnId) {
+ if (((msnId == null) && (_msnId != null)) ||
+ ((msnId != null) && (_msnId == null)) ||
+ ((msnId != null) && (_msnId != null) && !msnId.equals(_msnId))) {
+ if (!XSS_ALLOW_MSNID) {
+ msnId = Xss.strip(msnId);
+ }
+
+ _msnId = msnId;
+ setModified(true);
+ }
+ }
+
+ public String getYmId() {
+ return _ymId;
+ }
+
+ public void setYmId(String ymId) {
+ if (((ymId == null) && (_ymId != null)) ||
+ ((ymId != null) && (_ymId == null)) ||
+ ((ymId != null) && (_ymId != null) && !ymId.equals(_ymId))) {
+ if (!XSS_ALLOW_YMID) {
+ ymId = Xss.strip(ymId);
+ }
+
+ _ymId = ymId;
+ setModified(true);
+ }
+ }
+
+ public String getFavoriteActivity() {
+ return _favoriteActivity;
+ }
+
+ public void setFavoriteActivity(String favoriteActivity) {
+ if (((favoriteActivity == null) && (_favoriteActivity != null)) ||
+ ((favoriteActivity != null) && (_favoriteActivity == null)) ||
+ ((favoriteActivity != null) && (_favoriteActivity != null) &&
+ !favoriteActivity.equals(_favoriteActivity))) {
+ if (!XSS_ALLOW_FAVORITEACTIVITY) {
+ favoriteActivity = Xss.strip(favoriteActivity);
+ }
+
+ _favoriteActivity = favoriteActivity;
+ setModified(true);
+ }
+ }
+
+ public String getFavoriteBibleVerse() {
+ return _favoriteBibleVerse;
+ }
+
+ public void setFavoriteBibleVerse(String favoriteBibleVerse) {
+ if (((favoriteBibleVerse == null) && (_favoriteBibleVerse != null)) ||
+ ((favoriteBibleVerse != null) && (_favoriteBibleVerse == null)) ||
+ ((favoriteBibleVerse != null) && (_favoriteBibleVerse != null) &&
+ !favoriteBibleVerse.equals(_favoriteBibleVerse))) {
+ if (!XSS_ALLOW_FAVORITEBIBLEVERSE) {
+ favoriteBibleVerse = Xss.strip(favoriteBibleVerse);
+ }
+
+ _favoriteBibleVerse = favoriteBibleVerse;
+ setModified(true);
+ }
+ }
+
+ public String getFavoriteFood() {
+ return _favoriteFood;
+ }
+
+ public void setFavoriteFood(String favoriteFood) {
+ if (((favoriteFood == null) && (_favoriteFood != null)) ||
+ ((favoriteFood != null) && (_favoriteFood == null)) ||
+ ((favoriteFood != null) && (_favoriteFood != null) &&
+ !favoriteFood.equals(_favoriteFood))) {
+ if (!XSS_ALLOW_FAVORITEFOOD) {
+ favoriteFood = Xss.strip(favoriteFood);
+ }
+
+ _favoriteFood = favoriteFood;
+ setModified(true);
+ }
+ }
+
+ public String getFavoriteMovie() {
+ return _favoriteMovie;
+ }
+
+ public void setFavoriteMovie(String favoriteMovie) {
+ if (((favoriteMovie == null) && (_favoriteMovie != null)) ||
+ ((favoriteMovie != null) && (_favoriteMovie == null)) ||
+ ((favoriteMovie != null) && (_favoriteMovie != null) &&
+ !favoriteMovie.equals(_favoriteMovie))) {
+ if (!XSS_ALLOW_FAVORITEMOVIE) {
+ favoriteMovie = Xss.strip(favoriteMovie);
+ }
+
+ _favoriteMovie = favoriteMovie;
+ setModified(true);
+ }
+ }
+
+ public String getFavoriteMusic() {
+ return _favoriteMusic;
+ }
+
+ public void setFavoriteMusic(String favoriteMusic) {
+ if (((favoriteMusic == null) && (_favoriteMusic != null)) ||
+ ((favoriteMusic != null) && (_favoriteMusic == null)) ||
+ ((favoriteMusic != null) && (_favoriteMusic != null) &&
+ !favoriteMusic.equals(_favoriteMusic))) {
+ if (!XSS_ALLOW_FAVORITEMUSIC) {
+ favoriteMusic = Xss.strip(favoriteMusic);
+ }
+
+ _favoriteMusic = favoriteMusic;
+ setModified(true);
+ }
+ }
+
+ public String getLanguageId() {
+ return _languageId;
+ }
+
+ public void setLanguageId(String languageId) {
+ if (((languageId == null) && (_languageId != null)) ||
+ ((languageId != null) && (_languageId == null)) ||
+ ((languageId != null) && (_languageId != null) &&
+ !languageId.equals(_languageId))) {
+ if (!XSS_ALLOW_LANGUAGEID) {
+ languageId = Xss.strip(languageId);
+ }
+
+ _languageId = languageId;
+ setModified(true);
+ }
+ }
+
+ public String getTimeZoneId() {
+ return _timeZoneId;
+ }
+
+ public void setTimeZoneId(String timeZoneId) {
+ if (((timeZoneId == null) && (_timeZoneId != null)) ||
+ ((timeZoneId != null) && (_timeZoneId == null)) ||
+ ((timeZoneId != null) && (_timeZoneId != null) &&
+ !timeZoneId.equals(_timeZoneId))) {
+ if (!XSS_ALLOW_TIMEZONEID) {
+ timeZoneId = Xss.strip(timeZoneId);
+ }
+
+ _timeZoneId = timeZoneId;
+ setModified(true);
+ }
+ }
+
+ /**
+ * Returns the token for the access user token, on remember me
+ * @return String
+ */
+ @JsonIgnore
+ public String getRememberMeToken() {
+ return _skinId;
+ }
+
+ public String getSkinId() {
+ return _skinId;
+ }
+
+ public void setSkinId(String skinId) {
+ if (((skinId == null) && (_skinId != null)) ||
+ ((skinId != null) && (_skinId == null)) ||
+ ((skinId != null) && (_skinId != null) &&
+ !skinId.equals(_skinId))) {
+ if (!XSS_ALLOW_SKINID) {
+ skinId = Xss.strip(skinId);
+ }
+
+ _skinId = skinId;
+ setModified(true);
+ }
+ }
+
+ public boolean getDottedSkins() {
+ return _dottedSkins;
+ }
+
+ public boolean isDottedSkins() {
+ return _dottedSkins;
+ }
+
+ public void setDottedSkins(boolean dottedSkins) {
+ if (dottedSkins != _dottedSkins) {
+ _dottedSkins = dottedSkins;
+ setModified(true);
+ }
+ }
+
+ public boolean getRoundedSkins() {
+ return _roundedSkins;
+ }
+
+ public boolean isRoundedSkins() {
+ return _roundedSkins;
+ }
+
+ public void setRoundedSkins(boolean roundedSkins) {
+ if (roundedSkins != _roundedSkins) {
+ _roundedSkins = roundedSkins;
+ setModified(true);
+ }
+ }
+
+ public String getGreeting() {
+ return _greeting;
+ }
+
+ public void setGreeting(String greeting) {
+ if (((greeting == null) && (_greeting != null)) ||
+ ((greeting != null) && (_greeting == null)) ||
+ ((greeting != null) && (_greeting != null) &&
+ !greeting.equals(_greeting))) {
+ if (!XSS_ALLOW_GREETING) {
+ greeting = Xss.strip(greeting);
+ }
+
+ _greeting = greeting;
+ setModified(true);
+ }
+ }
+
+ public String getResolution() {
+ return _resolution;
+ }
+
+ public void setResolution(String resolution) {
+ if (((resolution == null) && (_resolution != null)) ||
+ ((resolution != null) && (_resolution == null)) ||
+ ((resolution != null) && (_resolution != null) &&
+ !resolution.equals(_resolution))) {
+ if (!XSS_ALLOW_RESOLUTION) {
+ resolution = Xss.strip(resolution);
+ }
+
+ _resolution = resolution;
+ setModified(true);
+ }
+ }
+
+ public String getRefreshRate() {
+ return _refreshRate;
+ }
+
+ public void setRefreshRate(String refreshRate) {
+ if (((refreshRate == null) && (_refreshRate != null)) ||
+ ((refreshRate != null) && (_refreshRate == null)) ||
+ ((refreshRate != null) && (_refreshRate != null) &&
+ !refreshRate.equals(_refreshRate))) {
+ if (!XSS_ALLOW_REFRESHRATE) {
+ refreshRate = Xss.strip(refreshRate);
+ }
+
+ _refreshRate = refreshRate;
+ setModified(true);
+ }
+ }
+
+ public String getLayoutIds() {
+ return _layoutIds;
+ }
+
+ public void setLayoutIds(String layoutIds) {
+ if (((layoutIds == null) && (_layoutIds != null)) ||
+ ((layoutIds != null) && (_layoutIds == null)) ||
+ ((layoutIds != null) && (_layoutIds != null) &&
+ !layoutIds.equals(_layoutIds))) {
+ if (!XSS_ALLOW_LAYOUTIDS) {
+ layoutIds = Xss.strip(layoutIds);
+ }
+
+ _layoutIds = layoutIds;
+ setModified(true);
+ }
+ }
+
+ public String getComments() {
+ return _comments;
+ }
+
+ public void setComments(String comments) {
+ if (((comments == null) && (_comments != null)) ||
+ ((comments != null) && (_comments == null)) ||
+ ((comments != null) && (_comments != null) &&
+ !comments.equals(_comments))) {
+ if (!XSS_ALLOW_COMMENTS) {
+ comments = Xss.strip(comments);
+ }
+
+ _comments = comments;
+ setModified(true);
+ }
+ }
+
+ public Date getCreateDate() {
+ return _createDate;
+ }
+
+ public void setCreateDate(Date createDate) {
+ if (((createDate == null) && (_createDate != null)) ||
+ ((createDate != null) && (_createDate == null)) ||
+ ((createDate != null) && (_createDate != null) &&
+ !createDate.equals(_createDate))) {
+ _createDate = createDate;
+ setModified(true);
+ }
+ }
+
+ public Date getLoginDate() {
+ return _loginDate;
+ }
+
+ public void setLoginDate(Date loginDate) {
+ if (((loginDate == null) && (_loginDate != null)) ||
+ ((loginDate != null) && (_loginDate == null)) ||
+ ((loginDate != null) && (_loginDate != null) &&
+ !loginDate.equals(_loginDate))) {
+ _loginDate = loginDate;
+ setModified(true);
+ }
+ }
+
+ public String getLoginIP() {
+ return _loginIP;
+ }
+
+ public void setLoginIP(String loginIP) {
+ if (((loginIP == null) && (_loginIP != null)) ||
+ ((loginIP != null) && (_loginIP == null)) ||
+ ((loginIP != null) && (_loginIP != null) &&
+ !loginIP.equals(_loginIP))) {
+ if (!XSS_ALLOW_LOGINIP) {
+ loginIP = Xss.strip(loginIP);
+ }
+
+ _loginIP = loginIP;
+ setModified(true);
+ }
+ }
+
+ public Date getLastLoginDate() {
+ return _lastLoginDate;
+ }
+
+ public void setLastLoginDate(Date lastLoginDate) {
+ if (((lastLoginDate == null) && (_lastLoginDate != null)) ||
+ ((lastLoginDate != null) && (_lastLoginDate == null)) ||
+ ((lastLoginDate != null) && (_lastLoginDate != null) &&
+ !lastLoginDate.equals(_lastLoginDate))) {
+ _lastLoginDate = lastLoginDate;
+ setModified(true);
+ }
+ }
+
+ public String getLastLoginIP() {
+ return _lastLoginIP;
+ }
+
+ public void setLastLoginIP(String lastLoginIP) {
+ if (((lastLoginIP == null) && (_lastLoginIP != null)) ||
+ ((lastLoginIP != null) && (_lastLoginIP == null)) ||
+ ((lastLoginIP != null) && (_lastLoginIP != null) &&
+ !lastLoginIP.equals(_lastLoginIP))) {
+ if (!XSS_ALLOW_LASTLOGINIP) {
+ lastLoginIP = Xss.strip(lastLoginIP);
+ }
+
+ _lastLoginIP = lastLoginIP;
+ setModified(true);
+ }
+ }
+
+ public int getFailedLoginAttempts() {
+ return _failedLoginAttempts;
+ }
+
+ public void setFailedLoginAttempts(int failedLoginAttempts) {
+ if (failedLoginAttempts != _failedLoginAttempts) {
+ _failedLoginAttempts = failedLoginAttempts;
+ setModified(true);
+ }
+ }
+
+ public boolean getAgreedToTermsOfUse() {
+ return _agreedToTermsOfUse;
+ }
+
+ public boolean isAgreedToTermsOfUse() {
+ return _agreedToTermsOfUse;
+ }
+
+ public void setAgreedToTermsOfUse(boolean agreedToTermsOfUse) {
+ if (agreedToTermsOfUse != _agreedToTermsOfUse) {
+ _agreedToTermsOfUse = agreedToTermsOfUse;
+ setModified(true);
+ }
+ }
+
+ public boolean getActive() {
+ return _active;
+ }
+
+ public boolean isActive() {
+ return _active;
+ }
+
+ public void setActive(boolean active) {
+ if (active != _active) {
+ _active = active;
+ setModified(true);
+ }
+ }
+
+ public boolean getDeleteInProgress() {
+ return _deleteInProgress;
+ }
+
+ public boolean isDeleteInProgress() {
+ return _deleteInProgress;
+ }
+
+ public void setDeleteInProgress(boolean deleteInProgress) {
+ if (deleteInProgress != _deleteInProgress) {
+ _deleteInProgress = deleteInProgress;
+ setModified(true);
+ }
+ }
+
+ public Date getDeleteDate() {
+ return _deleteDate;
+ }
+
+ public void setDeleteDate(Date deleteDate) {
+ if (((deleteDate == null) && (_deleteDate != null)) ||
+ ((deleteDate != null) && (_deleteDate == null)) ||
+ ((deleteDate != null) && (_deleteDate != null) &&
+ !deleteDate.equals(_deleteDate))) {
+ _deleteDate = deleteDate;
+ setModified(true);
+ }
+ }
+
+ public Map getAdditionalInfo(){
+ return _additionalInfo;
+ }
+
+ public void setAdditionalInfo(final Map additionalInfo){
+ _additionalInfo = additionalInfo;
+ }
+
+ public BaseModel getProtected() {
+ return null;
+ }
+
+ public void protect() {
+ }
+
+ public Object clone() {
+ return new User(getUserId(), getCompanyId(), getPassword(),
+ getPasswordEncrypted(), getPasswordExpirationDate(),
+ getPasswordReset(), getFirstName(), getMiddleName(), getLastName(),
+ getNickName(), getMale(), getBirthday(), getEmailAddress(),
+ getSmsId(), getAimId(), getIcqId(), getMsnId(), getYmId(),
+ getFavoriteActivity(), getFavoriteBibleVerse(), getFavoriteFood(),
+ getFavoriteMovie(), getFavoriteMusic(), getLanguageId(),
+ getTimeZoneId(), getSkinId(), getDottedSkins(), getRoundedSkins(),
+ getGreeting(), getResolution(), getRefreshRate(), getLayoutIds(),
+ getComments(), getCreateDate(), getLoginDate(), getLoginIP(),
+ getLastLoginDate(), getLastLoginIP(), getFailedLoginAttempts(),
+ getAgreedToTermsOfUse(), getActive(), getDeleteInProgress(), getDeleteDate(),
+ getAdditionalInfo());
+ }
+
+ public int compareTo(Object obj) {
+ if (obj == null) {
+ return -1;
+ }
+
+ User user = (User)obj;
+ int value = 0;
+ value = getFirstName().toLowerCase().compareTo(user.getFirstName()
+ .toLowerCase());
+
+ if (value != 0) {
+ return value;
+ }
+
+ value = getMiddleName().toLowerCase().compareTo(user.getMiddleName()
+ .toLowerCase());
+
+ if (value != 0) {
+ return value;
+ }
+
+ value = getLastName().toLowerCase().compareTo(user.getLastName()
+ .toLowerCase());
+
+ if (value != 0) {
+ return value;
+ }
+
+ return 0;
+ }
+
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+
+ User user = null;
+
+ try {
+ user = (User)obj;
+ }
+ catch (ClassCastException cce) {
+ return false;
+ }
+
+ String pk = user.getPrimaryKey();
+
+ if (getPrimaryKey().equals(pk)) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ public int hashCode() {
+ return getPrimaryKey().hashCode();
+ }
+
+ private String _userId;
+ private String _companyId;
+ private String _password;
+ private boolean _passwordEncrypted;
+ private Date _passwordExpirationDate;
+ private boolean _passwordReset;
+ private String _firstName;
+ private String _middleName;
+ private String _lastName;
+ private String _nickName;
+ private boolean _male;
+ private Date _birthday;
+ private String _emailAddress;
+ private String _smsId;
+ private String _aimId;
+ private String _icqId;
+ private String _msnId;
+ private String _ymId;
+ private String _favoriteActivity;
+ private String _favoriteBibleVerse;
+ private String _favoriteFood;
+ private String _favoriteMovie;
+ private String _favoriteMusic;
+ private String _languageId;
+ private String _timeZoneId;
+ private String _skinId;
+ private boolean _dottedSkins;
+ private boolean _roundedSkins;
+ private String _greeting;
+ private String _resolution;
+ private String _refreshRate;
+ private String _layoutIds;
+ private String _comments;
+ private Date _createDate;
+ private Date _loginDate;
+ private String _loginIP;
+ private Date _lastLoginDate;
+ private String _lastLoginIP;
+ private int _failedLoginAttempts;
+ private boolean _agreedToTermsOfUse;
+ private boolean _active;
+ private boolean _deleteInProgress;
+ private Date _deleteDate;
+ private Map _additionalInfo;
+}