mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-18 20:27:56 +01:00
- Migrate to Spring 3.1
- Remove Acegy - Fix editor partially
This commit is contained in:
parent
2287825292
commit
5fd6ba30f5
@ -1,53 +0,0 @@
|
|||||||
h1. Documentation
|
|
||||||
|
|
||||||
h2. Architecture
|
|
||||||
|
|
||||||
WiseMapping has been development mainly in Java and JavaScript. The following diagram represents a high level overview of the product
|
|
||||||
[[http://www.wisemapping.org/_/rsrc/1257718018304/documentation/architecture/Wise%20Editor%20Architecture.png]]
|
|
||||||
|
|
||||||
h2. Configuration
|
|
||||||
|
|
||||||
h3. DataBase
|
|
||||||
|
|
||||||
Wisemapping support a wide variety of databases, but we provide the Database’s script initialization for HSQL and MySQL Database. The initialization script are located within <WISEMAPPING_SOURCE_DIR>\trunk\wise-webapp\src\test\sql.
|
|
||||||
|
|
||||||
This directory contains the following 3 scripts::
|
|
||||||
create-schemas.sql: Contains all the SQL statement to create the Wisemapping’s tables.
|
|
||||||
drop-schemas.sql:Contains all the SQL statement to drop all the Wisemapping database.
|
|
||||||
test-data.sql: This script creates a sample data and the test user called test@wisemapping.com and password test.
|
|
||||||
MySQL
|
|
||||||
|
|
||||||
h4. Create Database User
|
|
||||||
|
|
||||||
Using the MySQL Databse Tools run the following command in order to create the database user.
|
|
||||||
|
|
||||||
CREATE DATABASE wisemapping CHARACTER SET='utf8' COLLATE='utf8_unicode_ci';
|
|
||||||
CREATE USER 'wisemapping'@'localhost' IDENTIFIED BY 'd0ndu3nd3';
|
|
||||||
GRANT ALL ON wisemapping.* TO 'wisemapping'@'localhost';
|
|
||||||
|
|
||||||
h3. Configuration
|
|
||||||
|
|
||||||
You can configure Wisemapping through the following file:
|
|
||||||
|
|
||||||
wise-webapp\src\main\webapp\WEB-INF\app.properties.
|
|
||||||
|
|
||||||
This property file contains all the properties to configure the database, mail and other resources used by Wisemapping.
|
|
||||||
|
|
||||||
Property -> Description
|
|
||||||
* database.url -> The Database URL(Ex. dbc:hsqldb:file:target/db/wisemapping)
|
|
||||||
* database.driver-> The Database Driver.(Ex. org.hsqldb.jdbcDriver)
|
|
||||||
* database.hibernate.dialect -> The Database dialect. This value is used by Spring DB.(Ex. org.hibernate.dialect.HSQLDialect)
|
|
||||||
* database.username -> The database username
|
|
||||||
* database.password -> The database password
|
|
||||||
* mail.smtp.socketFactory.port -> The mail port to send email
|
|
||||||
* mail.host -> The email server host
|
|
||||||
* mail.user -> The mail username
|
|
||||||
* mail.password -> The mail password
|
|
||||||
* mail.registrationEmail -> The email used as FROM in the registration emails.
|
|
||||||
* mail.siteEmail -> The email used as FROM in the notification emails.
|
|
||||||
|
|
||||||
h3. Logging Properties
|
|
||||||
|
|
||||||
WiseMapping uses Log4J to log all the events. The configuration file is located in :
|
|
||||||
|
|
||||||
<WISEMAPPING_DIR>\wise-webapp\src\main\webapp\WEB-INF\classes
|
|
@ -16,7 +16,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wisemapping</groupId>
|
<groupId>org.wisemapping</groupId>
|
||||||
<artifactId>web2d</artifactId>
|
<artifactId>web2d</artifactId>
|
||||||
<version>3.0-SNAPSHOT</version>
|
<version>${com.wisemapping.version}</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- <dependency>
|
<!-- <dependency>
|
||||||
|
7
pom.xml
7
pom.xml
@ -2,6 +2,11 @@
|
|||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||||
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<com.wisemapping.version>3.0-SNAPSHOT</com.wisemapping.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.wisemapping</groupId>
|
<groupId>org.wisemapping</groupId>
|
||||||
<artifactId>wisemapping</artifactId>
|
<artifactId>wisemapping</artifactId>
|
||||||
@ -83,5 +88,7 @@
|
|||||||
<module>wise-webapp</module>
|
<module>wise-webapp</module>
|
||||||
<module>wise-editor</module>
|
<module>wise-editor</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
|
@ -16,13 +16,13 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wisemapping</groupId>
|
<groupId>org.wisemapping</groupId>
|
||||||
<artifactId>core-js</artifactId>
|
<artifactId>core-js</artifactId>
|
||||||
<version>3.0-SNAPSHOT</version>
|
<version>${com.wisemapping.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wisemapping</groupId>
|
<groupId>org.wisemapping</groupId>
|
||||||
<artifactId>mindplot</artifactId>
|
<artifactId>mindplot</artifactId>
|
||||||
<version>3.0-SNAPSHOT</version>
|
<version>${com.wisemapping.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@ -40,7 +40,7 @@
|
|||||||
<maxIdleTime>60000</maxIdleTime>
|
<maxIdleTime>60000</maxIdleTime>
|
||||||
</connector>
|
</connector>
|
||||||
</connectors>
|
</connectors>
|
||||||
<webApp>${project.build.directory}/wise-editor-3.0-SNAPSHOT.war</webApp>
|
<webApp>${project.build.directory}/wise-editor-${com.wisemapping.version}.war</webApp>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
@ -27,24 +27,29 @@
|
|||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<org.springframework.version>3.1.0.RELEASE</org.springframework.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wisemapping</groupId>
|
<groupId>org.wisemapping</groupId>
|
||||||
<artifactId>core-js</artifactId>
|
<artifactId>core-js</artifactId>
|
||||||
<version>3.0-SNAPSHOT</version>
|
<version>${com.wisemapping.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wisemapping</groupId>
|
<groupId>org.wisemapping</groupId>
|
||||||
<artifactId>wise-editor</artifactId>
|
<artifactId>wise-editor</artifactId>
|
||||||
<version>3.0-SNAPSHOT</version>
|
<version>${com.wisemapping.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wisemapping</groupId>
|
<groupId>org.wisemapping</groupId>
|
||||||
<artifactId>mindplot</artifactId>
|
<artifactId>mindplot</artifactId>
|
||||||
<version>3.0-SNAPSHOT</version>
|
<version>${com.wisemapping.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -69,13 +74,35 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-webmvc</artifactId>
|
<artifactId>spring-webmvc</artifactId>
|
||||||
<version>2.5.6</version>
|
<version>${org.springframework.version}</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-webmvc-struts</artifactId>
|
<artifactId>spring-web</artifactId>
|
||||||
<version>2.5.6</version>
|
<version>${org.springframework.version}</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-struts</artifactId>
|
||||||
|
<version>${org.springframework.version}</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.xml.bind</groupId>
|
||||||
|
<artifactId>jaxb-api</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-oxm</artifactId>
|
||||||
|
<version>${org.springframework.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>antlr</groupId>
|
||||||
|
<artifactId>antlr</artifactId>
|
||||||
|
<version>2.7.6</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -83,17 +110,35 @@
|
|||||||
<artifactId>struts-tiles</artifactId>
|
<artifactId>struts-tiles</artifactId>
|
||||||
<version>1.3.8</version>
|
<version>1.3.8</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>antlr</groupId>
|
||||||
|
<artifactId>antlr</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-aop</artifactId>
|
<artifactId>spring-aop</artifactId>
|
||||||
<version>2.5.6</version>
|
<version>${org.springframework.version}</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-orm</artifactId>
|
<artifactId>spring-orm</artifactId>
|
||||||
<version>2.5.6</version>
|
<version>${org.springframework.version}</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.security</groupId>
|
||||||
|
<artifactId>spring-security-web</artifactId>
|
||||||
|
<version>${org.springframework.version}</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.security</groupId>
|
||||||
|
<artifactId>spring-security-config</artifactId>
|
||||||
|
<version>${org.springframework.version}</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -111,25 +156,13 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-jdbc</artifactId>
|
<artifactId>spring-jdbc</artifactId>
|
||||||
<version>2.5.6</version>
|
<version>${org.springframework.version}</version>
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.ws</groupId>
|
|
||||||
<artifactId>spring-ws-support</artifactId>
|
|
||||||
<version>1.5.6</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.ws</groupId>
|
|
||||||
<artifactId>spring-ws-core-tiger</artifactId>
|
|
||||||
<version>1.5.6</version>
|
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate</groupId>
|
<groupId>org.hibernate</groupId>
|
||||||
<artifactId>hibernate</artifactId>
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
<version>3.1.3</version>
|
<version>3.6.0.Final</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -168,46 +201,6 @@
|
|||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.acegisecurity</groupId>
|
|
||||||
<artifactId>acegi-security</artifactId>
|
|
||||||
<version>1.0.7</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-core</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-aop</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-beans</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-context</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-dao</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-jdbc</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-support</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-remoting</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<artifactId>servlet-api</artifactId>
|
<artifactId>servlet-api</artifactId>
|
||||||
@ -352,13 +345,15 @@
|
|||||||
<groupId>org.wisemapping</groupId>
|
<groupId>org.wisemapping</groupId>
|
||||||
<artifactId>wise-editor</artifactId>
|
<artifactId>wise-editor</artifactId>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
<targetPath>css</targetPath>
|
<targetPath>/</targetPath>
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*.css</include>
|
<include>**/*.css</include>
|
||||||
<include>**/*.jpg</include>
|
<include>**/*.png</include>
|
||||||
|
<include>**/*.gif</include>
|
||||||
<include>**/*.ico</include>
|
<include>**/*.ico</include>
|
||||||
<include>**/*.jpg</include>
|
<include>**/*.jpg</include>
|
||||||
<include>**/*.less</include>
|
<include>**/*.less</include>
|
||||||
|
<include>js/editor.js</include>
|
||||||
</includes>
|
</includes>
|
||||||
</overlay>
|
</overlay>
|
||||||
<overlay>
|
<overlay>
|
||||||
@ -404,37 +399,6 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>net.sf.alchim</groupId>
|
|
||||||
<artifactId>yuicompressor-maven-plugin</artifactId>
|
|
||||||
<version>0.7.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>wiseEditorLibrary</id>
|
|
||||||
<phase>generate-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>compress</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<aggregations>
|
|
||||||
<aggregation>
|
|
||||||
<output>
|
|
||||||
${project.build.directory}/${project.build.finalName}/js/editorLib.js
|
|
||||||
</output>
|
|
||||||
<includes>
|
|
||||||
<include>help.js</include>
|
|
||||||
<include>Panel.js</include>
|
|
||||||
</includes>
|
|
||||||
</aggregation>
|
|
||||||
</aggregations>
|
|
||||||
<nosuffix>true</nosuffix>
|
|
||||||
<nomunge>true</nomunge>
|
|
||||||
<jswarn>false</jswarn>
|
|
||||||
<statistics>false</statistics>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
@ -450,17 +414,10 @@
|
|||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.mortbay.jetty</groupId>
|
<groupId>org.mortbay.jetty</groupId>
|
||||||
<artifactId>maven-jetty-plugin</artifactId>
|
<artifactId>jetty-maven-plugin</artifactId>
|
||||||
<version>6.1.26</version>
|
<version>8.1.0.v20120127</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
<war>${project.build.directory}/wisemapping.war</war>
|
||||||
<connectors>
|
|
||||||
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
|
|
||||||
<port>8080</port>
|
|
||||||
<maxIdleTime>60000</maxIdleTime>
|
|
||||||
</connector>
|
|
||||||
</connectors>
|
|
||||||
<webApp>${project.build.directory}/wisemapping.war</webApp>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
@ -1,142 +1,142 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright [2011] [wisemapping]
|
* Copyright [2011] [wisemapping]
|
||||||
*
|
*
|
||||||
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
||||||
* "powered by wisemapping" text requirement on every single page;
|
* "powered by wisemapping" text requirement on every single page;
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the license at
|
* You may obtain a copy of the license at
|
||||||
*
|
*
|
||||||
* http://www.wisemapping.org/license
|
* http://www.wisemapping.org/license
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.wisemapping.dao;
|
package com.wisemapping.dao;
|
||||||
|
|
||||||
import com.wisemapping.model.Colaborator;
|
import com.wisemapping.model.Colaborator;
|
||||||
import com.wisemapping.model.MindmapUser;
|
import com.wisemapping.model.MindmapUser;
|
||||||
import com.wisemapping.model.User;
|
import com.wisemapping.model.User;
|
||||||
import com.wisemapping.model.UserLogin;
|
import com.wisemapping.model.UserLogin;
|
||||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||||
import org.acegisecurity.providers.encoding.PasswordEncoder;
|
//import org.acegisecurity.providers.encoding.PasswordEncoder;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class UserManagerImpl
|
public class UserManagerImpl
|
||||||
extends HibernateDaoSupport
|
extends HibernateDaoSupport
|
||||||
implements UserManager {
|
implements UserManager {
|
||||||
|
|
||||||
private PasswordEncoder passwordEncoder;
|
// private PasswordEncoder passwordEncoder;
|
||||||
|
//
|
||||||
public void setPasswordEncoder(PasswordEncoder passwordEncoder)
|
// public void setEncoder(PasswordEncoder passwordEncoder)
|
||||||
{
|
// {
|
||||||
this.passwordEncoder = passwordEncoder;
|
// this.passwordEncoder = passwordEncoder;
|
||||||
}
|
// }
|
||||||
|
|
||||||
public List<User> getAllUsers() {
|
public List<User> getAllUsers() {
|
||||||
return getHibernateTemplate().find("from com.wisemapping.model.User user");
|
return getHibernateTemplate().find("from com.wisemapping.model.User user");
|
||||||
}
|
}
|
||||||
|
|
||||||
public User getUserBy(final String email) {
|
public User getUserBy(final String email) {
|
||||||
final User user;
|
final User user;
|
||||||
final List users = getHibernateTemplate().find("from com.wisemapping.model.User colaborator where email=?", email);
|
final List users = getHibernateTemplate().find("from com.wisemapping.model.User colaborator where email=?", email);
|
||||||
if (users != null && !users.isEmpty()) {
|
if (users != null && !users.isEmpty()) {
|
||||||
assert users.size() == 1 : "More than one user with the same email!";
|
assert users.size() == 1 : "More than one user with the same email!";
|
||||||
user = (User) users.get(0);
|
user = (User) users.get(0);
|
||||||
} else {
|
} else {
|
||||||
user = null;
|
user = null;
|
||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Colaborator getColaboratorBy(final String email) {
|
public Colaborator getColaboratorBy(final String email) {
|
||||||
final Colaborator cola;
|
final Colaborator cola;
|
||||||
final List cols = getHibernateTemplate().find("from com.wisemapping.model.Colaborator colaborator where email=?", email);
|
final List cols = getHibernateTemplate().find("from com.wisemapping.model.Colaborator colaborator where email=?", email);
|
||||||
if (cols != null && !cols.isEmpty()) {
|
if (cols != null && !cols.isEmpty()) {
|
||||||
assert cols.size() == 1 : "More than one colaborator with the same email!";
|
assert cols.size() == 1 : "More than one colaborator with the same email!";
|
||||||
cola = (Colaborator) cols.get(0);
|
cola = (Colaborator) cols.get(0);
|
||||||
} else {
|
} else {
|
||||||
cola = null;
|
cola = null;
|
||||||
}
|
}
|
||||||
return cola;
|
return cola;
|
||||||
}
|
}
|
||||||
|
|
||||||
public User getUserBy(long id)
|
public User getUserBy(long id)
|
||||||
{
|
{
|
||||||
return (User)getHibernateTemplate().get(User.class,id);
|
return (User)getHibernateTemplate().get(User.class,id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public User getUserByUsername(String username) {
|
public User getUserByUsername(String username) {
|
||||||
final User user;
|
final User user;
|
||||||
final List users = getHibernateTemplate().find("from com.wisemapping.model.User colaborator where username=?", username);
|
final List users = getHibernateTemplate().find("from com.wisemapping.model.User colaborator where username=?", username);
|
||||||
if (users != null && !users.isEmpty()) {
|
if (users != null && !users.isEmpty()) {
|
||||||
assert users.size() == 1 : "More than one user with the same username!";
|
assert users.size() == 1 : "More than one user with the same username!";
|
||||||
user = (User) users.get(0);
|
user = (User) users.get(0);
|
||||||
} else {
|
} else {
|
||||||
user = null;
|
user = null;
|
||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean authenticate(final String email, final String password) {
|
public boolean authenticate(final String email, final String password) {
|
||||||
final boolean result;
|
final boolean result;
|
||||||
final User user = getUserBy(email);
|
final User user = getUserBy(email);
|
||||||
result = user != null && user.getPassword().equals(password);
|
result = user != null && user.getPassword().equals(password);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createUser(User user) {
|
public void createUser(User user) {
|
||||||
assert user != null : "Trying to store a null user";
|
assert user != null : "Trying to store a null user";
|
||||||
user.setPassword(passwordEncoder.encodePassword(user.getPassword(),null));
|
// user.setPassword(passwordEncoder.encodePassword(user.getPassword(),null));
|
||||||
getHibernateTemplate().saveOrUpdate(user);
|
getHibernateTemplate().saveOrUpdate(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
public User createUser(User user, Colaborator col)
|
public User createUser(User user, Colaborator col)
|
||||||
{
|
{
|
||||||
user.setPassword(passwordEncoder.encodePassword(user.getPassword(),null));
|
// user.setPassword(passwordEncoder.encodePassword(user.getPassword(),null));
|
||||||
assert user != null : "Trying to store a null user";
|
assert user != null : "Trying to store a null user";
|
||||||
|
|
||||||
final Set<MindmapUser> set = col.getMindmapUsers();
|
final Set<MindmapUser> set = col.getMindmapUsers();
|
||||||
for (MindmapUser mindmapUser : set) {
|
for (MindmapUser mindmapUser : set) {
|
||||||
MindmapUser newMapUser = new MindmapUser();
|
MindmapUser newMapUser = new MindmapUser();
|
||||||
newMapUser.setRoleId(mindmapUser.getRole().ordinal());
|
newMapUser.setRoleId(mindmapUser.getRole().ordinal());
|
||||||
newMapUser.setMindMap(mindmapUser.getMindMap());
|
newMapUser.setMindMap(mindmapUser.getMindMap());
|
||||||
newMapUser.setColaborator(user);
|
newMapUser.setColaborator(user);
|
||||||
user.addMindmapUser(newMapUser);
|
user.addMindmapUser(newMapUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
getHibernateTemplate().delete(col);
|
getHibernateTemplate().delete(col);
|
||||||
getHibernateTemplate().flush();
|
getHibernateTemplate().flush();
|
||||||
getHibernateTemplate().saveOrUpdate(user);
|
getHibernateTemplate().saveOrUpdate(user);
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void auditLogin(UserLogin userLogin) {
|
public void auditLogin(UserLogin userLogin) {
|
||||||
assert userLogin != null : "userLogin is null";
|
assert userLogin != null : "userLogin is null";
|
||||||
getHibernateTemplate().save(userLogin);
|
getHibernateTemplate().save(userLogin);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateUser(User user) {
|
public void updateUser(User user) {
|
||||||
assert user != null : "user is null";
|
assert user != null : "user is null";
|
||||||
user.setPassword(passwordEncoder.encodePassword(user.getPassword(),null));
|
// user.setPassword(passwordEncoder.encodePassword(user.getPassword(),null));
|
||||||
getHibernateTemplate().update(user);
|
getHibernateTemplate().update(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
public User getUserByActivationCode(long code) {
|
public User getUserByActivationCode(long code) {
|
||||||
final User user;
|
final User user;
|
||||||
final List users = getHibernateTemplate().find("from com.wisemapping.model.User user where activationCode=?", code);
|
final List users = getHibernateTemplate().find("from com.wisemapping.model.User user where activationCode=?", code);
|
||||||
if (users != null && !users.isEmpty()) {
|
if (users != null && !users.isEmpty()) {
|
||||||
assert users.size() == 1 : "More than one user with the same username!";
|
assert users.size() == 1 : "More than one user with the same username!";
|
||||||
user = (User) users.get(0);
|
user = (User) users.get(0);
|
||||||
} else {
|
} else {
|
||||||
user = null;
|
user = null;
|
||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,140 +1,142 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright [2011] [wisemapping]
|
* Copyright [2011] [wisemapping]
|
||||||
*
|
*
|
||||||
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
||||||
* "powered by wisemapping" text requirement on every single page;
|
* "powered by wisemapping" text requirement on every single page;
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the license at
|
* You may obtain a copy of the license at
|
||||||
*
|
*
|
||||||
* http://www.wisemapping.org/license
|
* http://www.wisemapping.org/license
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.wisemapping.model;
|
package com.wisemapping.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import java.util.*;
|
import java.io.Serializable;
|
||||||
|
import java.util.*;
|
||||||
public class User
|
|
||||||
extends Colaborator
|
@XmlRootElement(name="user")
|
||||||
implements Serializable
|
public class User
|
||||||
{
|
extends Colaborator
|
||||||
|
implements Serializable
|
||||||
private String firstname;
|
{
|
||||||
private String lastname;
|
|
||||||
private String password;
|
private String firstname;
|
||||||
private long activationCode;
|
private String lastname;
|
||||||
private Calendar activationDate;
|
private String password;
|
||||||
private String username;
|
private long activationCode;
|
||||||
private Set<String> tags = new HashSet<String>();
|
private Calendar activationDate;
|
||||||
private boolean allowSendEmail = false;
|
private String username;
|
||||||
|
private Set<String> tags = new HashSet<String>();
|
||||||
public User() {
|
private boolean allowSendEmail = false;
|
||||||
}
|
|
||||||
|
public User() {
|
||||||
public void setTags(Set<String> tags)
|
}
|
||||||
{
|
|
||||||
this.tags = tags;
|
public void setTags(Set<String> tags)
|
||||||
}
|
{
|
||||||
|
this.tags = tags;
|
||||||
public Set<String> getTags()
|
}
|
||||||
{
|
|
||||||
return tags;
|
public Set<String> getTags()
|
||||||
}
|
{
|
||||||
|
return tags;
|
||||||
public String getFirstname() {
|
}
|
||||||
return firstname;
|
|
||||||
}
|
public String getFirstname() {
|
||||||
|
return firstname;
|
||||||
public void setFirstname(String firstname) {
|
}
|
||||||
this.firstname = firstname;
|
|
||||||
}
|
public void setFirstname(String firstname) {
|
||||||
|
this.firstname = firstname;
|
||||||
public String getLastname() {
|
}
|
||||||
return lastname;
|
|
||||||
}
|
public String getLastname() {
|
||||||
|
return lastname;
|
||||||
public void setLastname(String lastname) {
|
}
|
||||||
this.lastname = lastname;
|
|
||||||
}
|
public void setLastname(String lastname) {
|
||||||
|
this.lastname = lastname;
|
||||||
public String getPassword() {
|
}
|
||||||
return password;
|
|
||||||
}
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
public void setPassword(String password) {
|
}
|
||||||
this.password = password;
|
|
||||||
}
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
public boolean isActive() {
|
}
|
||||||
return activationDate != null;
|
|
||||||
}
|
public boolean isActive() {
|
||||||
|
return activationDate != null;
|
||||||
public void setActivationCode(long code) {
|
}
|
||||||
this.activationCode = code;
|
|
||||||
}
|
public void setActivationCode(long code) {
|
||||||
|
this.activationCode = code;
|
||||||
public long getActivationCode() {
|
}
|
||||||
return activationCode;
|
|
||||||
}
|
public long getActivationCode() {
|
||||||
|
return activationCode;
|
||||||
public void setActivationDate(Calendar date) {
|
}
|
||||||
this.activationDate = date;
|
|
||||||
}
|
public void setActivationDate(Calendar date) {
|
||||||
|
this.activationDate = date;
|
||||||
public Calendar getActivationDate() {
|
}
|
||||||
return activationDate;
|
|
||||||
}
|
public Calendar getActivationDate() {
|
||||||
|
return activationDate;
|
||||||
public boolean isAllowSendEmail()
|
}
|
||||||
{
|
|
||||||
return allowSendEmail;
|
public boolean isAllowSendEmail()
|
||||||
}
|
{
|
||||||
|
return allowSendEmail;
|
||||||
public void setAllowSendEmail(boolean allowSendEmail)
|
}
|
||||||
{
|
|
||||||
this.allowSendEmail = allowSendEmail;
|
public void setAllowSendEmail(boolean allowSendEmail)
|
||||||
}
|
{
|
||||||
|
this.allowSendEmail = allowSendEmail;
|
||||||
public boolean getAllowSendEmail()
|
}
|
||||||
{
|
|
||||||
return allowSendEmail;
|
public boolean getAllowSendEmail()
|
||||||
}
|
{
|
||||||
|
return allowSendEmail;
|
||||||
public boolean equals(Object o) {
|
}
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
final User user = (User) o;
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
if (!getEmail().equals(user.getEmail())) return false;
|
final User user = (User) o;
|
||||||
if (firstname != null ? !firstname.equals(user.firstname) : user.firstname != null) return false;
|
|
||||||
if (lastname != null ? !lastname.equals(user.lastname) : user.lastname != null) return false;
|
if (!getEmail().equals(user.getEmail())) return false;
|
||||||
if (password != null ? !password.equals(user.password) : user.password != null) return false;
|
if (firstname != null ? !firstname.equals(user.firstname) : user.firstname != null) return false;
|
||||||
|
if (lastname != null ? !lastname.equals(user.lastname) : user.lastname != null) return false;
|
||||||
return true;
|
if (password != null ? !password.equals(user.password) : user.password != null) return false;
|
||||||
}
|
|
||||||
|
return true;
|
||||||
public int hashCode() {
|
}
|
||||||
int result;
|
|
||||||
result = (firstname != null ? firstname.hashCode() : 0);
|
public int hashCode() {
|
||||||
result = 29 * result + (lastname != null ? lastname.hashCode() : 0);
|
int result;
|
||||||
result = 29 * result + (password != null ? password.hashCode() : 0);
|
result = (firstname != null ? firstname.hashCode() : 0);
|
||||||
result = 29 * result + getEmail().hashCode();
|
result = 29 * result + (lastname != null ? lastname.hashCode() : 0);
|
||||||
return result;
|
result = 29 * result + (password != null ? password.hashCode() : 0);
|
||||||
}
|
result = 29 * result + getEmail().hashCode();
|
||||||
|
return result;
|
||||||
public String getUsername() {
|
}
|
||||||
return username;
|
|
||||||
}
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
public void setUsername(String username) {
|
}
|
||||||
this.username = username;
|
|
||||||
}
|
public void setUsername(String username) {
|
||||||
}
|
this.username = username;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.wisemapping.rest;
|
||||||
|
|
||||||
|
|
||||||
|
import com.wisemapping.model.User;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class UserController {
|
||||||
|
private Jaxb2Marshaller jaxb2Mashaller;
|
||||||
|
|
||||||
|
public void setJaxb2Mashaller(@NotNull final Jaxb2Marshaller jaxb2Mashaller) {
|
||||||
|
this.jaxb2Mashaller = jaxb2Mashaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final String XML_VIEW_NAME = "users";
|
||||||
|
|
||||||
|
@RequestMapping(method = RequestMethod.GET, value = "/employee/{id}")
|
||||||
|
public ModelAndView getEmployee(@PathVariable String id) {
|
||||||
|
User user = new User();
|
||||||
|
return new ModelAndView(XML_VIEW_NAME, "object", user);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright [2011] [wisemapping]
|
|
||||||
*
|
|
||||||
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
|
||||||
* "powered by wisemapping" text requirement on every single page;
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the license at
|
|
||||||
*
|
|
||||||
* http://www.wisemapping.org/license
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.wisemapping.security;
|
|
||||||
|
|
||||||
import org.acegisecurity.AuthenticationException;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
public interface AuthenticationHandler
|
|
||||||
{
|
|
||||||
|
|
||||||
AuthenticationToken getAuthenticationToken(HttpServletRequest request) throws AuthenticationException;
|
|
||||||
|
|
||||||
}
|
|
@ -0,0 +1,48 @@
|
|||||||
|
package com.wisemapping.security;
|
||||||
|
|
||||||
|
|
||||||
|
import com.wisemapping.dao.UserManager;
|
||||||
|
import com.wisemapping.model.User;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.springframework.security.authentication.AbstractAuthenticationToken;
|
||||||
|
import org.springframework.security.authentication.BadCredentialsException;
|
||||||
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||||
|
import org.springframework.security.authentication.encoding.PasswordEncoder;
|
||||||
|
import org.springframework.security.core.Authentication;
|
||||||
|
import org.springframework.security.core.AuthenticationException;
|
||||||
|
|
||||||
|
|
||||||
|
public class AuthenticationProvider implements org.springframework.security.authentication.AuthenticationProvider {
|
||||||
|
private UserManager userManager;
|
||||||
|
|
||||||
|
private PasswordEncoder encoder;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Authentication authenticate(@NotNull final Authentication auth) throws AuthenticationException {
|
||||||
|
|
||||||
|
// All your user authentication needs
|
||||||
|
final String email = auth.getName();
|
||||||
|
final User user = userManager.getUserBy(email);
|
||||||
|
final String credentials = (String) auth.getCredentials();
|
||||||
|
if (user == null || credentials == null || !encoder.isPasswordValid(user.getPassword(), credentials, null)) {
|
||||||
|
throw new BadCredentialsException("Username/Password does not match for " + auth.getPrincipal());
|
||||||
|
}
|
||||||
|
|
||||||
|
final UserDetails userDetails = new UserDetails(user);
|
||||||
|
return new UsernamePasswordAuthenticationToken(userDetails, credentials, userDetails.getAuthorities());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supports(final Class<? extends Object> authentication) {
|
||||||
|
return (UsernamePasswordAuthenticationToken.class.isAssignableFrom(authentication));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEncoder(@NotNull PasswordEncoder encoder) {
|
||||||
|
this.encoder = encoder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserManager(UserManager userManager) {
|
||||||
|
this.userManager = userManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright [2011] [wisemapping]
|
|
||||||
*
|
|
||||||
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
|
||||||
* "powered by wisemapping" text requirement on every single page;
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the license at
|
|
||||||
*
|
|
||||||
* http://www.wisemapping.org/license
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.wisemapping.security;
|
|
||||||
|
|
||||||
public class AuthenticationToken
|
|
||||||
{
|
|
||||||
private String username;
|
|
||||||
private String password;
|
|
||||||
|
|
||||||
public AuthenticationToken(String username,String password)
|
|
||||||
{
|
|
||||||
this.username = username;
|
|
||||||
this.password = password;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUsername()
|
|
||||||
{
|
|
||||||
return username;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPassword()
|
|
||||||
{
|
|
||||||
return password;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,59 +1,57 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright [2011] [wisemapping]
|
* Copyright [2011] [wisemapping]
|
||||||
*
|
*
|
||||||
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
||||||
* "powered by wisemapping" text requirement on every single page;
|
* "powered by wisemapping" text requirement on every single page;
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the license at
|
* You may obtain a copy of the license at
|
||||||
*
|
*
|
||||||
* http://www.wisemapping.org/license
|
* http://www.wisemapping.org/license
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.wisemapping.security;
|
package com.wisemapping.security;
|
||||||
|
|
||||||
import org.acegisecurity.providers.encoding.PasswordEncoder;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
import org.springframework.dao.DataAccessException;
|
||||||
public class CustomPasswordEncoder
|
import org.springframework.security.authentication.encoding.PasswordEncoder;
|
||||||
implements PasswordEncoder
|
import org.springframework.security.authentication.encoding.ShaPasswordEncoder;
|
||||||
{
|
|
||||||
private PasswordEncoder delegateEncoder;
|
public class CustomPasswordEncoder
|
||||||
private static final String ENC_PREFIX = "ENC:";
|
implements PasswordEncoder
|
||||||
|
{
|
||||||
public void setDelegatedEncoder(PasswordEncoder delegateEncoder)
|
private PasswordEncoder delegateEncoder = new ShaPasswordEncoder();
|
||||||
{
|
|
||||||
this.delegateEncoder = delegateEncoder;
|
private static final String ENC_PREFIX = "ENC:";
|
||||||
}
|
|
||||||
|
public String encodePassword(@NotNull String rawPass, @Nullable Object salt) throws DataAccessException {
|
||||||
public String encodePassword(String rawPass, Object salt) throws DataAccessException {
|
|
||||||
|
String password = rawPass;
|
||||||
String password = rawPass;
|
if (!rawPass.startsWith(ENC_PREFIX))
|
||||||
if (!rawPass.startsWith(ENC_PREFIX))
|
{
|
||||||
{
|
password = ENC_PREFIX + delegateEncoder.encodePassword(rawPass,salt);
|
||||||
password = ENC_PREFIX + delegateEncoder.encodePassword(rawPass,salt);
|
}
|
||||||
}
|
|
||||||
|
return password;
|
||||||
return password;
|
}
|
||||||
}
|
|
||||||
|
public boolean isPasswordValid(@NotNull String encPass, @NotNull String rawPass, Object salt) throws DataAccessException {
|
||||||
public boolean isPasswordValid(String encPass, String rawPass, Object salt) throws DataAccessException {
|
|
||||||
|
String pass1 = "" + encPass;
|
||||||
String pass1 = "" + encPass;
|
String pass2 = rawPass;
|
||||||
String pass2 = rawPass;
|
|
||||||
|
if (pass1.startsWith(ENC_PREFIX))
|
||||||
if (pass1.startsWith(ENC_PREFIX))
|
{
|
||||||
{
|
|
||||||
|
pass2 = encodePassword(rawPass, salt);
|
||||||
pass2 = encodePassword(rawPass, salt);
|
}
|
||||||
}
|
return pass1.equals(pass2);
|
||||||
|
}
|
||||||
return pass1.equals(pass2);
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright [2011] [wisemapping]
|
|
||||||
*
|
|
||||||
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
|
||||||
* "powered by wisemapping" text requirement on every single page;
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the license at
|
|
||||||
*
|
|
||||||
* http://www.wisemapping.org/license
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.wisemapping.security;
|
|
||||||
|
|
||||||
import org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices;
|
|
||||||
import org.acegisecurity.Authentication;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
public class CustomTokenBasedRememberMeServices extends
|
|
||||||
TokenBasedRememberMeServices {
|
|
||||||
public void logout(HttpServletRequest request, HttpServletResponse response, Authentication authentication)
|
|
||||||
{
|
|
||||||
if(authentication!=null)
|
|
||||||
super.logout(request, response, authentication);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
logger.debug("Session Already Expired. Authentication is null");
|
|
||||||
response.addCookie(makeCancelCookie(request));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,52 +1,50 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright [2011] [wisemapping]
|
* Copyright [2011] [wisemapping]
|
||||||
*
|
*
|
||||||
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
||||||
* "powered by wisemapping" text requirement on every single page;
|
* "powered by wisemapping" text requirement on every single page;
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the license at
|
* You may obtain a copy of the license at
|
||||||
*
|
*
|
||||||
* http://www.wisemapping.org/license
|
* http://www.wisemapping.org/license
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.wisemapping.security;
|
package com.wisemapping.security;
|
||||||
|
|
||||||
import com.wisemapping.dao.UserManager;
|
import com.wisemapping.dao.UserManager;
|
||||||
import org.acegisecurity.userdetails.UserDetailsService;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.acegisecurity.userdetails.UsernameNotFoundException;
|
import org.springframework.dao.DataAccessException;
|
||||||
import org.acegisecurity.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||||
import org.acegisecurity.providers.encoding.PasswordEncoder;
|
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||||
import org.acegisecurity.providers.encoding.Md5PasswordEncoder;
|
|
||||||
import org.acegisecurity.providers.dao.SaltSource;
|
public class DatabaseUserDetailService
|
||||||
import org.springframework.dao.DataAccessException;
|
implements UserDetailsService {
|
||||||
|
private UserManager userManager;
|
||||||
public class DatabaseUserDetailService
|
|
||||||
implements UserDetailsService {
|
@Override
|
||||||
private UserManager userManager;
|
public UserDetails loadUserByUsername(@NotNull String email) throws UsernameNotFoundException, DataAccessException {
|
||||||
|
final com.wisemapping.model.User model = userManager.getUserBy(email);
|
||||||
public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException, DataAccessException {
|
|
||||||
final com.wisemapping.model.User model = userManager.getUserBy(email);
|
if (model != null) {
|
||||||
|
return new UserDetails(model);
|
||||||
if (model != null) {
|
} else {
|
||||||
return new User(model);
|
throw new UsernameNotFoundException(email);
|
||||||
} else {
|
}
|
||||||
throw new UsernameNotFoundException(email);
|
}
|
||||||
}
|
|
||||||
}
|
public UserManager getUserManager() {
|
||||||
|
return userManager;
|
||||||
public UserManager getUserManager() {
|
}
|
||||||
return userManager;
|
|
||||||
}
|
public void setUserManager(UserManager userManager) {
|
||||||
|
this.userManager = userManager;
|
||||||
public void setUserManager(UserManager userManager) {
|
}
|
||||||
this.userManager = userManager;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright [2011] [wisemapping]
|
|
||||||
*
|
|
||||||
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
|
||||||
* "powered by wisemapping" text requirement on every single page;
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the license at
|
|
||||||
*
|
|
||||||
* http://www.wisemapping.org/license
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.wisemapping.security;
|
|
||||||
|
|
||||||
import org.acegisecurity.AuthenticationException;
|
|
||||||
import org.acegisecurity.ui.webapp.AuthenticationProcessingFilter;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
public class DefaultAuthenticationHandler
|
|
||||||
implements AuthenticationHandler
|
|
||||||
{
|
|
||||||
public AuthenticationToken getAuthenticationToken(HttpServletRequest request)
|
|
||||||
throws AuthenticationException
|
|
||||||
{
|
|
||||||
String username = request.getParameter(AuthenticationProcessingFilter.ACEGI_SECURITY_FORM_USERNAME_KEY);
|
|
||||||
String password = request.getParameter(AuthenticationProcessingFilter.ACEGI_SECURITY_FORM_PASSWORD_KEY);
|
|
||||||
if (username == null) {
|
|
||||||
username = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (password == null) {
|
|
||||||
password = "";
|
|
||||||
}
|
|
||||||
return new AuthenticationToken(username,password);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,67 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright [2011] [wisemapping]
|
|
||||||
*
|
|
||||||
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
|
||||||
* "powered by wisemapping" text requirement on every single page;
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the license at
|
|
||||||
*
|
|
||||||
* http://www.wisemapping.org/license
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.wisemapping.security;
|
|
||||||
|
|
||||||
import org.acegisecurity.userdetails.UserDetails;
|
|
||||||
import org.acegisecurity.GrantedAuthority;
|
|
||||||
import org.acegisecurity.GrantedAuthorityImpl;
|
|
||||||
|
|
||||||
public class User implements UserDetails {
|
|
||||||
private com.wisemapping.model.User model;
|
|
||||||
|
|
||||||
public User(com.wisemapping.model.User model) {
|
|
||||||
this.model = model;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GrantedAuthority[] getAuthorities() {
|
|
||||||
return new GrantedAuthority[]{new GrantedAuthorityImpl("ROLE_USER")};
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPassword() {
|
|
||||||
return model.getPassword();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUsername() {
|
|
||||||
return model.getEmail();
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAccountNonExpired() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAccountNonLocked() {
|
|
||||||
return this.model.isActive();
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isCredentialsNonExpired() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isEnabled() {
|
|
||||||
return this.model.isActive();
|
|
||||||
}
|
|
||||||
|
|
||||||
public com.wisemapping.model.User getModel() {
|
|
||||||
return model;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDisplayName() {
|
|
||||||
return model.getFirstname();
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,77 @@
|
|||||||
|
/*
|
||||||
|
* Copyright [2011] [wisemapping]
|
||||||
|
*
|
||||||
|
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
||||||
|
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
||||||
|
* "powered by wisemapping" text requirement on every single page;
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the license at
|
||||||
|
*
|
||||||
|
* http://www.wisemapping.org/license
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.wisemapping.security;
|
||||||
|
|
||||||
|
import com.wisemapping.model.User;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
|
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
public class UserDetails implements org.springframework.security.core.userdetails.UserDetails {
|
||||||
|
private com.wisemapping.model.User user;
|
||||||
|
|
||||||
|
public UserDetails(@NotNull final com.wisemapping.model.User user) {
|
||||||
|
this.user = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Collection<? extends GrantedAuthority> getAuthorities() {
|
||||||
|
final SimpleGrantedAuthority role_user = new SimpleGrantedAuthority("ROLE_USER");
|
||||||
|
final Collection<GrantedAuthority> result = new ArrayList<GrantedAuthority>();
|
||||||
|
result.add(role_user);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPassword() {
|
||||||
|
return user.getPassword();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUsername() {
|
||||||
|
return user.getEmail();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAccountNonExpired() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAccountNonLocked() {
|
||||||
|
return this.user.isActive();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCredentialsNonExpired() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEnabled() {
|
||||||
|
return this.user.isActive();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public User getUser() {
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
}
|
@ -1,58 +1,56 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright [2011] [wisemapping]
|
* Copyright [2011] [wisemapping]
|
||||||
*
|
*
|
||||||
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
||||||
* "powered by wisemapping" text requirement on every single page;
|
* "powered by wisemapping" text requirement on every single page;
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the license at
|
* You may obtain a copy of the license at
|
||||||
*
|
*
|
||||||
* http://www.wisemapping.org/license
|
* http://www.wisemapping.org/license
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.wisemapping.security;
|
package com.wisemapping.security;
|
||||||
|
|
||||||
import com.wisemapping.model.User;
|
import com.wisemapping.model.User;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import org.springframework.security.authentication.AbstractAuthenticationToken;
|
||||||
|
import org.springframework.security.core.Authentication;
|
||||||
import org.acegisecurity.providers.AbstractAuthenticationToken;
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
import org.acegisecurity.context.SecurityContextHolder;
|
|
||||||
import org.acegisecurity.Authentication;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
final public class Utils {
|
||||||
public class Utils {
|
private Utils() {
|
||||||
private Utils() {
|
}
|
||||||
}
|
|
||||||
|
public static User getUser(@NotNull final HttpServletRequest request) {
|
||||||
public static User getUser(final HttpServletRequest request) {
|
|
||||||
|
final AbstractAuthenticationToken token = (AbstractAuthenticationToken) request.getUserPrincipal();
|
||||||
final AbstractAuthenticationToken token = (AbstractAuthenticationToken) request.getUserPrincipal();
|
User result = null;
|
||||||
User result = null;
|
if (token != null) {
|
||||||
if (token != null) {
|
final UserDetails userDetails = (UserDetails) token.getPrincipal();
|
||||||
final com.wisemapping.security.User user = (com.wisemapping.security.User) token.getPrincipal();
|
result = userDetails.getUser();
|
||||||
result = user.getModel();
|
}
|
||||||
}
|
return result;
|
||||||
return result;
|
}
|
||||||
}
|
|
||||||
|
public static User getUser() {
|
||||||
public static User getUser()
|
User result = null;
|
||||||
{
|
final Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||||
User user = null;
|
if (auth != null && auth.getDetails() != null)
|
||||||
final Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
{
|
||||||
if (auth != null && auth.getDetails() != null)
|
final Object principal = auth.getPrincipal();
|
||||||
{
|
if (principal != null && principal instanceof UserDetails) {
|
||||||
final Object principal = auth.getPrincipal();
|
result = ((UserDetails)principal).getUser();
|
||||||
if (principal != null && principal instanceof com.wisemapping.security.User) {
|
}
|
||||||
user = ((com.wisemapping.security.User)principal).getModel();
|
}
|
||||||
}
|
return result;
|
||||||
}
|
}
|
||||||
return user;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright [2011] [wisemapping]
|
|
||||||
*
|
|
||||||
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
|
|
||||||
* It is basically the Apache License, Version 2.0 (the "License") plus the
|
|
||||||
* "powered by wisemapping" text requirement on every single page;
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the license at
|
|
||||||
*
|
|
||||||
* http://www.wisemapping.org/license
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.wisemapping.security;
|
|
||||||
|
|
||||||
import org.acegisecurity.Authentication;
|
|
||||||
import org.acegisecurity.AuthenticationException;
|
|
||||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
|
||||||
import org.acegisecurity.ui.webapp.AuthenticationProcessingFilter;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
public class WiseAuthenticationProcessingFilter
|
|
||||||
extends AuthenticationProcessingFilter
|
|
||||||
{
|
|
||||||
public static final String ACEGI_SECURITY_FORM_SSO_ID_KEY = "j_sso_id";
|
|
||||||
|
|
||||||
private AuthenticationHandler authenticationHandler;
|
|
||||||
|
|
||||||
public void setAuthenticationHandler(AuthenticationHandler ssoAuthenticationHandler)
|
|
||||||
{
|
|
||||||
this.authenticationHandler = ssoAuthenticationHandler;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Authentication attemptAuthentication(HttpServletRequest request)
|
|
||||||
throws AuthenticationException
|
|
||||||
{
|
|
||||||
|
|
||||||
final AuthenticationToken ssoToken = authenticationHandler.getAuthenticationToken(request);
|
|
||||||
|
|
||||||
final UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(ssoToken.getUsername(), ssoToken.getPassword());
|
|
||||||
|
|
||||||
// Place the last username attempted into HttpSession for views
|
|
||||||
request.getSession().setAttribute(ACEGI_SECURITY_LAST_USERNAME_KEY, ssoToken.getUsername());
|
|
||||||
|
|
||||||
// Allow subclasses to set the "details" property
|
|
||||||
setDetails(request, authRequest);
|
|
||||||
|
|
||||||
return this.getAuthenticationManager().authenticate(authRequest);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPreAuthentication(HttpServletRequest request, HttpServletResponse response)
|
|
||||||
throws AuthenticationException, IOException
|
|
||||||
{
|
|
||||||
assert request != null;
|
|
||||||
}
|
|
||||||
}
|
|
24
wise-webapp/src/main/webapp/WEB-INF/jsp-rest/users.jsp
Normal file
24
wise-webapp/src/main/webapp/WEB-INF/jsp-rest/users.jsp
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Employees</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table border=1>
|
||||||
|
<thead><tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Email</th>
|
||||||
|
</tr></thead>
|
||||||
|
<%--<c:forEach var="employee" items="${employees.employees}">--%>
|
||||||
|
<%--<tr>--%>
|
||||||
|
<%--<td>${employee.id}</td>--%>
|
||||||
|
<%--<td>${employee.name}</td>--%>
|
||||||
|
<%--<td>${employee.email}</td>--%>
|
||||||
|
<%--</tr>--%>
|
||||||
|
<%--</c:forEach>--%>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1,128 +1,142 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
|
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
|
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
|
||||||
version="2.4">
|
version="2.4">
|
||||||
|
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
|
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
|
||||||
<param-value>messages</param-value>
|
<param-value>messages</param-value>
|
||||||
</context-param>
|
</context-param>
|
||||||
|
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>contextConfigLocation</param-name>
|
<param-name>contextConfigLocation</param-name>
|
||||||
<param-value>
|
<param-value>
|
||||||
/WEB-INF/wisemapping-security.xml
|
/WEB-INF/wisemapping-aop.xml
|
||||||
/WEB-INF/wisemapping-dao.xml
|
/WEB-INF/wisemapping-dao.xml
|
||||||
/WEB-INF/wisemapping-service.xml
|
/WEB-INF/wisemapping-service.xml
|
||||||
/WEB-INF/wisemapping-model.xml
|
/WEB-INF/wisemapping-model.xml
|
||||||
/WEB-INF/wisemapping-acegi-security.xml
|
/WEB-INF/wisemapping-security.xml
|
||||||
</param-value>
|
</param-value>
|
||||||
</context-param>
|
</context-param>
|
||||||
|
|
||||||
<!--
|
|
||||||
- Loads the root application context of this web app at startup.
|
<!--
|
||||||
- The application context is then available via
|
- Loads the root application context of this web app at startup.
|
||||||
- WebApplicationContextUtils.getWebApplicationContext(servletContext).
|
- The application context is then available via
|
||||||
-->
|
- WebApplicationContextUtils.getWebApplicationContext(servletContext).
|
||||||
<listener>
|
-->
|
||||||
<listener-class>com.wisemapping.service.HibernateAppListener</listener-class>
|
<listener>
|
||||||
</listener>
|
<listener-class>com.wisemapping.service.HibernateAppListener</listener-class>
|
||||||
|
</listener>
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>charsetFilter</filter-name>
|
<filter-name>charsetFilter</filter-name>
|
||||||
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
|
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
|
||||||
<init-param>
|
<init-param>
|
||||||
<param-name>encoding</param-name>
|
<param-name>encoding</param-name>
|
||||||
<param-value>UTF-8</param-value>
|
<param-value>UTF-8</param-value>
|
||||||
</init-param>
|
</init-param>
|
||||||
<init-param>
|
<init-param>
|
||||||
<param-name>forceEncoding</param-name>
|
<param-name>forceEncoding</param-name>
|
||||||
<param-value>true</param-value>
|
<param-value>true</param-value>
|
||||||
</init-param>
|
</init-param>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
<filter-name>charsetFilter</filter-name>
|
<filter-name>charsetFilter</filter-name>
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>hibernate</filter-name>
|
<filter-name>hibernate</filter-name>
|
||||||
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
|
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
|
||||||
<init-param>
|
<init-param>
|
||||||
<param-name>singleSession</param-name>
|
<param-name>singleSession</param-name>
|
||||||
<param-value>true</param-value>
|
<param-value>true</param-value>
|
||||||
</init-param>
|
</init-param>
|
||||||
<init-param>
|
<init-param>
|
||||||
<param-name>sessionFactoryBeanName</param-name>
|
<param-name>sessionFactoryBeanName</param-name>
|
||||||
<param-value>mindmapSessionFactory</param-value>
|
<param-value>mindmapSessionFactory</param-value>
|
||||||
</init-param>
|
</init-param>
|
||||||
</filter>
|
</filter>
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
<filter-name>springSecurityFilterChain</filter-name>
|
||||||
<filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
|
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
|
||||||
<init-param>
|
</filter>
|
||||||
<param-name>targetClass</param-name>
|
|
||||||
<param-value>org.acegisecurity.util.FilterChainProxy</param-value>
|
<filter-mapping>
|
||||||
</init-param>
|
<filter-name>springSecurityFilterChain</filter-name>
|
||||||
</filter>
|
<url-pattern>/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
<filter-mapping>
|
|
||||||
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
<filter-mapping>
|
||||||
<url-pattern>/*</url-pattern>
|
<filter-name>hibernate</filter-name>
|
||||||
</filter-mapping>
|
<url-pattern>/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
<filter-mapping>
|
|
||||||
<filter-name>hibernate</filter-name>
|
<listener>
|
||||||
<url-pattern>/*</url-pattern>
|
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||||
</filter-mapping>
|
</listener>
|
||||||
|
|
||||||
<listener>
|
<servlet>
|
||||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
<servlet-name>mvc-servlet</servlet-name>
|
||||||
</listener>
|
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||||
|
<load-on-startup>1</load-on-startup>
|
||||||
<servlet>
|
|
||||||
<servlet-name>wisemapping</servlet-name>
|
<init-param>
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
<param-name>contextConfigLocation</param-name>
|
||||||
<load-on-startup>1</load-on-startup>
|
<param-value>
|
||||||
|
/WEB-INF/wisemapping-servlet.xml
|
||||||
<init-param>
|
</param-value>
|
||||||
<param-name>contextConfigLocation</param-name>
|
</init-param>
|
||||||
<param-value>
|
|
||||||
/WEB-INF/wisemapping-servlet.xml
|
</servlet>
|
||||||
/WEB-INF/wisemapping-captcha.xml
|
|
||||||
</param-value>
|
<servlet>
|
||||||
</init-param>
|
<servlet-name>mvc-rest</servlet-name>
|
||||||
|
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||||
</servlet>
|
<load-on-startup>1</load-on-startup>
|
||||||
|
|
||||||
<servlet>
|
<init-param>
|
||||||
<servlet-name>dwr-invoker</servlet-name>
|
<param-name>contextConfigLocation</param-name>
|
||||||
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
|
<param-value>
|
||||||
<init-param>
|
/WEB-INF/wisemapping-rest.xml
|
||||||
<param-name>debug</param-name>
|
</param-value>
|
||||||
<param-value>true</param-value>
|
</init-param>
|
||||||
</init-param>
|
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
<servlet-mapping>
|
<servlet>
|
||||||
<servlet-name>wisemapping</servlet-name>
|
<servlet-name>dwr-invoker</servlet-name>
|
||||||
<url-pattern>*.htm</url-pattern>
|
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
|
||||||
</servlet-mapping>
|
<init-param>
|
||||||
|
<param-name>debug</param-name>
|
||||||
<servlet-mapping>
|
<param-value>true</param-value>
|
||||||
<servlet-name>dwr-invoker</servlet-name>
|
</init-param>
|
||||||
<url-pattern>/dwr/*</url-pattern>
|
</servlet>
|
||||||
</servlet-mapping>
|
|
||||||
|
<servlet-mapping>
|
||||||
<welcome-file-list>
|
<servlet-name>mvc-servlet</servlet-name>
|
||||||
<welcome-file>
|
<url-pattern>*.htm</url-pattern>
|
||||||
index.jsp
|
</servlet-mapping>
|
||||||
</welcome-file>
|
|
||||||
</welcome-file-list>
|
<servlet-mapping>
|
||||||
<session-config>
|
<servlet-name>mvc-rest</servlet-name>
|
||||||
<session-timeout>180</session-timeout>
|
<url-pattern>/service/*</url-pattern>
|
||||||
</session-config>
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>dwr-invoker</servlet-name>
|
||||||
|
<url-pattern>/dwr/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<welcome-file-list>
|
||||||
|
<welcome-file>
|
||||||
|
index.jsp
|
||||||
|
</welcome-file>
|
||||||
|
</welcome-file-list>
|
||||||
|
<session-config>
|
||||||
|
<session-timeout>180</session-timeout>
|
||||||
|
</session-config>
|
||||||
</web-app>
|
</web-app>
|
@ -1,167 +1,167 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
|
||||||
<beans>
|
<beans>
|
||||||
|
|
||||||
<bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy">
|
<bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy">
|
||||||
<property name="filterInvocationDefinitionSource">
|
<property name="filterInvocationDefinitionSource">
|
||||||
<value>
|
<value>
|
||||||
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
|
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
|
||||||
PATTERN_TYPE_APACHE_ANT
|
PATTERN_TYPE_APACHE_ANT
|
||||||
/**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,securityContextHolderAwareRequestFilter,rememberMeProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor
|
/**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,securityContextHolderAwareRequestFilter,rememberMeProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor
|
||||||
</value>
|
</value>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="shaPasswordEncoder" class="org.acegisecurity.providers.encoding.ShaPasswordEncoder"/>
|
<bean id="shaPasswordEncoder" class="org.acegisecurity.providers.encoding.ShaPasswordEncoder"/>
|
||||||
|
|
||||||
<bean id="passwordEncoder" class="com.wisemapping.security.CustomPasswordEncoder">
|
<bean id="encoder" class="com.wisemapping.security.CustomPasswordEncoder">
|
||||||
<property name="delegatedEncoder" ref="shaPasswordEncoder"/>
|
<property name="delegatedEncoder" ref="shaPasswordEncoder"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="httpSessionContextIntegrationFilter"
|
<bean id="httpSessionContextIntegrationFilter"
|
||||||
class="org.acegisecurity.context.HttpSessionContextIntegrationFilter"/>
|
class="org.acegisecurity.context.HttpSessionContextIntegrationFilter"/>
|
||||||
|
|
||||||
<bean id="logoutFilter" class="org.acegisecurity.ui.logout.LogoutFilter">
|
<bean id="logoutFilter" class="org.acegisecurity.ui.logout.LogoutFilter">
|
||||||
<property name="filterProcessesUrl" value="/c/logout.htm"/>
|
<property name="filterProcessesUrl" value="/c/logout.htm"/>
|
||||||
<constructor-arg value="/c/login.htm"/>
|
<constructor-arg value="/c/login.htm"/>
|
||||||
<!-- URL redirected to after logout -->
|
<!-- URL redirected to after logout -->
|
||||||
<constructor-arg>
|
<constructor-arg>
|
||||||
<list>
|
<list>
|
||||||
<ref bean="rememberMeServices"/>
|
<ref bean="rememberMeServices"/>
|
||||||
<bean class="org.acegisecurity.ui.logout.SecurityContextLogoutHandler"/>
|
<bean class="org.acegisecurity.ui.logout.SecurityContextLogoutHandler"/>
|
||||||
</list>
|
</list>
|
||||||
</constructor-arg>
|
</constructor-arg>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="ssoCustomAuthenticationHandler" class="com.wisemapping.security.DefaultAuthenticationHandler"/>
|
<bean id="ssoCustomAuthenticationHandler" class="com.wisemapping.security.DefaultAuthenticationHandler"/>
|
||||||
|
|
||||||
<bean id="authenticationProcessingFilter" class="com.wisemapping.security.WiseAuthenticationProcessingFilter">
|
<bean id="authenticationProcessingFilter" class="com.wisemapping.security.WiseAuthenticationProcessingFilter">
|
||||||
<property name="authenticationManager" ref="authenticationManager"/>
|
<property name="authenticationManager" ref="authenticationManager"/>
|
||||||
<property name="authenticationFailureUrl" value="/c/login.htm?login_error=1"/>
|
<property name="authenticationFailureUrl" value="/c/login.htm?login_error=1"/>
|
||||||
<property name="defaultTargetUrl" value="/c/login.htm"/>
|
<property name="defaultTargetUrl" value="/c/login.htm"/>
|
||||||
<property name="filterProcessesUrl" value="/c/j_acegi_security_check"/>
|
<property name="filterProcessesUrl" value="/c/j_acegi_security_check"/>
|
||||||
<property name="rememberMeServices" ref="rememberMeServices"/>
|
<property name="rememberMeServices" ref="rememberMeServices"/>
|
||||||
<property name="authenticationHandler" ref="ssoCustomAuthenticationHandler"/>
|
<property name="authenticationHandler" ref="ssoCustomAuthenticationHandler"/>
|
||||||
<property name="exceptionMappings">
|
<property name="exceptionMappings">
|
||||||
<props>
|
<props>
|
||||||
<prop key="org.acegisecurity.BadCredentialsException">/c/login.htm?login_error=2</prop>
|
<prop key="org.acegisecurity.BadCredentialsException">/c/login.htm?login_error=2</prop>
|
||||||
<prop key="org.acegisecurity.LockedException">/c/login.htm?login_error=3</prop>
|
<prop key="org.acegisecurity.LockedException">/c/login.htm?login_error=3</prop>
|
||||||
</props>
|
</props>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="securityContextHolderAwareRequestFilter"
|
<bean id="securityContextHolderAwareRequestFilter"
|
||||||
class="org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter"/>
|
class="org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter"/>
|
||||||
|
|
||||||
<bean id="rememberMeProcessingFilter" class="org.acegisecurity.ui.rememberme.RememberMeProcessingFilter">
|
<bean id="rememberMeProcessingFilter" class="org.acegisecurity.ui.rememberme.RememberMeProcessingFilter">
|
||||||
<property name="authenticationManager" ref="authenticationManager"/>
|
<property name="authenticationManager" ref="authenticationManager"/>
|
||||||
<property name="rememberMeServices" ref="rememberMeServices"/>
|
<property name="rememberMeServices" ref="rememberMeServices"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="anonymousProcessingFilter" class="org.acegisecurity.providers.anonymous.AnonymousProcessingFilter">
|
<bean id="anonymousProcessingFilter" class="org.acegisecurity.providers.anonymous.AnonymousProcessingFilter">
|
||||||
<property name="key" value="changeThis"/>
|
<property name="key" value="changeThis"/>
|
||||||
<property name="userAttribute" value="anonymousUser,ROLE_ANONYMOUS"/>
|
<property name="userAttribute" value="anonymousUser,ROLE_ANONYMOUS"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="exceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFilter">
|
<bean id="exceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFilter">
|
||||||
<property name="authenticationEntryPoint">
|
<property name="authenticationEntryPoint">
|
||||||
<bean class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint">
|
<bean class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint">
|
||||||
<property name="loginFormUrl" value="/c/login.htm"/>
|
<property name="loginFormUrl" value="/c/login.htm"/>
|
||||||
<property name="forceHttps" value="false"/>
|
<property name="forceHttps" value="false"/>
|
||||||
</bean>
|
</bean>
|
||||||
</property>
|
</property>
|
||||||
<property name="accessDeniedHandler">
|
<property name="accessDeniedHandler">
|
||||||
<bean class="org.acegisecurity.ui.AccessDeniedHandlerImpl">
|
<bean class="org.acegisecurity.ui.AccessDeniedHandlerImpl">
|
||||||
<property name="errorPage" value="/accessDenied.jsp"/>
|
<property name="errorPage" value="/accessDenied.jsp"/>
|
||||||
</bean>
|
</bean>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="filterInvocationInterceptor" class="org.acegisecurity.intercept.web.FilterSecurityInterceptor">
|
<bean id="filterInvocationInterceptor" class="org.acegisecurity.intercept.web.FilterSecurityInterceptor">
|
||||||
<property name="authenticationManager" ref="authenticationManager"/>
|
<property name="authenticationManager" ref="authenticationManager"/>
|
||||||
<property name="accessDecisionManager">
|
<property name="accessDecisionManager">
|
||||||
<bean class="org.acegisecurity.vote.AffirmativeBased">
|
<bean class="org.acegisecurity.vote.AffirmativeBased">
|
||||||
<property name="allowIfAllAbstainDecisions" value="false"/>
|
<property name="allowIfAllAbstainDecisions" value="false"/>
|
||||||
<property name="decisionVoters">
|
<property name="decisionVoters">
|
||||||
<list>
|
<list>
|
||||||
<bean class="org.acegisecurity.vote.RoleVoter"/>
|
<bean class="org.acegisecurity.vote.RoleVoter"/>
|
||||||
<bean class="org.acegisecurity.vote.AuthenticatedVoter"/>
|
<bean class="org.acegisecurity.vote.AuthenticatedVoter"/>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
</property>
|
</property>
|
||||||
<property name="objectDefinitionSource">
|
<property name="objectDefinitionSource">
|
||||||
<value>
|
<value>
|
||||||
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
|
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
|
||||||
PATTERN_TYPE_APACHE_ANT
|
PATTERN_TYPE_APACHE_ANT
|
||||||
/index.jsp=IS_AUTHENTICATED_ANONYMOUSLY
|
/index.jsp=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/c/login*=IS_AUTHENTICATED_ANONYMOUSLY
|
/c/login*=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/c/userregistration*=IS_AUTHENTICATED_ANONYMOUSLY
|
/c/userregistration*=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/c/activation.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
/c/activation.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/c/forgotpassword*=IS_AUTHENTICATED_ANONYMOUSLY
|
/c/forgotpassword*=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/c/captcha*=IS_AUTHENTICATED_ANONYMOUSLY
|
/c/captcha*=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/c/home.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
/c/home.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/c/try.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
/c/try.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/c/search.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
/c/search.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/c/keyboard.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
/c/keyboard.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/css/*=IS_AUTHENTICATED_ANONYMOUSLY
|
/css/*=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/js/**=IS_AUTHENTICATED_ANONYMOUSLY
|
/js/**=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/ws/**=IS_AUTHENTICATED_ANONYMOUSLY
|
/ws/**=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/images/*=IS_AUTHENTICATED_ANONYMOUSLY
|
/images/*=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/c/embeddedview.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
/c/embeddedview.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/c/export.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
/c/export.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/c/publicview.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
/c/publicview.htm=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/dwr/engine.js=IS_AUTHENTICATED_ANONYMOUSLY
|
/dwr/engine.js=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/dwr/interface/loggerservice.js=IS_AUTHENTICATED_ANONYMOUSLY
|
/dwr/interface/loggerservice.js=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/dwr/call/plaincall/loggerservice.logerror.dwr=IS_AUTHENTICATED_ANONYMOUSLY
|
/dwr/call/plaincall/loggerservice.logerror.dwr=IS_AUTHENTICATED_ANONYMOUSLY
|
||||||
/**=IS_AUTHENTICATED_REMEMBERED
|
/**=IS_AUTHENTICATED_REMEMBERED
|
||||||
</value>
|
</value>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="rememberMeServices" class="com.wisemapping.security.CustomTokenBasedRememberMeServices">
|
<bean id="rememberMeServices" class="com.wisemapping.security.CustomTokenBasedRememberMeServices">
|
||||||
<property name="userDetailsService" ref="userDetailsService"/>
|
<property name="userDetailsService" ref="userDetailsService"/>
|
||||||
<property name="key" value="changeThis"/>
|
<property name="key" value="changeThis"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager">
|
<bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager">
|
||||||
<property name="providers">
|
<property name="providers">
|
||||||
<list>
|
<list>
|
||||||
<ref local="daoAuthenticationProvider"/>
|
<ref local="daoAuthenticationProvider"/>
|
||||||
<bean class="org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider">
|
<bean class="org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider">
|
||||||
<property name="key" value="changeThis"/>
|
<property name="key" value="changeThis"/>
|
||||||
</bean>
|
</bean>
|
||||||
<bean class="org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider">
|
<bean class="org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider">
|
||||||
<property name="key" value="changeThis"/>
|
<property name="key" value="changeThis"/>
|
||||||
</bean>
|
</bean>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="daoAuthenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenticationProvider">
|
<bean id="daoAuthenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenticationProvider">
|
||||||
<property name="userDetailsService" ref="userDetailsService"/>
|
<property name="userDetailsService" ref="userDetailsService"/>
|
||||||
<!-- @Todo: Check if this still required. this was removed in the new spring version.-->
|
<!-- @Todo: Check if this still required. this was removed in the new spring version.-->
|
||||||
<!--<property name="userCache">-->
|
<!--<property name="userCache">-->
|
||||||
<!--<bean class="org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache">-->
|
<!--<bean class="org.acegisecurity.providers.dao.cache.EhCacheBasedUserCache">-->
|
||||||
<!--<property name="cache">-->
|
<!--<property name="cache">-->
|
||||||
<!--<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean">-->
|
<!--<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean">-->
|
||||||
<!--<property name="cacheManager">-->
|
<!--<property name="cacheManager">-->
|
||||||
<!--<bean class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"/>-->
|
<!--<bean class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"/>-->
|
||||||
<!--</property>-->
|
<!--</property>-->
|
||||||
<!--<property name="cacheName" value="userCache"/>-->
|
<!--<property name="cacheName" value="userCache"/>-->
|
||||||
<!--</bean>-->
|
<!--</bean>-->
|
||||||
<!--</property>-->
|
<!--</property>-->
|
||||||
<!--</bean>-->
|
<!--</bean>-->
|
||||||
<!--</property>-->
|
<!--</property>-->
|
||||||
<property name="passwordEncoder" ref="passwordEncoder"/>
|
<property name="encoder" ref="encoder"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="userDetailsService" class="com.wisemapping.security.DatabaseUserDetailService">
|
<bean id="userDetailsService" class="com.wisemapping.security.DatabaseUserDetailService">
|
||||||
<property name="userManager" ref="userManager"/>
|
<property name="userManager" ref="userManager"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- This bean is optional; it isn't used by any other bean as it only listens and logs -->
|
<!-- This bean is optional; it isn't used by any other bean as it only listens and logs -->
|
||||||
<bean id="loggerListener" class="org.acegisecurity.event.authentication.LoggerListener"/>
|
<bean id="loggerListener" class="org.acegisecurity.event.authentication.LoggerListener"/>
|
||||||
</beans>
|
</beans>
|
||||||
|
|
||||||
|
42
wise-webapp/src/main/webapp/WEB-INF/wisemapping-aop.xml
Executable file
42
wise-webapp/src/main/webapp/WEB-INF/wisemapping-aop.xml
Executable file
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
|
||||||
|
<beans>
|
||||||
|
|
||||||
|
<bean id="viewSecurityAdvisor"
|
||||||
|
class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
|
||||||
|
<property name="advice">
|
||||||
|
<ref local="viewSecurityAdvice"/>
|
||||||
|
</property>
|
||||||
|
<property name="mappedNames">
|
||||||
|
<list>
|
||||||
|
<value>getMindmapUserBy</value>
|
||||||
|
<value>getMindmapById</value>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="updateSecurityAdvisor"
|
||||||
|
class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
|
||||||
|
<property name="advice">
|
||||||
|
<ref local="updateSecurityAdvice"/>
|
||||||
|
</property>
|
||||||
|
<property name="mappedNames">
|
||||||
|
<list>
|
||||||
|
<value>update*</value>
|
||||||
|
<value>add*</value>
|
||||||
|
<value>remove*</value>
|
||||||
|
<value>remove*</value>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="updateSecurityAdvice" class="com.wisemapping.security.aop.UpdateSecurityAdvise">
|
||||||
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="viewSecurityAdvice" class="com.wisemapping.security.aop.ViewBaseSecurityAdvise">
|
||||||
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
</beans>
|
@ -1,129 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
|
||||||
|
|
||||||
<beans>
|
|
||||||
|
|
||||||
<bean id="colorGenRandomDark" class="com.octo.captcha.component.image.color.RandomRangeColorGenerator">
|
|
||||||
<constructor-arg index="0">
|
|
||||||
<list>
|
|
||||||
<value>0</value>
|
|
||||||
<value>150</value>
|
|
||||||
</list>
|
|
||||||
</constructor-arg>
|
|
||||||
<constructor-arg index="1">
|
|
||||||
<list>
|
|
||||||
<value>0</value>
|
|
||||||
<value>150</value>
|
|
||||||
</list>
|
|
||||||
</constructor-arg>
|
|
||||||
<constructor-arg index="2">
|
|
||||||
<list>
|
|
||||||
<value>0</value>
|
|
||||||
<value>150</value>
|
|
||||||
</list>
|
|
||||||
</constructor-arg>
|
|
||||||
<constructor-arg index="3">
|
|
||||||
<list>
|
|
||||||
<value>255</value>
|
|
||||||
<value>255</value>
|
|
||||||
</list>
|
|
||||||
</constructor-arg>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="fontArial" class="java.awt.Font">
|
|
||||||
<constructor-arg index="0" value="Arial"/>
|
|
||||||
<constructor-arg index="1" value="0"/>
|
|
||||||
<constructor-arg index="2" value="10"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="fontTahoma" class="java.awt.Font">
|
|
||||||
<constructor-arg index="0" value="Tahoma"/>
|
|
||||||
<constructor-arg index="1" value="0"/>
|
|
||||||
<constructor-arg index="2" value="10"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="fontVerdana" class="java.awt.Font">
|
|
||||||
<constructor-arg index="0" value="Verdana"/>
|
|
||||||
<constructor-arg index="1" value="0"/>
|
|
||||||
<constructor-arg index="2" value="10"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="fontComic" class="java.awt.Font">
|
|
||||||
<constructor-arg index="0" value="Comic sans MS"/>
|
|
||||||
<constructor-arg index="1" value="0"/>
|
|
||||||
<constructor-arg index="2" value="10"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="fontLucida" class="java.awt.Font">
|
|
||||||
<constructor-arg index="0" value="Lucida console"/>
|
|
||||||
<constructor-arg index="1" value="0"/>
|
|
||||||
<constructor-arg index="2" value="10"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="fontGenRandom" class="com.octo.captcha.component.image.fontgenerator.RandomFontGenerator">
|
|
||||||
<constructor-arg index="0" value="20"/>
|
|
||||||
<constructor-arg index="1" value="30"/>
|
|
||||||
<constructor-arg index="2">
|
|
||||||
<list>
|
|
||||||
<ref bean="fontArial"/>
|
|
||||||
<ref bean="fontTahoma"/>
|
|
||||||
<ref bean="fontVerdana"/>
|
|
||||||
<ref bean="fontComic"/>
|
|
||||||
<ref bean="fontLucida"/>
|
|
||||||
</list>
|
|
||||||
</constructor-arg>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="backGenUni" class="com.octo.captcha.component.image.backgroundgenerator.UniColorBackgroundGenerator">
|
|
||||||
<constructor-arg index="0" value="150"/>
|
|
||||||
<constructor-arg index="1" value="50"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="path" class="java.lang.String">
|
|
||||||
<constructor-arg value="\home\jcaptcha\conf\gimpybackgrounds"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="simpleColoredPaster" class="com.octo.captcha.component.image.textpaster.RandomTextPaster">
|
|
||||||
<constructor-arg type="java.lang.Integer" index="0" value="4"/>
|
|
||||||
<constructor-arg type="java.lang.Integer" index="1" value="6"/>
|
|
||||||
<constructor-arg type="com.octo.captcha.component.image.color.ColorGenerator" index="2"
|
|
||||||
ref="colorGenRandomDark"/>
|
|
||||||
<constructor-arg index="3" value="true"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="wordtoimage" class="com.octo.captcha.component.image.wordtoimage.ComposedWordToImage">
|
|
||||||
<constructor-arg index="0" ref="fontGenRandom"/>
|
|
||||||
<constructor-arg index="1" ref="backGenUni"/>
|
|
||||||
<constructor-arg index="2" ref="simpleColoredPaster"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="filedict" class="com.octo.captcha.component.word.FileDictionary">
|
|
||||||
<constructor-arg index="0" value="toddlist"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="wordgen" class="com.octo.captcha.component.word.wordgenerator.ComposeDictionaryWordGenerator">
|
|
||||||
<constructor-arg ref="filedict"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="imageCaptchaFactory" class="com.octo.captcha.image.gimpy.GimpyFactory">
|
|
||||||
<constructor-arg ref="wordgen"/>
|
|
||||||
<constructor-arg ref="wordtoimage"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="imageEngine" class="com.octo.captcha.engine.GenericCaptchaEngine">
|
|
||||||
<constructor-arg index="0">
|
|
||||||
<list>
|
|
||||||
<ref bean="imageCaptchaFactory"/>
|
|
||||||
</list>
|
|
||||||
</constructor-arg>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="captchaService" class="com.octo.captcha.service.multitype.GenericManageableCaptchaService">
|
|
||||||
<constructor-arg index="0" ref="imageEngine"/>
|
|
||||||
<constructor-arg index="1" value="300"/>
|
|
||||||
<constructor-arg index="2" value="200000"/>
|
|
||||||
<!-- Umm... Why this is requred ...-->
|
|
||||||
<constructor-arg index="3" value="200000"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
</beans>
|
|
@ -1,15 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
|
||||||
<beans>
|
<beans>
|
||||||
|
|
||||||
<bean id="userManager" class="com.wisemapping.dao.UserManagerImpl">
|
<bean id="userManager" class="com.wisemapping.dao.UserManagerImpl">
|
||||||
<property name="hibernateTemplate" ref="hibernateTemplate"/>
|
<property name="hibernateTemplate" ref="hibernateTemplate"/>
|
||||||
<property name="passwordEncoder" ref="passwordEncoder"/>
|
<!--<property name="encoder" ref="encoder"/>-->
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="mindmapManager" class="com.wisemapping.dao.MindmapManagerImpl">
|
<bean id="mindmapManager" class="com.wisemapping.dao.MindmapManagerImpl">
|
||||||
<property name="hibernateTemplate" ref="hibernateTemplate"/>
|
<property name="hibernateTemplate" ref="hibernateTemplate"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
54
wise-webapp/src/main/webapp/WEB-INF/wisemapping-rest.xml
Normal file
54
wise-webapp/src/main/webapp/WEB-INF/wisemapping-rest.xml
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns:context="http://www.springframework.org/schema/context"
|
||||||
|
xsi:schemaLocation="
|
||||||
|
http://www.springframework.org/schema/beans
|
||||||
|
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||||
|
http://www.springframework.org/schema/context
|
||||||
|
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
|
||||||
|
|
||||||
|
<context:component-scan base-package="dw.spring3.rest.controller"/>
|
||||||
|
|
||||||
|
<!-- To enable @RequestMapping process on type level and method level -->
|
||||||
|
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
|
||||||
|
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>
|
||||||
|
|
||||||
|
<bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
|
||||||
|
<property name="classesToBeBound">
|
||||||
|
<list>
|
||||||
|
<value>com.wisemapping.model.User</value>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="employees" class="org.springframework.web.servlet.view.xml.MarshallingView">
|
||||||
|
<constructor-arg ref="jaxbMarshaller"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
|
||||||
|
<property name="mediaTypes">
|
||||||
|
<map>
|
||||||
|
<entry key="xml" value="application/xml"/>
|
||||||
|
<entry key="html" value="text/html"/>
|
||||||
|
</map>
|
||||||
|
</property>
|
||||||
|
<property name="viewResolvers">
|
||||||
|
<list>
|
||||||
|
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
|
||||||
|
|
||||||
|
<bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
|
||||||
|
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
|
||||||
|
<property name="prefix" value="/WEB-INF/jsp-rest"/>
|
||||||
|
<property name="suffix" value=".jsp"/>
|
||||||
|
</bean>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<!--bean id="viewResolver" class="org.springframework.web.servlet.view.BeanNameViewResolver" /-->
|
||||||
|
|
||||||
|
<bean id="employeeController" class="com.wisemapping.rest.UserController">
|
||||||
|
<property name="jaxb2Mashaller" ref="jaxbMarshaller"/>
|
||||||
|
</bean>
|
||||||
|
</beans>
|
103
wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml
Executable file → Normal file
103
wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml
Executable file → Normal file
@ -1,42 +1,61 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
<beans>
|
xmlns:sec="http://www.springframework.org/schema/security"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
<bean id="viewSecurityAdvisor"
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
|
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||||
<property name="advice">
|
http://www.springframework.org/schema/security
|
||||||
<ref local="viewSecurityAdvice"/>
|
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
|
||||||
</property>
|
|
||||||
<property name="mappedNames">
|
<bean id="encoder"
|
||||||
<list>
|
class="com.wisemapping.security.CustomPasswordEncoder"/>
|
||||||
<value>getMindmapUserBy</value>
|
|
||||||
<value>getMindmapById</value>
|
<sec:http pattern="/css/*" security="none"/>
|
||||||
</list>
|
<sec:http pattern="/js/*" security="none"/>
|
||||||
</property>
|
<sec:http pattern="/images/*" security="none"/>
|
||||||
</bean>
|
<sec:http pattern="/favicon.ico" security="none"/>
|
||||||
|
<sec:http pattern="/c/login*" security="none"/>
|
||||||
<bean id="updateSecurityAdvisor"
|
<sec:http pattern="/c/userregistration.htm" security="none"/>
|
||||||
class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
|
<sec:http pattern="/c/activation.htm" security="none"/>
|
||||||
<property name="advice">
|
<sec:http pattern="/c/forgotpassword.htm" security="none"/>
|
||||||
<ref local="updateSecurityAdvice"/>
|
<sec:http pattern="/c/home.htm" security="none"/>
|
||||||
</property>
|
<sec:http pattern="/c/try.htm" security="none"/>
|
||||||
<property name="mappedNames">
|
<sec:http pattern="/c/search.htm" security="none"/>
|
||||||
<list>
|
<sec:http pattern="/c/keyboard.htm" security="none"/>
|
||||||
<value>update*</value>
|
<sec:http pattern="/c/embeddedview*" security="none"/>
|
||||||
<value>add*</value>
|
<sec:http pattern="/c/export.htm" security="none"/>
|
||||||
<value>remove*</value>
|
<sec:http pattern="/c/publicview.htm" security="none"/>
|
||||||
<value>remove*</value>
|
<sec:http pattern="/dwr/engine.js" security="none"/>
|
||||||
</list>
|
|
||||||
</property>
|
<sec:http pattern="/dwr/interface/loggerservice.js" security="none"/>
|
||||||
</bean>
|
<sec:http pattern="/dwr/call/plaincall/loggerservice.logerror.dwr" security="none"/>
|
||||||
|
|
||||||
<bean id="updateSecurityAdvice" class="com.wisemapping.security.aop.UpdateSecurityAdvise">
|
<sec:http use-expressions="true" >
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
|
||||||
</bean>
|
<sec:intercept-url pattern="/**/*" access="isFullyAuthenticated()"/>
|
||||||
|
<sec:form-login login-page="/c/login.htm" default-target-url='/c/mymaps.htm'
|
||||||
<bean id="viewSecurityAdvice" class="com.wisemapping.security.aop.ViewBaseSecurityAdvise">
|
always-use-default-target='true' authentication-failure-url="/c/login.htm?login_error=2"
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
login-processing-url="/j_spring_security_check"/>
|
||||||
</bean>
|
<sec:remember-me key="rememberMeKey" user-service-ref="userDetailsService"/>
|
||||||
|
<!--<sec:session-management session-fixation-protection="newSession">-->
|
||||||
</beans>
|
<!--<sec:concurrency-control error-if-maximum-exceeded="true" max-sessions="1"/>-->
|
||||||
|
<!--</sec:session-management>-->
|
||||||
|
<sec:logout logout-url="/c/logout.htm" invalidate-session="true" logout-success-url="/c/login.htm"/>
|
||||||
|
</sec:http>
|
||||||
|
|
||||||
|
<sec:authentication-manager alias="authenticationManager" >
|
||||||
|
<sec:authentication-provider ref="dbAuthenticationProvider"/>
|
||||||
|
<sec:authentication-provider user-service-ref="userDetailsService"/>
|
||||||
|
</sec:authentication-manager>
|
||||||
|
|
||||||
|
<bean id="dbAuthenticationProvider" class="com.wisemapping.security.AuthenticationProvider">
|
||||||
|
<property name="userManager" ref="userManager"/>
|
||||||
|
<property name="encoder" ref="encoder"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="userDetailsService" class="com.wisemapping.security.DatabaseUserDetailService">
|
||||||
|
<property name="userManager" ref="userManager"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
</beans>
|
@ -1,347 +1,346 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
|
|
||||||
<beans>
|
<beans>
|
||||||
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||||
<property name="location" value="/WEB-INF/app.properties"/>
|
<property name="location" value="/WEB-INF/app.properties"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="browserSupportInterceptor" class="com.wisemapping.filter.BrowserSupportInterceptor">
|
<bean id="browserSupportInterceptor" class="com.wisemapping.filter.BrowserSupportInterceptor">
|
||||||
<property name="exclude">
|
<property name="exclude">
|
||||||
<list>
|
<list>
|
||||||
<value>/</value>
|
<value>/</value>
|
||||||
<value>/index.jsp</value>
|
<value>/index.jsp</value>
|
||||||
<value>/c/home.htm</value>
|
<value>/c/home.htm</value>
|
||||||
<value>/c/login.htm</value>
|
<value>/c/login.htm</value>
|
||||||
<value>/c/userRegistration.htm</value>
|
<value>/c/userRegistration.htm</value>
|
||||||
<value>/c/captcha.htm</value>
|
<value>/c/captcha.htm</value>
|
||||||
<value>/c/publicView.htm</value>
|
<value>/c/publicView.htm</value>
|
||||||
<value>/c/export.htm</value>
|
<value>/c/export.htm</value>
|
||||||
<value>/c/search.htm</value>
|
<value>/c/search.htm</value>
|
||||||
<value>/c/keyboard.htm</value>
|
<value>/c/keyboard.htm</value>
|
||||||
<value>/c/renameMap.htm</value>
|
<value>/c/renameMap.htm</value>
|
||||||
<value>/c/embeddedView.htm</value>
|
<value>/c/embeddedView.htm</value>
|
||||||
<value>/c/forgotPassword.htm</value>
|
<value>/c/forgotPassword.htm</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="exceptionHadlerResolver"
|
<bean id="exceptionHadlerResolver"
|
||||||
class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
|
class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
|
||||||
<property name="defaultStatusCode" value="500"/>
|
<property name="defaultStatusCode" value="500"/>
|
||||||
<property name="defaultErrorView" value="unexpectedError"/>
|
<property name="defaultErrorView" value="unexpectedError"/>
|
||||||
<property name="exceptionMappings">
|
<property name="exceptionMappings">
|
||||||
<props>
|
<props>
|
||||||
<prop key="com.wisemapping.exceptions.UnsupportedBrowserException">browserNotSupported</prop>
|
<prop key="com.wisemapping.exceptions.UnsupportedBrowserException">browserNotSupported</prop>
|
||||||
<!-- Security exceptions are wrapped in this exceptions -->
|
<!-- Security exceptions are wrapped in this exceptions -->
|
||||||
<prop key="java.lang.reflect.UndeclaredThrowableException">securityError</prop>
|
<prop key="java.lang.reflect.UndeclaredThrowableException">securityError</prop>
|
||||||
<prop key="com.wisemapping.exceptions.EmailNotExistsException">emailNotExistsError</prop>
|
<prop key="com.wisemapping.exceptions.EmailNotExistsException">emailNotExistsError</prop>
|
||||||
</props>
|
</props>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="paramResolverByAction"
|
<bean id="paramResolverByAction"
|
||||||
class="org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver">
|
class="org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver">
|
||||||
<property name="paramName" value="action"/>
|
<property name="paramName" value="action"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="paramResolverByAction2"
|
<bean id="paramResolverByAction2"
|
||||||
class="org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver">
|
class="org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver">
|
||||||
<property name="paramName" value="actionId"/>
|
<property name="paramName" value="actionId"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="mindmapController" class="com.wisemapping.controller.MindmapController">
|
<bean id="mindmapController" class="com.wisemapping.controller.MindmapController">
|
||||||
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
|
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
|
||||||
<property name="basenames">
|
<property name="basenames">
|
||||||
<list>
|
<list>
|
||||||
<value>messages</value>
|
<value>messages</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!--<bean id="localeResolver"
|
<!--<bean id="localeResolver"
|
||||||
class="org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver">
|
class="org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver">
|
||||||
</bean>-->
|
</bean>-->
|
||||||
|
|
||||||
<bean id="homeResolver" class="org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver">
|
<bean id="homeResolver" class="org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver">
|
||||||
<property name="mappings">
|
<property name="mappings">
|
||||||
<props>
|
<props>
|
||||||
<prop key="/c/try.htm">tryEditor</prop>
|
<prop key="/c/try.htm">tryEditor</prop>
|
||||||
<prop key="/c/installCFG.htm">installCFG</prop>
|
<prop key="/c/installCFG.htm">installCFG</prop>
|
||||||
</props>
|
</props>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="homeController" class="com.wisemapping.controller.PublicPagesController">
|
<bean id="homeController" class="com.wisemapping.controller.PublicPagesController">
|
||||||
<property name="methodNameResolver" ref="homeResolver"/>
|
<property name="methodNameResolver" ref="homeResolver"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="editorController" class="com.wisemapping.controller.MindmapEditorController">
|
<bean id="editorController" class="com.wisemapping.controller.MindmapEditorController">
|
||||||
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="cookerController" class="com.wisemapping.controller.MindmapCooker">
|
<bean id="cookerController" class="com.wisemapping.controller.MindmapCooker">
|
||||||
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="loginController" class="com.wisemapping.controller.LoginController">
|
<bean id="loginController" class="com.wisemapping.controller.LoginController">
|
||||||
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
<property name="driver" value="${database.driver}"/>
|
<property name="driver" value="${database.driver}"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="sharingController" class="com.wisemapping.controller.MindmapSharingController">
|
<bean id="sharingController" class="com.wisemapping.controller.MindmapSharingController">
|
||||||
<property name="methodNameResolver" ref="paramResolverByAction2"/>
|
<property name="methodNameResolver" ref="paramResolverByAction2"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="exportController" class="com.wisemapping.controller.ExportController">
|
<bean id="exportController" class="com.wisemapping.controller.ExportController">
|
||||||
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
<bean id="publishController" class="com.wisemapping.controller.MindmapPublishController">
|
<bean id="publishController" class="com.wisemapping.controller.MindmapPublishController">
|
||||||
<property name="methodNameResolver" ref="paramResolverByAction2"/>
|
<property name="methodNameResolver" ref="paramResolverByAction2"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="userValidator" class="com.wisemapping.validator.UserValidator">
|
<bean id="userValidator" class="com.wisemapping.validator.UserValidator">
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="userController" class="com.wisemapping.controller.UserController">
|
<bean id="userController" class="com.wisemapping.controller.UserController">
|
||||||
<property name="captchaService" ref="captchaService"/>
|
<!--<property name="captchaService" ref="captchaService"/>-->
|
||||||
<property name="sessionForm" value="false"/>
|
<property name="sessionForm" value="false"/>
|
||||||
<property name="commandName" value="user"/>
|
<property name="commandName" value="user"/>
|
||||||
<property name="commandClass" value="com.wisemapping.view.UserBean"/>
|
<property name="commandClass" value="com.wisemapping.view.UserBean"/>
|
||||||
<property name="validator" ref="userValidator"/>
|
<property name="validator" ref="userValidator"/>
|
||||||
<property name="formView" value="userRegistration"/>
|
<property name="formView" value="userRegistration"/>
|
||||||
<property name="successView" value="userRegistrationConfirmation"/>
|
<property name="successView" value="userRegistrationConfirmation"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
<property name="emailConfirmEnabled" value="${user.confirm.registration}"/>
|
<property name="emailConfirmEnabled" value="${user.confirm.registration}"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="forgotPasswordValidator" class="com.wisemapping.validator.ForgotPasswordValidator"/>
|
<bean id="forgotPasswordValidator" class="com.wisemapping.validator.ForgotPasswordValidator"/>
|
||||||
|
|
||||||
<bean id="forgotPasswordController" class="com.wisemapping.controller.ForgotPasswordController">
|
<bean id="forgotPasswordController" class="com.wisemapping.controller.ForgotPasswordController">
|
||||||
<property name="sessionForm" value="false"/>
|
<property name="sessionForm" value="false"/>
|
||||||
<property name="commandName" value="forgotPassword"/>
|
<property name="commandName" value="forgotPassword"/>
|
||||||
<property name="commandClass" value="com.wisemapping.view.ForgotPasswordBean"/>
|
<property name="commandClass" value="com.wisemapping.view.ForgotPasswordBean"/>
|
||||||
<property name="validator" ref="forgotPasswordValidator"/>
|
<property name="validator" ref="forgotPasswordValidator"/>
|
||||||
<property name="formView" value="forgotPassword"/>
|
<property name="formView" value="forgotPassword"/>
|
||||||
<property name="successView" value="mindmap"/>
|
<property name="successView" value="mindmap"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="settingResolver" class="org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver">
|
<bean id="settingResolver" class="org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver">
|
||||||
<property name="mappings">
|
<property name="mappings">
|
||||||
<props>
|
<props>
|
||||||
<prop key="/c/settings.htm">settings</prop>
|
<prop key="/c/settings.htm">settings</prop>
|
||||||
</props>
|
</props>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="settingsController" class="com.wisemapping.controller.SettingsController">
|
<bean id="settingsController" class="com.wisemapping.controller.SettingsController">
|
||||||
<property name="methodNameResolver" ref="settingResolver"/>
|
<property name="methodNameResolver" ref="settingResolver"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="changePasswordValidator" class="com.wisemapping.validator.ChangePasswordValidator"/>
|
<bean id="changePasswordValidator" class="com.wisemapping.validator.ChangePasswordValidator"/>
|
||||||
<bean id="changePasswordController" class="com.wisemapping.controller.ChangePasswordController">
|
<bean id="changePasswordController" class="com.wisemapping.controller.ChangePasswordController">
|
||||||
<property name="sessionForm" value="false"/>
|
<property name="sessionForm" value="false"/>
|
||||||
<property name="commandName" value="changePassword"/>
|
<property name="commandName" value="changePassword"/>
|
||||||
<property name="commandClass" value="com.wisemapping.view.ChangePasswordBean"/>
|
<property name="commandClass" value="com.wisemapping.view.ChangePasswordBean"/>
|
||||||
<property name="validator" ref="changePasswordValidator"/>
|
<property name="validator" ref="changePasswordValidator"/>
|
||||||
<property name="formView" value="changePassword"/>
|
<property name="formView" value="changePassword"/>
|
||||||
<property name="successView" value="closeDialog"/>
|
<property name="successView" value="closeDialog"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="editProfileValidator" class="com.wisemapping.validator.EditProfileValidator">
|
<bean id="editProfileValidator" class="com.wisemapping.validator.EditProfileValidator">
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="editProfileController" class="com.wisemapping.controller.EditProfileController">
|
<bean id="editProfileController" class="com.wisemapping.controller.EditProfileController">
|
||||||
<property name="sessionForm" value="false"/>
|
<property name="sessionForm" value="false"/>
|
||||||
<property name="commandName" value="editProfile"/>
|
<property name="commandName" value="editProfile"/>
|
||||||
<property name="commandClass" value="com.wisemapping.view.UserBean"/>
|
<property name="commandClass" value="com.wisemapping.view.UserBean"/>
|
||||||
<property name="validator" ref="editProfileValidator"/>
|
<property name="validator" ref="editProfileValidator"/>
|
||||||
<property name="formView" value="editProfile"/>
|
<property name="formView" value="editProfile"/>
|
||||||
<property name="successView" value="closeDialog"/>
|
<property name="successView" value="closeDialog"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="renameMapValidator" class="com.wisemapping.validator.RenameMapValidator">
|
<bean id="renameMapValidator" class="com.wisemapping.validator.RenameMapValidator">
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="newMapValidator" class="com.wisemapping.validator.MapInfoValidator">
|
<bean id="newMapValidator" class="com.wisemapping.validator.MapInfoValidator">
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="importMapValidator" class="com.wisemapping.validator.ImportMapValidator">
|
<bean id="importMapValidator" class="com.wisemapping.validator.ImportMapValidator">
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="renameMapController" class="com.wisemapping.controller.RenameMindmapController">
|
<bean id="renameMapController" class="com.wisemapping.controller.RenameMindmapController">
|
||||||
<property name="sessionForm" value="false"/>
|
<property name="sessionForm" value="false"/>
|
||||||
<property name="commandName" value="renameMap"/>
|
<property name="commandName" value="renameMap"/>
|
||||||
<property name="commandClass" value="com.wisemapping.view.MindMapInfoBean"/>
|
<property name="commandClass" value="com.wisemapping.view.MindMapInfoBean"/>
|
||||||
<property name="validator" ref="renameMapValidator"/>
|
<property name="validator" ref="renameMapValidator"/>
|
||||||
<property name="formView" value="renameMap"/>
|
<property name="formView" value="renameMap"/>
|
||||||
<property name="successView" value="closeDialog"/>
|
<property name="successView" value="closeDialog"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="historyController" class="com.wisemapping.controller.HistoryController">
|
<bean id="historyController" class="com.wisemapping.controller.HistoryController">
|
||||||
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="newMapController" class="com.wisemapping.controller.NewMindmapController">
|
<bean id="newMapController" class="com.wisemapping.controller.NewMindmapController">
|
||||||
<property name="sessionForm" value="false"/>
|
<property name="sessionForm" value="false"/>
|
||||||
<property name="commandName" value="newMap"/>
|
<property name="commandName" value="newMap"/>
|
||||||
<property name="commandClass" value="com.wisemapping.view.MindMapInfoBean"/>
|
<property name="commandClass" value="com.wisemapping.view.MindMapInfoBean"/>
|
||||||
<property name="validator" ref="newMapValidator"/>
|
<property name="validator" ref="newMapValidator"/>
|
||||||
<property name="formView" value="newMap"/>
|
<property name="formView" value="newMap"/>
|
||||||
<property name="errorView" value="newMapError"/>
|
<property name="errorView" value="newMapError"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
|
||||||
<bean id="importMapController" class="com.wisemapping.controller.ImportController">
|
<bean id="importMapController" class="com.wisemapping.controller.ImportController">
|
||||||
<property name="sessionForm" value="false"/>
|
<property name="sessionForm" value="false"/>
|
||||||
<property name="commandName" value="importMap"/>
|
<property name="commandName" value="importMap"/>
|
||||||
<property name="commandClass" value="com.wisemapping.view.ImportMapBean"/>
|
<property name="commandClass" value="com.wisemapping.view.ImportMapBean"/>
|
||||||
<property name="validator" ref="importMapValidator"/>
|
<property name="validator" ref="importMapValidator"/>
|
||||||
<property name="formView" value="importMap"/>
|
<property name="formView" value="importMap"/>
|
||||||
<property name="errorView" value="importMapError"/>
|
<property name="errorView" value="importMapError"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="tagValidator" class="com.wisemapping.validator.TagValidator">
|
<bean id="tagValidator" class="com.wisemapping.validator.TagValidator">
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="tagsController" class="com.wisemapping.controller.TagsController">
|
<bean id="tagsController" class="com.wisemapping.controller.TagsController">
|
||||||
<property name="sessionForm" value="false"/>
|
<property name="sessionForm" value="false"/>
|
||||||
<property name="commandName" value="tag"/>
|
<property name="commandName" value="tag"/>
|
||||||
<property name="commandClass" value="com.wisemapping.view.TagBean"/>
|
<property name="commandClass" value="com.wisemapping.view.TagBean"/>
|
||||||
<property name="validator" ref="tagValidator"/>
|
<property name="validator" ref="tagValidator"/>
|
||||||
<property name="formView" value="mindmapTags"/>
|
<property name="formView" value="mindmapTags"/>
|
||||||
<property name="successView" value="closeDialog"/>
|
<property name="successView" value="closeDialog"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="multipartResolver"
|
<bean id="multipartResolver"
|
||||||
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
||||||
<!-- one of the properties available; the maximum file size in bytes -->
|
<!-- one of the properties available; the maximum file size in bytes -->
|
||||||
<property name="maxUploadSize" value="522240"/>
|
<property name="maxUploadSize" value="522240"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="activationController" class="com.wisemapping.controller.ActivationController">
|
<bean id="activationController" class="com.wisemapping.controller.ActivationController">
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="searchController" class="com.wisemapping.controller.SearchController">
|
<bean id="searchController" class="com.wisemapping.controller.SearchController">
|
||||||
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="keyboardController" class="com.wisemapping.controller.KeyboardController">
|
<bean id="keyboardController" class="com.wisemapping.controller.KeyboardController">
|
||||||
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="publicView" class="com.wisemapping.controller.PublicViewController">
|
<bean id="publicView" class="com.wisemapping.controller.PublicViewController">
|
||||||
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="embeddedView" class="com.wisemapping.controller.EmbeddedViewController">
|
<bean id="embeddedView" class="com.wisemapping.controller.EmbeddedViewController">
|
||||||
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
<property name="methodNameResolver" ref="paramResolverByAction"/>
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="captchaController" class="com.wisemapping.controller.CaptchaController">
|
<!--<bean id="captchaController" class="com.wisemapping.controller.CaptchaController">-->
|
||||||
<property name="captchaService" ref="captchaService"/>
|
<!--<property name="captchaService" ref="captchaService"/>-->
|
||||||
</bean>
|
<!--</bean>-->
|
||||||
|
|
||||||
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
|
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
|
||||||
<property name="interceptors">
|
<property name="interceptors">
|
||||||
<list>
|
<list>
|
||||||
<ref bean="browserSupportInterceptor"/>
|
<ref bean="browserSupportInterceptor"/>
|
||||||
<ref bean="localeChangeInterceptor"/>
|
<ref bean="localeChangeInterceptor"/>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
<property name="mappings">
|
<property name="mappings">
|
||||||
<props>
|
<props>
|
||||||
<prop key="/c/mymaps.htm">mindmapController</prop>
|
<prop key="/c/mymaps.htm">mindmapController</prop>
|
||||||
<prop key="/c/userRegistration.htm">userController</prop>
|
<prop key="/c/userRegistration.htm">userController</prop>
|
||||||
<prop key="/c/sharing.htm">sharingController</prop>
|
<prop key="/c/sharing.htm">sharingController</prop>
|
||||||
<prop key="/c/home.htm">homeController</prop>
|
<prop key="/c/home.htm">homeController</prop>
|
||||||
<prop key="/c/login.htm">loginController</prop>
|
<prop key="/c/login.htm">loginController</prop>
|
||||||
<prop key="/c/captcha.htm">captchaController</prop>
|
<prop key="/c/forgotPassword.htm">forgotPasswordController</prop>
|
||||||
<prop key="/c/forgotPassword.htm">forgotPasswordController</prop>
|
<prop key="/c/activation.htm">activationController</prop>
|
||||||
<prop key="/c/activation.htm">activationController</prop>
|
<prop key="/c/changePassword.htm">changePasswordController</prop>
|
||||||
<prop key="/c/changePassword.htm">changePasswordController</prop>
|
<prop key="/c/editor.htm">editorController</prop>
|
||||||
<prop key="/c/editor.htm">editorController</prop>
|
<prop key="/c/cooker.htm">cookerController</prop>
|
||||||
<prop key="/c/cooker.htm">cookerController</prop>
|
<prop key="/c/settings.htm">settingsController</prop>
|
||||||
<prop key="/c/settings.htm">settingsController</prop>
|
<prop key="/c/export.htm">exportController</prop>
|
||||||
<prop key="/c/export.htm">exportController</prop>
|
<prop key="/c/publish.htm">publishController</prop>
|
||||||
<prop key="/c/publish.htm">publishController</prop>
|
<prop key="/c/editProfile.htm">editProfileController</prop>
|
||||||
<prop key="/c/editProfile.htm">editProfileController</prop>
|
<prop key="/c/tags.htm">tagsController</prop>
|
||||||
<prop key="/c/tags.htm">tagsController</prop>
|
<prop key="/c/search.htm">searchController</prop>
|
||||||
<prop key="/c/search.htm">searchController</prop>
|
<prop key="/c/keyboard.htm">keyboardController</prop>
|
||||||
<prop key="/c/keyboard.htm">keyboardController</prop>
|
<prop key="/c/publicView.htm">publicView</prop>
|
||||||
<prop key="/c/publicView.htm">publicView</prop>
|
<prop key="/c/embeddedView.htm">embeddedView</prop>
|
||||||
<prop key="/c/embeddedView.htm">embeddedView</prop>
|
<prop key="/c/renameMap.htm">renameMapController</prop>
|
||||||
<prop key="/c/renameMap.htm">renameMapController</prop>
|
<prop key="/c/importMap.htm">importMapController</prop>
|
||||||
<prop key="/c/importMap.htm">importMapController</prop>
|
<prop key="/c/newMap.htm">newMapController</prop>
|
||||||
<prop key="/c/newMap.htm">newMapController</prop>
|
<prop key="/c/history.htm">historyController</prop>
|
||||||
<prop key="/c/history.htm">historyController</prop>
|
<prop key="/c/installCFG.htm">homeController</prop>
|
||||||
<prop key="/c/installCFG.htm">homeController</prop>
|
</props>
|
||||||
</props>
|
</property>
|
||||||
</property>
|
</bean>
|
||||||
</bean>
|
|
||||||
|
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||||
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
<property name="viewClass" value="org.springframework.web.servlet.view.tiles.TilesJstlView"/>
|
||||||
<property name="viewClass" value="org.springframework.web.servlet.view.tiles.TilesJstlView"/>
|
</bean>
|
||||||
</bean>
|
|
||||||
|
<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles.TilesConfigurer">
|
||||||
<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles.TilesConfigurer">
|
<property name="definitions">
|
||||||
<property name="definitions">
|
<list>
|
||||||
<list>
|
<value>/WEB-INF/defs/definitions.xml</value>
|
||||||
<value>/WEB-INF/defs/definitions.xml</value>
|
</list>
|
||||||
</list>
|
</property>
|
||||||
</property>
|
</bean>
|
||||||
</bean>
|
|
||||||
|
<bean id="localeResolver"
|
||||||
<bean id="localeResolver"
|
class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
|
||||||
class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
|
<property name="defaultLocale" value="en"/>
|
||||||
<property name="defaultLocale" value="en"/>
|
</bean>
|
||||||
</bean>
|
|
||||||
|
<bean id="localeChangeInterceptor"
|
||||||
<bean id="localeChangeInterceptor"
|
class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
|
||||||
class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
|
<property name="paramName" value="language"/>
|
||||||
<property name="paramName" value="language"/>
|
</bean>
|
||||||
</bean>
|
|
||||||
|
|
||||||
|
|
||||||
</beans>
|
</beans>
|
@ -1,46 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
|
||||||
|
|
||||||
<beans>
|
|
||||||
<bean id="wiseservices" class="org.springframework.ws.wsdl.wsdl11.SimpleWsdl11Definition">
|
|
||||||
<constructor-arg value="/WEB-INF/wiseservices.wsdl"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="orderEndpoint" class="com.wisemapping.ws.WiseWsEndpoint">
|
|
||||||
<constructor-arg ref="mindmapService"/>
|
|
||||||
<constructor-arg ref="userService"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean class="org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter">
|
|
||||||
<constructor-arg ref="marshaller"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
|
|
||||||
<property name="classesToBeBound">
|
|
||||||
<list>
|
|
||||||
<value>com.wisemapping.ws.LoadMindmapRequest</value>
|
|
||||||
<value>com.wisemapping.ws.LoadMindmapResponse</value>
|
|
||||||
<value>com.wisemapping.ws.AddMindmapRequest</value>
|
|
||||||
<value>com.wisemapping.ws.AddMindmapResponse</value>
|
|
||||||
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
<bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping"/>
|
|
||||||
|
|
||||||
<!-- Security -->
|
|
||||||
<!--<bean id="springSecurityHandler"-->
|
|
||||||
<!--class="org.springframework.ws.soap.security.xwss.callback.SpringPlainTextPasswordValidationCallbackHandler">-->
|
|
||||||
<!--<property name="authenticationManager" ref="wsAuthenticationManager"/>-->
|
|
||||||
<!--</bean>-->
|
|
||||||
|
|
||||||
<!--<bean id="wsAuthenticationManager" class="org.springframework.security.providers.ProviderManager">-->
|
|
||||||
<!--<property name="providers">-->
|
|
||||||
<!--<bean class="org.springframework.security.providers.dao.DaoAuthenticationProvider">-->
|
|
||||||
<!--<property name="userDetailsService" ref="userDetailsService"/>-->
|
|
||||||
<!--</bean>-->
|
|
||||||
<!--</property>-->
|
|
||||||
<!--</bean>-->
|
|
||||||
|
|
||||||
|
|
||||||
</beans>
|
|
@ -1,20 +1,20 @@
|
|||||||
<%@ page import="org.acegisecurity.context.SecurityContextHolder" %>
|
<%--<%@ page import="org.acegisecurity.context.SecurityContextHolder" %>--%>
|
||||||
<%@ page import="org.acegisecurity.Authentication" %>
|
<%--<%@ page import="org.acegisecurity.Authentication" %>--%>
|
||||||
<%@ page import="org.acegisecurity.ui.AccessDeniedHandlerImpl" %>
|
<%--<%@ page import="org.acegisecurity.ui.AccessDeniedHandlerImpl" %>--%>
|
||||||
|
|
||||||
<h1>Sorry, access is denied</h1>
|
<%--<h1>Sorry, access is denied</h1>--%>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<%--<p>--%>
|
||||||
<%= request.getAttribute(AccessDeniedHandlerImpl.ACEGI_SECURITY_ACCESS_DENIED_EXCEPTION_KEY)%>
|
<%--<%= request.getAttribute(AccessDeniedHandlerImpl.ACEGI_SECURITY_ACCESS_DENIED_EXCEPTION_KEY)%>--%>
|
||||||
|
|
||||||
<p>
|
<%--<p>--%>
|
||||||
|
|
||||||
<%
|
<%--<%--%>
|
||||||
|
|
||||||
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
<%--Authentication auth = SecurityContextHolder.getContext().getAuthentication();--%>
|
||||||
if (auth != null) {
|
<%--if (auth != null) {--%>
|
||||||
|
|
||||||
%>
|
<%--%>--%>
|
||||||
Authentication object as a String: <%= auth.toString() %><BR><BR>
|
<%--Authentication object as a String: <%= auth.toString() %><BR><BR>--%>
|
||||||
<% } %>
|
<%--<% } %>--%>
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="../css/embedded.css"/>
|
<link rel="stylesheet" type="text/css" href="../css/embedded.css"/>
|
||||||
|
|
||||||
<script type='text/javascript' src='../js/libraries/mootools/mootools-core-1.3.2-full-compress.js'></script>
|
<script type='text/javascript' src='../js/mootools-core.js'></script>
|
||||||
<script type='text/javascript' src='../js/libraries/mootools/mootools-more-1.3.2.1-yui.js'></script>
|
<script type='text/javascript' src='../js/mootools-more.js'></script>
|
||||||
<script type='text/javascript' src='../js/core.js'></script>
|
<script type='text/javascript' src='../js/core.js'></script>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<%
|
<%
|
||||||
response.sendRedirect(request.getContextPath() + "/c/login.htm");
|
response.sendRedirect(request.getContextPath() + "/c/mymaps.htm");
|
||||||
%>
|
%>
|
@ -1,106 +1,106 @@
|
|||||||
<%@ include file="/jsp/init.jsp" %>
|
<%@ include file="/jsp/init.jsp" %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
if(typeof isOldIE != "undefined"){
|
if(typeof isOldIE != "undefined"){
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
var simpleButtonGenerator = RUZEE.ShadedBorder.create({ corner:8, border:1 });
|
var simpleButtonGenerator = RUZEE.ShadedBorder.create({ corner:8, border:1 });
|
||||||
simpleButtonGenerator.render('login');
|
simpleButtonGenerator.render('login');
|
||||||
|
|
||||||
$('submitButton').onclick = displayLoading;
|
$('submitButton').onclick = displayLoading;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="loginContent">
|
<div id="loginContent">
|
||||||
|
|
||||||
<div id="news" class="sb">
|
<div id="news" class="sb">
|
||||||
<h1>What is New: </h1>
|
<h1>What is New: </h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Links Between Nodes</li>
|
<li>Links Between Nodes</li>
|
||||||
<li>FreeMind 0.9 Update</li>
|
<li>FreeMind 0.9 Update</li>
|
||||||
<li>Improved HTML 5.0 Support</li>
|
<li>Improved HTML 5.0 Support</li>
|
||||||
<li>Firefox 4.0 is officially supported</li>
|
<li>Firefox 4.0 is officially supported</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="login" class="sb">
|
<div id="login" class="sb">
|
||||||
<h1>
|
<h1>
|
||||||
<spring:message code="SIGN_IN"/>
|
<spring:message code="SIGN_IN"/>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<form action="<c:url value='j_acegi_security_check'/>" method="POST">
|
<form action="<c:url value='/j_spring_security_check'/>" method="POST">
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<c:if test="${not empty param.login_error}">
|
<c:if test="${not empty param.login_error}">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td class="errorMsg">
|
<td class="errorMsg">
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${param.login_error == 3}">
|
<c:when test="${param.login_error == 3}">
|
||||||
<spring:message code="USER_INACTIVE"/>
|
<spring:message code="USER_INACTIVE"/>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
<spring:message code="LOGIN_ERROR"/>
|
<spring:message code="LOGIN_ERROR"/>
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</c:if>
|
</c:if>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="formLabel">
|
<td class="formLabel">
|
||||||
<spring:message code="EMAIL"/>
|
<spring:message code="EMAIL"/>
|
||||||
:
|
:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type='text' tabindex="1" id="email" name='j_username'/>
|
<input type='text' tabindex="1" id="email" name='j_username'/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="formLabel">
|
<td class="formLabel">
|
||||||
<spring:message code="PASSWORD"/>
|
<spring:message code="PASSWORD"/>
|
||||||
:
|
:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type='password' tabindex="2" id="password" name='j_password'/>
|
<input type='password' tabindex="2" id="password" name='j_password'/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="formLabel">
|
<td class="formLabel">
|
||||||
<input type="checkbox" id="rememberme" name="_acegi_security_remember_me"/>
|
<input type="checkbox" id="rememberme" name="_spring_security_remember_me"/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<spring:message code="REMEMBER_ME"/>
|
<spring:message code="REMEMBER_ME"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td>
|
<td>
|
||||||
<input type="submit" class="btn-primary" id="submitButton"
|
<input type="submit" class="btn-primary" id="submitButton"
|
||||||
value="<spring:message code="SIGN_IN"/>">
|
value="<spring:message code="SIGN_IN"/>">
|
||||||
|
|
||||||
<div style="text-align:right;"><a href="<c:url value="forgotPassword.htm"/>">
|
<div style="text-align:right;"><a href="<c:url value="forgotPassword.htm"/>">
|
||||||
<spring:message code="FORGOT_PASSWORD"/>
|
<spring:message code="FORGOT_PASSWORD"/>
|
||||||
</a></div>
|
</a></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="register">
|
<div id="register">
|
||||||
<b>
|
<b>
|
||||||
<spring:message code="NOT_READY_A_USER"/>
|
<spring:message code="NOT_READY_A_USER"/>
|
||||||
</b>
|
</b>
|
||||||
<spring:message code="NOT_READY_A_USER_MESSAGE"/>
|
<spring:message code="NOT_READY_A_USER_MESSAGE"/>
|
||||||
<a href="userRegistration.htm">
|
<a href="userRegistration.htm">
|
||||||
<spring:message code="JOIN_NOW"/>
|
<spring:message code="JOIN_NOW"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<c:if test="${isHsql== 'true'}">
|
<c:if test="${isHsql== 'true'}">
|
||||||
|
|
||||||
|
|
||||||
<div style="padding:10px;background-color: #E0EFFF; border-radius: 5px 5px 5px 5px;border-style:solid;border-color:gray"><img src="../images/info.png" style="margin:0px 4px">Note: Although HSQLDB is bundled with WiseMapping by default during the installation, we do not recommend this database for production use. Please consider using MySQL 5.5 instead. You can find more information how to configure MySQL <a href="http://www.wisemapping.org/documentation/configu">here</a>.</div>
|
<div style="padding:10px;background-color: #E0EFFF; border-radius: 5px 5px 5px 5px;border-style:solid;border-color:gray"><img src="../images/info.png" style="margin:0px 4px">Note: Although HSQLDB is bundled with WiseMapping by default during the installation, we do not recommend this database for production use. Please consider using MySQL 5.5 instead. You can find more information how to configure MySQL <a href="http://www.wisemapping.org/documentation/configu">here</a>.</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
@ -1,454 +1,454 @@
|
|||||||
<!DOCTYPE HTML>
|
<!DOCTYPE HTML>
|
||||||
|
|
||||||
<%@ page import="com.wisemapping.view.MindMapBean" %>
|
<%@ page import="com.wisemapping.view.MindMapBean" %>
|
||||||
<%@ page import="java.util.List" %>
|
<%@ page import="java.util.List" %>
|
||||||
<%@ page import="java.util.Collections" %>
|
<%@ page import="java.util.Collections" %>
|
||||||
<%@ page import="java.util.ArrayList" %>
|
<%@ page import="java.util.ArrayList" %>
|
||||||
<%@ include file="/jsp/init.jsp" %>
|
<%@ include file="/jsp/init.jsp" %>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>
|
<title>
|
||||||
<spring:message code="SITE.TITLE"/>
|
<spring:message code="SITE.TITLE"/>
|
||||||
</title>
|
</title>
|
||||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
|
||||||
<link rel="stylesheet" type="text/css" href="../css/mymaps.css"/>
|
<link rel="stylesheet" type="text/css" href="../css/mymaps.css"/>
|
||||||
<link rel="icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"/>
|
<link rel="icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"/>
|
||||||
<link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"/>
|
<link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"/>
|
||||||
<script type='text/javascript' src='../js/libraries/mootools/mootools-core-1.3.2-full-compress.js'></script>
|
<script type='text/javascript' src='../js/mootools-core.js'></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<jsp:include page="header.jsp">
|
<jsp:include page="header.jsp">
|
||||||
<jsp:param name="removeSignin" value="false"/>
|
<jsp:param name="removeSignin" value="false"/>
|
||||||
<jsp:param name="showLogout" value="true"/>
|
<jsp:param name="showLogout" value="true"/>
|
||||||
</jsp:include>
|
</jsp:include>
|
||||||
|
|
||||||
|
|
||||||
<c:url value="mymaps.htm" var="mapDetail">
|
<c:url value="mymaps.htm" var="mapDetail">
|
||||||
<c:param name="action" value="detail"/>
|
<c:param name="action" value="detail"/>
|
||||||
</c:url>
|
</c:url>
|
||||||
<c:url value="mymaps.htm" var="deleteSelectedMapUrl">
|
<c:url value="mymaps.htm" var="deleteSelectedMapUrl">
|
||||||
<c:param name="action" value="deleteAll"/>
|
<c:param name="action" value="deleteAll"/>
|
||||||
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
|
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
|
||||||
</c:url>
|
</c:url>
|
||||||
|
|
||||||
<div id="mapListContainer">
|
<div id="mapListContainer">
|
||||||
|
|
||||||
<div id="myDocsContainer">
|
<div id="myDocsContainer">
|
||||||
|
|
||||||
<div id="recentFiles" class="sb">
|
<div id="recentFiles" class="sb">
|
||||||
<div id="recentText">
|
<div id="recentText">
|
||||||
<spring:message code="RECENT_FILES"/>
|
<spring:message code="RECENT_FILES"/>
|
||||||
</div>
|
</div>
|
||||||
<div id="recentItems" class="sb">
|
<div id="recentItems" class="sb">
|
||||||
<div class="recentItemContainer">
|
<div class="recentItemContainer">
|
||||||
<%
|
<%
|
||||||
int MAX_RECENT_MAPS = 6;
|
int MAX_RECENT_MAPS = 6;
|
||||||
List<MindMapBean> list = (List<MindMapBean>) request.getAttribute("wisemapsList");
|
List<MindMapBean> list = (List<MindMapBean>) request.getAttribute("wisemapsList");
|
||||||
if (list != null && !list.isEmpty()) {
|
if (list != null && !list.isEmpty()) {
|
||||||
List<MindMapBean> recentMaps = new ArrayList<MindMapBean>();
|
List<MindMapBean> recentMaps = new ArrayList<MindMapBean>();
|
||||||
recentMaps.addAll(list);
|
recentMaps.addAll(list);
|
||||||
Collections.sort(recentMaps, new MindMapBean.MindMapBeanComparator());
|
Collections.sort(recentMaps, new MindMapBean.MindMapBeanComparator());
|
||||||
for (int i = recentMaps.size() - 1; i >= 0 && i >= recentMaps.size() - MAX_RECENT_MAPS; i--) {
|
for (int i = recentMaps.size() - 1; i >= 0 && i >= recentMaps.size() - MAX_RECENT_MAPS; i--) {
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<div class="recentItemIcon"></div>
|
<div class="recentItemIcon"></div>
|
||||||
<div class="recentItemTitle">
|
<div class="recentItemTitle">
|
||||||
<a href="javascript:openMap('<%=recentMaps.get(i).getId()%>')">
|
<a href="javascript:openMap('<%=recentMaps.get(i).getId()%>')">
|
||||||
<%=recentMaps.get(i).getTitle()%>
|
<%=recentMaps.get(i).getTitle()%>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
%>
|
%>
|
||||||
<div class="recentItemTitle">
|
<div class="recentItemTitle">
|
||||||
<spring:message code="EMPTY_MINDMAP_TABLE"/>
|
<spring:message code="EMPTY_MINDMAP_TABLE"/>
|
||||||
</div>
|
</div>
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="mydocs">
|
<div id="mydocs">
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<input id="selectedMapIds" type="hidden" value=""/>
|
<input id="selectedMapIds" type="hidden" value=""/>
|
||||||
|
|
||||||
<div class="leftMenu">
|
<div class="leftMenu">
|
||||||
<div class="button">
|
<div class="button">
|
||||||
<a href="newMap.htm" rel="moodalbox 500px 190px" title="<spring:message code="NEW_MAP_MSG"/>">
|
<a href="newMap.htm" rel="moodalbox 500px 190px" title="<spring:message code="NEW_MAP_MSG"/>">
|
||||||
<spring:message code="NEW_MINDMAP"/>
|
<spring:message code="NEW_MINDMAP"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="button menuLink"
|
<div class="button menuLink"
|
||||||
onclick="updateLinks($(this).getParent()); new Windoo.Confirm('<spring:message code="DELETE_SELECTED_CONFIRMATION"/>',
|
onclick="updateLinks($(this).getParent()); new Windoo.Confirm('<spring:message code="DELETE_SELECTED_CONFIRMATION"/>',
|
||||||
{
|
{
|
||||||
'window': {theme:Windoo.Themes.wise,
|
'window': {theme:Windoo.Themes.wise,
|
||||||
title:'<spring:message code="DELETE_MAP"/>'
|
title:'<spring:message code="DELETE_MAP"/>'
|
||||||
},
|
},
|
||||||
'onConfirm':function(){
|
'onConfirm':function(){
|
||||||
$(document.toolbarForm.mindmapIds).value=$('selectedMapIds').value;
|
$(document.toolbarForm.mindmapIds).value=$('selectedMapIds').value;
|
||||||
$(document.toolbarForm).action='<c:out value="${deleteSelectedMapUrl}" escapeXml="true"/>';
|
$(document.toolbarForm).action='<c:out value="${deleteSelectedMapUrl}" escapeXml="true"/>';
|
||||||
$(document.toolbarForm).submit();
|
$(document.toolbarForm).submit();
|
||||||
}
|
}
|
||||||
});">
|
});">
|
||||||
<spring:message code="DELETE_SELECTED"/>
|
<spring:message code="DELETE_SELECTED"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="button">
|
<div class="button">
|
||||||
<a href="importMap.htm" rel="moodalbox 500px 250px" title="<spring:message code="IMPORT_MINDMAP_DETAILS"/>">
|
<a href="importMap.htm" rel="moodalbox 500px 250px" title="<spring:message code="IMPORT_MINDMAP_DETAILS"/>">
|
||||||
<spring:message code="IMPORT_MINDMAP"/>
|
<spring:message code="IMPORT_MINDMAP"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<c:url value="mymaps.htm" var="shareMap">
|
<c:url value="mymaps.htm" var="shareMap">
|
||||||
<c:param name="action" value="collaborator"/>
|
<c:param name="action" value="collaborator"/>
|
||||||
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
|
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
|
||||||
</c:url>
|
</c:url>
|
||||||
<c:url value="mymaps.htm" var="deleteMapUrl">
|
<c:url value="mymaps.htm" var="deleteMapUrl">
|
||||||
<c:param name="action" value="delete"/>
|
<c:param name="action" value="delete"/>
|
||||||
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
|
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
|
||||||
</c:url>
|
</c:url>
|
||||||
<c:url value="mymaps.htm" var="changeStatus">
|
<c:url value="mymaps.htm" var="changeStatus">
|
||||||
<c:param name="action" value="changeStatus"/>
|
<c:param name="action" value="changeStatus"/>
|
||||||
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
|
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
|
||||||
</c:url>
|
</c:url>
|
||||||
<div id="docTable">
|
<div id="docTable">
|
||||||
<table>
|
<table>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width:3%;"/>
|
<col style="width:3%;"/>
|
||||||
<col style="width:3%;"/>
|
<col style="width:3%;"/>
|
||||||
<col style="width:15%;"/>
|
<col style="width:15%;"/>
|
||||||
<col style="width:30%;"/>
|
<col style="width:30%;"/>
|
||||||
<col style="width:14%;"/>
|
<col style="width:14%;"/>
|
||||||
<col style="width:10%;"/>
|
<col style="width:10%;"/>
|
||||||
<col style="width:20%;"/>
|
<col style="width:20%;"/>
|
||||||
<col style="width:5%;"/>
|
<col style="width:5%;"/>
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="text-align:center">
|
<th style="text-align:center">
|
||||||
<label for="checkAll"></label><input id="checkAll" type="checkbox" onchange="selectAllMaps(this);">
|
<label for="checkAll"></label><input id="checkAll" type="checkbox" onchange="selectAllMaps(this);">
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<spring:message code="FILE"/>
|
<spring:message code="FILE"/>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<spring:message code="NAME"/>
|
<spring:message code="NAME"/>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<spring:message code="DESCRIPTION"/>
|
<spring:message code="DESCRIPTION"/>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th>
|
<th>
|
||||||
<spring:message code="STATUS"/>
|
<spring:message code="STATUS"/>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<spring:message code="CREATOR"/>
|
<spring:message code="CREATOR"/>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<spring:message code="LAST_EDITOR"/>
|
<spring:message code="LAST_EDITOR"/>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<c:forEach items="${wisemapsList}" var="mindmap">
|
<c:forEach items="${wisemapsList}" var="mindmap">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div style="text-align:center;"><input type="checkbox" name="chk" id="chk${mindmap.id}"
|
<div style="text-align:center;"><input type="checkbox" name="chk" id="chk${mindmap.id}"
|
||||||
onclick="addToSelectedMapList(this);"></div>
|
onclick="addToSelectedMapList(this);"></div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="leftMenu">
|
<div class="leftMenu">
|
||||||
<img src="../images/icon_list.png" class="button" style="display:block;border:0;">
|
<img src="../images/icon_list.png" class="button" style="display:block;border:0;">
|
||||||
|
|
||||||
<div class="subMenu2">
|
<div class="subMenu2">
|
||||||
<a href="javascript:openMap('${mindmap.id}')" title="<spring:message code="OPEN_MSG"/>">
|
<a href="javascript:openMap('${mindmap.id}')" title="<spring:message code="OPEN_MSG"/>">
|
||||||
<spring:message code="OPEN"/>
|
<spring:message code="OPEN"/>
|
||||||
</a>
|
</a>
|
||||||
<c:if test="${mindmap.owner==requestScope.user}">
|
<c:if test="${mindmap.owner==requestScope.user}">
|
||||||
<a href="renameMap.htm?mapId=${mindmap.id}" rel="moodalbox 400px 180px wizard"
|
<a href="renameMap.htm?mapId=${mindmap.id}" rel="moodalbox 400px 180px wizard"
|
||||||
title="<spring:message code="RENAME_DETAILS"/>">
|
title="<spring:message code="RENAME_DETAILS"/>">
|
||||||
<spring:message code="RENAME"/>
|
<spring:message code="RENAME"/>
|
||||||
</a>
|
</a>
|
||||||
</c:if>
|
</c:if>
|
||||||
<a href="history.htm?action=list&goToMindmapList&mapId=${mindmap.id}"
|
<a href="history.htm?action=list&goToMindmapList&mapId=${mindmap.id}"
|
||||||
rel="moodalbox 600px 400px wizard" title="<spring:message code="HISTORY_INFO"/>">
|
rel="moodalbox 600px 400px wizard" title="<spring:message code="HISTORY_INFO"/>">
|
||||||
<spring:message code="HISTORY"/>
|
<spring:message code="HISTORY"/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="menuButton menuLink subMenu2Sep"
|
<div class="menuButton menuLink subMenu2Sep"
|
||||||
onclick="new Windoo.Confirm('<spring:message code="DELETE_CONFIRMATION"/>',
|
onclick="new Windoo.Confirm('<spring:message code="DELETE_CONFIRMATION"/>',
|
||||||
{
|
{
|
||||||
window: {'theme':Windoo.Themes.wise,
|
window: {'theme':Windoo.Themes.wise,
|
||||||
title:'<spring:message code="DELETE_MAP"/>'
|
title:'<spring:message code="DELETE_MAP"/>'
|
||||||
},
|
},
|
||||||
'onConfirm':function(){
|
'onConfirm':function(){
|
||||||
var form = new Element('form').setProperties({action: '<c:out value="${deleteMapUrl}" escapeXml="true"/>&mapId=${mindmap.id}', method:'post'}).injectInside(document.body);
|
var form = new Element('form').setProperties({action: '<c:out value="${deleteMapUrl}" escapeXml="true"/>&mapId=${mindmap.id}', method:'post'}).injectInside(document.body);
|
||||||
form.submit();
|
form.submit();
|
||||||
}
|
}
|
||||||
});">
|
});">
|
||||||
<spring:message code="DELETE"/>
|
<spring:message code="DELETE"/>
|
||||||
</div>
|
</div>
|
||||||
<a href="tags.htm?mapId=${mindmap.id}" rel="moodalbox 400px 200px wizard"
|
<a href="tags.htm?mapId=${mindmap.id}" rel="moodalbox 400px 200px wizard"
|
||||||
title="<spring:message code="TAGS_DETAILS"/>">
|
title="<spring:message code="TAGS_DETAILS"/>">
|
||||||
<spring:message code="TAGS"/>
|
<spring:message code="TAGS"/>
|
||||||
</a>
|
</a>
|
||||||
<c:if test="${mindmap.owner==requestScope.user}">
|
<c:if test="${mindmap.owner==requestScope.user}">
|
||||||
<a href="<c:out value="${shareMap}" escapeXml="true"/>&mapId=${mindmap.id}"
|
<a href="<c:out value="${shareMap}" escapeXml="true"/>&mapId=${mindmap.id}"
|
||||||
rel="moodalbox 780px 530px wizard"
|
rel="moodalbox 780px 530px wizard"
|
||||||
title="<spring:message code="SHARE_DETAILS"/>">
|
title="<spring:message code="SHARE_DETAILS"/>">
|
||||||
<spring:message code="COLLABORATION"/>
|
<spring:message code="COLLABORATION"/>
|
||||||
</a>
|
</a>
|
||||||
<a class="subMenu2Sep" href="publish.htm?mapId=${mindmap.id}"
|
<a class="subMenu2Sep" href="publish.htm?mapId=${mindmap.id}"
|
||||||
rel="moodalbox 600px 400px wizard" title="<spring:message code="PUBLISH_MSG"/>">
|
rel="moodalbox 600px 400px wizard" title="<spring:message code="PUBLISH_MSG"/>">
|
||||||
<spring:message code="PUBLISH"/>
|
<spring:message code="PUBLISH"/>
|
||||||
</a>
|
</a>
|
||||||
</c:if>
|
</c:if>
|
||||||
<%--<a href="export.htm?mapId=${mindmap.id}"
|
<%--<a href="export.htm?mapId=${mindmap.id}"
|
||||||
rel="moodalbox 600px 400px" title="<spring:message code="EXPORT_DETAILS"/>">
|
rel="moodalbox 600px 400px" title="<spring:message code="EXPORT_DETAILS"/>">
|
||||||
<spring:message code="EXPORT"/>
|
<spring:message code="EXPORT"/>
|
||||||
</a>--%>
|
</a>--%>
|
||||||
<%--<a href="javascript:printMap(${mindmap.id});">
|
<%--<a href="javascript:printMap(${mindmap.id});">
|
||||||
<spring:message code="PRINT"/>
|
<spring:message code="PRINT"/>
|
||||||
</a>--%>
|
</a>--%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div>
|
<div>
|
||||||
<div class="mapTitle">
|
<div class="mapTitle">
|
||||||
<a href="javascript:openMap('${mindmap.id}')">
|
<a href="javascript:openMap('${mindmap.id}')">
|
||||||
${mindmap.title}
|
${mindmap.title}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="mapTags">
|
<div class="mapTags">
|
||||||
${mindmap.tags}
|
${mindmap.tags}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
${mindmap.description}
|
${mindmap.description}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${not mindmap.public}">
|
<c:when test="${not mindmap.public}">
|
||||||
<img src="../images/key.png"
|
<img src="../images/key.png"
|
||||||
title="<spring:message code="PRIVATE"/>: <spring:message code="ONLY_VIEW_PRIVATE"/>"
|
title="<spring:message code="PRIVATE"/>: <spring:message code="ONLY_VIEW_PRIVATE"/>"
|
||||||
alt="<spring:message code="PRIVATE"/>"/>
|
alt="<spring:message code="PRIVATE"/>"/>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
<img src="../images/world2.png"
|
<img src="../images/world2.png"
|
||||||
title="<spring:message code="PUBLIC"/>: <spring:message code="ALL_VIEW_PUBLIC"/>"
|
title="<spring:message code="PUBLIC"/>: <spring:message code="ALL_VIEW_PUBLIC"/>"
|
||||||
alt="World"
|
alt="World"
|
||||||
<spring:message code="PUBLIC"/>
|
<spring:message code="PUBLIC"/>
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
</td>
|
</td>
|
||||||
<td>${mindmap.creationUser}</td>
|
<td>${mindmap.creationUser}</td>
|
||||||
<td>${mindmap.lastEditDate} by ${mindmap.lastEditor}</td>
|
<td>${mindmap.lastEditDate} by ${mindmap.lastEditor}</td>
|
||||||
<td><a href="<c:out value="${mapDetail}" escapeXml="true"/>&mapId=${mindmap.id}">
|
<td><a href="<c:out value="${mapDetail}" escapeXml="true"/>&mapId=${mindmap.id}">
|
||||||
<spring:message code="DETAIL"/>
|
<spring:message code="DETAIL"/>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="ds1" class="submenu" style="display:none;">
|
<div id="ds1" class="submenu" style="display:none;">
|
||||||
<a href="<c:out value="${deleteSelectedMapUrl}" escapeXml="true"/>&mindmapIds=" rel="moodalbox 300px 120px">Delete</a>
|
<a href="<c:out value="${deleteSelectedMapUrl}" escapeXml="true"/>&mindmapIds=" rel="moodalbox 300px 120px">Delete</a>
|
||||||
<a href="#">Tag</a>
|
<a href="#">Tag</a>
|
||||||
<a href="#">Publish</a>
|
<a href="#">Publish</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="ds2" class="submenu" style="position:absolute; display:none;">
|
<div id="ds2" class="submenu" style="position:absolute; display:none;">
|
||||||
<a href="<c:out value="${shareMap}" escapeXml="true"/>&mapId=" rel="moodalbox 780px 530px"
|
<a href="<c:out value="${shareMap}" escapeXml="true"/>&mapId=" rel="moodalbox 780px 530px"
|
||||||
title="Share WiseMap">Share</a>
|
title="Share WiseMap">Share</a>
|
||||||
<a href="publish.htm?mapId=" rel="moodalbox 600px 400px wizard" title="<spring:message code="PUBLISH_DETAILS"/>">
|
<a href="publish.htm?mapId=" rel="moodalbox 600px 400px wizard" title="<spring:message code="PUBLISH_DETAILS"/>">
|
||||||
<spring:message code="PUBLISH"/>
|
<spring:message code="PUBLISH"/>
|
||||||
</a>
|
</a>
|
||||||
<a href="<c:out value="${deleteMapUrl}" escapeXml="true"/>&mapId=" rel="moodalbox 300px 120px"
|
<a href="<c:out value="${deleteMapUrl}" escapeXml="true"/>&mapId=" rel="moodalbox 300px 120px"
|
||||||
title="Delete Confirmation">
|
title="Delete Confirmation">
|
||||||
Delete
|
Delete
|
||||||
</a>
|
</a>
|
||||||
<a href="export.htm?mapId=" rel="moodalbox 750px 400px" title="<spring:message code="EXPORT_DETAILS"/>">
|
<a href="export.htm?mapId=" rel="moodalbox 750px 400px" title="<spring:message code="EXPORT_DETAILS"/>">
|
||||||
<spring:message code="EXPORT"/>
|
<spring:message code="EXPORT"/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<c:url value="editor.htm" var="mindmapEditorUrl"/>
|
<c:url value="editor.htm" var="mindmapEditorUrl"/>
|
||||||
<form name="openForm" action="${mindmapEditorUrl}" method="post">
|
<form name="openForm" action="${mindmapEditorUrl}" method="post">
|
||||||
<input type="hidden" name="action" value="open"/>
|
<input type="hidden" name="action" value="open"/>
|
||||||
<input type="hidden" name="mapId" value=""/>
|
<input type="hidden" name="mapId" value=""/>
|
||||||
</form>
|
</form>
|
||||||
<form name="toolbarForm" method="post">
|
<form name="toolbarForm" method="post">
|
||||||
<input type="hidden" name="mindmapIds"/>
|
<input type="hidden" name="mindmapIds"/>
|
||||||
</form>
|
</form>
|
||||||
<form method="post" id="printForm" name="printForm" action="<c:url value="export.htm"/>" target="new">
|
<form method="post" id="printForm" name="printForm" action="<c:url value="export.htm"/>" target="new">
|
||||||
<input type="hidden" name="action" value="print"/>
|
<input type="hidden" name="action" value="print"/>
|
||||||
<input type="hidden" name="mapId" value="${mindmap.id}"/>
|
<input type="hidden" name="mapId" value="${mindmap.id}"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function openMap(mapId) {
|
function openMap(mapId) {
|
||||||
document.openForm.mapId.value = mapId;
|
document.openForm.mapId.value = mapId;
|
||||||
document.openForm.submit();
|
document.openForm.submit();
|
||||||
}
|
}
|
||||||
function deleteOkButton(url) {
|
function deleteOkButton(url) {
|
||||||
var form = document.createElement('form');
|
var form = document.createElement('form');
|
||||||
form.method = 'post';
|
form.method = 'post';
|
||||||
form.action = url;
|
form.action = url;
|
||||||
document.body.appendChild(form);
|
document.body.appendChild(form);
|
||||||
form.submit();
|
form.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
Window.onDomReady(initDropDowns);
|
Window.onDomReady(initDropDowns);
|
||||||
function initDropDowns() {
|
function initDropDowns() {
|
||||||
$ES('li[rel="submenu"]', $(document.body)).each(function(el) {
|
$ES('li[rel="submenu"]', $(document.body)).each(function(el) {
|
||||||
var items = $E('ul', el);
|
var items = $E('ul', el);
|
||||||
el.addEvent('click', showMenu.bind(items));
|
el.addEvent('click', showMenu.bind(items));
|
||||||
}, this);
|
}, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
function showMenu(evt) {
|
function showMenu(evt) {
|
||||||
if ($(document).onclick) {
|
if ($(document).onclick) {
|
||||||
$(document).fireEvent('click', 0);
|
$(document).fireEvent('click', 0);
|
||||||
showMenu.delay(110, this, evt);
|
showMenu.delay(110, this, evt);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.myEffect = $(this).effects({duration:100, transition: Fx.Transitions.linear});
|
this.myEffect = $(this).effects({duration:100, transition: Fx.Transitions.linear});
|
||||||
this.myEffect.start({'opacity':[0,1]});
|
this.myEffect.start({'opacity':[0,1]});
|
||||||
$(document).onclick = hide.bind(this);
|
$(document).onclick = hide.bind(this);
|
||||||
var event = new Event(evt);
|
var event = new Event(evt);
|
||||||
event.stop();
|
event.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide() {
|
function hide() {
|
||||||
this.myEffect.start({'opacity':[1,0]});
|
this.myEffect.start({'opacity':[1,0]});
|
||||||
$(document).onclick = '';
|
$(document).onclick = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateLinks(el) {
|
function updateLinks(el) {
|
||||||
$ES('a', el).each(function(link) {
|
$ES('a', el).each(function(link) {
|
||||||
if (!link.ohref) {
|
if (!link.ohref) {
|
||||||
link.ohref = link.getProperty('ohref');
|
link.ohref = link.getProperty('ohref');
|
||||||
}
|
}
|
||||||
link.href = link.ohref + $('selectedMapIds').value;
|
link.href = link.ohref + $('selectedMapIds').value;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function openWizard(href, title, rel) {
|
function openWizard(href, title, rel) {
|
||||||
href = href + $('selectedMapIds').value;
|
href = href + $('selectedMapIds').value;
|
||||||
// MOOdalBox.open(href, title, rel);
|
// MOOdalBox.open(href, title, rel);
|
||||||
}
|
}
|
||||||
|
|
||||||
function addToSelectedMapList(el) {
|
function addToSelectedMapList(el) {
|
||||||
var ids = $('selectedMapIds');
|
var ids = $('selectedMapIds');
|
||||||
var id = el.id.replace(/[^\d]/g, '');
|
var id = el.id.replace(/[^\d]/g, '');
|
||||||
|
|
||||||
var value = ids.getProperty("value");
|
var value = ids.getProperty("value");
|
||||||
|
|
||||||
if (value != "") {
|
if (value != "") {
|
||||||
var allIds = $A(ids.value.split(','));
|
var allIds = $A(ids.value.split(','));
|
||||||
var changed = false;
|
var changed = false;
|
||||||
if (allIds.contains(id) && !el.checked) {
|
if (allIds.contains(id) && !el.checked) {
|
||||||
allIds.remove(id);
|
allIds.remove(id);
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
else if (!allIds.contains(id) && el.checked) {
|
else if (!allIds.contains(id) && el.checked) {
|
||||||
allIds.extend([id]);
|
allIds.extend([id]);
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
if (changed) {
|
if (changed) {
|
||||||
var finalIds = "";
|
var finalIds = "";
|
||||||
$each(allIds, function(el) {
|
$each(allIds, function(el) {
|
||||||
if (!finalIds == "") {
|
if (!finalIds == "") {
|
||||||
el = "," + el;
|
el = "," + el;
|
||||||
}
|
}
|
||||||
finalIds = finalIds + el;
|
finalIds = finalIds + el;
|
||||||
});
|
});
|
||||||
value = finalIds;
|
value = finalIds;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (el.checked) {
|
if (el.checked) {
|
||||||
value = id;
|
value = id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ids.setProperty("value", value);
|
ids.setProperty("value", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function selectAllMaps(elem) {
|
function selectAllMaps(elem) {
|
||||||
var value = elem.checked;
|
var value = elem.checked;
|
||||||
var ids = "";
|
var ids = "";
|
||||||
$ES('input[type="checkbox"]', $('docTable')).each(function(el) {
|
$ES('input[type="checkbox"]', $('docTable')).each(function(el) {
|
||||||
if (el.name.contains('chk')) {
|
if (el.name.contains('chk')) {
|
||||||
el.checked = value;
|
el.checked = value;
|
||||||
var id = el.id.replace(/[^\d]/g, '');
|
var id = el.id.replace(/[^\d]/g, '');
|
||||||
if (!ids == "") {
|
if (!ids == "") {
|
||||||
id = "," + id;
|
id = "," + id;
|
||||||
}
|
}
|
||||||
ids = ids + id;
|
ids = ids + id;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!value) {
|
if (!value) {
|
||||||
$('selectedMapIds').setProperty('value', '');
|
$('selectedMapIds').setProperty('value', '');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('selectedMapIds').setProperty('value', ids);
|
$('selectedMapIds').setProperty('value', ids);
|
||||||
}
|
}
|
||||||
/*var allElems = document.getElementsByName("chk");
|
/*var allElems = document.getElementsByName("chk");
|
||||||
for (var i = 0; i < allElems.length; i++)
|
for (var i = 0; i < allElems.length; i++)
|
||||||
{
|
{
|
||||||
allElems[i].checked = value;
|
allElems[i].checked = value;
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
function printMap(mapId) {
|
function printMap(mapId) {
|
||||||
document.printForm.mapId.value = mapId;
|
document.printForm.mapId.value = mapId;
|
||||||
document.printForm.submit();
|
document.printForm.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
function removeCollaborator(collaboratorEmail) {
|
function removeCollaborator(collaboratorEmail) {
|
||||||
document.removeCollaboratorForm.colaboratorId.value = collaboratorEmail;
|
document.removeCollaboratorForm.colaboratorId.value = collaboratorEmail;
|
||||||
document.removeCollaboratorForm.submit();
|
document.removeCollaboratorForm.submit();
|
||||||
//submitDialog('removeCollaboratorForm');
|
//submitDialog('removeCollaboratorForm');
|
||||||
}
|
}
|
||||||
function addFriendsEmails() {
|
function addFriendsEmails() {
|
||||||
var newUsers = "";
|
var newUsers = "";
|
||||||
var ob = $('friendList');
|
var ob = $('friendList');
|
||||||
while (ob.selectedIndex != -1) {
|
while (ob.selectedIndex != -1) {
|
||||||
newUsers = newUsers + ", " + ob.options[ob.selectedIndex].value;
|
newUsers = newUsers + ", " + ob.options[ob.selectedIndex].value;
|
||||||
ob.options[ob.selectedIndex].selected = false;
|
ob.options[ob.selectedIndex].selected = false;
|
||||||
}
|
}
|
||||||
var dest = $('emailList');
|
var dest = $('emailList');
|
||||||
if (dest.value == "")
|
if (dest.value == "")
|
||||||
newUsers = newUsers.substr(2, newUsers.length);
|
newUsers = newUsers.substr(2, newUsers.length);
|
||||||
dest.value = dest.value + newUsers;
|
dest.value = dest.value + newUsers;
|
||||||
}
|
}
|
||||||
function changeStatus(collaboratorEmail) {
|
function changeStatus(collaboratorEmail) {
|
||||||
document.removeCollaboratorForm.userEmail.value = collaboratorEmail;
|
document.removeCollaboratorForm.userEmail.value = collaboratorEmail;
|
||||||
submitDialog('removeCollaboratorForm');
|
submitDialog('removeCollaboratorForm');
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<jsp:include page="footer.jsp"/>
|
<jsp:include page="footer.jsp"/>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="../css/print.css"/>
|
<link rel="stylesheet" type="text/css" href="../css/print.css"/>
|
||||||
|
|
||||||
<script type='text/javascript' src='../js/libraries/mootools/mootools-core-1.3.2-full-compress.js'></script>
|
<script type='text/javascript' src='../js/mootools-core.js'></script>
|
||||||
<script type='text/javascript' src='../js/libraries/mootools/mootools-more-1.3.2.1-yui.js'></script>
|
<script type='text/javascript' src='../js/mootools-more.js'></script>
|
||||||
<script type='text/javascript' src='../js/core.js'></script>
|
<script type='text/javascript' src='../js/core.js'></script>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,44 +1,44 @@
|
|||||||
<!DOCTYPE HTML>
|
<!DOCTYPE HTML>
|
||||||
<%@page pageEncoding="UTF-8" %>
|
<%@page pageEncoding="UTF-8" %>
|
||||||
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles" %>
|
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles" %>
|
||||||
<%@ include file="/jsp/init.jsp" %>
|
<%@ include file="/jsp/init.jsp" %>
|
||||||
|
|
||||||
<tiles:importAttribute name="title" scope="request"/>
|
<tiles:importAttribute name="title" scope="request"/>
|
||||||
<tiles:importAttribute name="details" scope="request"/>
|
<tiles:importAttribute name="details" scope="request"/>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>
|
<title>
|
||||||
<spring:message code="SITE.TITLE"/>
|
<spring:message code="SITE.TITLE"/>
|
||||||
-
|
-
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${requestScope.viewTitle!=null}">
|
<c:when test="${requestScope.viewTitle!=null}">
|
||||||
${requestScope.viewTitle}
|
${requestScope.viewTitle}
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
<spring:message code="${requestScope.title}"/>
|
<spring:message code="${requestScope.title}"/>
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
</title>
|
</title>
|
||||||
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
|
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
|
||||||
<link rel="stylesheet" type="text/css" href="../css/wisehome.css"/>
|
<link rel="stylesheet" type="text/css" href="../css/wisehome.css"/>
|
||||||
<link rel="icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"/>
|
<link rel="icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"/>
|
||||||
<link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"/>
|
<link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"/>
|
||||||
<script type='text/javascript'
|
<script type='text/javascript'
|
||||||
src='https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js'></script>
|
src='https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js'></script>
|
||||||
<script type='text/javascript' src='../js/libraries/mootools/mootools-more-1.3.2.1-yui.js'></script>
|
<script type='text/javascript' src='../js/mootools-more.js'></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<jsp:include page="header.jsp"/>
|
<jsp:include page="header.jsp"/>
|
||||||
|
|
||||||
<div class="pageBody">
|
<div class="pageBody">
|
||||||
|
|
||||||
<div class="pageBodyContent">
|
<div class="pageBodyContent">
|
||||||
<tiles:insert name="body"/>
|
<tiles:insert name="body"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<jsp:include page="footer.jsp"/>
|
<jsp:include page="footer.jsp"/>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user