Commit 789870c0f6cf6bd02d975528078a4f16343ea4c8

Authored by m.veroni
1 parent ba50a4dd

Aggiunto username nel log delgi statements

git-svn-id: http://svn.softecspa.it/desktopmate/DesktopMate%202.0/FileProxyServer/trunk@13344 edf0334f-4afc-450a-8f92-fe1409970e7d
conf/ADT/test-liliana/WEB-INF/web.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" 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">
3   - <display-name>FileProxy 1.0.0 (7) - ADT/test-liliana [27/06/2014 17:20]</display-name>
  3 + <display-name>FileProxy 1.0.2 (11) - ADT/test-liliana [07/07/2014 15:08]</display-name>
4 4 <!-- Ultime modifiche del 23/06/2014 -->
5 5  
6 6 <!-- Configurazione per New Relic -->
... ... @@ -9,7 +9,7 @@
9 9 <param-value>FileProxyServer ADT (test)</param-value>
10 10 </context-param>
11 11  
12   - <!-- ADT/test-liliana - 27/06/2014 17:20 -->
  12 + <!-- ADT/test-liliana - 07/07/2014 15:08 -->
13 13 <!-- Configurazioni obbligatorie -->
14 14 <context-param>
15 15 <param-name>ErrorPage</param-name>
... ...
conf/ADT/test-liliana/version.xml
... ... @@ -3,10 +3,10 @@
3 3 <properties>
4 4 <comment>Version information</comment>
5 5  
6   - <entry key="version.number">1.0.0</entry>
  6 + <entry key="version.number">1.0.2</entry>
7 7 <entry key="version.release"></entry>
8   - <entry key="build.number">7</entry>
9   - <entry key="build.date">27/06/2014 17:20</entry>
  8 + <entry key="build.number">11</entry>
  9 + <entry key="build.date">07/07/2014 15:08</entry>
10 10 <entry key="build.installation">ADT/test-liliana</entry>
11 11  
12 12 </properties>
... ...
conf/version.properties
1 1 #Build Number for ANT. Do not edit!
2   -#Fri Jun 27 17:20:50 CEST 2014
3   -build.number=8
  2 +#Mon Jul 07 15:08:58 CEST 2014
  3 +build.number=12
4 4 version.release=
5   -build.date=27/06/2014 17\:20
6   -version.number=1.0.0
  5 +build.date=07/07/2014 15\:08
  6 +version.number=1.0.2
... ...
src/it/softecspa/fileproxy/proxyservices/manager/core/WorkflowSession.java
... ... @@ -61,13 +61,18 @@ public class WorkflowSession&lt;I extends GlobalHttpProxyRequest&gt; extends Universal
61 61  
62 62 } catch (SQLException e) {
63 63 throw new ManagerException(e);
64   -
  64 +
65 65 } catch (AuthenticationException e) {
66 66 log.error("Error check credential with username '"+request.getUsername()+"': "+e.getMessage());
67 67 // Username/Password non validi
68 68 throw new CheckerException(ResponseOutcome.USER_PASSWORD_NO_VALID);
  69 +
  70 + } catch (Exception e) {
  71 + log.error("Error in check user checking",e);
  72 + throw new CheckerException(ResponseOutcome.USER_NOT_VERIFY_RETRY);
69 73 }
70 74  
  75 +
71 76 }
72 77  
73 78  
... ...
src/it/softecspa/fileproxy/proxyservices/request/AbstractHttpFileProxyRequest.java
... ... @@ -5,10 +5,10 @@ import it.softecspa.fileproxy.proxyservices.core.GlobalHttpProxyRequest;
5 5 import it.softecspa.fileproxy.services.common.comunicator.http.HttpRemote;
6 6 import it.softecspa.fileproxy.services.common.core.request.Protocollo;
7 7 import it.softecspa.fileproxy.services.common.core.request.RemoteHostRequestInfo;
8   -import it.softecspa.fileproxy.services.common.core.request.TrackRequestInfo;
  8 +import it.softecspa.fileproxy.services.common.core.request.TrackRequestCustomInfo;
9 9  
10 10  
11   -public abstract class AbstractHttpFileProxyRequest implements GlobalHttpProxyRequest, RemoteHostRequestInfo, TrackRequestInfo {
  11 +public abstract class AbstractHttpFileProxyRequest implements GlobalHttpProxyRequest, RemoteHostRequestInfo, /*TrackRequestInfo*/ TrackRequestCustomInfo {
12 12  
13 13 // UniversalRequest
14 14 private String language;
... ...
src/it/softecspa/fileproxy/proxyservices/request/DeleteRequestType.java
1 1 package it.softecspa.fileproxy.proxyservices.request;
2 2  
  3 +import it.softecspa.fileproxy.services.common.core.response.Entry;
  4 +
3 5  
4 6 public class DeleteRequestType extends AbstractHttpFileProxyRequest{
5 7  
... ... @@ -22,5 +24,13 @@ public class DeleteRequestType extends AbstractHttpFileProxyRequest{
22 24 public void setPath(String path) {
23 25 this.path = path;
24 26 }
  27 +
  28 + @Override
  29 + public Entry[] takeCustomEntry() {
  30 + return new Entry[] { new Entry("username", getUsername())
  31 + , new Entry("path", getPath())
  32 + , new Entry("filename", getFileName())
  33 + };
  34 + }
25 35  
26 36 }
... ...
src/it/softecspa/fileproxy/proxyservices/request/DownloadRequestType.java
1 1 package it.softecspa.fileproxy.proxyservices.request;
2 2  
  3 +import it.softecspa.fileproxy.services.common.core.response.Entry;
  4 +
3 5  
4 6 public class DownloadRequestType extends AbstractHttpFileProxyRequest{
5 7  
... ... @@ -41,4 +43,14 @@ public class DownloadRequestType extends AbstractHttpFileProxyRequest{
41 43 this.inline = inline;
42 44 }
43 45  
  46 + @Override
  47 + public Entry[] takeCustomEntry() {
  48 + return new Entry[] { new Entry("username", getUsername())
  49 + , new Entry("path", getPath())
  50 + , new Entry("filename", getFileName())
  51 + , new Entry("inline", getInline())
  52 + , new Entry("chunk", getChunk())
  53 + };
  54 + }
  55 +
44 56 }
... ...
src/it/softecspa/fileproxy/proxyservices/request/ListRequestType.java
1 1 package it.softecspa.fileproxy.proxyservices.request;
2 2  
  3 +import it.softecspa.fileproxy.services.common.core.response.Entry;
  4 +
3 5  
4 6 public class ListRequestType extends AbstractHttpFileProxyRequest{
5 7  
... ... @@ -31,4 +33,13 @@ public class ListRequestType extends AbstractHttpFileProxyRequest{
31 33 this.showHidden = showHidden;
32 34 }
33 35  
  36 +
  37 + @Override
  38 + public Entry[] takeCustomEntry() {
  39 + return new Entry[] { new Entry("username", getUsername())
  40 + , new Entry("path", getPath())
  41 + , new Entry("onlyFile", getOnlyFile())
  42 + , new Entry("showHidden", getShowHidden())
  43 + };
  44 + }
34 45 }
... ...
src/it/softecspa/fileproxy/proxyservices/request/MakeFolderRequestType.java
1 1 package it.softecspa.fileproxy.proxyservices.request;
2 2  
  3 +import it.softecspa.fileproxy.services.common.core.response.Entry;
  4 +
3 5  
4 6 public class MakeFolderRequestType extends AbstractHttpFileProxyRequest{
5 7  
... ... @@ -9,9 +11,15 @@ public class MakeFolderRequestType extends AbstractHttpFileProxyRequest{
9 11 return path;
10 12 }
11 13  
12   - public void setPath(String filename) {
13   - this.path = filename;
  14 + public void setPath(String path) {
  15 + this.path = path;
14 16 }
15 17  
  18 + @Override
  19 + public Entry[] takeCustomEntry() {
  20 + return new Entry[] { new Entry("username", getUsername())
  21 + , new Entry("path", getPath())
  22 + };
  23 + }
16 24  
17 25 }
... ...
src/it/softecspa/fileproxy/proxyservices/request/UploadRequestType.java
1 1 package it.softecspa.fileproxy.proxyservices.request;
2 2  
3   -import java.io.InputStream;
4   -
5 3 import it.softecspa.fileproxy.services.common.core.request.InputStreamReaderXML;
6 4 import it.softecspa.fileproxy.services.common.core.request.MethodPostMandatory;
  5 +import it.softecspa.fileproxy.services.common.core.response.Entry;
7 6 import it.softecspa.kahuna.util.xml.XmlRoot;
8 7  
  8 +import java.io.InputStream;
  9 +
9 10 public class UploadRequestType extends AbstractHttpFileProxyRequest implements InputStreamReaderXML<XmlRoot>, MethodPostMandatory {
10 11  
11 12 private Boolean overwrite;
... ... @@ -92,4 +93,16 @@ public class UploadRequestType extends AbstractHttpFileProxyRequest implements I
92 93 this.append = append;
93 94 }
94 95  
  96 + @Override
  97 + public Entry[] takeCustomEntry() {
  98 + return new Entry[] { new Entry("username", getUsername())
  99 + , new Entry("path", getPath())
  100 + , new Entry("filename", getFileName())
  101 + , new Entry("overwrite", getOverwrite())
  102 + , new Entry("append", getAppend())
  103 + , new Entry("bufferLength", getBufferLength())
  104 + , new Entry("encoding", getEncoding())
  105 + };
  106 + }
  107 +
95 108 }
... ...
src/it/softecspa/fileproxy/services/common/ResponseOutcome.java
... ... @@ -440,7 +440,7 @@ public enum ResponseOutcome {
440 440 , DIRECTORY_JUST_EXIST (30008,"Directory just exist")
441 441 , ERROR_CREATING_DIR (30009,"Error creating directory")
442 442 , FOUND_NOT_VALID_CHAR (30010,"Found not valid char in path or filename")
443   -
  443 + , USER_NOT_VERIFY_RETRY (30011,"Error in user verification, retry!")
444 444  
445 445 //-----------------
446 446  
... ...
src/it/softecspa/fileproxy/services/common/core/response/Entry.java
... ... @@ -15,6 +15,11 @@ public class Entry {
15 15 this.value = (value!=null?value.toString():null);
16 16 }
17 17  
  18 + public Entry(String key, Boolean value) {
  19 + this.key = key;
  20 + this.value = (value!=null?value.toString():null);
  21 + }
  22 +
18 23 public String getKey() {
19 24 return key;
20 25 }
... ...