Salvatore La Manna 4 anni fa
parent
commit
42b5422ff2
  1. 12
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java
  2. 1299
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java
  3. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/SismicaAdministrationPortlet.java
  4. 12
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerInvioDocumento.java
  5. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java
  6. 5
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/advanced_search.jsp
  7. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp
  8. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp
  9. 1
      liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/build.xml
  10. BIN
      liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/lib/firma-application-shared-0.0.1.jar
  11. 1
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/.tern-project
  12. 2
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service.xml
  13. 6
      liferay-plugins-sdk-6.2/shared/portos-firma-shared/.classpath
  14. 1
      liferay-plugins-sdk-6.2/shared/portos-firma-shared/.gitignore
  15. 17
      liferay-plugins-sdk-6.2/shared/portos-firma-shared/.project
  16. 8
      liferay-plugins-sdk-6.2/shared/portos-firma-shared/build.xml
  17. 92
      liferay-plugins-sdk-6.2/shared/portos-firma-shared/src/it/tref/firma/shared/RestFile.java
  18. 23
      liferay-plugins-sdk-6.2/shared/portos-firma-shared/src/it/tref/firma/shared/Risposta.java
  19. 13
      liferay-plugins-sdk-6.2/shared/portos-firma-shared/src/it/tref/firma/shared/RispostaCostanti.java
  20. 26
      liferay-plugins-sdk-6.2/shared/portos-firma-shared/src/it/tref/firma/shared/Stile.java
  21. 2
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/.classpath
  22. 1
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/TemplateMessage.java
  23. 11
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/model/FileAttachment.java
  24. 1
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailManagerConstants.java
  25. 9
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailUtil.java
  26. 1
      liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/StringUtil.java

12
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SvuotaDatabase.java → liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/ManutenzioneDatabase.java

@ -149,8 +149,8 @@ import com.liferay.sync.service.SyncDLObjectLocalServiceUtil;
* DELETE FROM "users_groups" WHERE "userid" IN (SELECT DISTINCT "ug"."userid" FROM "users_groups" "ug" LEFT JOIN "user_" "u" ON "ug"."userid"="u"."userid" WHERE "u"."userid" IS NULL); * DELETE FROM "users_groups" WHERE "userid" IN (SELECT DISTINCT "ug"."userid" FROM "users_groups" "ug" LEFT JOIN "user_" "u" ON "ug"."userid"="u"."userid" WHERE "u"."userid" IS NULL);
* *
*/ */
public class SvuotaDatabase { public class ManutenzioneDatabase {
private static final Log _log = LogFactoryUtil.getLog(SvuotaDatabase.class); private static final Log _log = LogFactoryUtil.getLog(ManutenzioneDatabase.class);
private static final int SLICE = 1000; private static final int SLICE = 1000;
// !Run!IntPratica!User!Reset! // !Run!IntPratica!User!Reset!
@ -158,7 +158,7 @@ public class SvuotaDatabase {
public static List<String> pulisci(ServiceContext serviceContext, String mode) throws SystemException, public static List<String> pulisci(ServiceContext serviceContext, String mode) throws SystemException,
PortalException { PortalException {
List<String> esito = new ArrayList<>(); List<String> esito = new ArrayList<>();
if (mode.contains("!Run!")) { if (mode.contains("!Pulisci!")) {
long companyId = serviceContext.getCompanyId(); long companyId = serviceContext.getCompanyId();
esito.addAll(puliziaDocumentLibrary(companyId)); esito.addAll(puliziaDocumentLibrary(companyId));
if (mode.contains("!IntPratica!")) { if (mode.contains("!IntPratica!")) {
@ -180,6 +180,8 @@ public class SvuotaDatabase {
} catch (IllegalStateException e) { } catch (IllegalStateException e) {
} }
_log.info("Elaborazione completata correttamente."); _log.info("Elaborazione completata correttamente.");
} else if (mode.contains("!Integrazioni!")) {
SismicaUtil.integrazioniScadute();
} else { } else {
esitoLog(esito, "Nessun comando"); esitoLog(esito, "Nessun comando");
} }
@ -589,7 +591,7 @@ public class SvuotaDatabase {
int rimossi = 0; int rimossi = 0;
intPratiche = IntPraticaLocalServiceUtil.getIntPraticas(start, start + SLICE); intPratiche = IntPraticaLocalServiceUtil.getIntPraticas(start, start + SLICE);
for (IntPratica intPratica : intPratiche) { for (IntPratica intPratica : intPratiche) {
IntPraticaLocalServiceUtil.deleteIntPratica(intPratica); IntPraticaLocalServiceUtil.deleteIntPratica(intPratica, true);
cancellati++; cancellati++;
rimossi++; rimossi++;
} }
@ -916,6 +918,7 @@ public class SvuotaDatabase {
} }
private static boolean esiste(String className, long classPK, long companyId) throws SystemException { private static boolean esiste(String className, long classPK, long companyId) throws SystemException {
if (0 != classPK && Validator.isNotNull(className)) {
try { try {
if (ALLEGATOMANUALE_CLASS_NAME.equals(className)) { if (ALLEGATOMANUALE_CLASS_NAME.equals(className)) {
AllegatoManualeLocalServiceUtil.getAllegatoManuale(classPK); AllegatoManualeLocalServiceUtil.getAllegatoManuale(classPK);
@ -1029,6 +1032,7 @@ public class SvuotaDatabase {
} catch (PortalException e) { } catch (PortalException e) {
return false; return false;
} }
}
return true; return true;
} }

1299
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SismicaUtil.java

File diff soppresso perché troppo grande Load Diff

6
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/SismicaAdministrationPortlet.java

@ -3,7 +3,7 @@ package it.tref.liferay.portos.bo.portlet;
import it.mwg.sismica.bo.util.AllegatiUtil; import it.mwg.sismica.bo.util.AllegatiUtil;
import it.mwg.sismica.bo.util.SismicaUtil; import it.mwg.sismica.bo.util.SismicaUtil;
import it.mwg.sismica.bo.util.SorteggioPraticaUtil; import it.mwg.sismica.bo.util.SorteggioPraticaUtil;
import it.mwg.sismica.bo.util.SvuotaDatabase; import it.mwg.sismica.bo.util.ManutenzioneDatabase;
import it.tref.liferay.portos.bo.service.ConfigurazioneServiceUtil; import it.tref.liferay.portos.bo.service.ConfigurazioneServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
@ -116,11 +116,11 @@ public class SismicaAdministrationPortlet extends MVCPortlet {
actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()])); actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()]));
} }
public void testInterno(ActionRequest actionRequest, ActionResponse actionResponse) public void manutenzioneDatabase(ActionRequest actionRequest, ActionResponse actionResponse)
throws PortalException, SystemException { throws PortalException, SystemException {
String mode = ParamUtil.getString(actionRequest, "mode"); String mode = ParamUtil.getString(actionRequest, "mode");
ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest); ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest);
List<String> esito = SvuotaDatabase.pulisci(serviceContext, mode); List<String> esito = ManutenzioneDatabase.pulisci(serviceContext, mode);
actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()])); actionResponse.setRenderParameter("esito", esito.toArray(new String[esito.size()]));
} }

12
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/scheduler/SchedulerInvioDocumento.java

@ -40,8 +40,10 @@ import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set;
import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantLock;
@ -371,16 +373,16 @@ public class SchedulerInvioDocumento implements MessageListener {
dettPratica.getCodiceFiscalePrincipaleCommittente(), TipoSoggettoUtil.COMMITTENTE); dettPratica.getCodiceFiscalePrincipaleCommittente(), TipoSoggettoUtil.COMMITTENTE);
if (null == committentePrincipale) { if (null == committentePrincipale) {
_log.error("inviaMailNotifica: il committente principale non esiste, intPraticaId = " _log.error("Il committente principale non esiste, intPraticaId = " + intPraticaId);
+ intPraticaId);
} else { } else {
soggetti.remove(committentePrincipale); soggetti.remove(committentePrincipale);
} }
String[] to = new String[soggetti.size()]; Set<String> sTo = new HashSet<>();
for (int i = 0; i < to.length; i++) { for (Soggetto soggetto : soggetti) {
to[i] = soggetti.get(i).getEmail(); sTo.add(soggetto.getEmail());
} }
String[] to = sTo.toArray(new String[sTo.size()]);
String[] cc = new String[0]; String[] cc = new String[0];
String[] ccn = new String[0]; String[] ccn = new String[0];

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java

@ -206,7 +206,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
} }
boolean agAlto = (dettPratica.getTcAdeguamentoSismico() || dettPratica.getTcMiglioramentoSismico()) boolean agAlto = (dettPratica.getTcAdeguamentoSismico() || dettPratica.getTcMiglioramentoSismico())
&& (territorio.getZona().equals("1") || (territorio.getZona().equals("2") && (ag >= 0.2) && (ag <= 0.25))); && (territorio.getZona().equals("1") || (territorio.getZona().equals("2") && (ag >= 0.2)));
boolean complesse = dettPratica.getTcNuovaCostruzioneComplessa(); boolean complesse = dettPratica.getTcNuovaCostruzioneComplessa();

5
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/advanced_search.jsp

@ -45,11 +45,6 @@
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3"> <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<aui:select name="statoPratica" label="Stato Procedimento"> <aui:select name="statoPratica" label="Stato Procedimento">
<aui:option value="-1">Stato Pratica</aui:option> <aui:option value="-1">Stato Pratica</aui:option>
<!-- ADT BUG-ID=15 Sezione Ricerca / Filtro Stato Pratica -->
<%-- <aui:option value="VI"><liferay-ui:message key="vidimata"/></aui:option> --%>
<%-- <aui:option value="RI"><liferay-ui:message key="rifiutata"/></aui:option> --%>
<%-- <aui:option value="SO"><liferay-ui:message key="sorteggiata"/></aui:option> --%>
<aui:option value="AL"><liferay-ui:message key="annullata"/></aui:option> <aui:option value="AL"><liferay-ui:message key="annullata"/></aui:option>
<aui:option value="AU"><liferay-ui:message key="autorizzata"/></aui:option> <aui:option value="AU"><liferay-ui:message key="autorizzata"/></aui:option>
<aui:option value="AN"><liferay-ui:message key="non autorizzata"/></aui:option> <aui:option value="AN"><liferay-ui:message key="non autorizzata"/></aui:option>

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp

@ -219,7 +219,7 @@ String dtSorteggioNullo = "2020-03-05 11:12:18.006";
Le pratiche sottoposte a parere sono quelle che hanno Le pratiche sottoposte a parere sono quelle che hanno
statoPratica == 'SP', non quelle in status di workflow = pending statoPratica == 'SP', non quelle in status di workflow = pending
--> -->
<c:if test="<%= intPratica.getStatoPratica().equalsIgnoreCase(\"SP\") %>"> <c:if test="<%= StatoPraticaConstants.SOTTOPOSTA_A_PARERE.equals(intPratica.getStatoPratica()) %>">
<span class="display-inline-block bordered-2x border-circle bg-green txt-bold tooltip-info" title="Sottoposta a parere" style="padding: 5px;margin-right:5px;"> <span class="display-inline-block bordered-2x border-circle bg-green txt-bold tooltip-info" title="Sottoposta a parere" style="padding: 5px;margin-right:5px;">
SP SP
</span> </span>

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp

@ -96,12 +96,12 @@ String dataProssimoSorteggio =
</div> </div>
</div> </div>
<liferay-portlet:actionURL name="testInterno" var="testInternoURL" /> <liferay-portlet:actionURL name="manutenzioneDatabase" var="manutenzioneDatabaseURL" />
<liferay-portlet:actionURL name="generaDocumenti" var="generaDocumentiURL" /> <liferay-portlet:actionURL name="generaDocumenti" var="generaDocumentiURL" />
<div class="row-fluid" style="margin-top: 10px;"> <div class="row-fluid" style="margin-top: 10px;">
<div class="span6"> <div class="span6">
<div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Manutenzione database</div> <div style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">Manutenzione database</div>
<aui:form action="<%=testInternoURL%>" method="post" name="fmTI"> <aui:form action="<%=manutenzioneDatabaseURL%>" method="post" name="fmMD">
<div> <div>
<aui:input name="mode" label="Modalità" /> <aui:input name="mode" label="Modalità" />
<aui:button cssClass="btn-danger" type="submit" value="Avvia manutenzione" /> <aui:button cssClass="btn-danger" type="submit" value="Avvia manutenzione" />

1
liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/build.xml

@ -2,5 +2,6 @@
<!DOCTYPE project> <!DOCTYPE project>
<project name="portos-firma-portlet" basedir="." default="deploy"> <project name="portos-firma-portlet" basedir="." default="deploy">
<property name="import.shared" value="portos-firma-shared" />
<import file="../build-common-portlet.xml" /> <import file="../build-common-portlet.xml" />
</project> </project>

BIN
liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/lib/firma-application-shared-0.0.1.jar

File binario non mostrato.

1
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/.tern-project

@ -0,0 +1 @@
{"ide":{"scriptPaths":[]},"plugins":{"aui":{},"liferay":{},"yui":{}},"libs":["ecma5","browser"]}

2
liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/WEB-INF/service.xml

@ -157,7 +157,7 @@
<column name="subject" type="String" /> <column name="subject" type="String" />
<column name="body" type="String" /> <column name="body" type="String" />
<column name="attachmentPermitted" type="Boolean" /> <column name="attachmentPermitted" type="boolean" />
<column name="additionalParameters" type="String" /> <column name="additionalParameters" type="String" />

6
liferay-plugins-sdk-6.2/shared/portos-firma-shared/.classpath

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_80"/>
<classpathentry kind="output" path="classes"/>
</classpath>

1
liferay-plugins-sdk-6.2/shared/portos-firma-shared/.gitignore vendored

@ -0,0 +1 @@
/classes/

17
liferay-plugins-sdk-6.2/shared/portos-firma-shared/.project

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>portos-firma-shared</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

8
liferay-plugins-sdk-6.2/shared/portos-firma-shared/build.xml

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="portos-firma-shared" basedir="." default="deploy">
<property name="plugin.version" value="1" />
<import file="../build-common-shared.xml" />
</project>

92
liferay-plugins-sdk-6.2/shared/portos-firma-shared/src/it/tref/firma/shared/RestFile.java

@ -0,0 +1,92 @@
package it.tref.firma.shared;
import java.io.Serializable;
import java.util.Date;
public class RestFile implements Serializable {
private static final long serialVersionUID = 560778228734037313L;
private Integer idFile;
private String nomeFile;
private Date dataInvio;
private String documentiType;
private String tipoPratica;
private String file;
public RestFile() {
this.idFile = Integer.valueOf(-1);
this.dataInvio = new Date();
this.nomeFile = "";
this.documentiType = "";
this.tipoPratica = "";
setFile("");
}
public String toString() {
StringBuilder sb = new StringBuilder();
if (this.idFile != null) {
sb.append("Id = ");
sb.append(this.idFile);
sb.append(" ");
}
if (this.documentiType != null) {
sb.append("Documenti type = ");
sb.append(this.documentiType);
sb.append(" ");
}
if (this.tipoPratica != null) {
sb.append("Tipo pratica= ");
sb.append(this.tipoPratica);
sb.append(" ");
}
return sb.toString();
}
public String getNomeFile() {
return nomeFile;
}
public void setNomeFile(String nomeFile) {
this.nomeFile = nomeFile;
}
public Date getDataInvio() {
return dataInvio;
}
public void setDataInvio(Date dataInvio) {
this.dataInvio = dataInvio;
}
public String getDocumentiType() {
return documentiType;
}
public void setDocumentiType(String documentiType) {
this.documentiType = documentiType;
}
public String getTipoPratica() {
return tipoPratica;
}
public void setTipoPratica(String tipoPratica) {
this.tipoPratica = tipoPratica;
}
public Integer getIdFile() {
return idFile;
}
public void setIdFile(Integer idFile) {
this.idFile = idFile;
}
public String getFile() {
return file;
}
public void setFile(String file) {
this.file = file;
}
}

23
liferay-plugins-sdk-6.2/shared/portos-firma-shared/src/it/tref/firma/shared/Risposta.java

@ -0,0 +1,23 @@
package it.tref.firma.shared;
public class Risposta<T> {
private int risposta = -100;
private T obj = null;
public int getRisposta() {
return risposta;
}
public void setRisposta(int risposta) {
this.risposta = risposta;
}
public T getObj() {
return obj;
}
public void setObj(T obj) {
this.obj = obj;
}
}

13
liferay-plugins-sdk-6.2/shared/portos-firma-shared/src/it/tref/firma/shared/RispostaCostanti.java

@ -0,0 +1,13 @@
package it.tref.firma.shared;
public interface RispostaCostanti {
public static final int NO_SET = -100;
public static final int OK = 0;
public static final int NO_CONFIGURATION = 1;
public static final int NO_UTENTE = 2;
public static final int NO_LOGIN = 3;
public static final int NO_FILE = 4;
public static final int NO_PRATICA = 5;
public static final int ERRORE_APPLICAZIONE = 6;
}

26
liferay-plugins-sdk-6.2/shared/portos-firma-shared/src/it/tref/firma/shared/Stile.java

@ -0,0 +1,26 @@
package it.tref.firma.shared;
import java.util.ArrayList;
import java.util.List;
public class Stile {
private String logo = null;
private List<String> listNumrodlfProperty = new ArrayList<>();
public String getLogo() {
return logo;
}
public void setLogo(String logo) {
this.logo = logo;
}
public List<String> getListNumrodlfProperty() {
return listNumrodlfProperty;
}
public void setListNumrodlfProperty(List<String> listNumrodlfProperty) {
this.listNumrodlfProperty = listNumrodlfProperty;
}
}

2
liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/.classpath

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_80"/>
<classpathentry kind="lib" path="/home/portos/bin/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/lib/ext/portal-service.jar" sourcepath="/home/portos/sources/liferay-portal-src-6.2-ce-ga6"> <classpathentry kind="lib" path="/home/portos/bin/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/lib/ext/portal-service.jar" sourcepath="/home/portos/sources/liferay-portal-src-6.2-ce-ga6">
<attributes> <attributes>
<attribute name="javadoc_location" value="file:/home/portos/sources/liferay-javadocs-all/"/> <attribute name="javadoc_location" value="file:/home/portos/sources/liferay-javadocs-all/"/>

1
liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/messaging/dto/TemplateMessage.java

@ -15,7 +15,6 @@ public class TemplateMessage implements Serializable {
private String body; private String body;
private boolean attachmentPermitted; private boolean attachmentPermitted;
public long getTemplateId() { public long getTemplateId() {
return templateId; return templateId;
} }

11
liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/model/FileAttachment.java

@ -12,7 +12,6 @@ import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil;
import java.io.File; import java.io.File;
import java.io.InputStream; import java.io.InputStream;
public class FileAttachment extends com.liferay.mail.model.FileAttachment { public class FileAttachment extends com.liferay.mail.model.FileAttachment {
public static final Log _log = LogFactoryUtil.getLog(FileAttachment.class); public static final Log _log = LogFactoryUtil.getLog(FileAttachment.class);
@ -33,7 +32,6 @@ public class FileAttachment extends com.liferay.mail.model.FileAttachment {
this.setBytes(bytes); this.setBytes(bytes);
} }
public String getFileName() { public String getFileName() {
return fileName; return fileName;
} }
@ -43,7 +41,6 @@ public class FileAttachment extends com.liferay.mail.model.FileAttachment {
super.setFileName(fileName); super.setFileName(fileName);
} }
public long getFileEntryId() { public long getFileEntryId() {
return fileEntryId; return fileEntryId;
} }
@ -79,9 +76,10 @@ public class FileAttachment extends com.liferay.mail.model.FileAttachment {
} else if (Validator.isNotNull(fileEntryId)) { } else if (Validator.isNotNull(fileEntryId)) {
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(fileEntryId); FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(fileEntryId);
setFileName(fileEntry.getTitle() setFileName(fileEntry.getTitle()
+ (Validator.isNotNull(fileEntry.getExtension()) ? "." + fileEntry.getExtension() : StringPool.BLANK)); + (Validator.isNotNull(fileEntry.getExtension()) ? "." + fileEntry.getExtension()
InputStream is = : StringPool.BLANK));
DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(), fileEntry.getVersion(), false); InputStream is = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(),
fileEntry.getVersion(), false);
result = FileUtil.createTempFile(is); result = FileUtil.createTempFile(is);
is.close(); is.close();
result.deleteOnExit(); result.deleteOnExit();
@ -97,5 +95,4 @@ public class FileAttachment extends com.liferay.mail.model.FileAttachment {
return result; return result;
} }
} }

1
liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailManagerConstants.java

@ -1,6 +1,5 @@
package it.tref.liferay.portos.mailmanager.shared.util; package it.tref.liferay.portos.mailmanager.shared.util;
public class MailManagerConstants { public class MailManagerConstants {
public enum SendTemplateMode { public enum SendTemplateMode {

9
liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/MailUtil.java

@ -92,11 +92,13 @@ public class MailUtil {
public static List<com.liferay.mail.model.FileAttachment> getEmailFileAttachments( public static List<com.liferay.mail.model.FileAttachment> getEmailFileAttachments(
UploadPortletRequest uploadPortletRequest) { UploadPortletRequest uploadPortletRequest) {
return getEmailFileAttachments(uploadPortletRequest, Collections.<com.liferay.mail.model.FileAttachment>emptyList()); return getEmailFileAttachments(uploadPortletRequest,
Collections.<com.liferay.mail.model.FileAttachment> emptyList());
} }
public static List<com.liferay.mail.model.FileAttachment> getEmailFileAttachments( public static List<com.liferay.mail.model.FileAttachment> getEmailFileAttachments(
UploadPortletRequest uploadPortletRequest, List<com.liferay.mail.model.FileAttachment> defaultFileAttachments) { UploadPortletRequest uploadPortletRequest,
List<com.liferay.mail.model.FileAttachment> defaultFileAttachments) {
String allegatiIndexesString = uploadPortletRequest.getParameter("allegatiIndexes"); String allegatiIndexesString = uploadPortletRequest.getParameter("allegatiIndexes");
@ -104,8 +106,7 @@ public class MailUtil {
return defaultFileAttachments; return defaultFileAttachments;
} }
List<com.liferay.mail.model.FileAttachment> fileAttachments = List<com.liferay.mail.model.FileAttachment> fileAttachments = new ArrayList<com.liferay.mail.model.FileAttachment>();
new ArrayList<com.liferay.mail.model.FileAttachment>();
int[] allegatiIndexes = StringUtil.split(allegatiIndexesString, 0); int[] allegatiIndexes = StringUtil.split(allegatiIndexesString, 0);

1
liferay-plugins-sdk-6.2/shared/portos-mail-manager-shared/src/it/tref/liferay/portos/mailmanager/shared/util/StringUtil.java

@ -1,6 +1,5 @@
package it.tref.liferay.portos.mailmanager.shared.util; package it.tref.liferay.portos.mailmanager.shared.util;
public class StringUtil extends com.liferay.portal.kernel.util.StringUtil { public class StringUtil extends com.liferay.portal.kernel.util.StringUtil {
public static String[] splitAndTrim(String s) { public static String[] splitAndTrim(String s) {

Caricamento…
Annulla
Salva