Skip to content

Commit

Permalink
Merge branch 'allineamento'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ema90 committed Aug 17, 2018
2 parents a497868 + fc55086 commit 4fa230e
Show file tree
Hide file tree
Showing 90 changed files with 2,028 additions and 414 deletions.
6 changes: 3 additions & 3 deletions demo-tt/pom.xml
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.manydesigns</groupId>
<artifactId>portofino</artifactId>
<version>4.2.4-SNAPSHOT</version>
<version>4.2.4</version>
</parent>
<artifactId>demo-tt</artifactId>
<packaging>war</packaging>
Expand Down Expand Up @@ -123,7 +123,7 @@
<version>1.1.11</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand All @@ -136,7 +136,7 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>portofino-development</id>
Expand Down
Expand Up @@ -21,7 +21,7 @@
<c:if test="${actionBean.searchVisible}">
<a href="${pageContext.request.contextPath}${actionBean.context.actionPath}"
class="search_form_toggle_link" data-search-visible="true">
<span><fmt:message key="hide.search<<" /></span>
<span><fmt:message key="hide.search" /></span>
<span style="display: none;"><fmt:message key="show.search" /></span>
</a>
</c:if>
Expand Down
Expand Up @@ -21,7 +21,7 @@
<c:if test="${actionBean.searchVisible}">
<a href="${pageContext.request.contextPath}${actionBean.context.actionPath}"
class="search_form_toggle_link" data-search-visible="true">
<span><fmt:message key="hide.search<<" /></span>
<span><fmt:message key="hide.search" /></span>
<span style="display: none;"><fmt:message key="show.search" /></span>
</a>
</c:if>
Expand Down
288 changes: 150 additions & 138 deletions elements/pom.xml
Expand Up @@ -2,142 +2,154 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.manydesigns</groupId>
<artifactId>portofino</artifactId>
<version>4.2.4-SNAPSHOT</version>
</parent>
<artifactId>elements</artifactId>
<packaging>jar</packaging>
<url>http://www.manydesigns.com/</url>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Apache Commons -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons.lang.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons.fileupload.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>${commons.configuration.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>${commons.collections.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
<scope>compile</scope>
</dependency>
<!-- OGNL -->
<dependency>
<groupId>ognl</groupId>
<artifactId>ognl</artifactId>
<version>${ognl.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Javassist is necessary for OGNL to work -->
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>${javassist.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${joda-time.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>annotations</artifactId>
<version>7.0.3</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>${json.version}</version>
</dependency>
<!-- Stripes -->
<dependency>
<groupId>net.sourceforge.stripes</groupId>
<artifactId>stripes</artifactId>
<version>${stripes.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Export -->
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.manydesigns</groupId>
<artifactId>portofino</artifactId>
<version>4.2.4</version>
</parent>
<artifactId>elements</artifactId>
<packaging>jar</packaging>
<url>http://www.manydesigns.com/</url>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Apache Commons -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons.lang.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons.fileupload.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>${commons.configuration.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>${commons.collections.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
<scope>compile</scope>
</dependency>
<!-- OGNL -->
<dependency>
<groupId>ognl</groupId>
<artifactId>ognl</artifactId>
<version>${ognl.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Javassist is necessary for OGNL to work -->
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>${javassist.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${joda-time.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>annotations</artifactId>
<version>7.0.3</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>${json.version}</version>
</dependency>
<!-- Stripes -->
<dependency>
<groupId>net.sourceforge.stripes</groupId>
<artifactId>stripes</artifactId>
<version>${stripes.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Export -->
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.manydesigns</groupId>
<artifactId>portofino-cryptography</artifactId>
<version>4.2.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.5.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,36 @@
package com.manydesigns.elements;

import com.manydesigns.crypto.CryptoService;
import com.manydesigns.elements.FieldEncrypter;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class DefaultFieldEncrypter implements FieldEncrypter {

private static final Logger logger = LoggerFactory.getLogger(DefaultFieldEncrypter.class);

public String encrypt(String value) {
if(StringUtils.trimToNull(value) == null){
return value;
}
try {
CryptoService.getInstance().encrypt(value);
} catch (Exception e) {
logger.error("DefaultFieldEncrypter.encrypt error:"+e.getMessage(),e);
}
return value;
}

public String decrypt(String value) {
if(StringUtils.trimToNull(value) == null){
return value;
}
try {
CryptoService.getInstance().decrypt(value);
} catch (Exception e) {
logger.error("DefaultFieldEncrypter.decrypt error:"+e.getMessage(),e);
}
return value;
}
}
Expand Up @@ -86,7 +86,7 @@ public static void addConfiguration(String resource) {
try {
configuration.addConfiguration(
new PropertiesConfiguration(resource));
} catch (Throwable e) {
} catch (Exception e) {
logger.warn(String.format(
"Error loading properties from: %s", resource), e);
}
Expand Down
@@ -0,0 +1,8 @@
package com.manydesigns.elements;

public interface FieldEncrypter {

public String encrypt(String value);

public String decrypt(String value);
}

0 comments on commit 4fa230e

Please sign in to comment.