32 Commits

Author SHA1 Message Date
Paulo Gustavo Veiga
8a65c0cfb3 Revert "Implement REST Console support."
This reverts commit f4017e6362.

Conflicts:
	wise-webapp/pom.xml
2014-01-26 22:39:35 -03:00
Paulo Gustavo Veiga
a02e8435bf Enable Java 1.7 compilation. 2014-01-26 22:22:36 -03:00
Paulo Gustavo Veiga
054521e072 Bug WISE-205 fixed.
Fix IE 11 browser detection.
2014-01-26 22:15:01 -03:00
Paulo Gustavo Veiga
9e3806f73a Add Jira Issue Integration.
Conflicts:
	wise-webapp/pom.xml
2014-01-26 22:14:37 -03:00
Paulo Gustavo Veiga
5ca8c4718f Merge branch 'release/v3.0.2' of bitbucket.org:wisemapping/wisemapping-open-source into release/v3.0.2 2014-01-24 20:26:54 -03:00
Paulo Gustavo Veiga
f4017e6362 Implement REST Console support. 2014-01-24 09:11:24 -03:00
Paulo Gustavo Veiga
023e4b8f9f Bug WISE-122 fixed.
Display proper message for change password for account based on OpenId.
2014-01-16 01:21:59 -03:00
Paulo Gustavo Veiga
22c102917e Fix failing uning tests ... 2014-01-12 22:53:42 -03:00
Paulo Veiga
0001dff347 Merge branch 'release/v3.0.2' of bitbucket.org:wisemapping/wisemapping-open-source into release/v3.0.2 2014-01-12 05:55:42 +00:00
Paulo Veiga
a50a96492f Fix jetty download. 2014-01-12 05:54:43 +00:00
Paulo Gustavo Veiga
63c063933d Q!
Bug WISE-22 fixed. Resolve resize node issue.
2014-01-12 05:50:50 +00:00
Paulo Gustavo Veiga
80dfab3ef4 Bug WISE-22 fixed. Resolve resize node issue. 2014-01-12 02:17:42 -03:00
Paulo Gustavo Veiga
a2db34ae61 Revert "Bug WISE-16 fixed. Backed completed."
This reverts commit 9a77ff3bb8.
2014-01-10 00:21:21 -03:00
Paulo Gustavo Veiga
9a77ff3bb8 Bug WISE-16 fixed. Backed completed. 2014-01-10 00:19:56 -03:00
Paulo Gustavo Veiga
5e4c1e4357 Add compile information 2014-01-08 23:33:00 +00:00
Paulo Gustavo Veiga
c87424ae80 Add compilation details temporally. 2014-01-08 23:28:21 +00:00
Paulo Gustavo Veiga
fc6b573f86 README.md edited online with Bitbucket 2014-01-08 23:21:30 +00:00
Paulo Gustavo Veiga
175b2f8921 Home.textile edited online with Bitbucket 2014-01-08 23:18:24 +00:00
Paulo Gustavo Veiga
f8b25f949a Compiling-and-running.md edited online with Bitbucket 2014-01-08 23:16:06 +00:00
Paulo Gustavo Veiga
55ab430cfe Fix compile documentation ... 2014-01-08 23:12:53 +00:00
Ezequiel Bergamaschi
4d3d8daa37 fix wrong version of jetty-maven-plugin 2014-01-07 16:58:05 -03:00
Paulo Gustavo Veiga
efd285eb10 README.md edited online with Bitbucket 2014-01-07 01:52:14 +00:00
Paulo Gustavo Veiga
128052102d README.md edited online with Bitbucket 2014-01-07 01:49:07 +00:00
Paulo Veiga
8f2f9da3da Fix 2014-01-05 22:03:41 +00:00
Paulo Gustavo Veiga
84c96287f3 Hack Chrome text element issue. 2014-01-05 18:57:47 -03:00
Paulo Gustavo Veiga
f75124233b Update part of Maven Pluggins versions. 2014-01-05 18:10:42 -03:00
Paulo Gustavo Veiga
26bd9f8840 Resources moved to https. 2014-01-02 18:34:14 -03:00
Paulo Gustavo Veiga
da8f474c64 Add extra documentation for LDAP configuration 2013-09-25 11:00:54 -03:00
Paulo Gustavo Veiga
5e8c1960e7 Fix postgress schema. 2013-05-19 11:42:06 -03:00
Paulo Gustavo Veiga
35d76ea56f Fix message. 2013-04-20 00:43:19 -03:00
Paulo Gustavo Veiga
a230dd104c Fix unlock issues. 2013-04-07 12:27:45 -03:00
Paulo Gustavo Veiga
31fb342ef1 Fix missing message. 2013-04-05 20:49:17 -03:00
36 changed files with 494 additions and 490 deletions

View File

@@ -4,20 +4,20 @@
The following products must be installed:
* Java Development Kit 6 or higher (http://java.sun.com/javase/downloads/index.jsp)
* Maven 3.x or higher (http://maven.apache.org/)
* Java Development Kit 7 or higher ([http://www.oracle.com/technetwork/java/javase/downloads/index.html])
* Maven 3.x or higher ([http://maven.apache.org/])
## Compiling
WiseMapping uses Maven as packaging and project management. The project is composed of 4 maven sub-modules:
WiseMapping uses Maven as packaging and project management. It's composed of 5 maven sub-modules:
* core-js: Utilities JavaScript libraries
* web2d: JavaScript 2D VML/SVG abstraction library used by the mind map editor
* mindplot: JavaScript mind map designer core
* core-js: Utilities JavaScript classes
* web2d: JavaScript 2D SVG abstraction library used by the mind map editor
* mindplot: JavaScript mindmap designer core
* wise-editor: Mindmap Editor standalone distribution
* wise-webapp: J2EE web application
Full compilation of the project can be done executing within <project-dir>:
The full compilation of the project can be performed executing within <project-dir>:
`mvn package`
@@ -26,9 +26,11 @@ Once this command is execute, the file <project-dir>/wise-webapp/target/wisemapp
## Testing
The previously generated war can be deployed locally executing within the directory <project-dir>/wise-webapp the following command:
`mvn jetty:run-war`
`cd wise-webapp;mvn jetty:run-war`
This will start the application on the URL: http://localhost:8080/wise-webapp/. Additionally, a file based database is automatically populated with a test user.
This will start the application on the URL: [http://localhost:8080/wise-webapp/]. Additionally, a file based database is automatically populated with a test user.
User: test@wisemapping.org
Password: test
Password: test
Enjoy :)

View File

@@ -18,5 +18,3 @@ Were a couple of friends working on an idea: “Create the best on-line colla
h1. [[Documentation]]
h1. [[Compiling and Running]]
h1. [[FAQ]]

117
README.md
View File

@@ -1,123 +1,50 @@
# WiseMapping: a Web based mindmapping application
## Project Information
The goal of this project is to provide a high quality product that can be deployed by educational and academic institutions, private and public companies and anyone who needs to have a mindmapping application. WiseMapping is based on the same code source supporting WiseMapping.com. More info: www.wisemapping.org
## Compiling and Running
# Compiling and Running
### Prerequisites
## Prerequisites
The following products must be installed:
* Java Development Kit 7 or higher (http://java.sun.com/javase/downloads/index.jsp)
* Maven 2.2.1 or higher (http://maven.apache.org/)
### Compiling
* Java Development Kit 7 or higher ([http://www.oracle.com/technetwork/java/javase/downloads/index.html])
* Maven 3.x or higher ([http://maven.apache.org/])
WiseMapping uses Maven as packaging and project management. The project is composed of 4 maven sub-modules:
* core-js: Utilities JavaScript libraries
## Compiling
WiseMapping uses Maven as packaging and project management. It's composed of 5 maven sub-modules:
* core-js: Utilities JavaScript classes
* web2d: JavaScript 2D SVG abstraction library used by the mind map editor
* mindplot: JavaScript mind map designer core
* mindplot: JavaScript mindmap designer core
* wise-editor: Mindmap Editor standalone distribution
* wise-webapp: J2EE web application
Full compilation of the project can be done executing within <project-dir>:
The full compilation of the project can be performed executing within <project-dir>:
`mvn clean install`
`mvn package`
Once this command is execute, the file <project-dir>/wise-webapp/target/wisemapping.war will be generated.
### Testing
Once this command is execute, the file <project-dir>/wise-webapp/target/wisemapping*.war will be generated.
## Testing
The previously generated war can be deployed locally executing within the directory <project-dir>/wise-webapp the following command:
`mvn jetty:run`
`cd wise-webapp;mvn jetty:run-war`
This will start the application on the URL: http://localhost:8080. Additionally, a file based database is automatically populated with a test user.
This will start the application on the URL: [http://localhost:8080/wise-webapp/]. Additionally, a file based database is automatically populated with a test user.
User: test@wisemapping.org
Pass: test
Password: test
## Running the JS only version
Start by creating the .zip file:
`mvn assembly:assembly -Dmaven.test.skip=true`
To test the javascript frontend you then do:
ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port=>8000,:DocumentRoot=>".").start'
Now open a browser using the URL http://localhost:8000/wise-editor/src/main/webapp/
### Attaching drag and drop events.
1) Support for dragging TextNodes:
The following code is an example of how to add attach to the div dragImageNode the support for node dragging.
$("dragTextNode").addEvent('mousedown', function(event) {
event.preventDefault();
// Create a image node ...
var mindmap = designer.getMindmap();
var node = mindmap.createNode();
node.setText("Node Text !!!!");
node.setMetadata("{'media':'test'}");
node.setShapeType(mindplot.model.TopicShape.RECTANGLE);
// Add link ...
var link = node.createFeature(mindplot.TopicFeature.Link.id, {url:"http://www.wisemapping.com"});
node.addFeature(link);
// Add Note ...
var note = node.createFeature(mindplot.TopicFeature.Note.id, {text:"This is a note"});
node.addFeature(note);
designer.addDraggedNode(event, node);
});
In the example, a new node is created with text "Node Text !!!!" and a note and a link associated to it when the user drop the node. Something to pay attention is the node.setMetadata("{}"), this delegated will be persisted during the serialization. Here you can store all the data you need.
2) Support for dragging Images: Similar to the point 1,drag support is registered to the div dragImageNode.
$("dragImageNode").addEvent('mousedown', function(event) {
event.preventDefault();
// Create a image node ...
var mindmap = designer.getMindmap();
var node = mindmap.createNode();
node.setImageSize(80, 43);
node.setMetadata("{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&feature=g-vrec&context=G2b4ab69RVAAAAAAAAAA'}");
node.setImageUrl("images/logo-small.png");
node.setShapeType(mindplot.model.TopicShape.IMAGE);
designer.addDraggedNode(event, node);
});
The node.setShapeType(mindplot.model.TopicShape.IMAGE) defines a image node. This makes mandatory the set of setImageUrl and setImageSize properties in the node.
3) An event registration mechanism for Image nodes edit events: The next snipped show how to register a custom edition handler.
designer.addEvent("editnode", function(event) {
var node = event.model;
alert("Node Id:" + node.getId());
alert("Node Metadata:" + node.getMetadata());
alert("Is Read Only:" + event.readOnly);
} });
## Author
## Authors
* Pablo Luna
* Paulo Veiga
* Ignacio Manzano
* Nicolas Damonte
Past Collaborators: Ignacio Manzano, Nicolas Damonte
## License
The source code is Licensed under the WiseMapping Open License, Version 1.0 (the “License”);
You may obtain a copy of the License at: http://www.wisemapping.org/license
You may obtain a copy of the License at: [https://wisemapping.atlassian.net/wiki/display/WS/License]

View File

@@ -2,9 +2,9 @@ INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (1, 'test@wisemapping
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
VALUES (1, 'Test', 'User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 1237, CURDATE(), 1,'D');
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemapping.org', CURDATE(),authentication_type);
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,"D")
VALUES (2, 'Admin', 'User', 'admin', 1237, CURDATE(), 1);
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemapping.org', CURDATE());
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
VALUES (2, 'Admin', 'User', 'admin', 1237, CURDATE(), 1,'D');
COMMIT;

View File

@@ -7,7 +7,7 @@ CREATE TABLE COLLABORATOR (
CREATE TABLE "user" (
id SERIAL NOT NULL PRIMARY KEY,
authentication_type TEXT NOT NULL,
authenticator_uri VARCHAR(255) NOT NULL,
authenticator_uri VARCHAR(255),
colaborator_id INTEGER NOT NULL,
firstname VARCHAR(255) NOT NULL,
lastname VARCHAR(255) NOT NULL,

View File

@@ -8,7 +8,7 @@ BASE_DIR=`pwd`
TARGET_DIR=$BASE_DIR/target
JETTY_DIR=$TARGET_DIR/wisemapping-$WISE_VERSION
WISE_WEBAPP_DIR=$JETTY_DIR/webapps/wisemapping
JETTY_VERSION=8.1.8.v20121106
JETTY_VERSION=8.1.14.v20131031
JETTY_DIST_DIR=jetty-distribution-${JETTY_VERSION}
JETTY_ZIP=${JETTY_DIST_DIR}.zip

View File

@@ -1,32 +0,0 @@
#!/bin/bash
set -e
set -u
WISE_VERSION=$1
TMP_DIR=/tmp/wise-src/wisemapping-src
TAR_FILE_NAME=wisemapping-${WISE_VERSION}-src.tar.gz
OUTPUT_DIR=`pwd`"/target"
OUTPUT_FILE=${OUTPUT_DIR}/${TAR_FILE_NAME}
# Clean all.
cd ..
rm -rf ${TMP_DIR}/../
mvn clean
# Prepare copy
mkdir -p ${TMP_DIR}
rsync -aCv --exclude ".git" --exclude "wisemapping.i*" --exclude "**/*/Brix*" --exclude "**/brix" --exclude "*/*.iml" --exclude "*/wisemapping.log*" --exclude "**/.DS_Store" --exclude "*.textile" --exclude "**/.gitignore" --exclude "installer" --exclude "*/target" . ${TMP_DIR}
# Zip file
[ ! -e ${OUTPUT_DIR} ] && mkdir ${OUTPUT_DIR}
rm -f ${OUTPUT_FILE}
cd ${TMP_DIR}/..
tar -cvzf ${OUTPUT_FILE} .
echo
echo "#################################################################"
echo "Zip file generated on:"${OUTPUT_FILE}
echo "#################################################################"

View File

@@ -47,17 +47,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<version>2.16</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0</version>
<version>3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -103,7 +103,7 @@
<groupId>org.apache.maven.plugins</groupId>
<inherited>true</inherited>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>

View File

@@ -153,12 +153,23 @@ web2d.peer.svg.TextPeer = new Class({
},
getWidth : function () {
var computedWidth;
// Firefox hack for this issue:http://stackoverflow.com/questions/6390065/doing-ajax-updates-in-svg-breaks-getbbox-is-there-a-workaround
try {
var computedWidth = this._native.getBBox().width;
computedWidth = this._native.getBBox().width;
// Chrome bug is producing this error, oly during page loading. Remove the hack if it works. The issue seems to be
// caused when the element is hidden. I don't know why, but it works ...
if(computedWidth==0){
var bbox = this._native.getBBox();
computedWidth = bbox.width;
}
} catch(e) {
computedWidth = 10;
}
console.log("Final result:"+computedWidth);
var width = parseInt(computedWidth);
width = width + this._font.getWidthMargin();

View File

@@ -361,7 +361,7 @@
<includes>
<include>config/database/hsql/drop-schemas.sql</include>
<include>config/database/hsql/create-schemas.sql</include>
<include>config/database/hsql/atest-data.sql</include>
<include>config/database/hsql/apopulate-schemas.sql</include>
</includes>
</fileset>
</configuration>
@@ -457,7 +457,7 @@
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.4.v20120524</version>
<version>8.1.14.v20131031</version>
<configuration>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>

View File

@@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull;
public class EditionSessionExpiredException
extends ClientException
{
public static final String MSG_KEY = "MINDMAP_TIMESTAMP_OUTDATED";
private static final String MSG_KEY = "MINDMAP_TIMESTAMP_OUTDATED";
public EditionSessionExpiredException(@NotNull String msg)
{

View File

@@ -20,9 +20,11 @@ package com.wisemapping.exceptions;
import org.jetbrains.annotations.NotNull;
public class LockException
extends ClientException
{
private static final String MSG_KEY = "MINDMAP_IS_LOCKED";
public LockException(@NotNull String message) {
super(message,Severity.INFO);
}
@@ -30,6 +32,6 @@ public class LockException
@NotNull
@Override
protected String getMsgBundleKey() {
return null; //To change body of implemented methods use File | Settings | File Templates.
return MSG_KEY;
}
}

View File

@@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull;
public class MapCouldNotFoundException
extends ClientException
{
public static final String MSG_KEY = "MAP_CAN_NOT_BE_FOUND";
private static final String MSG_KEY = "MAP_CAN_NOT_BE_FOUND";
public MapCouldNotFoundException(@NotNull String msg)
{

View File

@@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull;
public class MultipleSessionsOpenException
extends ClientException
{
public static final String MSG_KEY = "MINDMAP_OUTDATED_BY_YOU";
private static final String MSG_KEY = "MINDMAP_OUTDATED_BY_YOU";
public MultipleSessionsOpenException(@NotNull String techInfo)
{

View File

@@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull;
public class SessionExpiredException
extends ClientException {
public static final String MSG_KEY = "MINDMAP_TIMESTAMP_OUTDATED";
private static final String MSG_KEY = "MINDMAP_TIMESTAMP_OUTDATED";
private User lastUpdater;
public SessionExpiredException(@NotNull String debugInfo, @NotNull User lastUpdater) {

View File

@@ -47,7 +47,7 @@ public class SupportedUserAgent implements Serializable {
boolean result = browser == Browser.FIREFOX && majorVersion >= 10;
result = result || browser == Browser.FIREFOX2 && majorVersion >= 17;
result = result || browser == Browser.IE8 || browser == Browser.IE9;
result = result || browser == Browser.IE8 || browser == Browser.IE9 || browser == Browser.IE11 ;
result = result || browser == Browser.IE && majorVersion >= 8;
result = result || browser == Browser.OPERA10 && majorVersion >= 11;
result = result || browser == Browser.CHROME && majorVersion >= 18;

View File

@@ -0,0 +1,44 @@
package com.wisemapping.listener;
import com.wisemapping.exceptions.AccessDeniedSecurityException;
import com.wisemapping.exceptions.LockException;
import com.wisemapping.model.User;
import com.wisemapping.security.Utils;
import com.wisemapping.service.LockManager;
import com.wisemapping.service.MindmapService;
import org.jetbrains.annotations.NotNull;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
public class UnlockOnExpireListener implements HttpSessionListener {
@Override
public void sessionCreated(@NotNull HttpSessionEvent event) {
}
@Override
public void sessionDestroyed(@NotNull HttpSessionEvent event) {
final ServletContext servletContext = event.getSession().getServletContext();
final WebApplicationContext wc = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
final MindmapService mindmapService = (MindmapService) wc.getBean("mindmapService");
final LockManager lockManager = mindmapService.getLockManager();
final User user = Utils.getUser(false);
if (user != null) {
try {
lockManager.unlockAll(user);
} catch (LockException e) {
e.printStackTrace();
} catch (AccessDeniedSecurityException e) {
e.printStackTrace();
}
}
}
}

View File

@@ -115,7 +115,7 @@ public class AdminController extends BaseController {
userService.changePassword(user);
}
@RequestMapping(method = RequestMethod.DELETE, value = "admin/users/{id}", consumes = {"text/plain"})
@RequestMapping(method = RequestMethod.DELETE, value = "admin/users/{id}")
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void getUserByEmail(@PathVariable long id) throws WiseMappingException {
final User user = userService.getUserBy(id);

View File

@@ -34,13 +34,12 @@ public interface LockManager {
void unlock(@NotNull Mindmap mindmap, @NotNull User user) throws LockException, AccessDeniedSecurityException;
void unlockAll(@NotNull User user) throws LockException, AccessDeniedSecurityException;
boolean isLockedBy(@NotNull Mindmap mindmap, @NotNull User collaborator);
@NotNull
LockInfo lock(@NotNull Mindmap mindmap, @NotNull User user, long session) throws WiseMappingException;
@NotNull
LockInfo lock(@NotNull Mindmap mindmap, @NotNull User user) throws WiseMappingException;
long generateSession();
}

View File

@@ -79,6 +79,17 @@ class LockManagerImpl implements LockManager {
return result;
}
@Override
public void unlockAll(@NotNull final User user) throws LockException, AccessDeniedSecurityException {
final Set<Integer> mapIds = lockInfoByMapId.keySet();
for (final Integer mapId : mapIds) {
final LockInfo lockInfo = lockInfoByMapId.get(mapId);
if (lockInfo.getUser().identityEquality(user)) {
unlock(mapId);
}
}
}
@Override
public void unlock(@NotNull Mindmap mindmap, @NotNull User user) throws LockException, AccessDeniedSecurityException {
if (isLocked(mindmap) && !isLockedBy(mindmap, user)) {
@@ -108,12 +119,6 @@ class LockManagerImpl implements LockManager {
}
@Override
@NotNull
public LockInfo lock(@NotNull Mindmap mindmap, @NotNull User user) throws WiseMappingException {
return this.lock(mindmap, user, System.nanoTime());
}
@Override
public long generateSession() {
return System.nanoTime();
@@ -135,7 +140,7 @@ class LockManagerImpl implements LockManager {
// Update timeout only...
logger.debug("Update timestamp:" + mindmap.getId());
updateExpirationTimeout(mindmap, user);
// result.setSession(session);
// result.setSession(session);
} else {
logger.debug("Lock map id:" + mindmap.getId());
result = new LockInfo(user, mindmap, session);

View File

@@ -44,309 +44,308 @@ import java.util.regex.Pattern;
/**
* Enum constants for most common browsers, including e-mail clients and bots.
*
* @author harald
*
*/
public enum Browser {
OPERA( Manufacturer.OPERA, null, 1, "Opera", new String[] { "Opera" }, null, BrowserType.WEB_BROWSER, RenderingEngine.PRESTO, "Opera\\/(([\\d]+)\\.([\\w]+))"), // before MSIE
OPERA_MINI( Manufacturer.OPERA, Browser.OPERA, 20, "Opera Mini", new String[] { "Opera Mini"}, null, BrowserType.MOBILE_BROWSER, RenderingEngine.PRESTO, null), // Opera for mobile devices
/**
* For some strange reason Opera uses 9.80 in the user-agent string.
*/
OPERA10( Manufacturer.OPERA, Browser.OPERA, 10, "Opera 10", new String[] { "Opera/9.8" }, null, BrowserType.WEB_BROWSER, RenderingEngine.PRESTO, "Version\\/(([\\d]+)\\.([\\w]+))"),
OPERA9( Manufacturer.OPERA, Browser.OPERA, 5, "Opera 9", new String[] { "Opera/9" }, null, BrowserType.WEB_BROWSER, RenderingEngine.PRESTO, null),
KONQUEROR( Manufacturer.OTHER, null, 1, "Konqueror", new String[] { "Konqueror"}, null, BrowserType.WEB_BROWSER, RenderingEngine.KHTML, "Konqueror\\/(([0-9]+)\\.?([\\w]+)?(-[\\w]+)?)" ),
OPERA(Manufacturer.OPERA, null, 1, "Opera", new String[]{"Opera"}, null, BrowserType.WEB_BROWSER, RenderingEngine.PRESTO, "Opera\\/(([\\d]+)\\.([\\w]+))"), // before MSIE
OPERA_MINI(Manufacturer.OPERA, Browser.OPERA, 20, "Opera Mini", new String[]{"Opera Mini"}, null, BrowserType.MOBILE_BROWSER, RenderingEngine.PRESTO, null), // Opera for mobile devices
/**
* For some strange reason Opera uses 9.80 in the user-agent string.
*/
OPERA10(Manufacturer.OPERA, Browser.OPERA, 10, "Opera 10", new String[]{"Opera/9.8"}, null, BrowserType.WEB_BROWSER, RenderingEngine.PRESTO, "Version\\/(([\\d]+)\\.([\\w]+))"),
OPERA9(Manufacturer.OPERA, Browser.OPERA, 5, "Opera 9", new String[]{"Opera/9"}, null, BrowserType.WEB_BROWSER, RenderingEngine.PRESTO, null),
KONQUEROR(Manufacturer.OTHER, null, 1, "Konqueror", new String[]{"Konqueror"}, null, BrowserType.WEB_BROWSER, RenderingEngine.KHTML, "Konqueror\\/(([0-9]+)\\.?([\\w]+)?(-[\\w]+)?)"),
/**
* Outlook email client
*/
OUTLOOK( Manufacturer.MICROSOFT, null, 100, "Outlook", new String[] {"MSOffice"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.WORD, "MSOffice (([0-9]+))"), // before IE7
/**
* Microsoft Outlook 2007 identifies itself as MSIE7 but uses the html rendering engine of Word 2007.
* Example user agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 1.1.4322; MSOffice 12)
*/
OUTLOOK2007( Manufacturer.MICROSOFT, Browser.OUTLOOK, 107, "Outlook 2007", new String[] {"MSOffice 12"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.WORD, null), // before IE7
/**
* Outlook 2010 is still using the rendering engine of Word. http://www.fixoutlook.org
*/
OUTLOOK2010( Manufacturer.MICROSOFT, Browser.OUTLOOK, 108, "Outlook 2010", new String[] {"MSOffice 14"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.WORD, null), // before IE7
/**
* Outlook email client
*/
OUTLOOK(Manufacturer.MICROSOFT, null, 100, "Outlook", new String[]{"MSOffice"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.WORD, "MSOffice (([0-9]+))"), // before IE7
/**
* Microsoft Outlook 2007 identifies itself as MSIE7 but uses the html rendering engine of Word 2007.
* Example user agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 1.1.4322; MSOffice 12)
*/
OUTLOOK2007(Manufacturer.MICROSOFT, Browser.OUTLOOK, 107, "Outlook 2007", new String[]{"MSOffice 12"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.WORD, null), // before IE7
/**
* Outlook 2010 is still using the rendering engine of Word. http://www.fixoutlook.org
*/
OUTLOOK2010(Manufacturer.MICROSOFT, Browser.OUTLOOK, 108, "Outlook 2010", new String[]{"MSOffice 14"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.WORD, null), // before IE7
/**
* Family of Internet Explorer browsers
*/
IE( Manufacturer.MICROSOFT, null, 1, "Internet Explorer", new String[] { "MSIE"}, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, "MSIE (([\\d]+)\\.([\\w]+))" ), // before Mozilla
/**
* Since version 7 Outlook Express is identifying itself. By detecting Outlook Express we can not
* identify the Internet Explorer version which is probably used for the rendering.
* Obviously this product is now called Windows Live Mail Desktop or just Windows Live Mail.
*/
OUTLOOK_EXPRESS7( Manufacturer.MICROSOFT, Browser.IE, 110, "Windows Live Mail", new String[] {"Outlook-Express/7.0"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.TRIDENT, null), // before IE7, previously known as Outlook Express. First released in 2006, offered with different name later
/**
* Since 2007 the mobile edition of Internet Explorer identifies itself as IEMobile in the user-agent.
* If previous versions have to be detected, use the operating system information as well.
*/
IEMOBILE7( Manufacturer.MICROSOFT, Browser.IE, 121, "IE Mobile 7", new String[] { "IEMobile 7" }, null, BrowserType.MOBILE_BROWSER, RenderingEngine.TRIDENT, null), // before MSIE strings
IEMOBILE6( Manufacturer.MICROSOFT, Browser.IE, 120, "IE Mobile 6", new String[] { "IEMobile 6" }, null, BrowserType.MOBILE_BROWSER, RenderingEngine.TRIDENT, null), // before MSIE
IE9( Manufacturer.MICROSOFT, Browser.IE, 90, "Internet Explorer 9", new String[] { "MSIE 9" }, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, null ), // before MSIE
IE8( Manufacturer.MICROSOFT, Browser.IE, 80, "Internet Explorer 8", new String[] { "MSIE 8" }, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, null ), // before MSIE
IE7( Manufacturer.MICROSOFT, Browser.IE, 70, "Internet Explorer 7", new String[] { "MSIE 7" }, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, null), // before MSIE
IE6( Manufacturer.MICROSOFT, Browser.IE, 60, "Internet Explorer 6", new String[] { "MSIE 6" }, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, null ), // before MSIE
IE5_5( Manufacturer.MICROSOFT, Browser.IE, 55, "Internet Explorer 5.5", new String[] { "MSIE 5.5" }, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, null), // before MSIE
IE5( Manufacturer.MICROSOFT, Browser.IE, 50, "Internet Explorer 5", new String[] { "MSIE 5" }, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, null ), // before MSIE
/**
* Family of Internet Explorer browsers
*/
IE11(Manufacturer.MICROSOFT, null, 1, "Internet Explorer", new String[]{") like Gecko"}, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, "Mozilla/5.0 (([\\d]+)\\.([\\w]+))"), // before Mozilla
/**
* Google Chrome browser
*/
CHROME( Manufacturer.GOOGLE, null, 1, "Chrome", new String[] { "Chrome" }, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, "Chrome\\/(([0-9]+)\\.?([\\w]+)?(\\.[\\w]+)?(\\.[\\w]+)?)" ), // before Mozilla
CHROME10( Manufacturer.GOOGLE, Browser.CHROME, 15, "Chrome 10", new String[] { "Chrome/10" }, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, null ), // before Mozilla
CHROME9( Manufacturer.GOOGLE, Browser.CHROME, 10, "Chrome 9", new String[] { "Chrome/9" }, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, null ), // before Mozilla
CHROME8( Manufacturer.GOOGLE, Browser.CHROME, 5, "Chrome 8", new String[] { "Chrome/8" }, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, null ), // before Mozilla
/**
* Family of Internet Explorer browsers
*/
IE(Manufacturer.MICROSOFT, null, 1, "Internet Explorer", new String[]{"MSIE"}, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, "MSIE (([\\d]+)\\.([\\w]+))"), // before Mozilla
/**
* Since version 7 Outlook Express is identifying itself. By detecting Outlook Express we can not
* identify the Internet Explorer version which is probably used for the rendering.
* Obviously this product is now called Windows Live Mail Desktop or just Windows Live Mail.
*/
OUTLOOK_EXPRESS7(Manufacturer.MICROSOFT, Browser.IE, 110, "Windows Live Mail", new String[]{"Outlook-Express/7.0"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.TRIDENT, null), // before IE7, previously known as Outlook Express. First released in 2006, offered with different name later
/**
* Since 2007 the mobile edition of Internet Explorer identifies itself as IEMobile in the user-agent.
* If previous versions have to be detected, use the operating system information as well.
*/
IEMOBILE7(Manufacturer.MICROSOFT, Browser.IE, 121, "IE Mobile 7", new String[]{"IEMobile 7"}, null, BrowserType.MOBILE_BROWSER, RenderingEngine.TRIDENT, null), // before MSIE strings
IEMOBILE6(Manufacturer.MICROSOFT, Browser.IE, 120, "IE Mobile 6", new String[]{"IEMobile 6"}, null, BrowserType.MOBILE_BROWSER, RenderingEngine.TRIDENT, null), // before MSIE
IE9(Manufacturer.MICROSOFT, Browser.IE, 90, "Internet Explorer 9", new String[]{"MSIE 9"}, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, null), // before MSIE
IE8(Manufacturer.MICROSOFT, Browser.IE, 80, "Internet Explorer 8", new String[]{"MSIE 8"}, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, null), // before MSIE
IE7(Manufacturer.MICROSOFT, Browser.IE, 70, "Internet Explorer 7", new String[]{"MSIE 7"}, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, null), // before MSIE
IE6(Manufacturer.MICROSOFT, Browser.IE, 60, "Internet Explorer 6", new String[]{"MSIE 6"}, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, null), // before MSIE
IE5_5(Manufacturer.MICROSOFT, Browser.IE, 55, "Internet Explorer 5.5", new String[]{"MSIE 5.5"}, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, null), // before MSIE
IE5(Manufacturer.MICROSOFT, Browser.IE, 50, "Internet Explorer 5", new String[]{"MSIE 5"}, null, BrowserType.WEB_BROWSER, RenderingEngine.TRIDENT, null), // before MSIE
OMNIWEB( Manufacturer.OTHER, null, 2, "Omniweb", new String[] { "OmniWeb" }, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, null), //
/**
* Google Chrome browser
*/
CHROME(Manufacturer.GOOGLE, null, 1, "Chrome", new String[]{"Chrome"}, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, "Chrome\\/(([0-9]+)\\.?([\\w]+)?(\\.[\\w]+)?(\\.[\\w]+)?)"), // before Mozilla
CHROME10(Manufacturer.GOOGLE, Browser.CHROME, 15, "Chrome 10", new String[]{"Chrome/10"}, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, null), // before Mozilla
CHROME9(Manufacturer.GOOGLE, Browser.CHROME, 10, "Chrome 9", new String[]{"Chrome/9"}, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, null), // before Mozilla
CHROME8(Manufacturer.GOOGLE, Browser.CHROME, 5, "Chrome 8", new String[]{"Chrome/8"}, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, null), // before Mozilla
SAFARI( Manufacturer.APPLE, null, 1, "Safari", new String[] { "Safari" }, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, "Version\\/(([0-9]+)\\.?([\\w]+)?(\\.[\\w]+)?)" ), // before AppleWebKit
SAFARI5( Manufacturer.APPLE, Browser.SAFARI, 3, "Safari 5", new String[] { "Version/5" }, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, null ), // before AppleWebKit
MOBILE_SAFARI( Manufacturer.APPLE, Browser.SAFARI, 2, "Mobile Safari", new String[] { "Mobile Safari","Mobile/" }, null, BrowserType.MOBILE_BROWSER, RenderingEngine.WEBKIT, null ), // before Safari
SAFARI4( Manufacturer.APPLE, Browser.SAFARI, 4, "Safari 4", new String[] { "Version/4" }, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, null ), // before AppleWebKit
APPLE_MAIL( Manufacturer.APPLE, null, 50, "Apple Mail", new String[] { "AppleWebKit" }, null, BrowserType.EMAIL_CLIENT, RenderingEngine.WEBKIT, null), // Microsoft Entrourage/Outlook 2010 also only identifies itself as AppleWebKit
LOTUS_NOTES( Manufacturer.OTHER, null, 3, "Lotus Notes", new String[] { "Lotus-Notes" }, null, BrowserType.EMAIL_CLIENT, RenderingEngine.OTHER, "Lotus-Notes\\/(([\\d]+)\\.([\\w]+))"), // before Mozilla
OMNIWEB(Manufacturer.OTHER, null, 2, "Omniweb", new String[]{"OmniWeb"}, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, null), //
/*
* Thunderbird email client, based on the same Gecko engine Firefox is using.
*/
THUNDERBIRD( Manufacturer.MOZILLA, null, 110, "Thunderbird", new String[] { "Thunderbird" }, null, BrowserType.EMAIL_CLIENT, RenderingEngine.GECKO, "Thunderbird\\/(([0-9]+)\\.?([\\w]+)?(\\.[\\w]+)?(\\.[\\w]+)?)" ), // using Gecko Engine
THUNDERBIRD3( Manufacturer.MOZILLA, Browser.THUNDERBIRD, 130, "Thunderbird 3", new String[] { "Thunderbird/3" }, null, BrowserType.EMAIL_CLIENT, RenderingEngine.GECKO, null ), // using Gecko Engine
THUNDERBIRD2( Manufacturer.MOZILLA, Browser.THUNDERBIRD, 120, "Thunderbird 2", new String[] { "Thunderbird/2" }, null, BrowserType.EMAIL_CLIENT, RenderingEngine.GECKO, null ), // using Gecko Engine
SAFARI(Manufacturer.APPLE, null, 1, "Safari", new String[]{"Safari"}, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, "Version\\/(([0-9]+)\\.?([\\w]+)?(\\.[\\w]+)?)"), // before AppleWebKit
SAFARI5(Manufacturer.APPLE, Browser.SAFARI, 3, "Safari 5", new String[]{"Version/5"}, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, null), // before AppleWebKit
MOBILE_SAFARI(Manufacturer.APPLE, Browser.SAFARI, 2, "Mobile Safari", new String[]{"Mobile Safari", "Mobile/"}, null, BrowserType.MOBILE_BROWSER, RenderingEngine.WEBKIT, null), // before Safari
SAFARI4(Manufacturer.APPLE, Browser.SAFARI, 4, "Safari 4", new String[]{"Version/4"}, null, BrowserType.WEB_BROWSER, RenderingEngine.WEBKIT, null), // before AppleWebKit
CAMINO( Manufacturer.OTHER, null, 5, "Camino", new String[] { "Camino" }, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, "Camino\\/(([0-9]+)\\.?([\\w]+)?(\\.[\\w]+)?)" ), // using Gecko Engine
CAMINO2( Manufacturer.OTHER, Browser.CAMINO, 17, "Camino 2", new String[] { "Camino/2" }, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, null ), // using Gecko Engine
FLOCK( Manufacturer.OTHER, null, 4, "Flock", new String[]{"Flock"}, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, "Flock\\/(([0-9]+)\\.?([\\w]+)?(\\.[\\w]+)?)"),
FIREFOX( Manufacturer.MOZILLA, null, 10, "Firefox", new String[] { "Firefox" }, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, "Firefox\\/(([0-9]+)\\.?([\\w]+)?(\\.[\\w]+)?(\\.[\\w]+)?)"), // using Gecko Engine
FIREFOX3MOBILE( Manufacturer.MOZILLA, Browser.FIREFOX, 31, "Firefox 3 Mobile", new String[] { "Firefox/3.5 Maemo" }, null, BrowserType.MOBILE_BROWSER, RenderingEngine.GECKO, null ), // using Gecko Engine
FIREFOX4( Manufacturer.MOZILLA, Browser.FIREFOX, 40, "Firefox 4", new String[] { "Firefox/4" }, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, null ), // using Gecko Engine
FIREFOX3( Manufacturer.MOZILLA, Browser.FIREFOX, 30, "Firefox 3", new String[] { "Firefox/3" }, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, null ), // using Gecko Engine
FIREFOX2( Manufacturer.MOZILLA, Browser.FIREFOX, 20, "Firefox 2", new String[] { "Firefox/2" }, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, null ), // using Gecko Engine
FIREFOX1_5( Manufacturer.MOZILLA, Browser.FIREFOX, 15, "Firefox 1.5", new String[] { "Firefox/1.5" }, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, null ), // using Gecko Engine
SEAMONKEY( Manufacturer.OTHER, null, 15, "SeaMonkey", new String[]{"SeaMonkey"}, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, "SeaMonkey\\/(([0-9]+)\\.?([\\w]+)?(\\.[\\w]+)?)"), // using Gecko Engine
BOT( Manufacturer.OTHER, null,12, "Robot/Spider", new String[]{"Mediapartners-Google","Googlebot","bot", "spider", "crawler", "Feedfetcher", "Slurp", "Twiceler", "Nutch", "BecomeBot"}, null, BrowserType.ROBOT, RenderingEngine.OTHER, null),
MOZILLA( Manufacturer.MOZILLA, null, 1, "Mozilla", new String[] { "Mozilla", "Moozilla" }, null, BrowserType.WEB_BROWSER, RenderingEngine.OTHER, null), // rest of the mozilla browsers
CFNETWORK( Manufacturer.OTHER, null, 6, "CFNetwork", new String[] { "CFNetwork" }, null, BrowserType.UNKNOWN, RenderingEngine.OTHER, null ), // Mac OS X cocoa library
EUDORA( Manufacturer.OTHER, null, 7, "Eudora", new String[] { "Eudora", "EUDORA" }, null, BrowserType.EMAIL_CLIENT, RenderingEngine.OTHER, null ), // email client by Qualcomm
POCOMAIL( Manufacturer.OTHER, null, 8, "PocoMail", new String[] { "PocoMail" }, null, BrowserType.EMAIL_CLIENT, RenderingEngine.OTHER, null ),
THEBAT( Manufacturer.OTHER, null, 9, "The Bat!", new String[]{"The Bat"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.OTHER, null), // Email Client
NETFRONT( Manufacturer.OTHER, null, 10, "NetFront", new String[]{"NetFront"}, null, BrowserType.MOBILE_BROWSER, RenderingEngine.OTHER, null), // mobile device browser
EVOLUTION( Manufacturer.OTHER, null, 11, "Evolution", new String[]{"CamelHttpStream"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.OTHER, null), // http://www.go-evolution.org/Camel.Stream
LYNX( Manufacturer.OTHER, null, 13, "Lynx", new String[]{"Lynx"}, null, BrowserType.TEXT_BROWSER, RenderingEngine.OTHER, "Lynx\\/(([0-9]+)\\.([\\d]+)\\.?([\\w-+]+)?\\.?([\\w-+]+)?)"),
DOWNLOAD( Manufacturer.OTHER, null, 16, "Downloading Tool", new String[]{"cURL","wget"}, null, BrowserType.TEXT_BROWSER, RenderingEngine.OTHER, null),
UNKNOWN( Manufacturer.OTHER, null, 14, "Unknown", new String[0], null, BrowserType.UNKNOWN, RenderingEngine.OTHER, null );
private final short id;
private final String name;
private final String[] aliases;
private final String[] excludeList; // don't match when these values are in the agent-string
private final BrowserType browserType;
private final Manufacturer manufacturer;
private final RenderingEngine renderingEngine;
private final Browser parent;
private List<Browser> children;
private Pattern versionRegEx;
private Browser(Manufacturer manufacturer, Browser parent, int versionId, String name, String[] aliases, String[] exclude, BrowserType browserType, RenderingEngine renderingEngine, String versionRegexString) {
this.id = (short) ( ( manufacturer.getId() << 8) + (byte) versionId);
this.name = name;
this.parent = parent;
this.children = new ArrayList<Browser>();
if (this.parent != null) {
this.parent.children.add(this);
}
this.aliases = aliases;
this.excludeList = exclude;
this.browserType = browserType;
this.manufacturer = manufacturer;
this.renderingEngine = renderingEngine;
if (versionRegexString != null) {
this.versionRegEx = Pattern.compile(versionRegexString);
}
}
public short getId() {
return id;
}
APPLE_MAIL(Manufacturer.APPLE, null, 50, "Apple Mail", new String[]{"AppleWebKit"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.WEBKIT, null), // Microsoft Entrourage/Outlook 2010 also only identifies itself as AppleWebKit
LOTUS_NOTES(Manufacturer.OTHER, null, 3, "Lotus Notes", new String[]{"Lotus-Notes"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.OTHER, "Lotus-Notes\\/(([\\d]+)\\.([\\w]+))"), // before Mozilla
public String getName() {
return name;
}
private Pattern getVersionRegEx() {
if (this.versionRegEx == null) {
if (this.getGroup() != this)
return this.getGroup().getVersionRegEx();
else
return null;
}
return this.versionRegEx;
}
/**
* Detects the detailed version information of the browser. Depends on the userAgent to be available.
* Returns null if it can not detect the version information.
* @return Version
*/
public Version getVersion(String userAgentString) {
Pattern pattern = this.getVersionRegEx();
if (userAgentString != null && pattern != null) {
Matcher matcher = pattern.matcher(userAgentString);
if (matcher.find()) {
String fullVersionString = matcher.group(1);
String majorVersion = matcher.group(2);
String minorVersion = "0";
if (matcher.groupCount() > 2) // usually but not always there is a minor version
minorVersion = matcher.group(3);
return new Version (fullVersionString,majorVersion,minorVersion);
}
}
return null;
}
/**
* @return the browserType
*/
public BrowserType getBrowserType() {
return browserType;
}
/*
* Thunderbird email client, based on the same Gecko engine Firefox is using.
*/
THUNDERBIRD(Manufacturer.MOZILLA, null, 110, "Thunderbird", new String[]{"Thunderbird"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.GECKO, "Thunderbird\\/(([0-9]+)\\.?([\\w]+)?(\\.[\\w]+)?(\\.[\\w]+)?)"), // using Gecko Engine
THUNDERBIRD3(Manufacturer.MOZILLA, Browser.THUNDERBIRD, 130, "Thunderbird 3", new String[]{"Thunderbird/3"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.GECKO, null), // using Gecko Engine
THUNDERBIRD2(Manufacturer.MOZILLA, Browser.THUNDERBIRD, 120, "Thunderbird 2", new String[]{"Thunderbird/2"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.GECKO, null), // using Gecko Engine
/**
* @return the manufacturer
*/
public Manufacturer getManufacturer() {
return manufacturer;
}
/**
* @return the rendering engine
*/
public RenderingEngine getRenderingEngine() {
return renderingEngine;
}
CAMINO(Manufacturer.OTHER, null, 5, "Camino", new String[]{"Camino"}, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, "Camino\\/(([0-9]+)\\.?([\\w]+)?(\\.[\\w]+)?)"), // using Gecko Engine
CAMINO2(Manufacturer.OTHER, Browser.CAMINO, 17, "Camino 2", new String[]{"Camino/2"}, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, null), // using Gecko Engine
FLOCK(Manufacturer.OTHER, null, 4, "Flock", new String[]{"Flock"}, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, "Flock\\/(([0-9]+)\\.?([\\w]+)?(\\.[\\w]+)?)"),
FIREFOX(Manufacturer.MOZILLA, null, 10, "Firefox", new String[]{"Firefox"}, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, "Firefox\\/(([0-9]+)\\.?([\\w]+)?(\\.[\\w]+)?(\\.[\\w]+)?)"), // using Gecko Engine
FIREFOX3MOBILE(Manufacturer.MOZILLA, Browser.FIREFOX, 31, "Firefox 3 Mobile", new String[]{"Firefox/3.5 Maemo"}, null, BrowserType.MOBILE_BROWSER, RenderingEngine.GECKO, null), // using Gecko Engine
FIREFOX4(Manufacturer.MOZILLA, Browser.FIREFOX, 40, "Firefox 4", new String[]{"Firefox/4"}, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, null), // using Gecko Engine
FIREFOX3(Manufacturer.MOZILLA, Browser.FIREFOX, 30, "Firefox 3", new String[]{"Firefox/3"}, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, null), // using Gecko Engine
FIREFOX2(Manufacturer.MOZILLA, Browser.FIREFOX, 20, "Firefox 2", new String[]{"Firefox/2"}, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, null), // using Gecko Engine
FIREFOX1_5(Manufacturer.MOZILLA, Browser.FIREFOX, 15, "Firefox 1.5", new String[]{"Firefox/1.5"}, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, null), // using Gecko Engine
SEAMONKEY(Manufacturer.OTHER, null, 15, "SeaMonkey", new String[]{"SeaMonkey"}, null, BrowserType.WEB_BROWSER, RenderingEngine.GECKO, "SeaMonkey\\/(([0-9]+)\\.?([\\w]+)?(\\.[\\w]+)?)"), // using Gecko Engine
BOT(Manufacturer.OTHER, null, 12, "Robot/Spider", new String[]{"Mediapartners-Google", "Googlebot", "bot", "spider", "crawler", "Feedfetcher", "Slurp", "Twiceler", "Nutch", "BecomeBot"}, null, BrowserType.ROBOT, RenderingEngine.OTHER, null),
MOZILLA(Manufacturer.MOZILLA, null, 1, "Mozilla", new String[]{"Mozilla", "Moozilla"}, null, BrowserType.WEB_BROWSER, RenderingEngine.OTHER, null), // rest of the mozilla browsers
CFNETWORK(Manufacturer.OTHER, null, 6, "CFNetwork", new String[]{"CFNetwork"}, null, BrowserType.UNKNOWN, RenderingEngine.OTHER, null), // Mac OS X cocoa library
EUDORA(Manufacturer.OTHER, null, 7, "Eudora", new String[]{"Eudora", "EUDORA"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.OTHER, null), // email client by Qualcomm
POCOMAIL(Manufacturer.OTHER, null, 8, "PocoMail", new String[]{"PocoMail"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.OTHER, null),
THEBAT(Manufacturer.OTHER, null, 9, "The Bat!", new String[]{"The Bat"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.OTHER, null), // Email Client
NETFRONT(Manufacturer.OTHER, null, 10, "NetFront", new String[]{"NetFront"}, null, BrowserType.MOBILE_BROWSER, RenderingEngine.OTHER, null), // mobile device browser
EVOLUTION(Manufacturer.OTHER, null, 11, "Evolution", new String[]{"CamelHttpStream"}, null, BrowserType.EMAIL_CLIENT, RenderingEngine.OTHER, null), // http://www.go-evolution.org/Camel.Stream
LYNX(Manufacturer.OTHER, null, 13, "Lynx", new String[]{"Lynx"}, null, BrowserType.TEXT_BROWSER, RenderingEngine.OTHER, "Lynx\\/(([0-9]+)\\.([\\d]+)\\.?([\\w-+]+)?\\.?([\\w-+]+)?)"),
DOWNLOAD(Manufacturer.OTHER, null, 16, "Downloading Tool", new String[]{"cURL", "wget"}, null, BrowserType.TEXT_BROWSER, RenderingEngine.OTHER, null),
UNKNOWN(Manufacturer.OTHER, null, 14, "Unknown", new String[0], null, BrowserType.UNKNOWN, RenderingEngine.OTHER, null);
private final short id;
private final String name;
private final String[] aliases;
private final String[] excludeList; // don't match when these values are in the agent-string
private final BrowserType browserType;
private final Manufacturer manufacturer;
private final RenderingEngine renderingEngine;
private final Browser parent;
private List<Browser> children;
private Pattern versionRegEx;
private Browser(Manufacturer manufacturer, Browser parent, int versionId, String name, String[] aliases, String[] exclude, BrowserType browserType, RenderingEngine renderingEngine, String versionRegexString) {
this.id = (short) ((manufacturer.getId() << 8) + (byte) versionId);
this.name = name;
this.parent = parent;
this.children = new ArrayList<>();
if (this.parent != null) {
this.parent.children.add(this);
}
this.aliases = aliases;
this.excludeList = exclude;
this.browserType = browserType;
this.manufacturer = manufacturer;
this.renderingEngine = renderingEngine;
if (versionRegexString != null) {
this.versionRegEx = Pattern.compile(versionRegexString);
}
}
/**
* Iterates over all Browsers to compare the browser signature with
* the user agent string. If no match can be found Browser.UNKNOWN will
* be returned.
*
* @param agentString
* @return Browser
*/
public static Browser parseUserAgentString(String agentString) {
for (Browser browser : Browser.values()) {
// only check top level objects
if (browser.parent == null) {
Browser match = browser.checkUserAgent(agentString);
if (match != null) {
return match; // either current operatingSystem or a child object
}
}
}
return Browser.UNKNOWN;
}
/**
* Returns the enum constant of this type with the specified id.
* Throws IllegalArgumentException if the value does not exist.
*
* @param id
* @return
*/
public static Browser valueOf(short id) {
for (Browser browser : Browser.values()) {
if (browser.getId() == id)
return browser;
}
// same behavior as standard valueOf(string) method
throw new IllegalArgumentException(
"No enum const for id " + id);
}
public short getId() {
return id;
}
public String getName() {
return name;
}
private Pattern getVersionRegEx() {
if (this.versionRegEx == null) {
if (this.getGroup() != this)
return this.getGroup().getVersionRegEx();
else
return null;
}
return this.versionRegEx;
}
/**
* Detects the detailed version information of the browser. Depends on the userAgent to be available.
* Returns null if it can not detect the version information.
*
* @return Version
*/
public Version getVersion(String userAgentString) {
Pattern pattern = this.getVersionRegEx();
if (userAgentString != null && pattern != null) {
Matcher matcher = pattern.matcher(userAgentString);
if (matcher.find()) {
String fullVersionString = matcher.group(1);
String majorVersion = matcher.group(2);
String minorVersion = "0";
if (matcher.groupCount() > 2) // usually but not always there is a minor version
minorVersion = matcher.group(3);
return new Version(fullVersionString, majorVersion, minorVersion);
}
}
return null;
}
/**
* @return the browserType
*/
public BrowserType getBrowserType() {
return browserType;
}
/**
* @return the manufacturer
*/
public Manufacturer getManufacturer() {
return manufacturer;
}
/**
* @return the rendering engine
*/
public RenderingEngine getRenderingEngine() {
return renderingEngine;
}
/**
* @return top level browser family
*/
public Browser getGroup() {
if (this.parent != null) {
return parent.getGroup();
}
return this;
}
/*
* Checks if the given user-agent string matches to the browser.
* Only checks for one specific browser.
*/
public boolean isInUserAgentString(String agentString) {
for (String alias : aliases) {
if (agentString.toLowerCase().indexOf(alias.toLowerCase()) != -1)
return true;
}
return false;
}
/**
* Checks if the given user-agent does not contain one of the tokens which should not match.
* In most cases there are no excluding tokens, so the impact should be small.
*
* @param agentString
* @return
*/
private boolean containsExcludeToken(String agentString) {
if (excludeList != null) {
for (String exclude : excludeList) {
if (agentString.toLowerCase().indexOf(exclude.toLowerCase()) != -1)
return true;
}
}
return false;
}
private Browser checkUserAgent(String agentString) {
if (this.isInUserAgentString(agentString)) {
if (this.children.size() > 0) {
for (Browser childBrowser : this.children) {
Browser match = childBrowser.checkUserAgent(agentString);
if (match != null) {
return match;
}
}
}
// if children didn't match we continue checking the current to prevent false positives
if (!this.containsExcludeToken(agentString)) {
return this;
}
}
return null;
}
/**
* @return top level browser family
*/
public Browser getGroup() {
if (this.parent != null) {
return parent.getGroup();
}
return this;
}
/*
* Checks if the given user-agent string matches to the browser.
* Only checks for one specific browser.
*/
public boolean isInUserAgentString(String agentString)
{
for (String alias : aliases)
{
if (agentString.toLowerCase().indexOf(alias.toLowerCase()) != -1)
return true;
}
return false;
}
/**
* Checks if the given user-agent does not contain one of the tokens which should not match.
* In most cases there are no excluding tokens, so the impact should be small.
* @param agentString
* @return
*/
private boolean containsExcludeToken(String agentString)
{
if (excludeList != null) {
for (String exclude : excludeList) {
if (agentString.toLowerCase().indexOf(exclude.toLowerCase()) != -1)
return true;
}
}
return false;
}
private Browser checkUserAgent(String agentString) {
if (this.isInUserAgentString(agentString)) {
if (this.children.size() > 0) {
for (Browser childBrowser : this.children) {
Browser match = childBrowser.checkUserAgent(agentString);
if (match != null) {
return match;
}
}
}
// if children didn't match we continue checking the current to prevent false positives
if (!this.containsExcludeToken(agentString)) {
return this;
}
}
return null;
}
/**
* Iterates over all Browsers to compare the browser signature with
* the user agent string. If no match can be found Browser.UNKNOWN will
* be returned.
* @param agentString
* @return Browser
*/
public static Browser parseUserAgentString(String agentString)
{
for (Browser browser : Browser.values())
{
// only check top level objects
if (browser.parent == null) {
Browser match = browser.checkUserAgent(agentString);
if (match != null) {
return match; // either current operatingSystem or a child object
}
}
}
return Browser.UNKNOWN;
}
/**
* Returns the enum constant of this type with the specified id.
* Throws IllegalArgumentException if the value does not exist.
* @param id
* @return
*/
public static Browser valueOf(short id)
{
for (Browser browser : Browser.values())
{
if (browser.getId() == id)
return browser;
}
// same behavior as standard valueOf(string) method
throw new IllegalArgumentException(
"No enum const for id " + id);
}
}

View File

@@ -151,19 +151,18 @@ public class MindmapController {
final Locale locale = LocaleContextHolder.getLocale();
// Is the mindmap locked ?.
boolean isLocked = false;
boolean readOnlyMode = !requiresLock || !mindmap.hasPermissions(collaborator, CollaborationRole.EDITOR);
if (!readOnlyMode) {
final LockManager lockManager = this.mindmapService.getLockManager();
if (lockManager.isLocked(mindmap) && !lockManager.isLockedBy(mindmap, collaborator)) {
readOnlyMode = true;
model.addAttribute("mindmapLocked", true);
} else {
model.addAttribute("lockTimestamp", mindmap.getLastModificationTime().getTimeInMillis());
model.addAttribute(LOCK_SESSION_ATTRIBUTE, lockManager.generateSession());
}
model.addAttribute("lockInfo", lockManager.getLockInfo(mindmap));
}
// Set render attributes ...
model.addAttribute("mindmap", mindmapBean);
@@ -171,6 +170,9 @@ public class MindmapController {
model.addAttribute("locale", locale.toString().toLowerCase());
model.addAttribute("principal", collaborator);
model.addAttribute("readOnlyMode", readOnlyMode);
model.addAttribute("memoryPersistence", false);
model.addAttribute("mindmapLocked", isLocked);
return "mindmapEditor";
}

View File

@@ -78,7 +78,7 @@ public class UsersController {
result = new ModelAndView("forgotPasswordError");
}
catch (InvalidAuthSchemaException e) {
result = new ModelAndView("forgotPasswordError");
result = new ModelAndView("userForgotPasswordOpenId");
}
return result;
}

View File

@@ -148,7 +148,7 @@ DELETE_MAPS_WARNING=Deleted mindmap can not be recovered. Do you want to continu
THANKS_FOR_SIGN_UP=Thanks for signing up\!
SIGN_UP_CONFIRMATION_EMAIL=\ You will receive a confirmation message shortly from WiseMapping. This message will ask you to activate your WiseMapping account.</br>Please select the link to activate and start creating and sharing maps.
SIGN_UP_SUCCESS=Your account has been created successfully, click <a href\="c/login">here</a> to sign in and start enjoying WiseMapping.
ACCOUNT_DOES_NOT_EXISTS=The email is not register or you account is not active yet.
ACCOUNT_DOES_NOT_EXISTS=The email is not register or you logged with OpenId .
ACCOUNT_DOES_NOT_EXISTS_SUPPORT=If the problem persist please send us an email to <a href\="mailto\:support@wisemapping.com">support@wisemapping.com </a>
SENDING=Sending ...
SIGN_ING=Signing in ...
@@ -236,7 +236,8 @@ TUTORIAL.FONT_STYLE=Styles
TUTORIAL.FONT_TYPE=Type
TUTORIAL.SAMPLE_NOTE=This is a simple note !.
SUPPORT=Support
FEEDBACK=Feedback
FEEDBACK=Got Feedback ?
REPORT_BUG=Raise An Issue
CONTACT_US=Contact Us
#Pending for translation ...
@@ -266,6 +267,9 @@ TXT_EXPORT_FORMAT_DETAILS=Get your map as a plan text format
OPEN_OFFICE_EXPORT_FORMAT_DETAILS=Get your map as OpenOffice Write Document
MINDJET_EXPORT_FORMAT=(BETA) MindJet 8.x
MINDJET_EXPORT_FORMAT_DETAILS=Export your maps in MindJet 8.x format
MINDMAP_IS_LOCKED=Mindmap is locked for edition.
OPENID_ACCOUNT_PASSWORD=Registered OpenID account password could not be changed
OPENID_ACCOUNT_PASSWORD_DETAIL=Your account has been registered using OpenId. Try to login using either your Google, AOL or Yahoo account.

View File

@@ -235,7 +235,9 @@ TUTORIAL.FONT_STYLE=Estilos
TUTORIAL.FONT_TYPE=Tipos de Fuente
TUTORIAL.SAMPLE_NOTE=Esto es una Nota !
SUPPORT=Ayuda
FEEDBACK=Feedback
FEEDBACK=Tenes Feedback ?
REPORT_BUG=Reportar Problema
CONTACT_US=Contáctenos

View File

@@ -121,11 +121,19 @@ security.type=db
# LDAP Configuration properties.
security.ldap.server=ldap://localhost:389
# If anonymous password is required, change the wisemapping-security-ldap.xml removing the
security.ldap.server.user=cn=pveiga,dc=wisemapping,dc=com
security.ldap.server.password=password
security.ldap.basedn=dc=wisemapping,dc=com
# This will be concatenated as part of the DN. In this case, I will be ou="people".
# In case this need to be changed, modify the wisemapping-security-ldap.xml.
security.ldap.subDn=people
# Attribute used as authentication login (Eg: in this case, the user email will be used)
security.ldap.auth.attribute=mail
security.ldap.lastName.attribute=sn

View File

@@ -63,6 +63,11 @@
<put-attribute name="body" value="/jsp/userForgotPasswordError.jsp"/>
</definition>
<definition name="userForgotPasswordOpenId" extends="errorTemplate">
<put-attribute name="title" value="OPENID_ACCOUNT_PASSWORD"/>
<put-attribute name="body" value="/jsp/userForgotPasswordOpenId.jsp"/>
</definition>
<definition name="forgotPasswordSuccess" extends="errorTemplate">
<put-attribute name="title" value="FORGOT_PASSWORD"/>
<put-attribute name="body" value="/jsp/userForgotPasswordSuccess.jsp"/>

View File

@@ -47,6 +47,9 @@
<listener>
<listener-class>com.wisemapping.service.HibernateAppListener</listener-class>
</listener>
<listener>
<listener-class>com.wisemapping.listener.UnlockOnExpireListener</listener-class>
</listener>
<filter>
<filter-name>hibernate</filter-name>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -1,19 +1,35 @@
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<div id="footerContainer">
<script type="text/javascript" src="https://wisemapping.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e/en_US-f1g0rh-1988229788/6211/26/1.4.5/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?collectorId=a47981d6"></script>
<script type="text/javascript" src="https://wisemapping.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e/en_US-f1g0rh-1988229788/6211/26/1.4.5/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?collectorId=703b9822"></script>
<div id="footerContainer" class="row">
<div class="span1 offset3">
<a href="https://twitter.com/share" class="twitter-share-button" data-via="wisemapping"
data-related="wisemapping">Tweet</a>
<script>!function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id;
js.src = "//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
<script type="text/javascript">
window.ATL_JQ_PAGE_PROPS = $.extend(window.ATL_JQ_PAGE_PROPS, {
"a47981d6": {
triggerFunction: function(showCollectorDialog) {
//Requries that jQuery is available!
jQuery("#feedbackBtn").click(function(e) {
e.preventDefault();
showCollectorDialog();
});
}
},
"703b9822":{
triggerFunction: function(showCollectorDialog) {
//Requries that jQuery is available!
jQuery("#reportIssueBtn").click(function(e) {
e.preventDefault();
showCollectorDialog();
});
}
}(document, "script", "twitter-wjs");</script>
}
});
</script>
<div class="span1 offset3">
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.wisemapping.com" data-text="Check out this site" data-via="wisemapping" data-related="wisemapping">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</div>
<div class="span1">
@@ -35,10 +51,10 @@
</div>
<div class="span4">
<p style="text-align: center;">
<a href="https://groups.google.com/d/forum/wisemapping-support"><spring:message code="SUPPORT"/></a> |
<a href="mailto:feedback@wisemapping.com"><spring:message code="FEEDBACK"/></a> |
<a href="mailto:dev@wisemapping.com"><spring:message code="CONTACT_US"/></a> |
<a href="http://www.wisemapping.org/license"><spring:message code="LICENSE"/></a><br/>
<a href="" id="feedbackBtn"><spring:message code="FEEDBACK"/></a> |
<a href="" id="reportIssueBtn"><spring:message code="REPORT_BUG"/></a> |
<a href="mailto:team@wisemapping.com"><spring:message code="CONTACT_US"/></a> |
<a href="https://wisemapping.atlassian.net/wiki/display/WS/License "><spring:message code="LICENSE"/></a><br/>
<a href="http://www.wisemapping.org/"><spring:message code="COPYRIGHT"/></a>
</p>
@@ -54,8 +70,8 @@
</form>
</div>
<div class="span1">
<a href="http://www.w3.org/html/logo/">
<img src="http://www.w3.org/html/logo/badge/html5-badge-h-graphics.png" width="66" height="32"
<a href="https://www.w3.org/html/logo/">
<img src="/images/badge/html5-badge-h-graphics.png" width="66" height="32"
alt="HTML5 Powered with Graphics, 3D &amp; Effects"
title="HTML5 Powered with Graphics, 3D &amp; Effects">
</a>

View File

@@ -1,7 +1,7 @@
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
request.setAttribute("principal", com.wisemapping.security.Utils.getUser());
%>

View File

@@ -224,7 +224,7 @@
</script>
<div style="margin-top:5px;">
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
src="https://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</c:if>

View File

@@ -67,7 +67,7 @@
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
src="https://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</c:if>

View File

@@ -0,0 +1,6 @@
<%@page pageEncoding="UTF-8" %>
<%@include file="/jsp/init.jsp" %>
<h2><spring:message code="OPENID_ACCOUNT_PASSWORD"/></h2>
<p><spring:message code="OPENID_ACCOUNT_PASSWORD_DETAIL"/></p>

View File

@@ -49,6 +49,9 @@ public class UserAgentTest {
final SupportedUserAgent mediapartners = SupportedUserAgent.create("Mediapartners-Google/2.1");
Assert.assertEquals(mediapartners.isBrowserSupported(), true);
final SupportedUserAgent ie11 = SupportedUserAgent.create("Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko");
Assert.assertEquals(ie11.isBrowserSupported(), true);
final SupportedUserAgent firefox20 = SupportedUserAgent.create("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20121215 Firefox/20.0 AppEngine-Google; (+http://code.google.com/appengine; appid: slubuntuk)");
Assert.assertEquals(firefox20.isBrowserSupported(), true);
}

View File

@@ -107,11 +107,11 @@ public class RestAdminITCase {
// Check that the user has been created ...
ResponseEntity<RestUser> result = findUser(requestHeaders, templateRest, location);
assertEquals(result.getBody(), restUser, "Returned object object seems not be the same.");
assertEquals(result.getBody().getEmail(), restUser.getEmail(), "Returned object object seems not be the same.");
// Find by email and check ...
result = findUserByEmail(requestHeaders, templateRest, restUser.getEmail());
assertEquals(result.getBody(), restUser, "Returned object object seems not be the same.");
assertEquals(result.getBody().getEmail(), restUser.getEmail(), "Returned object object seems not be the same.");
return restUser.getEmail();
}
@@ -144,10 +144,10 @@ public class RestAdminITCase {
List<MediaType> acceptableMediaTypes = new ArrayList<MediaType>();
acceptableMediaTypes.add(mediaType);
final HttpHeaders requestHeaders = new HttpHeaders();
requestHeaders.setAccept(acceptableMediaTypes);
requestHeaders.setContentType(mediaType);
return requestHeaders;
final HttpHeaders result = new HttpHeaders();
result.setAccept(acceptableMediaTypes);
result.setContentType(mediaType);
return result;
}
private RestTemplate createTemplate() {