diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/commons-io.jar b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/commons-io.jar deleted file mode 100644 index 00556b11..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/commons-io.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-plugin-package.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-plugin-package.properties index 7c7658ac..044bac22 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-plugin-package.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-plugin-package.properties @@ -15,7 +15,8 @@ portal-dependency-jars=\ jstl-api.jar,\ jstl-impl.jar,\ wsdl4j.jar,\ - xml-apis.jar + xml-apis.jar,\ + commons-io.jar portal-dependency-tlds=\ c.tld required-deployment-contexts=\ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml index 087cebff..b1c3af3d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml @@ -842,6 +842,7 @@ + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaClp.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaClp.java index d61522f9..cf51a1fc 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaClp.java @@ -109,6 +109,7 @@ public class IntPraticaClp extends BaseModelImpl attributes.put("collaudoParziale", getCollaudoParziale()); attributes.put("collaudoTotale", getCollaudoTotale()); attributes.put("controlloObbligatorio", getControlloObbligatorio()); + attributes.put("inLavorazioneSue", getInLavorazioneSue()); return attributes; } @@ -305,6 +306,12 @@ public class IntPraticaClp extends BaseModelImpl if (controlloObbligatorio != null) { setControlloObbligatorio(controlloObbligatorio); } + + Boolean inLavorazioneSue = (Boolean)attributes.get("inLavorazioneSue"); + + if (inLavorazioneSue != null) { + setInLavorazioneSue(inLavorazioneSue); + } } @Override @@ -1089,6 +1096,35 @@ public class IntPraticaClp extends BaseModelImpl } } + @Override + public boolean getInLavorazioneSue() { + return _inLavorazioneSue; + } + + @Override + public boolean isInLavorazioneSue() { + return _inLavorazioneSue; + } + + @Override + public void setInLavorazioneSue(boolean inLavorazioneSue) { + _inLavorazioneSue = inLavorazioneSue; + + if (_intPraticaRemoteModel != null) { + try { + Class clazz = _intPraticaRemoteModel.getClass(); + + Method method = clazz.getMethod("setInLavorazioneSue", + boolean.class); + + method.invoke(_intPraticaRemoteModel, inLavorazioneSue); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + @Override public java.lang.String getTitle(java.util.Locale locale, boolean completed) { try { @@ -1292,6 +1328,7 @@ public class IntPraticaClp extends BaseModelImpl clone.setCollaudoParziale(getCollaudoParziale()); clone.setCollaudoTotale(getCollaudoTotale()); clone.setControlloObbligatorio(getControlloObbligatorio()); + clone.setInLavorazioneSue(getInLavorazioneSue()); return clone; } @@ -1344,7 +1381,7 @@ public class IntPraticaClp extends BaseModelImpl @Override public String toString() { - StringBundler sb = new StringBundler(63); + StringBundler sb = new StringBundler(65); sb.append("{uuid="); sb.append(getUuid()); @@ -1408,6 +1445,8 @@ public class IntPraticaClp extends BaseModelImpl sb.append(getCollaudoTotale()); sb.append(", controlloObbligatorio="); sb.append(getControlloObbligatorio()); + sb.append(", inLavorazioneSue="); + sb.append(getInLavorazioneSue()); sb.append("}"); return sb.toString(); @@ -1415,7 +1454,7 @@ public class IntPraticaClp extends BaseModelImpl @Override public String toXmlString() { - StringBundler sb = new StringBundler(97); + StringBundler sb = new StringBundler(100); sb.append(""); sb.append("it.tref.liferay.portos.bo.model.IntPratica"); @@ -1545,6 +1584,10 @@ public class IntPraticaClp extends BaseModelImpl "controlloObbligatorio"); + sb.append( + "inLavorazioneSue"); sb.append(""); @@ -1584,6 +1627,7 @@ public class IntPraticaClp extends BaseModelImpl private boolean _collaudoParziale; private boolean _collaudoTotale; private boolean _controlloObbligatorio; + private boolean _inLavorazioneSue; private BaseModel _intPraticaRemoteModel; private Class _clpSerializerClass = it.tref.liferay.portos.bo.service.ClpSerializer.class; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaModel.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaModel.java index 81dd43ab..9fb60bc3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaModel.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaModel.java @@ -601,6 +601,27 @@ public interface IntPraticaModel extends BaseModel, */ public void setControlloObbligatorio(boolean controlloObbligatorio); + /** + * Returns the in lavorazione sue of this int pratica. + * + * @return the in lavorazione sue of this int pratica + */ + public boolean getInLavorazioneSue(); + + /** + * Returns true if this int pratica is in lavorazione sue. + * + * @return true if this int pratica is in lavorazione sue; false otherwise + */ + public boolean isInLavorazioneSue(); + + /** + * Sets whether this int pratica is in lavorazione sue. + * + * @param inLavorazioneSue the in lavorazione sue of this int pratica + */ + public void setInLavorazioneSue(boolean inLavorazioneSue); + @Override public boolean isNew(); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaSoap.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaSoap.java index 22074ec1..9f134235 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaSoap.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaSoap.java @@ -62,6 +62,7 @@ public class IntPraticaSoap implements Serializable { soapModel.setCollaudoParziale(model.getCollaudoParziale()); soapModel.setCollaudoTotale(model.getCollaudoTotale()); soapModel.setControlloObbligatorio(model.getControlloObbligatorio()); + soapModel.setInLavorazioneSue(model.getInLavorazioneSue()); return soapModel; } @@ -392,6 +393,18 @@ public class IntPraticaSoap implements Serializable { _controlloObbligatorio = controlloObbligatorio; } + public boolean getInLavorazioneSue() { + return _inLavorazioneSue; + } + + public boolean isInLavorazioneSue() { + return _inLavorazioneSue; + } + + public void setInLavorazioneSue(boolean inLavorazioneSue) { + _inLavorazioneSue = inLavorazioneSue; + } + private String _uuid; private long _intPraticaId; private long _companyId; @@ -423,4 +436,5 @@ public class IntPraticaSoap implements Serializable { private boolean _collaudoParziale; private boolean _collaudoTotale; private boolean _controlloObbligatorio; + private boolean _inLavorazioneSue; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaWrapper.java index 235b99d1..ce896ef6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/model/IntPraticaWrapper.java @@ -83,6 +83,7 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper { attributes.put("collaudoParziale", getCollaudoParziale()); attributes.put("collaudoTotale", getCollaudoTotale()); attributes.put("controlloObbligatorio", getControlloObbligatorio()); + attributes.put("inLavorazioneSue", getInLavorazioneSue()); return attributes; } @@ -279,6 +280,12 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper { if (controlloObbligatorio != null) { setControlloObbligatorio(controlloObbligatorio); } + + Boolean inLavorazioneSue = (Boolean)attributes.get("inLavorazioneSue"); + + if (inLavorazioneSue != null) { + setInLavorazioneSue(inLavorazioneSue); + } } /** @@ -1037,6 +1044,36 @@ public class IntPraticaWrapper implements IntPratica, ModelWrapper { _intPratica.setControlloObbligatorio(controlloObbligatorio); } + /** + * Returns the in lavorazione sue of this int pratica. + * + * @return the in lavorazione sue of this int pratica + */ + @Override + public boolean getInLavorazioneSue() { + return _intPratica.getInLavorazioneSue(); + } + + /** + * Returns true if this int pratica is in lavorazione sue. + * + * @return true if this int pratica is in lavorazione sue; false otherwise + */ + @Override + public boolean isInLavorazioneSue() { + return _intPratica.isInLavorazioneSue(); + } + + /** + * Sets whether this int pratica is in lavorazione sue. + * + * @param inLavorazioneSue the in lavorazione sue of this int pratica + */ + @Override + public void setInLavorazioneSue(boolean inLavorazioneSue) { + _intPratica.setInLavorazioneSue(inLavorazioneSue); + } + @Override public boolean isNew() { return _intPratica.isNew(); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/IntPraticaAdvancedSearch.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/IntPraticaAdvancedSearch.java index 6bd0968e..42f0d11d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/IntPraticaAdvancedSearch.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/search/IntPraticaAdvancedSearch.java @@ -77,6 +77,8 @@ public class IntPraticaAdvancedSearch { booleanQuery.add(termQuery, BooleanClauseOccur.MUST); termQuery = TermQueryFactoryUtil.create(searchContext, PortosIndexField.PRATICA_APERTA, StringPool.TRUE); booleanQuery.add(termQuery, BooleanClauseOccur.MUST); + termQuery = TermQueryFactoryUtil.create(searchContext, PortosIndexField.IN_LAVORAZIONE_SUE, StringPool.FALSE); + booleanQuery.add(termQuery, BooleanClauseOccur.MUST); // Condizioni aggiuntive query(request, user, booleanQuery, searchContext); hits = SearchEngineUtil.search(searchContext, booleanQuery); @@ -109,6 +111,8 @@ public class IntPraticaAdvancedSearch { booleanQuery.add(termQuery, BooleanClauseOccur.MUST); termQuery = TermQueryFactoryUtil.create(searchContext, PortosIndexField.PRATICA_APERTA, StringPool.TRUE); booleanQuery.add(termQuery, BooleanClauseOccur.MUST); + termQuery = TermQueryFactoryUtil.create(searchContext, PortosIndexField.IN_LAVORAZIONE_SUE, StringPool.FALSE); + booleanQuery.add(termQuery, BooleanClauseOccur.MUST); // Condizioni aggiuntive query(request, user, booleanQuery, searchContext); hits = SearchEngineUtil.search(searchContext, booleanQuery); @@ -144,6 +148,8 @@ public class IntPraticaAdvancedSearch { termQuery = TermQueryFactoryUtil.create(searchContext, PortosIndexField.PRATICA_APERTA, StringPool.FALSE); booleanQuery.add(termQuery, BooleanClauseOccur.MUST); booleanQuery.add(altriProgettiBooleanQuery, BooleanClauseOccur.MUST); + termQuery = TermQueryFactoryUtil.create(searchContext, PortosIndexField.IN_LAVORAZIONE_SUE, StringPool.FALSE); + booleanQuery.add(termQuery, BooleanClauseOccur.MUST); // Condizioni aggiuntive query(request, user, booleanQuery, searchContext); hits = SearchEngineUtil.search(searchContext, booleanQuery); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java index a239c284..13a74e0c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalService.java @@ -317,6 +317,9 @@ public interface IntPraticaLocalService extends BaseLocalService, java.lang.String[] parameterTypes, java.lang.Object[] arguments) throws java.lang.Throwable; + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.Map getTipiProcedure(); + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) public it.tref.liferay.portos.bo.model.IntPratica addIntPratica( long territorioId, java.lang.String tipoProcedura, @@ -334,7 +337,6 @@ public interface IntPraticaLocalService extends BaseLocalService, throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException; - @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) public it.tref.liferay.portos.bo.model.IntPratica deleteIntPratica( it.tref.liferay.portos.bo.model.IntPratica intPratica, boolean forced) throws com.liferay.portal.kernel.exception.PortalException, diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java index e09ae821..4555d530 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceClp.java @@ -131,254 +131,258 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { _methodParameterTypes21 = new String[] { "java.lang.String" }; - _methodName23 = "addIntPratica"; + _methodName23 = "getTipiProcedure"; - _methodParameterTypes23 = new String[] { + _methodParameterTypes23 = new String[] { }; + + _methodName24 = "addIntPratica"; + + _methodParameterTypes24 = new String[] { "long", "java.lang.String", "com.liferay.portal.service.ServiceContext" }; - _methodName24 = "addIntPratica"; + _methodName25 = "addIntPratica"; - _methodParameterTypes24 = new String[] { + _methodParameterTypes25 = new String[] { "long", "java.lang.String", "java.lang.String", "long", "java.lang.String", "java.lang.String", "java.lang.String", "boolean", "int", "java.util.Date", "com.liferay.portal.service.ServiceContext" }; - _methodName25 = "deleteIntPratica"; + _methodName26 = "deleteIntPratica"; - _methodParameterTypes25 = new String[] { + _methodParameterTypes26 = new String[] { "it.tref.liferay.portos.bo.model.IntPratica", "boolean" }; - _methodName26 = "cloneIntPratica"; + _methodName27 = "cloneIntPratica"; - _methodParameterTypes26 = new String[] { + _methodParameterTypes27 = new String[] { "long", "com.liferay.portal.service.ServiceContext" }; - _methodName27 = "updateDelegati"; + _methodName28 = "updateDelegati"; - _methodParameterTypes27 = new String[] { + _methodParameterTypes28 = new String[] { "long", "java.lang.String", "java.lang.String", "boolean" }; - _methodName28 = "findFascicoliNotProgetto"; + _methodName29 = "findFascicoliNotProgetto"; - _methodParameterTypes28 = new String[] { "int", "int" }; + _methodParameterTypes29 = new String[] { "int", "int" }; - _methodName29 = "countFascicoliNotProgetto"; + _methodName30 = "countFascicoliNotProgetto"; - _methodParameterTypes29 = new String[] { }; + _methodParameterTypes30 = new String[] { }; - _methodName30 = "addNumeroProgetto"; + _methodName31 = "addNumeroProgetto"; - _methodParameterTypes30 = new String[] { "long" }; + _methodParameterTypes31 = new String[] { "long" }; - _methodName31 = "sospendiPratica"; + _methodName32 = "sospendiPratica"; - _methodParameterTypes31 = new String[] { "long", "boolean" }; + _methodParameterTypes32 = new String[] { "long", "boolean" }; - _methodName32 = "cambiaTitolare"; + _methodName33 = "cambiaTitolare"; - _methodParameterTypes32 = new String[] { + _methodParameterTypes33 = new String[] { "long", "long", "com.liferay.portal.service.ServiceContext" }; - _methodName33 = "updateStatoPratica"; + _methodName34 = "updateStatoPratica"; - _methodParameterTypes33 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes34 = new String[] { "long", "java.lang.String" }; - _methodName34 = "findByC_UserId"; + _methodName35 = "findByC_UserId"; - _methodParameterTypes34 = new String[] { "long", "long", "int", "int" }; + _methodParameterTypes35 = new String[] { "long", "long", "int", "int" }; - _methodName35 = "countByC_UserId"; + _methodName36 = "countByC_UserId"; - _methodParameterTypes35 = new String[] { "long", "long" }; + _methodParameterTypes36 = new String[] { "long", "long" }; - _methodName36 = "updateStatus"; + _methodName37 = "updateStatus"; - _methodParameterTypes36 = new String[] { "long", "int" }; + _methodParameterTypes37 = new String[] { "long", "int" }; - _methodName37 = "findByCanAddFineLavori"; + _methodName38 = "findByCanAddFineLavori"; - _methodParameterTypes37 = new String[] { + _methodParameterTypes38 = new String[] { "long", "java.lang.String", "int", "int" }; - _methodName38 = "countByCanAddFineLavori"; + _methodName39 = "countByCanAddFineLavori"; - _methodParameterTypes38 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes39 = new String[] { "long", "java.lang.String" }; - _methodName39 = "findByCanAddCollaudo"; + _methodName40 = "findByCanAddCollaudo"; - _methodParameterTypes39 = new String[] { + _methodParameterTypes40 = new String[] { "long", "java.lang.String", "int", "int" }; - _methodName40 = "countByCanAddCollaudo"; + _methodName41 = "countByCanAddCollaudo"; - _methodParameterTypes40 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes41 = new String[] { "long", "java.lang.String" }; - _methodName41 = "search"; + _methodName42 = "search"; - _methodParameterTypes41 = new String[] { "java.util.List", "int", "int" }; + _methodParameterTypes42 = new String[] { "java.util.List", "int", "int" }; - _methodName42 = "countSearch"; + _methodName43 = "countSearch"; - _methodParameterTypes42 = new String[] { "java.util.List" }; + _methodParameterTypes43 = new String[] { "java.util.List" }; - _methodName43 = "searchWithIntPraticaId"; + _methodName44 = "searchWithIntPraticaId"; - _methodParameterTypes43 = new String[] { + _methodParameterTypes44 = new String[] { "java.util.List", "long", "int", "int" }; - _methodName44 = "allegaFileAnnullamento"; + _methodName45 = "allegaFileAnnullamento"; - _methodParameterTypes44 = new String[] { + _methodParameterTypes45 = new String[] { "long", "byte[][]", "java.lang.String", "java.lang.String", "com.liferay.portal.service.ServiceContext" }; - _methodName45 = "generateFileAnnullamento"; + _methodName46 = "generateFileAnnullamento"; - _methodParameterTypes45 = new String[] { + _methodParameterTypes46 = new String[] { "long", "com.liferay.portal.service.ServiceContext" }; - _methodName46 = "deleteFileAnnullamento"; + _methodName47 = "deleteFileAnnullamento"; - _methodParameterTypes46 = new String[] { "long" }; + _methodParameterTypes47 = new String[] { "long" }; - _methodName47 = "completeAnnullamento"; + _methodName48 = "completeAnnullamento"; - _methodParameterTypes47 = new String[] { "long" }; + _methodParameterTypes48 = new String[] { "long" }; - _methodName48 = "cambiaIstruttore"; + _methodName49 = "cambiaIstruttore"; - _methodParameterTypes48 = new String[] { "long", "long", "long" }; + _methodParameterTypes49 = new String[] { "long", "long", "long" }; - _methodName49 = "countCaricoLavoroCF"; + _methodName50 = "countCaricoLavoroCF"; - _methodParameterTypes49 = new String[] { + _methodParameterTypes50 = new String[] { "long", "java.lang.String", "java.lang.Long[][]" }; - _methodName50 = "countCaricoLavoroIstruttore"; + _methodName51 = "countCaricoLavoroIstruttore"; - _methodParameterTypes50 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes51 = new String[] { "long", "java.lang.String" }; - _methodName51 = "generateReportPratica"; + _methodName52 = "generateReportPratica"; - _methodParameterTypes51 = new String[] { + _methodParameterTypes52 = new String[] { "it.tref.liferay.portos.bo.model.IntPratica", "long" }; - _methodName52 = "updateModifiedDate"; + _methodName53 = "updateModifiedDate"; - _methodParameterTypes52 = new String[] { "long", "java.util.Date" }; + _methodParameterTypes53 = new String[] { "long", "java.util.Date" }; - _methodName53 = "countAutorizzazione"; + _methodName54 = "countAutorizzazione"; - _methodParameterTypes53 = new String[] { + _methodParameterTypes54 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName54 = "countSanatorie"; + _methodName55 = "countSanatorie"; - _methodParameterTypes54 = new String[] { + _methodParameterTypes55 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName55 = "countOpereMinoreImportanza"; + _methodName56 = "countOpereMinoreImportanza"; - _methodParameterTypes55 = new String[] { + _methodParameterTypes56 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName56 = "countDeposito"; + _methodName57 = "countDeposito"; - _methodParameterTypes56 = new String[] { + _methodParameterTypes57 = new String[] { "java.util.Date", "java.util.Date", "long", "boolean" }; - _methodName57 = "countVidimate"; + _methodName58 = "countVidimate"; - _methodParameterTypes57 = new String[] { + _methodParameterTypes58 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String", "boolean" }; - _methodName58 = "countControllo"; + _methodName59 = "countControllo"; - _methodParameterTypes58 = new String[] { + _methodParameterTypes59 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String", "boolean" }; - _methodName59 = "riparaWorkflow"; + _methodName60 = "riparaWorkflow"; - _methodParameterTypes59 = new String[] { }; + _methodParameterTypes60 = new String[] { }; - _methodName60 = "reIndexFascicolo"; + _methodName61 = "reIndexFascicolo"; - _methodParameterTypes60 = new String[] { + _methodParameterTypes61 = new String[] { "it.tref.liferay.portos.bo.model.IntPratica", "long" }; - _methodName61 = "reIndexFasciolo"; - - _methodParameterTypes61 = new String[] { "java.lang.String", "long" }; - _methodName62 = "reIndexFasciolo"; - _methodParameterTypes62 = new String[] { "long", "long" }; + _methodParameterTypes62 = new String[] { "java.lang.String", "long" }; - _methodName63 = "findByNumeroProgetto"; + _methodName63 = "reIndexFasciolo"; - _methodParameterTypes63 = new String[] { "java.lang.String" }; + _methodParameterTypes63 = new String[] { "long", "long" }; - _methodName64 = "findByTerritorioId"; + _methodName64 = "findByNumeroProgetto"; - _methodParameterTypes64 = new String[] { "long" }; + _methodParameterTypes64 = new String[] { "java.lang.String" }; - _methodName65 = "reportTempisticheIstruttorieAvvisiAutorizzazioni"; + _methodName65 = "findByTerritorioId"; - _methodParameterTypes65 = new String[] { - "java.util.Date", "java.util.Date", "long", "java.lang.String" - }; + _methodParameterTypes65 = new String[] { "long" }; - _methodName66 = "reportPraticheVidimate"; + _methodName66 = "reportTempisticheIstruttorieAvvisiAutorizzazioni"; _methodParameterTypes66 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String" }; - _methodName67 = "countIngressiAutorizzazioni"; + _methodName67 = "reportPraticheVidimate"; _methodParameterTypes67 = new String[] { - "java.util.Date", "java.util.Date", "long" + "java.util.Date", "java.util.Date", "long", "java.lang.String" }; - _methodName68 = "countIngressiDepositi"; + _methodName68 = "countIngressiAutorizzazioni"; _methodParameterTypes68 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName69 = "countIngressiCO"; + _methodName69 = "countIngressiDepositi"; _methodParameterTypes69 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName70 = "getOrganizationByIntPraticaId"; + _methodName70 = "countIngressiCO"; + + _methodParameterTypes70 = new String[] { + "java.util.Date", "java.util.Date", "long" + }; + + _methodName71 = "getOrganizationByIntPraticaId"; - _methodParameterTypes70 = new String[] { "long" }; + _methodParameterTypes71 = new String[] { "long" }; } @Override @@ -1081,6 +1085,29 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { throw new UnsupportedOperationException(); } + @Override + public java.util.Map getTipiProcedure() { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName23, + _methodParameterTypes23, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.Map)ClpSerializer.translateOutput(returnObj); + } + @Override public it.tref.liferay.portos.bo.model.IntPratica addIntPratica( long territorioId, java.lang.String tipoProcedura, @@ -1090,8 +1117,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName23, - _methodParameterTypes23, + returnObj = _invokableLocalService.invokeMethod(_methodName24, + _methodParameterTypes24, new Object[] { territorioId, @@ -1135,8 +1162,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName24, - _methodParameterTypes24, + returnObj = _invokableLocalService.invokeMethod(_methodName25, + _methodParameterTypes25, new Object[] { userId, @@ -1192,8 +1219,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName25, - _methodParameterTypes25, + returnObj = _invokableLocalService.invokeMethod(_methodName26, + _methodParameterTypes26, new Object[] { ClpSerializer.translateInput(intPratica), @@ -1232,8 +1259,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName26, - _methodParameterTypes26, + returnObj = _invokableLocalService.invokeMethod(_methodName27, + _methodParameterTypes27, new Object[] { intPraticaId, @@ -1273,8 +1300,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName27, - _methodParameterTypes27, + returnObj = _invokableLocalService.invokeMethod(_methodName28, + _methodParameterTypes28, new Object[] { intPraticaId, @@ -1316,8 +1343,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName28, - _methodParameterTypes28, new Object[] { start, end }); + returnObj = _invokableLocalService.invokeMethod(_methodName29, + _methodParameterTypes29, new Object[] { start, end }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -1344,8 +1371,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName29, - _methodParameterTypes29, new Object[] { }); + returnObj = _invokableLocalService.invokeMethod(_methodName30, + _methodParameterTypes30, new Object[] { }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -1374,8 +1401,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName30, - _methodParameterTypes30, new Object[] { intPraticaId }); + returnObj = _invokableLocalService.invokeMethod(_methodName31, + _methodParameterTypes31, new Object[] { intPraticaId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -1408,8 +1435,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName31, - _methodParameterTypes31, + returnObj = _invokableLocalService.invokeMethod(_methodName32, + _methodParameterTypes32, new Object[] { intPraticaId, sospesa }); } catch (Throwable t) { @@ -1444,8 +1471,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName32, - _methodParameterTypes32, + returnObj = _invokableLocalService.invokeMethod(_methodName33, + _methodParameterTypes33, new Object[] { intPraticaId, @@ -1485,8 +1512,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName33, - _methodParameterTypes33, + returnObj = _invokableLocalService.invokeMethod(_methodName34, + _methodParameterTypes34, new Object[] { intPraticaId, @@ -1523,8 +1550,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName34, - _methodParameterTypes34, + returnObj = _invokableLocalService.invokeMethod(_methodName35, + _methodParameterTypes35, new Object[] { companyId, userId, start, end }); } catch (Throwable t) { @@ -1552,8 +1579,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName35, - _methodParameterTypes35, new Object[] { companyId, userId }); + returnObj = _invokableLocalService.invokeMethod(_methodName36, + _methodParameterTypes36, new Object[] { companyId, userId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -1579,8 +1606,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { try { - _invokableLocalService.invokeMethod(_methodName36, - _methodParameterTypes36, new Object[] { intPraticaId, status }); + _invokableLocalService.invokeMethod(_methodName37, + _methodParameterTypes37, new Object[] { intPraticaId, status }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -1611,8 +1638,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName37, - _methodParameterTypes37, + returnObj = _invokableLocalService.invokeMethod(_methodName38, + _methodParameterTypes38, new Object[] { companyId, @@ -1654,8 +1681,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName38, - _methodParameterTypes38, + returnObj = _invokableLocalService.invokeMethod(_methodName39, + _methodParameterTypes39, new Object[] { companyId, @@ -1693,8 +1720,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName39, - _methodParameterTypes39, + returnObj = _invokableLocalService.invokeMethod(_methodName40, + _methodParameterTypes40, new Object[] { companyId, @@ -1736,8 +1763,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName40, - _methodParameterTypes40, + returnObj = _invokableLocalService.invokeMethod(_methodName41, + _methodParameterTypes41, new Object[] { companyId, @@ -1774,8 +1801,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName41, - _methodParameterTypes41, + returnObj = _invokableLocalService.invokeMethod(_methodName42, + _methodParameterTypes42, new Object[] { ClpSerializer.translateInput(groupIds), @@ -1809,8 +1836,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName42, - _methodParameterTypes42, + returnObj = _invokableLocalService.invokeMethod(_methodName43, + _methodParameterTypes43, new Object[] { ClpSerializer.translateInput(groupIds) }); } catch (Throwable t) { @@ -1839,8 +1866,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName43, - _methodParameterTypes43, + returnObj = _invokableLocalService.invokeMethod(_methodName44, + _methodParameterTypes44, new Object[] { ClpSerializer.translateInput(groupIds), @@ -1881,8 +1908,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName44, - _methodParameterTypes44, + returnObj = _invokableLocalService.invokeMethod(_methodName45, + _methodParameterTypes45, new Object[] { intPraticaId, @@ -1932,8 +1959,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName45, - _methodParameterTypes45, + returnObj = _invokableLocalService.invokeMethod(_methodName46, + _methodParameterTypes46, new Object[] { intPraticaId, @@ -1972,8 +1999,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { try { - _invokableLocalService.invokeMethod(_methodName46, - _methodParameterTypes46, + _invokableLocalService.invokeMethod(_methodName47, + _methodParameterTypes47, new Object[] { docPraticaAnnullamentoId }); } catch (Throwable t) { @@ -2002,8 +2029,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { try { - _invokableLocalService.invokeMethod(_methodName47, - _methodParameterTypes47, new Object[] { intPraticaId }); + _invokableLocalService.invokeMethod(_methodName48, + _methodParameterTypes48, new Object[] { intPraticaId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -2032,8 +2059,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { try { - _invokableLocalService.invokeMethod(_methodName48, - _methodParameterTypes48, + _invokableLocalService.invokeMethod(_methodName49, + _methodParameterTypes49, new Object[] { intPraticaId, controlloPraticaId, istruttoreId }); } catch (Throwable t) { @@ -2065,8 +2092,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName49, - _methodParameterTypes49, + returnObj = _invokableLocalService.invokeMethod(_methodName50, + _methodParameterTypes50, new Object[] { ispettoreId, @@ -2105,8 +2132,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName50, - _methodParameterTypes50, + returnObj = _invokableLocalService.invokeMethod(_methodName51, + _methodParameterTypes51, new Object[] { ispettoreId, @@ -2140,8 +2167,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName51, - _methodParameterTypes51, + returnObj = _invokableLocalService.invokeMethod(_methodName52, + _methodParameterTypes52, new Object[] { ClpSerializer.translateInput(intPratica), @@ -2179,8 +2206,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName52, - _methodParameterTypes52, + returnObj = _invokableLocalService.invokeMethod(_methodName53, + _methodParameterTypes53, new Object[] { intPraticaId, @@ -2217,8 +2244,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName53, - _methodParameterTypes53, + returnObj = _invokableLocalService.invokeMethod(_methodName54, + _methodParameterTypes54, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2253,8 +2280,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName54, - _methodParameterTypes54, + returnObj = _invokableLocalService.invokeMethod(_methodName55, + _methodParameterTypes55, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2289,8 +2316,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName55, - _methodParameterTypes55, + returnObj = _invokableLocalService.invokeMethod(_methodName56, + _methodParameterTypes56, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2325,8 +2352,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName56, - _methodParameterTypes56, + returnObj = _invokableLocalService.invokeMethod(_methodName57, + _methodParameterTypes57, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2363,8 +2390,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName57, - _methodParameterTypes57, + returnObj = _invokableLocalService.invokeMethod(_methodName58, + _methodParameterTypes58, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2404,8 +2431,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName58, - _methodParameterTypes58, + returnObj = _invokableLocalService.invokeMethod(_methodName59, + _methodParameterTypes59, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2443,8 +2470,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName59, - _methodParameterTypes59, new Object[] { }); + returnObj = _invokableLocalService.invokeMethod(_methodName60, + _methodParameterTypes60, new Object[] { }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -2469,8 +2496,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { public void reIndexFascicolo( it.tref.liferay.portos.bo.model.IntPratica intPratica, long companyId) { try { - _invokableLocalService.invokeMethod(_methodName60, - _methodParameterTypes60, + _invokableLocalService.invokeMethod(_methodName61, + _methodParameterTypes61, new Object[] { ClpSerializer.translateInput(intPratica), companyId }); } catch (Throwable t) { @@ -2490,8 +2517,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { public void reIndexFasciolo(java.lang.String numeroProgetto, long companyId) throws com.liferay.portal.kernel.exception.SystemException { try { - _invokableLocalService.invokeMethod(_methodName61, - _methodParameterTypes61, + _invokableLocalService.invokeMethod(_methodName62, + _methodParameterTypes62, new Object[] { ClpSerializer.translateInput(numeroProgetto), @@ -2520,8 +2547,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { try { - _invokableLocalService.invokeMethod(_methodName62, - _methodParameterTypes62, + _invokableLocalService.invokeMethod(_methodName63, + _methodParameterTypes63, new Object[] { intPraticaId, companyId }); } catch (Throwable t) { @@ -2552,8 +2579,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName63, - _methodParameterTypes63, + returnObj = _invokableLocalService.invokeMethod(_methodName64, + _methodParameterTypes64, new Object[] { ClpSerializer.translateInput(numeroProgetto) }); } catch (Throwable t) { @@ -2582,8 +2609,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName64, - _methodParameterTypes64, new Object[] { territorioId }); + returnObj = _invokableLocalService.invokeMethod(_methodName65, + _methodParameterTypes65, new Object[] { territorioId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -2612,8 +2639,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName65, - _methodParameterTypes65, + returnObj = _invokableLocalService.invokeMethod(_methodName66, + _methodParameterTypes66, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2651,8 +2678,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName66, - _methodParameterTypes66, + returnObj = _invokableLocalService.invokeMethod(_methodName67, + _methodParameterTypes67, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2689,8 +2716,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName67, - _methodParameterTypes67, + returnObj = _invokableLocalService.invokeMethod(_methodName68, + _methodParameterTypes68, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2725,8 +2752,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName68, - _methodParameterTypes68, + returnObj = _invokableLocalService.invokeMethod(_methodName69, + _methodParameterTypes69, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2761,8 +2788,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName69, - _methodParameterTypes69, + returnObj = _invokableLocalService.invokeMethod(_methodName70, + _methodParameterTypes70, new Object[] { ClpSerializer.translateInput(dtMin), @@ -2798,8 +2825,8 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { Object returnObj = null; try { - returnObj = _invokableLocalService.invokeMethod(_methodName70, - _methodParameterTypes70, new Object[] { intPraticaId }); + returnObj = _invokableLocalService.invokeMethod(_methodName71, + _methodParameterTypes71, new Object[] { intPraticaId }); } catch (Throwable t) { t = ClpSerializer.translateThrowable(t); @@ -2965,4 +2992,6 @@ public class IntPraticaLocalServiceClp implements IntPraticaLocalService { private String[] _methodParameterTypes69; private String _methodName70; private String[] _methodParameterTypes70; + private String _methodName71; + private String[] _methodParameterTypes71; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceUtil.java index 647b90a7..5a03fa79 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceUtil.java @@ -342,6 +342,10 @@ public class IntPraticaLocalServiceUtil { return getService().invokeMethod(name, parameterTypes, arguments); } + public static java.util.Map getTipiProcedure() { + return getService().getTipiProcedure(); + } + public static it.tref.liferay.portos.bo.model.IntPratica addIntPratica( long territorioId, java.lang.String tipoProcedura, com.liferay.portal.service.ServiceContext serviceContext) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java index 6a75dca7..35e0ea12 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/service/IntPraticaLocalServiceWrapper.java @@ -362,6 +362,11 @@ public class IntPraticaLocalServiceWrapper implements IntPraticaLocalService, arguments); } + @Override + public java.util.Map getTipiProcedure() { + return _intPraticaLocalService.getTipiProcedure(); + } + @Override public it.tref.liferay.portos.bo.model.IntPratica addIntPratica( long territorioId, java.lang.String tipoProcedura, diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/DocumentiPraticaUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/DocumentiPraticaUtil.java index 936f9ebb..f9da1e91 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/DocumentiPraticaUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/DocumentiPraticaUtil.java @@ -5,9 +5,14 @@ import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.shared.util.Constants; import java.util.ArrayList; +import java.util.LinkedHashMap; import java.util.List; import java.util.Set; import java.util.TreeSet; +import java.util.Map; + +import com.liferay.portal.kernel.language.LanguageUtil; +import com.liferay.portal.kernel.util.LocaleUtil; public class DocumentiPraticaUtil { @@ -75,49 +80,57 @@ public class DocumentiPraticaUtil { public static final String TIPOLOGIA_ALLEGATO_VARIAZIONE_SOGGETTO = "VS"; public static final String TIPOLOGIA_ALLEGATO_ANNULLAMENTO_FASCICOLO = "AI"; - public static List getDocObbligatori() { - List docObbligatori = new ArrayList(); - return docObbligatori; + private static final List docDomanda = new ArrayList(); + private static final Map tipiDocDomanda = new LinkedHashMap(); + + private static void addDocDomanda(String tipo) { + docDomanda.add(tipo); + tipiDocDomanda.put(tipo, LanguageUtil.get(LocaleUtil.ITALIAN, "label-documenti-tipologia-" + tipo)); } - public static List getDocObbligatoriCheck() { - List docObbligatoriCheck = new ArrayList(); - return docObbligatoriCheck; + static { + addDocDomanda(TIPOLOGIA_ALLEGATO_A01); + addDocDomanda(TIPOLOGIA_ALLEGATO_A02); + addDocDomanda(TIPOLOGIA_ALLEGATO_A03); + addDocDomanda(TIPOLOGIA_ALLEGATO_A04); + addDocDomanda(TIPOLOGIA_ALLEGATO_A08); + addDocDomanda(TIPOLOGIA_ALLEGATO_A09); + addDocDomanda(TIPOLOGIA_ALLEGATO_A10); + addDocDomanda(TIPOLOGIA_ALLEGATO_A11); + addDocDomanda(TIPOLOGIA_ALLEGATO_A12); + addDocDomanda(TIPOLOGIA_ALLEGATO_A13); + addDocDomanda(TIPOLOGIA_ALLEGATO_A15); + addDocDomanda(TIPOLOGIA_ALLEGATO_A16); + addDocDomanda(TIPOLOGIA_ALLEGATO_A17); + addDocDomanda(TIPOLOGIA_ALLEGATO_A18); + addDocDomanda(TIPOLOGIA_ALLEGATO_A19); + addDocDomanda(TIPOLOGIA_ALLEGATO_A20); + addDocDomanda(TIPOLOGIA_ALLEGATO_A21); + addDocDomanda(TIPOLOGIA_ALLEGATO_A24); + addDocDomanda(TIPOLOGIA_ALLEGATO_A25); + addDocDomanda(TIPOLOGIA_ALLEGATO_A26); + addDocDomanda(TIPOLOGIA_ALLEGATO_A27); + addDocDomanda(TIPOLOGIA_ALLEGATO_A28); + addDocDomanda(TIPOLOGIA_ALLEGATO_A29); + addDocDomanda(TIPOLOGIA_ALLEGATO_A30); + addDocDomanda(TIPOLOGIA_ALLEGATO_ALTRI); + addDocDomanda(TIPOLOGIA_ALLEGATO_DELEGA); } - @SuppressWarnings("serial") public static List getDocDomanda() { + return docDomanda; + } - return new ArrayList() { - { - add(TIPOLOGIA_ALLEGATO_A01); - add(TIPOLOGIA_ALLEGATO_A02); - add(TIPOLOGIA_ALLEGATO_A03); - add(TIPOLOGIA_ALLEGATO_A04); - add(TIPOLOGIA_ALLEGATO_A08); - add(TIPOLOGIA_ALLEGATO_A09); - add(TIPOLOGIA_ALLEGATO_A10); - add(TIPOLOGIA_ALLEGATO_A11); - add(TIPOLOGIA_ALLEGATO_A12); - add(TIPOLOGIA_ALLEGATO_A13); - add(TIPOLOGIA_ALLEGATO_A15); - add(TIPOLOGIA_ALLEGATO_A16); - add(TIPOLOGIA_ALLEGATO_A17); - add(TIPOLOGIA_ALLEGATO_A18); - add(TIPOLOGIA_ALLEGATO_A19); - add(TIPOLOGIA_ALLEGATO_A20); - add(TIPOLOGIA_ALLEGATO_A21); - add(TIPOLOGIA_ALLEGATO_A24); - add(TIPOLOGIA_ALLEGATO_A25); - add(TIPOLOGIA_ALLEGATO_A26); - add(TIPOLOGIA_ALLEGATO_A27); - add(TIPOLOGIA_ALLEGATO_A28); - add(TIPOLOGIA_ALLEGATO_A29); - add(TIPOLOGIA_ALLEGATO_A30); - add(TIPOLOGIA_ALLEGATO_ALTRI); - add(TIPOLOGIA_ALLEGATO_DELEGA); - } - }; + public static Map getTipiDocDomanda() { + return tipiDocDomanda; + } + + public static List getDocObbligatori() { + return new ArrayList(); + } + + public static List getDocObbligatoriCheck() { + return new ArrayList(); } public static Set getDocObbligatoriDomanda(IntPratica intPratica, DettPratica dettPratica) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PortosIndexField.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PortosIndexField.java index 31b31881..49306644 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PortosIndexField.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/PortosIndexField.java @@ -70,4 +70,5 @@ public class PortosIndexField implements Serializable { public static final String COMUNE = "comune"; public static final String TIPO_PROCEDURA = "tipoProcedura"; public static final String UNITA_OPERATIVA = "unitaOperativa"; + public static final String IN_LAVORAZIONE_SUE = "inLavorazioneSue"; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java index 7840b995..911f4062 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java @@ -792,7 +792,7 @@ public class ValidazionePraticaUtil { && Validator.isNotNull(rischioGeomorfologicoPai) && rischioGeomorfologicoPai.equalsIgnoreCase("NA") && Validator.isNotNull(pericolositaIdraulicaPai) && pericolositaIdraulicaPai.equalsIgnoreCase("NA") && Validator.isNotNull(rischioIdraulicoPai) && rischioIdraulicoPai.equalsIgnoreCase("NA")) { - notCompleted.add("Nessun allegato per " + notCompleted.add("Nessun allegato per A22 - " + LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-A22")); } } @@ -805,14 +805,12 @@ public class ValidazionePraticaUtil { if (DocPraticaLocalServiceUtil.getValidTmpByIntPratica_Tipologia(dettPratica.getIntPraticaId(), "A23", QueryUtil.ALL_POS, QueryUtil.ALL_POS).isEmpty()) { - notCompleted.add("Nessun allegato per " - + LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-A23")); + notCompleted.add("Nessun allegato per A23 - " + LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-A23")); } if (DocPraticaLocalServiceUtil.getValidTmpByIntPratica_Tipologia(dettPratica.getIntPraticaId(), "A22", QueryUtil.ALL_POS, QueryUtil.ALL_POS).isEmpty()) { - notCompleted.add("Nessun allegato per " - + LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-A22")); + notCompleted.add("Nessun allegato per A22 - " + LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-A22")); } } @@ -858,7 +856,7 @@ public class ValidazionePraticaUtil { for (String firmaMancante : firmeMancanti) { tipologieMancanti.add(LanguageUtil.get(Locale.getDefault(), "gc-soggetto-" + firmaMancante)); } - notCompleted.add(LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-" + tipologia) + notCompleted.add(tipologia + " - " + LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-" + tipologia) + ", firme mancanti: " + StringUtils.join(tipologieMancanti, StringPool.COMMA_AND_SPACE)); } } @@ -896,7 +894,7 @@ public class ValidazionePraticaUtil { List docs = DocPraticaLocalServiceUtil.getValidTmpByIntPratica_Tipologia(intPraticaId, docObbligatorio, QueryUtil.ALL_POS, QueryUtil.ALL_POS); if (docs.isEmpty()) { - notCompleted.add("Nessun allegato per " + notCompleted.add("Nessun allegato per " + docObbligatorio + " - " + LanguageUtil.get(LocaleUtil.getDefault(), "label-documenti-tipologia-" + docObbligatorio)); } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/tables.sql b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/tables.sql index c2e76094..5b02074d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/tables.sql +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/sql/tables.sql @@ -589,7 +589,8 @@ create table portos_bo_IntPratica ( fineLavoriTotale BOOLEAN, collaudoParziale BOOLEAN, collaudoTotale BOOLEAN, - controlloObbligatorio BOOLEAN + controlloObbligatorio BOOLEAN, + inLavorazioneSue BOOLEAN ); create table portos_bo_Pagamento ( diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml index ea35a280..cea94ded 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml @@ -618,6 +618,7 @@ + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml index 3ed6a8a3..faaeca6d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml @@ -671,6 +671,7 @@ + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml index 623011b4..287159a5 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml @@ -786,6 +786,7 @@ + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties index cf1d1736..47047dfe 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties @@ -849,33 +849,33 @@ label-documenti-tipologia-G14=Altre tipologie indagini eseguite label-documenti-tipologia-G15=Indagini di archivio label-documenti-tipologia-G16=Altri -label-documenti-tipologia-A01 = A1 - Inquadramento territoriale -label-documenti-tipologia-A02 = A2 - Progetto -label-documenti-tipologia-A03 = A3 - Relazione tecnica generale -label-documenti-tipologia-A04 = A4 - Relazione materiali impiegati -label-documenti-tipologia-A05 = A5 - Relazione geologica -label-documenti-tipologia-A08 = A8 - Relazione di calcolo -label-documenti-tipologia-A09 = A9 - Documentazione fotografica -label-documenti-tipologia-A10 = A10 - Particolari costruttivi e sezioni di scavo -label-documenti-tipologia-A11 = A11 - Relazione paesaggistica -label-documenti-tipologia-A12 = A12 - Titolo di proprietà -label-documenti-tipologia-A13 = A13 - Piano di Manutenzione -label-documenti-tipologia-A15 = A15 - Dichiarazione sulla data di realizzazione delle opere abusive -label-documenti-tipologia-A16 = A16 - Copia conforme della domanda di sanatoria depositata al Comune -label-documenti-tipologia-A17 = A17 - Certificazione Legge n. 326/2003 -label-documenti-tipologia-A18 = A18 - Copia conforme della dichiarazione depositata al Comune sulla data di realizzazione delle opere abusive -label-documenti-tipologia-A19 = A19 - Dichiarazione sul valore delle opere realizzate abusivamente -label-documenti-tipologia-A20 = A20 - Visura catastale -label-documenti-tipologia-A21 = A21 - Certificato di residenza di tutti i proprietari -label-documenti-tipologia-A22 = A22 - Relazione idrogeomorfologica -label-documenti-tipologia-A23 = A23 - Autorizzazione PAI -label-documenti-tipologia-A24 = A24 - Viarch -label-documenti-tipologia-A25 = A25 - Dichiarazione assenza scavi - sorveglianza / fibra ottica -label-documenti-tipologia-A26 = A26 - Titoli di legittimità -label-documenti-tipologia-A27 = A27 - Dichiarazione collaudo -label-documenti-tipologia-A28 = A28 - Certificazione mancanza motivi ostativi -label-documenti-tipologia-A29 = A29 - Dichiarazione impresa -label-documenti-tipologia-A30 = A30 - Dichiarazione Direttore Lavori +label-documenti-tipologia-A01 = Inquadramento territoriale +label-documenti-tipologia-A02 = Progetto +label-documenti-tipologia-A03 = Relazione tecnica generale +label-documenti-tipologia-A04 = Relazione materiali impiegati +label-documenti-tipologia-A05 = Relazione geologica +label-documenti-tipologia-A08 = Relazione di calcolo +label-documenti-tipologia-A09 = Documentazione fotografica +label-documenti-tipologia-A10 = Particolari costruttivi e sezioni di scavo +label-documenti-tipologia-A11 = Relazione paesaggistica +label-documenti-tipologia-A12 = Titolo di proprietà +label-documenti-tipologia-A13 = Piano di Manutenzione +label-documenti-tipologia-A15 = Dichiarazione sulla data di realizzazione delle opere abusive +label-documenti-tipologia-A16 = Copia conforme della domanda di sanatoria depositata al Comune +label-documenti-tipologia-A17 = Certificazione Legge n. 326/2003 +label-documenti-tipologia-A18 = Copia conforme della dichiarazione depositata al Comune sulla data di realizzazione delle opere abusive +label-documenti-tipologia-A19 = Dichiarazione sul valore delle opere realizzate abusivamente +label-documenti-tipologia-A20 = Visura catastale +label-documenti-tipologia-A21 = Certificato di residenza di tutti i proprietari +label-documenti-tipologia-A22 = Relazione idrogeomorfologica +label-documenti-tipologia-A23 = Autorizzazione PAI +label-documenti-tipologia-A24 = Viarch +label-documenti-tipologia-A25 = Dichiarazione assenza scavi - sorveglianza / fibra ottica +label-documenti-tipologia-A26 = Titoli di legittimità +label-documenti-tipologia-A27 = Dichiarazione collaudo +label-documenti-tipologia-A28 = Certificazione mancanza motivi ostativi +label-documenti-tipologia-A29 = Dichiarazione impresa +label-documenti-tipologia-A30 = Dichiarazione Direttore Lavori label-documenti-tipologia-A98 = Deleghe label-documenti-tipologia-A99 = Altri @@ -1274,17 +1274,28 @@ tipo-procedura-b = B - Interventi di “minore rilevanza” D.D.G. 344/20 all. tipo-procedura-b1 = B1 - Interventi di “minore rilevanza” zone 1-2 ed interventi in abitati da consolidare, art.61 (zone 3-4) tipo-procedura-c = C - Interventi “privi di rilevanza“ D.D.G. 344/20 all. A - lett. C -tipo_procedura_P0 = 1) Autorizzazione per interventi su Beni Culturali (D.Lgs. 42/2004 artt. 21, 31, 48, 49, 50) -tipo_procedura_P1 = 1.1) Interventi su Beni Culturali mobili -tipo_procedura_P2 = 1.2) Interventi su Beni Culturali immobili -tipo_procedura_P3 = 2) Verifica preventiva dell’interesse archeologico (D.Lgs. 25/2016, art. 25) -tipo_procedura_P4 = 3) Autorizzazione per interventi di edilizia su Beni Culturali (D.Lgs. 42/2004 artt. 21, 22) -tipo_procedura_P5 = 4) Autorizzazione paesaggistica per interventi e/o opere di grande impegno territoriale (D.Lgs. 42/2004 art. 146) -tipo_procedura_P6 = 5) Autorizzazione paesaggistica per opere il cui impatto è valutato mediante documentazione semplificata (D.Lgs. 42/2004 art. 146) -tipo_procedura_P7 = 6) Autorizzazione paesaggistica per interventi di lieve entità (L.R. 5/2019 artt. 3, 5) -tipo_procedura_P8 = 7) Accertamento di compatibilità paesaggistica (D.Lgs. 42/2004 art. 146, 167) -tipo_procedura_P9 = 8) Accertamento di compatibilità paesaggistica per Sanatorie Edilizie (L. 47/1985 e L.R. 37/1985 – L. 724/1994 – L. 326/2003 e L.R. 15/2004) -tipo_procedura_P10 = 9) Certificazione di sussistenza vincoli +label_procedura_P0 = 1 +tipo_procedura_P0 = Autorizzazione per interventi su Beni Culturali (D.Lgs. 42/2004 art. 21, 31, 48, 49, 50) +label_procedura_P1 = 1.1 +tipo_procedura_P1 = Interventi su Beni Culturali mobili +label_procedura_P2 = 1.2 +tipo_procedura_P2 = Interventi su Beni Culturali immobili +label_procedura_P3 = 2 +tipo_procedura_P3 = Verifica preventiva dell’interesse archeologico (D.Lgs. 25/2016, art. 25) +label_procedura_P4 = 3 +tipo_procedura_P4 = Autorizzazione per interventi di edilizia su Beni Culturali (D.Lgs. 42/2004 artt. 21, 22) +label_procedura_P5 = 4 +tipo_procedura_P5 = Autorizzazione paesaggistica per interventi e/o opere di grande impegno territoriale (D.Lgs. 42/2004 art. 146) +label_procedura_P6 = 5 +tipo_procedura_P6 = Autorizzazione paesaggistica per opere il cui impatto è valutato mediante documentazione semplificata (D.Lgs. 42/2004 art. 146) +label_procedura_P7 = 6 +tipo_procedura_P7 = Autorizzazione paesaggistica per interventi di lieve entità (L.R. 5/2019 artt. 3, 5) +label_procedura_P8 = 7 +tipo_procedura_P8 = Accertamento di compatibilità paesaggistica (D.Lgs. 42/2004 art. 146, 167) +label_procedura_P9 = 8 +tipo_procedura_P9 = Accertamento di compatibilità paesaggistica per Sanatorie Edilizie (L. 47/1985 e L.R. 37/1985 – L. 724/1994 – L. 326/2003 e L.R. 15/2004) +label_procedura_P10 = 9 +tipo_procedura_P10 = Certificazione di sussistenza vincoli tipo_procedura_Q1 = 1) Autorizzazione per interventi su Beni Culturali mobili tipo_procedura_Q2 = 2) Autorizzazione per interventi su Beni Culturali immobili diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/indexer/IntPraticaIndexer.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/indexer/IntPraticaIndexer.java index 2c8e2f8f..c708ef2d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/indexer/IntPraticaIndexer.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/indexer/IntPraticaIndexer.java @@ -136,6 +136,7 @@ public class IntPraticaIndexer extends BaseIndexer { document.addNumberSortable(PortosIndexField.NUMERO_PROGETTO, Integer.valueOf(intPraticaFromDB.getNumeroProgetto())); } + document.addKeyword(PortosIndexField.IN_LAVORAZIONE_SUE, intPraticaFromDB.getInLavorazioneSue()); if (lastDettPratica != null) { document.addKeyword("nuovaCostruzione", lastDettPratica.getTcNuovaCostruzione()); document.addKeyword("adeguamentoSismico", lastDettPratica.getTcAdeguamentoSismico()); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaCacheModel.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaCacheModel.java index 19fda9b7..8815bd5b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaCacheModel.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaCacheModel.java @@ -38,7 +38,7 @@ public class IntPraticaCacheModel implements CacheModel, Externalizable { @Override public String toString() { - StringBundler sb = new StringBundler(63); + StringBundler sb = new StringBundler(65); sb.append("{uuid="); sb.append(uuid); @@ -102,6 +102,8 @@ public class IntPraticaCacheModel implements CacheModel, sb.append(collaudoTotale); sb.append(", controlloObbligatorio="); sb.append(controlloObbligatorio); + sb.append(", inLavorazioneSue="); + sb.append(inLavorazioneSue); sb.append("}"); return sb.toString(); @@ -233,6 +235,7 @@ public class IntPraticaCacheModel implements CacheModel, intPraticaImpl.setCollaudoParziale(collaudoParziale); intPraticaImpl.setCollaudoTotale(collaudoTotale); intPraticaImpl.setControlloObbligatorio(controlloObbligatorio); + intPraticaImpl.setInLavorazioneSue(inLavorazioneSue); intPraticaImpl.resetOriginalValues(); @@ -272,6 +275,7 @@ public class IntPraticaCacheModel implements CacheModel, collaudoParziale = objectInput.readBoolean(); collaudoTotale = objectInput.readBoolean(); controlloObbligatorio = objectInput.readBoolean(); + inLavorazioneSue = objectInput.readBoolean(); } @Override @@ -361,6 +365,7 @@ public class IntPraticaCacheModel implements CacheModel, objectOutput.writeBoolean(collaudoParziale); objectOutput.writeBoolean(collaudoTotale); objectOutput.writeBoolean(controlloObbligatorio); + objectOutput.writeBoolean(inLavorazioneSue); } public String uuid; @@ -394,4 +399,5 @@ public class IntPraticaCacheModel implements CacheModel, public boolean collaudoParziale; public boolean collaudoTotale; public boolean controlloObbligatorio; + public boolean inLavorazioneSue; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaModelImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaModelImpl.java index fb64edca..7765a39e 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaModelImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/model/impl/IntPraticaModelImpl.java @@ -97,9 +97,10 @@ public class IntPraticaModelImpl extends BaseModelImpl { "fineLavoriTotale", Types.BOOLEAN }, { "collaudoParziale", Types.BOOLEAN }, { "collaudoTotale", Types.BOOLEAN }, - { "controlloObbligatorio", Types.BOOLEAN } + { "controlloObbligatorio", Types.BOOLEAN }, + { "inLavorazioneSue", Types.BOOLEAN } }; - public static final String TABLE_SQL_CREATE = "create table portos_bo_IntPratica (uuid_ VARCHAR(75) null,intPraticaId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,groupId LONG,tipoPratica VARCHAR(75) null,territorioId LONG,tipoProcedura VARCHAR(75) null,dtAnnullamento DATE null,docPraticaAnnullamentoId LONG,unitaOperativa INTEGER,statoPratica VARCHAR(10) null,numeroProgetto VARCHAR(75) null,validata BOOLEAN,status INTEGER,statusByUserId LONG,statusDate DATE null,esitoControllo INTEGER,dtPratica DATE null,sospesa BOOLEAN,dtSospensione DATE null,codiceFiscaleDelegatoFineLavori VARCHAR(75) null,codiceFiscaleDelegatoCollaudo VARCHAR(75) null,fineLavoriParziale BOOLEAN,fineLavoriTotale BOOLEAN,collaudoParziale BOOLEAN,collaudoTotale BOOLEAN,controlloObbligatorio BOOLEAN)"; + public static final String TABLE_SQL_CREATE = "create table portos_bo_IntPratica (uuid_ VARCHAR(75) null,intPraticaId LONG not null primary key,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,groupId LONG,tipoPratica VARCHAR(75) null,territorioId LONG,tipoProcedura VARCHAR(75) null,dtAnnullamento DATE null,docPraticaAnnullamentoId LONG,unitaOperativa INTEGER,statoPratica VARCHAR(10) null,numeroProgetto VARCHAR(75) null,validata BOOLEAN,status INTEGER,statusByUserId LONG,statusDate DATE null,esitoControllo INTEGER,dtPratica DATE null,sospesa BOOLEAN,dtSospensione DATE null,codiceFiscaleDelegatoFineLavori VARCHAR(75) null,codiceFiscaleDelegatoCollaudo VARCHAR(75) null,fineLavoriParziale BOOLEAN,fineLavoriTotale BOOLEAN,collaudoParziale BOOLEAN,collaudoTotale BOOLEAN,controlloObbligatorio BOOLEAN,inLavorazioneSue BOOLEAN)"; public static final String TABLE_SQL_DROP = "drop table portos_bo_IntPratica"; public static final String ORDER_BY_JPQL = " ORDER BY intPratica.intPraticaId ASC"; public static final String ORDER_BY_SQL = " ORDER BY portos_bo_IntPratica.intPraticaId ASC"; @@ -168,6 +169,7 @@ public class IntPraticaModelImpl extends BaseModelImpl model.setCollaudoParziale(soapModel.getCollaudoParziale()); model.setCollaudoTotale(soapModel.getCollaudoTotale()); model.setControlloObbligatorio(soapModel.getControlloObbligatorio()); + model.setInLavorazioneSue(soapModel.getInLavorazioneSue()); return model; } @@ -265,6 +267,7 @@ public class IntPraticaModelImpl extends BaseModelImpl attributes.put("collaudoParziale", getCollaudoParziale()); attributes.put("collaudoTotale", getCollaudoTotale()); attributes.put("controlloObbligatorio", getControlloObbligatorio()); + attributes.put("inLavorazioneSue", getInLavorazioneSue()); return attributes; } @@ -461,6 +464,12 @@ public class IntPraticaModelImpl extends BaseModelImpl if (controlloObbligatorio != null) { setControlloObbligatorio(controlloObbligatorio); } + + Boolean inLavorazioneSue = (Boolean)attributes.get("inLavorazioneSue"); + + if (inLavorazioneSue != null) { + setInLavorazioneSue(inLavorazioneSue); + } } @JSON @@ -980,6 +989,22 @@ public class IntPraticaModelImpl extends BaseModelImpl _controlloObbligatorio = controlloObbligatorio; } + @JSON + @Override + public boolean getInLavorazioneSue() { + return _inLavorazioneSue; + } + + @Override + public boolean isInLavorazioneSue() { + return _inLavorazioneSue; + } + + @Override + public void setInLavorazioneSue(boolean inLavorazioneSue) { + _inLavorazioneSue = inLavorazioneSue; + } + @Override public StagedModelType getStagedModelType() { return new StagedModelType(PortalUtil.getClassNameId( @@ -1048,6 +1073,7 @@ public class IntPraticaModelImpl extends BaseModelImpl intPraticaImpl.setCollaudoParziale(getCollaudoParziale()); intPraticaImpl.setCollaudoTotale(getCollaudoTotale()); intPraticaImpl.setControlloObbligatorio(getControlloObbligatorio()); + intPraticaImpl.setInLavorazioneSue(getInLavorazioneSue()); intPraticaImpl.resetOriginalValues(); @@ -1285,12 +1311,14 @@ public class IntPraticaModelImpl extends BaseModelImpl intPraticaCacheModel.controlloObbligatorio = getControlloObbligatorio(); + intPraticaCacheModel.inLavorazioneSue = getInLavorazioneSue(); + return intPraticaCacheModel; } @Override public String toString() { - StringBundler sb = new StringBundler(63); + StringBundler sb = new StringBundler(65); sb.append("{uuid="); sb.append(getUuid()); @@ -1354,6 +1382,8 @@ public class IntPraticaModelImpl extends BaseModelImpl sb.append(getCollaudoTotale()); sb.append(", controlloObbligatorio="); sb.append(getControlloObbligatorio()); + sb.append(", inLavorazioneSue="); + sb.append(getInLavorazioneSue()); sb.append("}"); return sb.toString(); @@ -1361,7 +1391,7 @@ public class IntPraticaModelImpl extends BaseModelImpl @Override public String toXmlString() { - StringBundler sb = new StringBundler(97); + StringBundler sb = new StringBundler(100); sb.append(""); sb.append("it.tref.liferay.portos.bo.model.IntPratica"); @@ -1491,6 +1521,10 @@ public class IntPraticaModelImpl extends BaseModelImpl "controlloObbligatorio"); + sb.append( + "inLavorazioneSue"); sb.append(""); @@ -1546,6 +1580,7 @@ public class IntPraticaModelImpl extends BaseModelImpl private boolean _collaudoParziale; private boolean _collaudoTotale; private boolean _controlloObbligatorio; + private boolean _inLavorazioneSue; private long _columnBitmask; private IntPratica _escapedModel; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoBeanBuilder.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoBeanBuilder.java index ca1b4c7a..6048ecb9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoBeanBuilder.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/report/builder/builder/ReportAvvisoBeanBuilder.java @@ -177,8 +177,8 @@ public class ReportAvvisoBeanBuilder { bean.setDataAvviso(avviso.getModifiedDate()); bean.setTipoPratica(intPratica.getTipoPratica()); bean.setTipoProcedura(intPratica.getTipoProcedura()); - bean.setTipoAutorizzazione(LanguageUtil.get(LocaleUtil.getSiteDefault(), - "tipo_procedura_" + intPratica.getTipoProcedura())); + bean.setTipoAutorizzazione(LanguageUtil.get(LocaleUtil.getSiteDefault(), "label_procedura_" + intPratica.getTipoProcedura()) + ") " + + LanguageUtil.get(LocaleUtil.getSiteDefault(), "tipo_procedura_" + intPratica.getTipoProcedura())); bean.setCodiceUnivoco(uuid); bean.setLavoriDi(dettPratica.getDescLongIntervento()); bean.setNumeroProgetto(intPratica.getNumeroProgetto()); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java index 48b0640d..30807450 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/base/IntPraticaLocalServiceClpInvoker.java @@ -130,264 +130,268 @@ public class IntPraticaLocalServiceClpInvoker { _methodParameterTypes173 = new String[] { "java.lang.String" }; - _methodName178 = "addIntPratica"; + _methodName179 = "getTipiProcedure"; - _methodParameterTypes178 = new String[] { + _methodParameterTypes179 = new String[] { }; + + _methodName180 = "addIntPratica"; + + _methodParameterTypes180 = new String[] { "long", "java.lang.String", "com.liferay.portal.service.ServiceContext" }; - _methodName179 = "addIntPratica"; + _methodName181 = "addIntPratica"; - _methodParameterTypes179 = new String[] { + _methodParameterTypes181 = new String[] { "long", "java.lang.String", "java.lang.String", "long", "java.lang.String", "java.lang.String", "java.lang.String", "boolean", "int", "java.util.Date", "com.liferay.portal.service.ServiceContext" }; - _methodName180 = "deleteIntPratica"; + _methodName182 = "deleteIntPratica"; - _methodParameterTypes180 = new String[] { + _methodParameterTypes182 = new String[] { "it.tref.liferay.portos.bo.model.IntPratica", "boolean" }; - _methodName181 = "deleteIntPratica"; + _methodName183 = "deleteIntPratica"; - _methodParameterTypes181 = new String[] { + _methodParameterTypes183 = new String[] { "it.tref.liferay.portos.bo.model.IntPratica" }; - _methodName182 = "cloneIntPratica"; + _methodName184 = "cloneIntPratica"; - _methodParameterTypes182 = new String[] { + _methodParameterTypes184 = new String[] { "long", "com.liferay.portal.service.ServiceContext" }; - _methodName184 = "updateDelegati"; + _methodName186 = "updateDelegati"; - _methodParameterTypes184 = new String[] { + _methodParameterTypes186 = new String[] { "long", "java.lang.String", "java.lang.String", "boolean" }; - _methodName185 = "fetchIntPratica"; + _methodName187 = "fetchIntPratica"; - _methodParameterTypes185 = new String[] { "long" }; + _methodParameterTypes187 = new String[] { "long" }; - _methodName186 = "findFascicoliNotProgetto"; + _methodName188 = "findFascicoliNotProgetto"; - _methodParameterTypes186 = new String[] { "int", "int" }; + _methodParameterTypes188 = new String[] { "int", "int" }; - _methodName187 = "countFascicoliNotProgetto"; + _methodName189 = "countFascicoliNotProgetto"; - _methodParameterTypes187 = new String[] { }; + _methodParameterTypes189 = new String[] { }; - _methodName189 = "addNumeroProgetto"; + _methodName191 = "addNumeroProgetto"; - _methodParameterTypes189 = new String[] { "long" }; + _methodParameterTypes191 = new String[] { "long" }; - _methodName190 = "sospendiPratica"; + _methodName192 = "sospendiPratica"; - _methodParameterTypes190 = new String[] { "long", "boolean" }; + _methodParameterTypes192 = new String[] { "long", "boolean" }; - _methodName191 = "cambiaTitolare"; + _methodName193 = "cambiaTitolare"; - _methodParameterTypes191 = new String[] { + _methodParameterTypes193 = new String[] { "long", "long", "com.liferay.portal.service.ServiceContext" }; - _methodName192 = "updateStatoPratica"; + _methodName194 = "updateStatoPratica"; - _methodParameterTypes192 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes194 = new String[] { "long", "java.lang.String" }; - _methodName193 = "findByC_UserId"; + _methodName195 = "findByC_UserId"; - _methodParameterTypes193 = new String[] { "long", "long", "int", "int" }; + _methodParameterTypes195 = new String[] { "long", "long", "int", "int" }; - _methodName194 = "countByC_UserId"; + _methodName196 = "countByC_UserId"; - _methodParameterTypes194 = new String[] { "long", "long" }; + _methodParameterTypes196 = new String[] { "long", "long" }; - _methodName195 = "updateStatus"; + _methodName197 = "updateStatus"; - _methodParameterTypes195 = new String[] { "long", "int" }; + _methodParameterTypes197 = new String[] { "long", "int" }; - _methodName196 = "findByCanAddFineLavori"; + _methodName198 = "findByCanAddFineLavori"; - _methodParameterTypes196 = new String[] { + _methodParameterTypes198 = new String[] { "long", "java.lang.String", "int", "int" }; - _methodName197 = "countByCanAddFineLavori"; + _methodName199 = "countByCanAddFineLavori"; - _methodParameterTypes197 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes199 = new String[] { "long", "java.lang.String" }; - _methodName199 = "findByCanAddCollaudo"; + _methodName201 = "findByCanAddCollaudo"; - _methodParameterTypes199 = new String[] { + _methodParameterTypes201 = new String[] { "long", "java.lang.String", "int", "int" }; - _methodName200 = "countByCanAddCollaudo"; + _methodName202 = "countByCanAddCollaudo"; - _methodParameterTypes200 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes202 = new String[] { "long", "java.lang.String" }; - _methodName201 = "search"; + _methodName203 = "search"; - _methodParameterTypes201 = new String[] { "java.util.List", "int", "int" }; + _methodParameterTypes203 = new String[] { "java.util.List", "int", "int" }; - _methodName202 = "countSearch"; + _methodName204 = "countSearch"; - _methodParameterTypes202 = new String[] { "java.util.List" }; + _methodParameterTypes204 = new String[] { "java.util.List" }; - _methodName203 = "searchWithIntPraticaId"; + _methodName205 = "searchWithIntPraticaId"; - _methodParameterTypes203 = new String[] { + _methodParameterTypes205 = new String[] { "java.util.List", "long", "int", "int" }; - _methodName204 = "allegaFileAnnullamento"; + _methodName206 = "allegaFileAnnullamento"; - _methodParameterTypes204 = new String[] { + _methodParameterTypes206 = new String[] { "long", "byte[][]", "java.lang.String", "java.lang.String", "com.liferay.portal.service.ServiceContext" }; - _methodName205 = "generateFileAnnullamento"; + _methodName207 = "generateFileAnnullamento"; - _methodParameterTypes205 = new String[] { + _methodParameterTypes207 = new String[] { "long", "com.liferay.portal.service.ServiceContext" }; - _methodName206 = "deleteFileAnnullamento"; + _methodName208 = "deleteFileAnnullamento"; - _methodParameterTypes206 = new String[] { "long" }; + _methodParameterTypes208 = new String[] { "long" }; - _methodName207 = "completeAnnullamento"; + _methodName209 = "completeAnnullamento"; - _methodParameterTypes207 = new String[] { "long" }; + _methodParameterTypes209 = new String[] { "long" }; - _methodName208 = "cambiaIstruttore"; + _methodName210 = "cambiaIstruttore"; - _methodParameterTypes208 = new String[] { "long", "long", "long" }; + _methodParameterTypes210 = new String[] { "long", "long", "long" }; - _methodName209 = "countCaricoLavoroCF"; + _methodName211 = "countCaricoLavoroCF"; - _methodParameterTypes209 = new String[] { + _methodParameterTypes211 = new String[] { "long", "java.lang.String", "java.lang.Long[][]" }; - _methodName210 = "countCaricoLavoroIstruttore"; + _methodName212 = "countCaricoLavoroIstruttore"; - _methodParameterTypes210 = new String[] { "long", "java.lang.String" }; + _methodParameterTypes212 = new String[] { "long", "java.lang.String" }; - _methodName211 = "generateReportPratica"; + _methodName213 = "generateReportPratica"; - _methodParameterTypes211 = new String[] { + _methodParameterTypes213 = new String[] { "it.tref.liferay.portos.bo.model.IntPratica", "long" }; - _methodName212 = "updateModifiedDate"; + _methodName214 = "updateModifiedDate"; - _methodParameterTypes212 = new String[] { "long", "java.util.Date" }; + _methodParameterTypes214 = new String[] { "long", "java.util.Date" }; - _methodName213 = "countAutorizzazione"; + _methodName215 = "countAutorizzazione"; - _methodParameterTypes213 = new String[] { + _methodParameterTypes215 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName214 = "countSanatorie"; + _methodName216 = "countSanatorie"; - _methodParameterTypes214 = new String[] { + _methodParameterTypes216 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName215 = "countOpereMinoreImportanza"; + _methodName217 = "countOpereMinoreImportanza"; - _methodParameterTypes215 = new String[] { + _methodParameterTypes217 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName216 = "countDeposito"; + _methodName218 = "countDeposito"; - _methodParameterTypes216 = new String[] { + _methodParameterTypes218 = new String[] { "java.util.Date", "java.util.Date", "long", "boolean" }; - _methodName217 = "countVidimate"; + _methodName219 = "countVidimate"; - _methodParameterTypes217 = new String[] { + _methodParameterTypes219 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String", "boolean" }; - _methodName218 = "countControllo"; + _methodName220 = "countControllo"; - _methodParameterTypes218 = new String[] { + _methodParameterTypes220 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String", "boolean" }; - _methodName219 = "riparaWorkflow"; + _methodName221 = "riparaWorkflow"; - _methodParameterTypes219 = new String[] { }; + _methodParameterTypes221 = new String[] { }; - _methodName220 = "reIndexFascicolo"; + _methodName222 = "reIndexFascicolo"; - _methodParameterTypes220 = new String[] { + _methodParameterTypes222 = new String[] { "it.tref.liferay.portos.bo.model.IntPratica", "long" }; - _methodName221 = "reIndexFasciolo"; + _methodName223 = "reIndexFasciolo"; - _methodParameterTypes221 = new String[] { "java.lang.String", "long" }; + _methodParameterTypes223 = new String[] { "java.lang.String", "long" }; - _methodName222 = "reIndexFasciolo"; + _methodName224 = "reIndexFasciolo"; - _methodParameterTypes222 = new String[] { "long", "long" }; + _methodParameterTypes224 = new String[] { "long", "long" }; - _methodName223 = "findByNumeroProgetto"; + _methodName225 = "findByNumeroProgetto"; - _methodParameterTypes223 = new String[] { "java.lang.String" }; + _methodParameterTypes225 = new String[] { "java.lang.String" }; - _methodName224 = "findByTerritorioId"; + _methodName226 = "findByTerritorioId"; - _methodParameterTypes224 = new String[] { "long" }; + _methodParameterTypes226 = new String[] { "long" }; - _methodName225 = "reportTempisticheIstruttorieAvvisiAutorizzazioni"; + _methodName227 = "reportTempisticheIstruttorieAvvisiAutorizzazioni"; - _methodParameterTypes225 = new String[] { + _methodParameterTypes227 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String" }; - _methodName226 = "reportPraticheVidimate"; + _methodName228 = "reportPraticheVidimate"; - _methodParameterTypes226 = new String[] { + _methodParameterTypes228 = new String[] { "java.util.Date", "java.util.Date", "long", "java.lang.String" }; - _methodName227 = "countIngressiAutorizzazioni"; + _methodName229 = "countIngressiAutorizzazioni"; - _methodParameterTypes227 = new String[] { + _methodParameterTypes229 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName228 = "countIngressiDepositi"; + _methodName230 = "countIngressiDepositi"; - _methodParameterTypes228 = new String[] { + _methodParameterTypes230 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName229 = "countIngressiCO"; + _methodName231 = "countIngressiCO"; - _methodParameterTypes229 = new String[] { + _methodParameterTypes231 = new String[] { "java.util.Date", "java.util.Date", "long" }; - _methodName230 = "getOrganizationByIntPraticaId"; + _methodName232 = "getOrganizationByIntPraticaId"; - _methodParameterTypes230 = new String[] { "long" }; + _methodParameterTypes232 = new String[] { "long" }; } public Object invokeMethod(String name, String[] parameterTypes, @@ -515,15 +519,20 @@ public class IntPraticaLocalServiceClpInvoker { return null; } - if (_methodName178.equals(name) && - Arrays.deepEquals(_methodParameterTypes178, parameterTypes)) { + if (_methodName179.equals(name) && + Arrays.deepEquals(_methodParameterTypes179, parameterTypes)) { + return IntPraticaLocalServiceUtil.getTipiProcedure(); + } + + if (_methodName180.equals(name) && + Arrays.deepEquals(_methodParameterTypes180, parameterTypes)) { return IntPraticaLocalServiceUtil.addIntPratica(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (com.liferay.portal.service.ServiceContext)arguments[2]); } - if (_methodName179.equals(name) && - Arrays.deepEquals(_methodParameterTypes179, parameterTypes)) { + if (_methodName181.equals(name) && + Arrays.deepEquals(_methodParameterTypes181, parameterTypes)) { return IntPraticaLocalServiceUtil.addIntPratica(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (java.lang.String)arguments[2], ((Long)arguments[3]).longValue(), @@ -535,170 +544,170 @@ public class IntPraticaLocalServiceClpInvoker { (com.liferay.portal.service.ServiceContext)arguments[10]); } - if (_methodName180.equals(name) && - Arrays.deepEquals(_methodParameterTypes180, parameterTypes)) { + if (_methodName182.equals(name) && + Arrays.deepEquals(_methodParameterTypes182, parameterTypes)) { return IntPraticaLocalServiceUtil.deleteIntPratica((it.tref.liferay.portos.bo.model.IntPratica)arguments[0], ((Boolean)arguments[1]).booleanValue()); } - if (_methodName181.equals(name) && - Arrays.deepEquals(_methodParameterTypes181, parameterTypes)) { + if (_methodName183.equals(name) && + Arrays.deepEquals(_methodParameterTypes183, parameterTypes)) { return IntPraticaLocalServiceUtil.deleteIntPratica((it.tref.liferay.portos.bo.model.IntPratica)arguments[0]); } - if (_methodName182.equals(name) && - Arrays.deepEquals(_methodParameterTypes182, parameterTypes)) { + if (_methodName184.equals(name) && + Arrays.deepEquals(_methodParameterTypes184, parameterTypes)) { return IntPraticaLocalServiceUtil.cloneIntPratica(((Long)arguments[0]).longValue(), (com.liferay.portal.service.ServiceContext)arguments[1]); } - if (_methodName184.equals(name) && - Arrays.deepEquals(_methodParameterTypes184, parameterTypes)) { + if (_methodName186.equals(name) && + Arrays.deepEquals(_methodParameterTypes186, parameterTypes)) { return IntPraticaLocalServiceUtil.updateDelegati(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (java.lang.String)arguments[2], ((Boolean)arguments[3]).booleanValue()); } - if (_methodName185.equals(name) && - Arrays.deepEquals(_methodParameterTypes185, parameterTypes)) { + if (_methodName187.equals(name) && + Arrays.deepEquals(_methodParameterTypes187, parameterTypes)) { return IntPraticaLocalServiceUtil.fetchIntPratica(((Long)arguments[0]).longValue()); } - if (_methodName186.equals(name) && - Arrays.deepEquals(_methodParameterTypes186, parameterTypes)) { + if (_methodName188.equals(name) && + Arrays.deepEquals(_methodParameterTypes188, parameterTypes)) { return IntPraticaLocalServiceUtil.findFascicoliNotProgetto(((Integer)arguments[0]).intValue(), ((Integer)arguments[1]).intValue()); } - if (_methodName187.equals(name) && - Arrays.deepEquals(_methodParameterTypes187, parameterTypes)) { + if (_methodName189.equals(name) && + Arrays.deepEquals(_methodParameterTypes189, parameterTypes)) { return IntPraticaLocalServiceUtil.countFascicoliNotProgetto(); } - if (_methodName189.equals(name) && - Arrays.deepEquals(_methodParameterTypes189, parameterTypes)) { + if (_methodName191.equals(name) && + Arrays.deepEquals(_methodParameterTypes191, parameterTypes)) { return IntPraticaLocalServiceUtil.addNumeroProgetto(((Long)arguments[0]).longValue()); } - if (_methodName190.equals(name) && - Arrays.deepEquals(_methodParameterTypes190, parameterTypes)) { + if (_methodName192.equals(name) && + Arrays.deepEquals(_methodParameterTypes192, parameterTypes)) { return IntPraticaLocalServiceUtil.sospendiPratica(((Long)arguments[0]).longValue(), ((Boolean)arguments[1]).booleanValue()); } - if (_methodName191.equals(name) && - Arrays.deepEquals(_methodParameterTypes191, parameterTypes)) { + if (_methodName193.equals(name) && + Arrays.deepEquals(_methodParameterTypes193, parameterTypes)) { return IntPraticaLocalServiceUtil.cambiaTitolare(((Long)arguments[0]).longValue(), ((Long)arguments[1]).longValue(), (com.liferay.portal.service.ServiceContext)arguments[2]); } - if (_methodName192.equals(name) && - Arrays.deepEquals(_methodParameterTypes192, parameterTypes)) { + if (_methodName194.equals(name) && + Arrays.deepEquals(_methodParameterTypes194, parameterTypes)) { return IntPraticaLocalServiceUtil.updateStatoPratica(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1]); } - if (_methodName193.equals(name) && - Arrays.deepEquals(_methodParameterTypes193, parameterTypes)) { + if (_methodName195.equals(name) && + Arrays.deepEquals(_methodParameterTypes195, parameterTypes)) { return IntPraticaLocalServiceUtil.findByC_UserId(((Long)arguments[0]).longValue(), ((Long)arguments[1]).longValue(), ((Integer)arguments[2]).intValue(), ((Integer)arguments[3]).intValue()); } - if (_methodName194.equals(name) && - Arrays.deepEquals(_methodParameterTypes194, parameterTypes)) { + if (_methodName196.equals(name) && + Arrays.deepEquals(_methodParameterTypes196, parameterTypes)) { return IntPraticaLocalServiceUtil.countByC_UserId(((Long)arguments[0]).longValue(), ((Long)arguments[1]).longValue()); } - if (_methodName195.equals(name) && - Arrays.deepEquals(_methodParameterTypes195, parameterTypes)) { + if (_methodName197.equals(name) && + Arrays.deepEquals(_methodParameterTypes197, parameterTypes)) { IntPraticaLocalServiceUtil.updateStatus(((Long)arguments[0]).longValue(), ((Integer)arguments[1]).intValue()); return null; } - if (_methodName196.equals(name) && - Arrays.deepEquals(_methodParameterTypes196, parameterTypes)) { + if (_methodName198.equals(name) && + Arrays.deepEquals(_methodParameterTypes198, parameterTypes)) { return IntPraticaLocalServiceUtil.findByCanAddFineLavori(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], ((Integer)arguments[2]).intValue(), ((Integer)arguments[3]).intValue()); } - if (_methodName197.equals(name) && - Arrays.deepEquals(_methodParameterTypes197, parameterTypes)) { + if (_methodName199.equals(name) && + Arrays.deepEquals(_methodParameterTypes199, parameterTypes)) { return IntPraticaLocalServiceUtil.countByCanAddFineLavori(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1]); } - if (_methodName199.equals(name) && - Arrays.deepEquals(_methodParameterTypes199, parameterTypes)) { + if (_methodName201.equals(name) && + Arrays.deepEquals(_methodParameterTypes201, parameterTypes)) { return IntPraticaLocalServiceUtil.findByCanAddCollaudo(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], ((Integer)arguments[2]).intValue(), ((Integer)arguments[3]).intValue()); } - if (_methodName200.equals(name) && - Arrays.deepEquals(_methodParameterTypes200, parameterTypes)) { + if (_methodName202.equals(name) && + Arrays.deepEquals(_methodParameterTypes202, parameterTypes)) { return IntPraticaLocalServiceUtil.countByCanAddCollaudo(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1]); } - if (_methodName201.equals(name) && - Arrays.deepEquals(_methodParameterTypes201, parameterTypes)) { + if (_methodName203.equals(name) && + Arrays.deepEquals(_methodParameterTypes203, parameterTypes)) { return IntPraticaLocalServiceUtil.search((java.util.List)arguments[0], ((Integer)arguments[1]).intValue(), ((Integer)arguments[2]).intValue()); } - if (_methodName202.equals(name) && - Arrays.deepEquals(_methodParameterTypes202, parameterTypes)) { + if (_methodName204.equals(name) && + Arrays.deepEquals(_methodParameterTypes204, parameterTypes)) { return IntPraticaLocalServiceUtil.countSearch((java.util.List)arguments[0]); } - if (_methodName203.equals(name) && - Arrays.deepEquals(_methodParameterTypes203, parameterTypes)) { + if (_methodName205.equals(name) && + Arrays.deepEquals(_methodParameterTypes205, parameterTypes)) { return IntPraticaLocalServiceUtil.searchWithIntPraticaId((java.util.List)arguments[0], ((Long)arguments[1]).longValue(), ((Integer)arguments[2]).intValue(), ((Integer)arguments[3]).intValue()); } - if (_methodName204.equals(name) && - Arrays.deepEquals(_methodParameterTypes204, parameterTypes)) { + if (_methodName206.equals(name) && + Arrays.deepEquals(_methodParameterTypes206, parameterTypes)) { return IntPraticaLocalServiceUtil.allegaFileAnnullamento(((Long)arguments[0]).longValue(), (byte[])arguments[1], (java.lang.String)arguments[2], (java.lang.String)arguments[3], (com.liferay.portal.service.ServiceContext)arguments[4]); } - if (_methodName205.equals(name) && - Arrays.deepEquals(_methodParameterTypes205, parameterTypes)) { + if (_methodName207.equals(name) && + Arrays.deepEquals(_methodParameterTypes207, parameterTypes)) { return IntPraticaLocalServiceUtil.generateFileAnnullamento(((Long)arguments[0]).longValue(), (com.liferay.portal.service.ServiceContext)arguments[1]); } - if (_methodName206.equals(name) && - Arrays.deepEquals(_methodParameterTypes206, parameterTypes)) { + if (_methodName208.equals(name) && + Arrays.deepEquals(_methodParameterTypes208, parameterTypes)) { IntPraticaLocalServiceUtil.deleteFileAnnullamento(((Long)arguments[0]).longValue()); return null; } - if (_methodName207.equals(name) && - Arrays.deepEquals(_methodParameterTypes207, parameterTypes)) { + if (_methodName209.equals(name) && + Arrays.deepEquals(_methodParameterTypes209, parameterTypes)) { IntPraticaLocalServiceUtil.completeAnnullamento(((Long)arguments[0]).longValue()); return null; } - if (_methodName208.equals(name) && - Arrays.deepEquals(_methodParameterTypes208, parameterTypes)) { + if (_methodName210.equals(name) && + Arrays.deepEquals(_methodParameterTypes210, parameterTypes)) { IntPraticaLocalServiceUtil.cambiaIstruttore(((Long)arguments[0]).longValue(), ((Long)arguments[1]).longValue(), ((Long)arguments[2]).longValue()); @@ -706,144 +715,144 @@ public class IntPraticaLocalServiceClpInvoker { return null; } - if (_methodName209.equals(name) && - Arrays.deepEquals(_methodParameterTypes209, parameterTypes)) { + if (_methodName211.equals(name) && + Arrays.deepEquals(_methodParameterTypes211, parameterTypes)) { return IntPraticaLocalServiceUtil.countCaricoLavoroCF(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1], (java.lang.Long[])arguments[2]); } - if (_methodName210.equals(name) && - Arrays.deepEquals(_methodParameterTypes210, parameterTypes)) { + if (_methodName212.equals(name) && + Arrays.deepEquals(_methodParameterTypes212, parameterTypes)) { return IntPraticaLocalServiceUtil.countCaricoLavoroIstruttore(((Long)arguments[0]).longValue(), (java.lang.String)arguments[1]); } - if (_methodName211.equals(name) && - Arrays.deepEquals(_methodParameterTypes211, parameterTypes)) { + if (_methodName213.equals(name) && + Arrays.deepEquals(_methodParameterTypes213, parameterTypes)) { return IntPraticaLocalServiceUtil.generateReportPratica((it.tref.liferay.portos.bo.model.IntPratica)arguments[0], ((Long)arguments[1]).longValue()); } - if (_methodName212.equals(name) && - Arrays.deepEquals(_methodParameterTypes212, parameterTypes)) { + if (_methodName214.equals(name) && + Arrays.deepEquals(_methodParameterTypes214, parameterTypes)) { return IntPraticaLocalServiceUtil.updateModifiedDate(((Long)arguments[0]).longValue(), (java.util.Date)arguments[1]); } - if (_methodName213.equals(name) && - Arrays.deepEquals(_methodParameterTypes213, parameterTypes)) { + if (_methodName215.equals(name) && + Arrays.deepEquals(_methodParameterTypes215, parameterTypes)) { return IntPraticaLocalServiceUtil.countAutorizzazione((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); } - if (_methodName214.equals(name) && - Arrays.deepEquals(_methodParameterTypes214, parameterTypes)) { + if (_methodName216.equals(name) && + Arrays.deepEquals(_methodParameterTypes216, parameterTypes)) { return IntPraticaLocalServiceUtil.countSanatorie((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); } - if (_methodName215.equals(name) && - Arrays.deepEquals(_methodParameterTypes215, parameterTypes)) { + if (_methodName217.equals(name) && + Arrays.deepEquals(_methodParameterTypes217, parameterTypes)) { return IntPraticaLocalServiceUtil.countOpereMinoreImportanza((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); } - if (_methodName216.equals(name) && - Arrays.deepEquals(_methodParameterTypes216, parameterTypes)) { + if (_methodName218.equals(name) && + Arrays.deepEquals(_methodParameterTypes218, parameterTypes)) { return IntPraticaLocalServiceUtil.countDeposito((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), ((Boolean)arguments[3]).booleanValue()); } - if (_methodName217.equals(name) && - Arrays.deepEquals(_methodParameterTypes217, parameterTypes)) { + if (_methodName219.equals(name) && + Arrays.deepEquals(_methodParameterTypes219, parameterTypes)) { return IntPraticaLocalServiceUtil.countVidimate((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), (java.lang.String)arguments[3], ((Boolean)arguments[4]).booleanValue()); } - if (_methodName218.equals(name) && - Arrays.deepEquals(_methodParameterTypes218, parameterTypes)) { + if (_methodName220.equals(name) && + Arrays.deepEquals(_methodParameterTypes220, parameterTypes)) { return IntPraticaLocalServiceUtil.countControllo((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), (java.lang.String)arguments[3], ((Boolean)arguments[4]).booleanValue()); } - if (_methodName219.equals(name) && - Arrays.deepEquals(_methodParameterTypes219, parameterTypes)) { + if (_methodName221.equals(name) && + Arrays.deepEquals(_methodParameterTypes221, parameterTypes)) { return IntPraticaLocalServiceUtil.riparaWorkflow(); } - if (_methodName220.equals(name) && - Arrays.deepEquals(_methodParameterTypes220, parameterTypes)) { + if (_methodName222.equals(name) && + Arrays.deepEquals(_methodParameterTypes222, parameterTypes)) { IntPraticaLocalServiceUtil.reIndexFascicolo((it.tref.liferay.portos.bo.model.IntPratica)arguments[0], ((Long)arguments[1]).longValue()); return null; } - if (_methodName221.equals(name) && - Arrays.deepEquals(_methodParameterTypes221, parameterTypes)) { + if (_methodName223.equals(name) && + Arrays.deepEquals(_methodParameterTypes223, parameterTypes)) { IntPraticaLocalServiceUtil.reIndexFasciolo((java.lang.String)arguments[0], ((Long)arguments[1]).longValue()); return null; } - if (_methodName222.equals(name) && - Arrays.deepEquals(_methodParameterTypes222, parameterTypes)) { + if (_methodName224.equals(name) && + Arrays.deepEquals(_methodParameterTypes224, parameterTypes)) { IntPraticaLocalServiceUtil.reIndexFasciolo(((Long)arguments[0]).longValue(), ((Long)arguments[1]).longValue()); return null; } - if (_methodName223.equals(name) && - Arrays.deepEquals(_methodParameterTypes223, parameterTypes)) { + if (_methodName225.equals(name) && + Arrays.deepEquals(_methodParameterTypes225, parameterTypes)) { return IntPraticaLocalServiceUtil.findByNumeroProgetto((java.lang.String)arguments[0]); } - if (_methodName224.equals(name) && - Arrays.deepEquals(_methodParameterTypes224, parameterTypes)) { + if (_methodName226.equals(name) && + Arrays.deepEquals(_methodParameterTypes226, parameterTypes)) { return IntPraticaLocalServiceUtil.findByTerritorioId(((Long)arguments[0]).longValue()); } - if (_methodName225.equals(name) && - Arrays.deepEquals(_methodParameterTypes225, parameterTypes)) { + if (_methodName227.equals(name) && + Arrays.deepEquals(_methodParameterTypes227, parameterTypes)) { return IntPraticaLocalServiceUtil.reportTempisticheIstruttorieAvvisiAutorizzazioni((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), (java.lang.String)arguments[3]); } - if (_methodName226.equals(name) && - Arrays.deepEquals(_methodParameterTypes226, parameterTypes)) { + if (_methodName228.equals(name) && + Arrays.deepEquals(_methodParameterTypes228, parameterTypes)) { return IntPraticaLocalServiceUtil.reportPraticheVidimate((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue(), (java.lang.String)arguments[3]); } - if (_methodName227.equals(name) && - Arrays.deepEquals(_methodParameterTypes227, parameterTypes)) { + if (_methodName229.equals(name) && + Arrays.deepEquals(_methodParameterTypes229, parameterTypes)) { return IntPraticaLocalServiceUtil.countIngressiAutorizzazioni((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); } - if (_methodName228.equals(name) && - Arrays.deepEquals(_methodParameterTypes228, parameterTypes)) { + if (_methodName230.equals(name) && + Arrays.deepEquals(_methodParameterTypes230, parameterTypes)) { return IntPraticaLocalServiceUtil.countIngressiDepositi((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); } - if (_methodName229.equals(name) && - Arrays.deepEquals(_methodParameterTypes229, parameterTypes)) { + if (_methodName231.equals(name) && + Arrays.deepEquals(_methodParameterTypes231, parameterTypes)) { return IntPraticaLocalServiceUtil.countIngressiCO((java.util.Date)arguments[0], (java.util.Date)arguments[1], ((Long)arguments[2]).longValue()); } - if (_methodName230.equals(name) && - Arrays.deepEquals(_methodParameterTypes230, parameterTypes)) { + if (_methodName232.equals(name) && + Arrays.deepEquals(_methodParameterTypes232, parameterTypes)) { return IntPraticaLocalServiceUtil.getOrganizationByIntPraticaId(((Long)arguments[0]).longValue()); } @@ -894,8 +903,6 @@ public class IntPraticaLocalServiceClpInvoker { private String[] _methodParameterTypes172; private String _methodName173; private String[] _methodParameterTypes173; - private String _methodName178; - private String[] _methodParameterTypes178; private String _methodName179; private String[] _methodParameterTypes179; private String _methodName180; @@ -904,18 +911,18 @@ public class IntPraticaLocalServiceClpInvoker { private String[] _methodParameterTypes181; private String _methodName182; private String[] _methodParameterTypes182; + private String _methodName183; + private String[] _methodParameterTypes183; private String _methodName184; private String[] _methodParameterTypes184; - private String _methodName185; - private String[] _methodParameterTypes185; private String _methodName186; private String[] _methodParameterTypes186; private String _methodName187; private String[] _methodParameterTypes187; + private String _methodName188; + private String[] _methodParameterTypes188; private String _methodName189; private String[] _methodParameterTypes189; - private String _methodName190; - private String[] _methodParameterTypes190; private String _methodName191; private String[] _methodParameterTypes191; private String _methodName192; @@ -930,10 +937,10 @@ public class IntPraticaLocalServiceClpInvoker { private String[] _methodParameterTypes196; private String _methodName197; private String[] _methodParameterTypes197; + private String _methodName198; + private String[] _methodParameterTypes198; private String _methodName199; private String[] _methodParameterTypes199; - private String _methodName200; - private String[] _methodParameterTypes200; private String _methodName201; private String[] _methodParameterTypes201; private String _methodName202; @@ -994,4 +1001,8 @@ public class IntPraticaLocalServiceClpInvoker { private String[] _methodParameterTypes229; private String _methodName230; private String[] _methodParameterTypes230; + private String _methodName231; + private String[] _methodParameterTypes231; + private String _methodName232; + private String[] _methodParameterTypes232; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java index cc391da9..bf6b9114 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java @@ -59,6 +59,7 @@ import java.io.Serializable; import java.util.Calendar; import java.util.Date; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -129,6 +130,30 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { private static Log _log = LogFactoryUtil.getLog(IntPraticaLocalServiceImpl.class); + private static final Map tipiProcedure = new LinkedHashMap<>(); + static { + putTipoProcedura(Constants.PROCEDURA_P0); + putTipoProcedura(Constants.PROCEDURA_P1); + putTipoProcedura(Constants.PROCEDURA_P2); + putTipoProcedura(Constants.PROCEDURA_P3); + putTipoProcedura(Constants.PROCEDURA_P4); + putTipoProcedura(Constants.PROCEDURA_P5); + putTipoProcedura(Constants.PROCEDURA_P6); + putTipoProcedura(Constants.PROCEDURA_P7); + putTipoProcedura(Constants.PROCEDURA_P8); + putTipoProcedura(Constants.PROCEDURA_P9); + putTipoProcedura(Constants.PROCEDURA_P10); + } + + private static void putTipoProcedura(String tipo) { + tipiProcedure.put(tipo, LanguageUtil.get(LocaleUtil.ITALIAN, "tipo_procedura_" + tipo)); + } + + @Override + public Map getTipiProcedure() { + return tipiProcedure; + } + @Override @Indexable(type = IndexableType.REINDEX) public IntPratica addIntPratica(long territorioId, String tipoProcedura, ServiceContext serviceContext) @@ -188,7 +213,6 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl { } @Override - @Indexable(type = IndexableType.REINDEX) public IntPratica deleteIntPratica(IntPratica intPratica, boolean forced) throws SystemException, PortalException { if (intPratica.getStatus() == WorkflowConstants.STATUS_ANY || forced) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java index fc5b994d..bda5c175 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/persistence/IntPraticaPersistenceImpl.java @@ -4418,6 +4418,7 @@ public class IntPraticaPersistenceImpl extends BasePersistenceImpl intPraticaImpl.setCollaudoParziale(intPratica.isCollaudoParziale()); intPraticaImpl.setCollaudoTotale(intPratica.isCollaudoTotale()); intPraticaImpl.setControlloObbligatorio(intPratica.isControlloObbligatorio()); + intPraticaImpl.setInLavorazioneSue(intPratica.isInLavorazioneSue()); return intPraticaImpl; } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties index 0ca5fb04..b10eeed7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_bo - build.number=3171 - build.date=1623925070790 + build.number=3185 + build.date=1624449055901 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp index 7d6d52df..e8a96564 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/asset/controllopratica/full_content.jsp @@ -1,6 +1,5 @@ -<%@page import="com.liferay.portal.kernel.util.MapUtil"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@page import="it.tref.liferay.portos.bo.util.AvvisoUtil"%> +<%@page import="com.liferay.portal.kernel.util.MapUtil"%> <%@page import="com.liferay.portlet.documentlibrary.util.DLUtil"%> <%@page import="com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil"%> <%@page import="com.liferay.portal.kernel.repository.model.FileEntry"%> @@ -143,17 +142,17 @@ List nascosti = Arrays.asList(new String[] { "base64" }); <% - List avvisi = AvvisoLocalServiceUtil.getAvvisiRifiutatiByControlloPraticaId(controlloPratica.getControlloPraticaId()); +List avvisi = AvvisoLocalServiceUtil.getAvvisiRifiutatiByControlloPraticaId(controlloPratica.getControlloPraticaId()); %>

Dettagli Avvisi Rifiutati

    <% - for(Avviso avviso : avvisi){ + for (Avviso avviso : avvisi) { String tipoDocumento = avviso.translateTipoDocumento(); - out.print("
  • "+dateFormatDateTime.format(avviso.getDtRifiuto())+" - "+LanguageUtil.get(pageContext, tipoDocumento)+":
    " - +(Validator.isNotNull(avviso.getCommentoRifiuto()) ? avviso.getCommentoRifiuto() : "Nessun Commento")+"
  • "); + out.print("
  • " + dateFormatDateTime.format(avviso.getDtRifiuto()) + " - " + LanguageUtil.get(pageContext, tipoDocumento) + ":
    " + + (Validator.isNull(avviso.getCommentoRifiuto()) ? "Nessun Commento" : avviso.getCommentoRifiuto()) + "
  • "); } %>
@@ -176,7 +175,6 @@ List nascosti = Arrays.asList(new String[] { "base64" }); -ms-flex-align: center; align-items: center; } - .list-geo, .list-workflow { margin-left: 50px!important; } @@ -203,14 +201,12 @@ List nascosti = Arrays.asList(new String[] { "base64" }); color: #555; margin: 5px 7px 5px 0px; } - .container_header_text_attivita .text_attivita, .columns-max .control-group.field-wrapper > .control-group { margin: 0; } .text-local { margin-left: 35px; } - #updateComments .control-group.field-wrapper, #updateComments .columns-max .control-group.field-wrapper > .control-group { display: -webkit-box; display: -ms-flexbox; @@ -220,11 +216,9 @@ List nascosti = Arrays.asList(new String[] { "base64" }); align-items: center; width: 100%; } - #updateComments .control-group.field-wrapper, #updateComments .columns-max .control-group.field-wrapper > .control-group[data-fieldname="esito"] { display: block; } - #updateComments .control-group.field-wrapper textarea, #updateComments .control-group.field-wrapper input[type="text"] { width: 80%; margin-bottom: 0px!important; @@ -235,18 +229,15 @@ List nascosti = Arrays.asList(new String[] { "base64" }); #updateComments .control-group.field-wrapper label, #updateComments .columns-max .control-group.field-wrapper > .control-group label, #updateComments .control-group.field-wrapper span.control-label { width: 20%; } - #updateComments .control-group.field-wrapper .lfr-input-date.input-large, #updateComments .columns-max .control-group.field-wrapper > .control-group select { margin-left: -4px; } #updateComments .control-group.field-wrapper label, #updateComments .control-group.field-wrapper .control-group.input-text-wrapper { margin-bottom: 0!important; } - #updateComments .separator { border-top: 1px solid #812121; } - #updateComments .radio { width: auto!important; } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/header.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/header.jsp index 732f7140..8769c6d5 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/header.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/header.jsp @@ -38,7 +38,7 @@
- <%= LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()) %> + <%= LanguageUtil.get(pageContext, "label_procedura_" + intPratica.getTipoProcedura()) + ") " + LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()) %>
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_allegati.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_allegati.jsp index 09fc4797..88ed2b5c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_allegati.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_allegati.jsp @@ -38,13 +38,14 @@ List tipologiaAllegati = DocumentiPraticaUtil.getDocDomanda(); for (String codiceDoc : tipologiaAllegati) { List docPraticas = DocPraticaLocalServiceUtil.findByIntPratica_Tipologia(dettPratica.getIntPraticaId(), codiceDoc, QueryUtil.ALL_POS, QueryUtil.ALL_POS); + String nomeAllegato = codiceDoc + " - " + LanguageUtil.get(pageContext, "label-documenti-tipologia-" + codiceDoc); %>

- +

<%= docPraticas.size() %>
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_versioning.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_versioning.jsp index 23885b86..fa83f26a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_versioning.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_versioning.jsp @@ -94,7 +94,7 @@ int secondo = ParamUtil.getInteger(request, "secondo", size); if (nDocs > 0) { %> - <%= LanguageUtil.get(pageContext, "label-documenti-tipologia-" + codice) %> + <%= codice %> - <%= LanguageUtil.get(pageContext, "label-documenti-tipologia-" + codice) %> <% for (DettPratica dp : dps) { List lista = liste.get(dp.getDettPraticaId()); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp index 1543bc9d..5ca96ec9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/view.jsp @@ -376,7 +376,7 @@ String keywords = StringPool.BLANK; Territorio: <%= comune.getDenominazione() %> <%= (lastDettPratica == null || lastDettPratica.getLocalita().isEmpty()) ? "" : "(Loc. "+lastDettPratica.getLocalita()+" ) " %>- <%= provincia.getProvincia() %>
Localizzazione: <%= lastDettPratica == null ? "" : lastDettPratica.getVia() %>
- <%= LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()) %>

+ <%= LanguageUtil.get(pageContext, "label_procedura_" + intPratica.getTipoProcedura()) + ") " + LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()) %>

<%= lastDettPratica == null ? "" : lastDettPratica.getDescLongIntervento() %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf index 2f27cff1..e6eed721 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestioneattivita/view_columns.jspf @@ -115,7 +115,8 @@ DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntP %> <%= intPratica.getTitle(locale, true) %> <%= Validator.isNull(intPratica.getTipoProcedura()) ? StringPool.BLANK - : "
" + LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()) + : "
" + LanguageUtil.get(pageContext, "label_procedura_" + intPratica.getTipoProcedura()) + ") " + + LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()) + "" %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_da_firmare.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_da_firmare.jsp index 9fb55150..65565369 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_da_firmare.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_da_firmare.jsp @@ -76,7 +76,7 @@ for (Organization organization:organizations) { } String tipoProcedura = StringPool.BLANK; if (Validator.isNotNull(intPratica)) { - tipoProcedura = LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica + tipoProcedura = LanguageUtil.get(pageContext, "label_procedura_" + intPratica.getTipoProcedura()) + ") " + LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica .getTipoProcedura()); } %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_da_firmare_altri.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_da_firmare_altri.jsp index 16724269..df89a768 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_da_firmare_altri.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_da_firmare_altri.jsp @@ -65,7 +65,7 @@ for (Organization organization:organizations) { IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(avviso.getIntPraticaId()); String tipoProcedura = ""; if(Validator.isNotNull(intPratica)) - tipoProcedura = LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()); + tipoProcedura = LanguageUtil.get(pageContext, "label_procedura_" + intPratica.getTipoProcedura()) + ") " + LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()); %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_firme.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_firme.jsp index d57697c6..96668882 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_firme.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_firme.jsp @@ -49,7 +49,7 @@ searchURL.setParameter("tabs1", tabs1); String tipoProcedura = ""; if(Validator.isNotNull(intPratica)) - tipoProcedura = LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()); + tipoProcedura = LanguageUtil.get(pageContext, "label_procedura_" + intPratica.getTipoProcedura()) + ") " + LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()); %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/util/ReportFascicoloUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/util/ReportFascicoloUtil.java index 4c442158..9448edde 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/util/ReportFascicoloUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/util/ReportFascicoloUtil.java @@ -371,7 +371,7 @@ public class ReportFascicoloUtil { intPraticaId, lastDettPratica.getDettPraticaId(), stringa, QueryUtil.ALL_POS, QueryUtil.ALL_POS); if (docPraticas != null && !docPraticas.isEmpty()) { - ReportFascicoloBean bean1 = new ReportFascicoloBean("- " + ReportFascicoloBean bean1 = new ReportFascicoloBean(stringa + " - " + LanguageUtil.get(locale, "label-documenti-tipologia-" + stringa) + StringPool.TAB + " - num. documenti presentati: " + docPraticas.size()); listaAllegatiGeo.add(bean1); @@ -386,7 +386,7 @@ public class ReportFascicoloUtil { intPraticaId, lastDettPratica.getDettPraticaId(), stringa, QueryUtil.ALL_POS, QueryUtil.ALL_POS); if (docPraticas != null && !docPraticas.isEmpty()) { - ReportFascicoloBean bean1 = new ReportFascicoloBean("- " + ReportFascicoloBean bean1 = new ReportFascicoloBean(stringa + " - " + LanguageUtil.get(locale, "label-documenti-tipologia-" + stringa) + StringPool.TAB + " - num. documenti presentati: " + docPraticas.size()); listaAllegatiDomanda.add(bean1); @@ -729,7 +729,7 @@ public class ReportFascicoloUtil { intPraticaId, lastDettPratica.getDettPraticaId(), stringa, QueryUtil.ALL_POS, QueryUtil.ALL_POS); if (docPraticas != null && !docPraticas.isEmpty()) { - ReportFascicoloBean bean1 = new ReportFascicoloBean("- " + ReportFascicoloBean bean1 = new ReportFascicoloBean(stringa + " - " + LanguageUtil.get(locale, "label-documenti-tipologia-" + stringa) + StringPool.TAB + " - num. documenti presentati: " + docPraticas.size()); listaAllegatiGeo.add(bean1); @@ -744,7 +744,7 @@ public class ReportFascicoloUtil { intPraticaId, lastDettPratica.getDettPraticaId(), stringa, QueryUtil.ALL_POS, QueryUtil.ALL_POS); if (docPraticas != null && !docPraticas.isEmpty()) { - ReportFascicoloBean bean1 = new ReportFascicoloBean("- " + ReportFascicoloBean bean1 = new ReportFascicoloBean(stringa + " - " + LanguageUtil.get(locale, "label-documenti-tipologia-" + stringa) + StringPool.TAB + " - num. documenti presentati: " + docPraticas.size()); listaAllegatiDomanda.add(bean1); @@ -933,7 +933,7 @@ public class ReportFascicoloUtil { List docPraticas = DocPraticaLocalServiceUtil.findByIntPratica_ClassPk_TipologiaNew( intPraticaId, fineLavoriId, stringa, QueryUtil.ALL_POS, QueryUtil.ALL_POS); if (docPraticas != null && !docPraticas.isEmpty()) { - ReportFascicoloBean bean1 = new ReportFascicoloBean(" - " + ReportFascicoloBean bean1 = new ReportFascicoloBean(stringa + " - " + LanguageUtil.get(locale, "label-documenti-tipologia-" + stringa) + " - documenti presentati: "); listaAllegatiDomanda.add(bean1); @@ -1126,7 +1126,7 @@ public class ReportFascicoloUtil { List docPraticas = DocPraticaLocalServiceUtil.findByIntPratica_ClassPk_Tipologia( intPraticaId, collaudoId, stringa, QueryUtil.ALL_POS, QueryUtil.ALL_POS); if (docPraticas != null && !docPraticas.isEmpty()) { - ReportFascicoloBean bean1 = new ReportFascicoloBean("- " + ReportFascicoloBean bean1 = new ReportFascicoloBean(stringa + " - " + LanguageUtil.get(locale, "label-documenti-tipologia-" + stringa) + StringPool.TAB + " - num. documenti presentati: " + docPraticas.size()); listaAllegatiDomanda.add(bean1); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/edit_allegato.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/edit_allegato.jsp index b9a07a0d..98d4f7a2 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/edit_allegato.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/edit_allegato.jsp @@ -71,11 +71,12 @@ int dimensioneMassimaAllegati = (int) ((Short) company.getExpandoBridge() for(String codiceDoc:tipologiaAllegati){ //TODO come per il portlet potrebbe non andar bene per integrazioni e varianti + String nomeAllegato = codiceDoc + " - " + LanguageUtil.get(pageContext, "label-documenti-tipologia-" + codiceDoc); boolean isUnivoco = DocumentiPraticaUtil.getDocUnivoci().contains(codiceDoc); if (!isUnivoco || DocPraticaServiceUtil.countByClassPk_Tipologia(classPk, codiceDoc) == 0) { %> - + <% } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view.jsp index 78ee76b1..19ccfa06 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view.jsp @@ -203,11 +203,12 @@ if ("page_geologica".equals(comingFrom)) { docPraticas = DocPraticaServiceUtil.findByIntPratica_ClassPk_Tipologia(intPratica.getIntPraticaId(), classPk, codiceDoc, QueryUtil.ALL_POS, QueryUtil.ALL_POS); } + String nomeAllegato = codiceDoc + " - " + LanguageUtil.get(pageContext, "label-documenti-tipologia-" + codiceDoc); %>
<%= docPraticas.size() %> <% if (docPraticas.isEmpty()) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view_accordion.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view_accordion.jsp index f6281408..9983eeb3 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view_accordion.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view_accordion.jsp @@ -80,13 +80,14 @@ for (String codiceDoc:tipologiaAllegati) { docPraticas = DocPraticaServiceUtil.getValidUntilClassPkByIntPratica(intPraticaId, classPk, codiceDoc, QueryUtil.ALL_POS, QueryUtil.ALL_POS); } + String nomeAllegato = codiceDoc + " - " + LanguageUtil.get(pageContext, "label-documenti-tipologia-" + codiceDoc); %>

- +

<%= docPraticas.size() %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp index 770abc31..90a3b037 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_modal_fascicolo.jsp @@ -1,4 +1,5 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%> <%@ include file="/html/fascicolofe/init.jsp" %> <% String formName = ParamUtil.getString(request, "formName","fm"); %>
@@ -23,21 +24,21 @@
- - " type="radio" value="<%= Constants.PROCEDURA_Q1 %>" showRequiredLabel="true" disabled="true"> - + <% + for (Entry procedura : IntPraticaLocalServiceUtil.getTipiProcedure() + .entrySet()) { + String tipo = procedura.getKey(); + String label = procedura.getValue(); + String nomeProcedura = LanguageUtil.get(pageContext, "label_procedura_"+tipo) + ") " + label; + %> + + - " type="radio" value="<%= Constants.PROCEDURA_Q2 %>" showRequiredLabel="true" disabled="true" /> - " type="radio" value="<%= Constants.PROCEDURA_Q3 %>" showRequiredLabel="true" disabled="true" /> - " type="radio" value="<%= Constants.PROCEDURA_Q4 %>" showRequiredLabel="true" disabled="true" /> - " type="radio" value="<%= Constants.PROCEDURA_Q5 %>" showRequiredLabel="true" disabled="true" /> - " type="radio" value="<%= Constants.PROCEDURA_Q6 %>" showRequiredLabel="true" disabled="true" /> - " type="radio" value="<%= Constants.PROCEDURA_Q7 %>" showRequiredLabel="true" disabled="true" /> - " type="radio" value="<%= Constants.PROCEDURA_Q8 %>" showRequiredLabel="true" disabled="true" /> - " type="radio" value="<%= Constants.PROCEDURA_Q9 %>" showRequiredLabel="true" disabled="true" /> - " type="radio" value="<%= Constants.PROCEDURA_Q10 %>" showRequiredLabel="true" disabled="true" /> + <% + } + %>
@@ -167,7 +168,6 @@ selectId: 'provinciaId', selectSort: true, selectVal: '0' - }, { select: 'comune', @@ -176,7 +176,6 @@ selectId: 'comuneId', selectSort: true, selectVal: '0' - }/*, { select: 'territorioId', diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_collaudo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_collaudo.jsp index a22e3351..670b1dbf 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_collaudo.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_collaudo.jsp @@ -140,10 +140,11 @@ <% for(String codiceDoc:tipologiaAllegati){ + String nomeAllegato = codiceDoc + " - " + LanguageUtil.get(pageContext, "label-documenti-tipologia-" + codiceDoc); %>
- +
<% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo.jsp index 3e91fe04..f73af2a0 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo.jsp @@ -355,10 +355,11 @@ List tipologiaSoggetti = Arrays.asList(TipoSoggettoUtil.TITOLARE_DIGITAL
<% for(String codiceDoc:tipologiaAllegati){ + String nomeAllegato = codiceDoc + " - " + LanguageUtil.get(pageContext, "label-documenti-tipologia-" + codiceDoc); %>
- +
<% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fine-lavori.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fine-lavori.jsp index 4c8435b9..555352ce 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fine-lavori.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fine-lavori.jsp @@ -141,10 +141,11 @@ <% for(String codiceDoc:tipologiaAllegati){ + String nomeAllegato = codiceDoc + " - " + LanguageUtil.get(pageContext, "label-documenti-tipologia-" + codiceDoc); %>
- +
<% diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_columns_generic.jspf b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_columns_generic.jspf index 3caa7067..c2627bec 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_columns_generic.jspf +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_columns_generic.jspf @@ -305,7 +305,7 @@ if (lastDettPratica == null) { + StringPool.CLOSE_PARENTHESIS %> - <%= provincia.getProvincia() %>
Localizzazione: <%= lastDettPratica.getVia() %>
- <%= LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()) %> + <%= LanguageUtil.get(pageContext, "label_procedura_" + intPratica.getTipoProcedura()) + ") " + LanguageUtil.get(pageContext, "tipo_procedura_" + intPratica.getTipoProcedura()) %>

<%= lastDettPratica.getDescLongIntervento() %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/servlet/FirmaServlet.java b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/servlet/FirmaServlet.java index 6cbf032f..c242e8a7 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/servlet/FirmaServlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/servlet/FirmaServlet.java @@ -22,6 +22,7 @@ import com.liferay.portal.kernel.json.JSONSerializer; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.util.ContentTypes; import com.liferay.portal.kernel.util.StreamUtil; import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringUtil; @@ -151,7 +152,8 @@ public class FirmaServlet extends HttpServlet { JSONSerializer jsonSerializer = JSONFactoryUtil.createJSONSerializer(); jsonSerializer.exclude("*.class"); String jsonResponse = jsonSerializer.serialize(risposta); - response.setContentType("application/json; charset=UTF-8"); + response.setContentType(ContentTypes.APPLICATION_JSON); + response.setCharacterEncoding(StringPool.UTF8); ServletResponseUtil.write(response, jsonResponse); } } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/.settings/org.eclipse.wst.common.component b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/.settings/org.eclipse.wst.common.component index d5f205ee..c01cc188 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/.settings/org.eclipse.wst.common.component +++ b/liferay-plugins-sdk-6.2/portlets/portos-kaleo-controller-portlet/.settings/org.eclipse.wst.common.component @@ -5,6 +5,9 @@ uses + + uses + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/.tern-project b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/.tern-project new file mode 100644 index 00000000..a185ba0d --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/.tern-project @@ -0,0 +1 @@ +{"ide":{"scriptPaths":[]},"plugins":{"aui":{},"liferay":{},"yui":{}},"libs":["ecma5","browser"]} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/init.jsp b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/init.jsp index 51c865d9..f7a89418 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/init.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/docroot/html/init.jsp @@ -28,8 +28,6 @@ <%@page import="it.tref.liferay.portos.mailmanager.shared.util.MailManagerConstants"%> -<%@ page contentType="text/html; charset=UTF-8" %> - <%@page import="com.liferay.portal.kernel.util.GetterUtil"%> diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/.tern-project b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/.tern-project new file mode 100644 index 00000000..a185ba0d --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/.tern-project @@ -0,0 +1 @@ +{"ide":{"scriptPaths":[]},"plugins":{"aui":{},"liferay":{},"yui":{}},"libs":["ecma5","browser"]} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/lib/sicilia-sue-connector-portlet-service.jar b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/lib/sicilia-sue-connector-portlet-service.jar index b48d4900..a677f5b8 100644 Binary files a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/lib/sicilia-sue-connector-portlet-service.jar and b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/lib/sicilia-sue-connector-portlet-service.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-display.xml b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-display.xml index 79d2513c..95b5240a 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-display.xml +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-display.xml @@ -5,4 +5,7 @@ + + + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-hook.xml b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-hook.xml new file mode 100644 index 00000000..812685cb --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-hook.xml @@ -0,0 +1,5 @@ + + + + portal.properties + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-plugin-package.properties b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-plugin-package.properties index 066b9eef..8236641d 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-plugin-package.properties +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-plugin-package.properties @@ -9,4 +9,11 @@ page-url=http://www.liferay.com author=Liferay, Inc. licenses=LGPL liferay-versions=6.2.0+ -required-deployment-contexts=portos-bo-portlet \ No newline at end of file +portal-dependency-jars=\ + commons-codec.jar,\ + commons-io.jar,\ + commons-lang.jar,\ + jstl-api.jar,\ + jstl-impl.jar +portal-dependency-tlds=c.tld +required-deployment-contexts=portos-bo-portlet diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-portlet.xml b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-portlet.xml index 93887f16..1c7b9263 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-portlet.xml @@ -9,6 +9,15 @@ /js/main.js sicilia-sue-connector + + sicilia-sue-administration + /icon.png + configuration + 1.6 + /css/main.css + /js/main.js + sicilia-sue-administration + administrator Administrator diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/portlet.xml b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/portlet.xml index 95c83383..438a7819 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/portlet.xml +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/portlet.xml @@ -13,6 +13,7 @@ text/html + content.Language Sicilia SUE Connector Sicilia SUE Connector @@ -31,4 +32,36 @@ user + + sicilia-sue-administration + Amministrazione Connettore SUE + it.mwg.sicilia.sue.portlet.SueAdministrationPortlet + + view-template + /html/administration/view.jsp + + 0 + + text/html + view + + content.Language + + Amministrazione Connettore SUE + Amministrazione Connettore SUE + + + + administrator + + + guest + + + power-user + + + user + + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service.xml index 9f7dbf0f..daa57a57 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service.xml @@ -10,12 +10,44 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ExpiredToken + InactiveSportello + InvalidToken + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/ExpiredTokenException.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/ExpiredTokenException.java new file mode 100644 index 00000000..934acce0 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/ExpiredTokenException.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue; + +import com.liferay.portal.kernel.exception.PortalException; + +/** + * @author Manifattura Web Group Srl + */ +public class ExpiredTokenException extends PortalException { + + public ExpiredTokenException() { + super(); + } + + public ExpiredTokenException(String msg) { + super(msg); + } + + public ExpiredTokenException(String msg, Throwable cause) { + super(msg, cause); + } + + public ExpiredTokenException(Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/InactiveSportelloException.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/InactiveSportelloException.java new file mode 100644 index 00000000..ce3a97c0 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/InactiveSportelloException.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue; + +import com.liferay.portal.kernel.exception.PortalException; + +/** + * @author Manifattura Web Group Srl + */ +public class InactiveSportelloException extends PortalException { + + public InactiveSportelloException() { + super(); + } + + public InactiveSportelloException(String msg) { + super(msg); + } + + public InactiveSportelloException(String msg, Throwable cause) { + super(msg, cause); + } + + public InactiveSportelloException(Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/InvalidTokenException.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/InvalidTokenException.java new file mode 100644 index 00000000..5bc738f3 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/InvalidTokenException.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue; + +import com.liferay.portal.kernel.exception.PortalException; + +/** + * @author Manifattura Web Group Srl + */ +public class InvalidTokenException extends PortalException { + + public InvalidTokenException() { + super(); + } + + public InvalidTokenException(String msg) { + super(msg); + } + + public InvalidTokenException(String msg, Throwable cause) { + super(msg, cause); + } + + public InvalidTokenException(Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/NoSuchApiSettingException.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/NoSuchApiSettingException.java new file mode 100644 index 00000000..4ef11342 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/NoSuchApiSettingException.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue; + +import com.liferay.portal.NoSuchModelException; + +/** + * @author Manifattura Web Group Srl + */ +public class NoSuchApiSettingException extends NoSuchModelException { + + public NoSuchApiSettingException() { + super(); + } + + public NoSuchApiSettingException(String msg) { + super(msg); + } + + public NoSuchApiSettingException(String msg, Throwable cause) { + super(msg, cause); + } + + public NoSuchApiSettingException(Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSetting.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSetting.java new file mode 100644 index 00000000..d4bc4913 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSetting.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.model; + +import com.liferay.portal.model.PersistedModel; + +/** + * The extended model interface for the ApiSetting service. Represents a row in the "sicilia_sue_ApiSetting" database table, with each column mapped to a property of this class. + * + * @author Manifattura Web Group Srl + * @see ApiSettingModel + * @see it.mwg.sicilia.sue.model.impl.ApiSettingImpl + * @see it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl + * @generated + */ +public interface ApiSetting extends ApiSettingModel, PersistedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this interface directly. Add methods to {@link it.mwg.sicilia.sue.model.impl.ApiSettingImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSettingClp.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSettingClp.java new file mode 100644 index 00000000..ce7910b1 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSettingClp.java @@ -0,0 +1,379 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.model; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.model.BaseModel; +import com.liferay.portal.model.impl.BaseModelImpl; + +import it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil; +import it.mwg.sicilia.sue.service.ClpSerializer; + +import java.io.Serializable; + +import java.lang.reflect.Method; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author Manifattura Web Group Srl + */ +public class ApiSettingClp extends BaseModelImpl + implements ApiSetting { + public ApiSettingClp() { + } + + @Override + public Class getModelClass() { + return ApiSetting.class; + } + + @Override + public String getModelClassName() { + return ApiSetting.class.getName(); + } + + @Override + public long getPrimaryKey() { + return _id; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _id; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("id", getId()); + attributes.put("companyId", getCompanyId()); + attributes.put("key", getKey()); + attributes.put("value", getValue()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + Long id = (Long)attributes.get("id"); + + if (id != null) { + setId(id); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Long key = (Long)attributes.get("key"); + + if (key != null) { + setKey(key); + } + + String value = (String)attributes.get("value"); + + if (value != null) { + setValue(value); + } + } + + @Override + public long getId() { + return _id; + } + + @Override + public void setId(long id) { + _id = id; + + if (_apiSettingRemoteModel != null) { + try { + Class clazz = _apiSettingRemoteModel.getClass(); + + Method method = clazz.getMethod("setId", long.class); + + method.invoke(_apiSettingRemoteModel, id); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getCompanyId() { + return _companyId; + } + + @Override + public void setCompanyId(long companyId) { + _companyId = companyId; + + if (_apiSettingRemoteModel != null) { + try { + Class clazz = _apiSettingRemoteModel.getClass(); + + Method method = clazz.getMethod("setCompanyId", long.class); + + method.invoke(_apiSettingRemoteModel, companyId); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getKey() { + return _key; + } + + @Override + public void setKey(long key) { + _key = key; + + if (_apiSettingRemoteModel != null) { + try { + Class clazz = _apiSettingRemoteModel.getClass(); + + Method method = clazz.getMethod("setKey", long.class); + + method.invoke(_apiSettingRemoteModel, key); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public String getValue() { + return _value; + } + + @Override + public void setValue(String value) { + _value = value; + + if (_apiSettingRemoteModel != null) { + try { + Class clazz = _apiSettingRemoteModel.getClass(); + + Method method = clazz.getMethod("setValue", String.class); + + method.invoke(_apiSettingRemoteModel, value); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + public BaseModel getApiSettingRemoteModel() { + return _apiSettingRemoteModel; + } + + public void setApiSettingRemoteModel(BaseModel apiSettingRemoteModel) { + _apiSettingRemoteModel = apiSettingRemoteModel; + } + + public Object invokeOnRemoteModel(String methodName, + Class[] parameterTypes, Object[] parameterValues) + throws Exception { + Object[] remoteParameterValues = new Object[parameterValues.length]; + + for (int i = 0; i < parameterValues.length; i++) { + if (parameterValues[i] != null) { + remoteParameterValues[i] = ClpSerializer.translateInput(parameterValues[i]); + } + } + + Class remoteModelClass = _apiSettingRemoteModel.getClass(); + + ClassLoader remoteModelClassLoader = remoteModelClass.getClassLoader(); + + Class[] remoteParameterTypes = new Class[parameterTypes.length]; + + for (int i = 0; i < parameterTypes.length; i++) { + if (parameterTypes[i].isPrimitive()) { + remoteParameterTypes[i] = parameterTypes[i]; + } + else { + String parameterTypeName = parameterTypes[i].getName(); + + remoteParameterTypes[i] = remoteModelClassLoader.loadClass(parameterTypeName); + } + } + + Method method = remoteModelClass.getMethod(methodName, + remoteParameterTypes); + + Object returnValue = method.invoke(_apiSettingRemoteModel, + remoteParameterValues); + + if (returnValue != null) { + returnValue = ClpSerializer.translateOutput(returnValue); + } + + return returnValue; + } + + @Override + public void persist() throws SystemException { + if (this.isNew()) { + ApiSettingLocalServiceUtil.addApiSetting(this); + } + else { + ApiSettingLocalServiceUtil.updateApiSetting(this); + } + } + + @Override + public ApiSetting toEscapedModel() { + return (ApiSetting)ProxyUtil.newProxyInstance(ApiSetting.class.getClassLoader(), + new Class[] { ApiSetting.class }, new AutoEscapeBeanHandler(this)); + } + + @Override + public Object clone() { + ApiSettingClp clone = new ApiSettingClp(); + + clone.setId(getId()); + clone.setCompanyId(getCompanyId()); + clone.setKey(getKey()); + clone.setValue(getValue()); + + return clone; + } + + @Override + public int compareTo(ApiSetting apiSetting) { + long primaryKey = apiSetting.getPrimaryKey(); + + if (getPrimaryKey() < primaryKey) { + return -1; + } + else if (getPrimaryKey() > primaryKey) { + return 1; + } + else { + return 0; + } + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof ApiSettingClp)) { + return false; + } + + ApiSettingClp apiSetting = (ApiSettingClp)obj; + + long primaryKey = apiSetting.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + public Class getClpSerializerClass() { + return _clpSerializerClass; + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(9); + + sb.append("{id="); + sb.append(getId()); + sb.append(", companyId="); + sb.append(getCompanyId()); + sb.append(", key="); + sb.append(getKey()); + sb.append(", value="); + sb.append(getValue()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(16); + + sb.append(""); + sb.append("it.mwg.sicilia.sue.model.ApiSetting"); + sb.append(""); + + sb.append( + "id"); + sb.append( + "companyId"); + sb.append( + "key"); + sb.append( + "value"); + + sb.append(""); + + return sb.toString(); + } + + private long _id; + private long _companyId; + private long _key; + private String _value; + private BaseModel _apiSettingRemoteModel; + private Class _clpSerializerClass = it.mwg.sicilia.sue.service.ClpSerializer.class; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSettingModel.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSettingModel.java new file mode 100644 index 00000000..c6ea3753 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSettingModel.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.model; + +import com.liferay.portal.kernel.bean.AutoEscape; +import com.liferay.portal.model.BaseModel; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.service.ServiceContext; + +import com.liferay.portlet.expando.model.ExpandoBridge; + +import java.io.Serializable; + +/** + * The base model interface for the ApiSetting service. Represents a row in the "sicilia_sue_ApiSetting" database table, with each column mapped to a property of this class. + * + *

+ * This interface and its corresponding implementation {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.mwg.sicilia.sue.model.impl.ApiSettingImpl}. + *

+ * + * @author Manifattura Web Group Srl + * @see ApiSetting + * @see it.mwg.sicilia.sue.model.impl.ApiSettingImpl + * @see it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl + * @generated + */ +public interface ApiSettingModel extends BaseModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. All methods that expect a api setting model instance should use the {@link ApiSetting} interface instead. + */ + + /** + * Returns the primary key of this api setting. + * + * @return the primary key of this api setting + */ + public long getPrimaryKey(); + + /** + * Sets the primary key of this api setting. + * + * @param primaryKey the primary key of this api setting + */ + public void setPrimaryKey(long primaryKey); + + /** + * Returns the ID of this api setting. + * + * @return the ID of this api setting + */ + public long getId(); + + /** + * Sets the ID of this api setting. + * + * @param id the ID of this api setting + */ + public void setId(long id); + + /** + * Returns the company ID of this api setting. + * + * @return the company ID of this api setting + */ + public long getCompanyId(); + + /** + * Sets the company ID of this api setting. + * + * @param companyId the company ID of this api setting + */ + public void setCompanyId(long companyId); + + /** + * Returns the key of this api setting. + * + * @return the key of this api setting + */ + public long getKey(); + + /** + * Sets the key of this api setting. + * + * @param key the key of this api setting + */ + public void setKey(long key); + + /** + * Returns the value of this api setting. + * + * @return the value of this api setting + */ + @AutoEscape + public String getValue(); + + /** + * Sets the value of this api setting. + * + * @param value the value of this api setting + */ + public void setValue(String value); + + @Override + public boolean isNew(); + + @Override + public void setNew(boolean n); + + @Override + public boolean isCachedModel(); + + @Override + public void setCachedModel(boolean cachedModel); + + @Override + public boolean isEscapedModel(); + + @Override + public Serializable getPrimaryKeyObj(); + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj); + + @Override + public ExpandoBridge getExpandoBridge(); + + @Override + public void setExpandoBridgeAttributes(BaseModel baseModel); + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge); + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext); + + @Override + public Object clone(); + + @Override + public int compareTo(it.mwg.sicilia.sue.model.ApiSetting apiSetting); + + @Override + public int hashCode(); + + @Override + public CacheModel toCacheModel(); + + @Override + public it.mwg.sicilia.sue.model.ApiSetting toEscapedModel(); + + @Override + public it.mwg.sicilia.sue.model.ApiSetting toUnescapedModel(); + + @Override + public String toString(); + + @Override + public String toXmlString(); +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSettingSoap.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSettingSoap.java new file mode 100644 index 00000000..43988596 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSettingSoap.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.model; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.List; + +/** + * This class is used by SOAP remote services, specifically {@link it.mwg.sicilia.sue.service.http.ApiSettingServiceSoap}. + * + * @author Manifattura Web Group Srl + * @see it.mwg.sicilia.sue.service.http.ApiSettingServiceSoap + * @generated + */ +public class ApiSettingSoap implements Serializable { + public static ApiSettingSoap toSoapModel(ApiSetting model) { + ApiSettingSoap soapModel = new ApiSettingSoap(); + + soapModel.setId(model.getId()); + soapModel.setCompanyId(model.getCompanyId()); + soapModel.setKey(model.getKey()); + soapModel.setValue(model.getValue()); + + return soapModel; + } + + public static ApiSettingSoap[] toSoapModels(ApiSetting[] models) { + ApiSettingSoap[] soapModels = new ApiSettingSoap[models.length]; + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModel(models[i]); + } + + return soapModels; + } + + public static ApiSettingSoap[][] toSoapModels(ApiSetting[][] models) { + ApiSettingSoap[][] soapModels = null; + + if (models.length > 0) { + soapModels = new ApiSettingSoap[models.length][models[0].length]; + } + else { + soapModels = new ApiSettingSoap[0][0]; + } + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModels(models[i]); + } + + return soapModels; + } + + public static ApiSettingSoap[] toSoapModels(List models) { + List soapModels = new ArrayList(models.size()); + + for (ApiSetting model : models) { + soapModels.add(toSoapModel(model)); + } + + return soapModels.toArray(new ApiSettingSoap[soapModels.size()]); + } + + public ApiSettingSoap() { + } + + public long getPrimaryKey() { + return _id; + } + + public void setPrimaryKey(long pk) { + setId(pk); + } + + public long getId() { + return _id; + } + + public void setId(long id) { + _id = id; + } + + public long getCompanyId() { + return _companyId; + } + + public void setCompanyId(long companyId) { + _companyId = companyId; + } + + public long getKey() { + return _key; + } + + public void setKey(long key) { + _key = key; + } + + public String getValue() { + return _value; + } + + public void setValue(String value) { + _value = value; + } + + private long _id; + private long _companyId; + private long _key; + private String _value; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSettingWrapper.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSettingWrapper.java new file mode 100644 index 00000000..e9bad735 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/ApiSettingWrapper.java @@ -0,0 +1,327 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.model; + +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.model.ModelWrapper; + +import java.util.HashMap; +import java.util.Map; + +/** + *

+ * This class is a wrapper for {@link ApiSetting}. + *

+ * + * @author Manifattura Web Group Srl + * @see ApiSetting + * @generated + */ +public class ApiSettingWrapper implements ApiSetting, ModelWrapper { + public ApiSettingWrapper(ApiSetting apiSetting) { + _apiSetting = apiSetting; + } + + @Override + public Class getModelClass() { + return ApiSetting.class; + } + + @Override + public String getModelClassName() { + return ApiSetting.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("id", getId()); + attributes.put("companyId", getCompanyId()); + attributes.put("key", getKey()); + attributes.put("value", getValue()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + Long id = (Long)attributes.get("id"); + + if (id != null) { + setId(id); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Long key = (Long)attributes.get("key"); + + if (key != null) { + setKey(key); + } + + String value = (String)attributes.get("value"); + + if (value != null) { + setValue(value); + } + } + + /** + * Returns the primary key of this api setting. + * + * @return the primary key of this api setting + */ + @Override + public long getPrimaryKey() { + return _apiSetting.getPrimaryKey(); + } + + /** + * Sets the primary key of this api setting. + * + * @param primaryKey the primary key of this api setting + */ + @Override + public void setPrimaryKey(long primaryKey) { + _apiSetting.setPrimaryKey(primaryKey); + } + + /** + * Returns the ID of this api setting. + * + * @return the ID of this api setting + */ + @Override + public long getId() { + return _apiSetting.getId(); + } + + /** + * Sets the ID of this api setting. + * + * @param id the ID of this api setting + */ + @Override + public void setId(long id) { + _apiSetting.setId(id); + } + + /** + * Returns the company ID of this api setting. + * + * @return the company ID of this api setting + */ + @Override + public long getCompanyId() { + return _apiSetting.getCompanyId(); + } + + /** + * Sets the company ID of this api setting. + * + * @param companyId the company ID of this api setting + */ + @Override + public void setCompanyId(long companyId) { + _apiSetting.setCompanyId(companyId); + } + + /** + * Returns the key of this api setting. + * + * @return the key of this api setting + */ + @Override + public long getKey() { + return _apiSetting.getKey(); + } + + /** + * Sets the key of this api setting. + * + * @param key the key of this api setting + */ + @Override + public void setKey(long key) { + _apiSetting.setKey(key); + } + + /** + * Returns the value of this api setting. + * + * @return the value of this api setting + */ + @Override + public java.lang.String getValue() { + return _apiSetting.getValue(); + } + + /** + * Sets the value of this api setting. + * + * @param value the value of this api setting + */ + @Override + public void setValue(java.lang.String value) { + _apiSetting.setValue(value); + } + + @Override + public boolean isNew() { + return _apiSetting.isNew(); + } + + @Override + public void setNew(boolean n) { + _apiSetting.setNew(n); + } + + @Override + public boolean isCachedModel() { + return _apiSetting.isCachedModel(); + } + + @Override + public void setCachedModel(boolean cachedModel) { + _apiSetting.setCachedModel(cachedModel); + } + + @Override + public boolean isEscapedModel() { + return _apiSetting.isEscapedModel(); + } + + @Override + public java.io.Serializable getPrimaryKeyObj() { + return _apiSetting.getPrimaryKeyObj(); + } + + @Override + public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) { + _apiSetting.setPrimaryKeyObj(primaryKeyObj); + } + + @Override + public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() { + return _apiSetting.getExpandoBridge(); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.model.BaseModel baseModel) { + _apiSetting.setExpandoBridgeAttributes(baseModel); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) { + _apiSetting.setExpandoBridgeAttributes(expandoBridge); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.service.ServiceContext serviceContext) { + _apiSetting.setExpandoBridgeAttributes(serviceContext); + } + + @Override + public java.lang.Object clone() { + return new ApiSettingWrapper((ApiSetting)_apiSetting.clone()); + } + + @Override + public int compareTo(it.mwg.sicilia.sue.model.ApiSetting apiSetting) { + return _apiSetting.compareTo(apiSetting); + } + + @Override + public int hashCode() { + return _apiSetting.hashCode(); + } + + @Override + public com.liferay.portal.model.CacheModel toCacheModel() { + return _apiSetting.toCacheModel(); + } + + @Override + public it.mwg.sicilia.sue.model.ApiSetting toEscapedModel() { + return new ApiSettingWrapper(_apiSetting.toEscapedModel()); + } + + @Override + public it.mwg.sicilia.sue.model.ApiSetting toUnescapedModel() { + return new ApiSettingWrapper(_apiSetting.toUnescapedModel()); + } + + @Override + public java.lang.String toString() { + return _apiSetting.toString(); + } + + @Override + public java.lang.String toXmlString() { + return _apiSetting.toXmlString(); + } + + @Override + public void persist() + throws com.liferay.portal.kernel.exception.SystemException { + _apiSetting.persist(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof ApiSettingWrapper)) { + return false; + } + + ApiSettingWrapper apiSettingWrapper = (ApiSettingWrapper)obj; + + if (Validator.equals(_apiSetting, apiSettingWrapper._apiSetting)) { + return true; + } + + return false; + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel} + */ + public ApiSetting getWrappedApiSetting() { + return _apiSetting; + } + + @Override + public ApiSetting getWrappedModel() { + return _apiSetting; + } + + @Override + public void resetOriginalValues() { + _apiSetting.resetOriginalValues(); + } + + private ApiSetting _apiSetting; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/Sportello.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/Sportello.java index 9f52c59f..31cd5faa 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/Sportello.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/Sportello.java @@ -31,4 +31,26 @@ public interface Sportello extends SportelloModel, PersistedModel { * * Never modify this interface directly. Add methods to {@link it.mwg.sicilia.sue.model.impl.SportelloImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. */ + public java.lang.String encryptPassword(java.lang.String password); + + public boolean checkPassword(java.lang.String password); + + public void setEncryptedPassword(java.lang.String password, + com.liferay.portal.model.User user); + + public java.lang.String getCodiceProvincia() + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + public java.lang.String getNomeComune() + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + public java.lang.String getNomeProvincia() + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + public it.tref.liferay.portos.bo.model.Comune getComune() + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloClp.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloClp.java index 8cd21861..7db95aa9 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloClp.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloClp.java @@ -77,10 +77,20 @@ public class SportelloClp extends BaseModelImpl implements Sportello attributes.put("sportelloId", getSportelloId()); attributes.put("groupId", getGroupId()); attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); attributes.put("createDate", getCreateDate()); + attributes.put("createUserId", getCreateUserId()); + attributes.put("createUserName", getCreateUserName()); attributes.put("modifiedDate", getModifiedDate()); + attributes.put("modifiedUserId", getModifiedUserId()); + attributes.put("modifiedUserName", getModifiedUserName()); + attributes.put("userName", getUserName()); + attributes.put("email", getEmail()); + attributes.put("comuneId", getComuneId()); + attributes.put("attivo", getAttivo()); + attributes.put("password", getPassword()); + attributes.put("passwordModifiedDate", getPasswordModifiedDate()); + attributes.put("passwordModifiedUserId", getPasswordModifiedUserId()); + attributes.put("passwordModifiedUserName", getPasswordModifiedUserName()); return attributes; } @@ -105,22 +115,22 @@ public class SportelloClp extends BaseModelImpl implements Sportello setCompanyId(companyId); } - Long userId = (Long)attributes.get("userId"); + Date createDate = (Date)attributes.get("createDate"); - if (userId != null) { - setUserId(userId); + if (createDate != null) { + setCreateDate(createDate); } - String userName = (String)attributes.get("userName"); + Long createUserId = (Long)attributes.get("createUserId"); - if (userName != null) { - setUserName(userName); + if (createUserId != null) { + setCreateUserId(createUserId); } - Date createDate = (Date)attributes.get("createDate"); + String createUserName = (String)attributes.get("createUserName"); - if (createDate != null) { - setCreateDate(createDate); + if (createUserName != null) { + setCreateUserName(createUserName); } Date modifiedDate = (Date)attributes.get("modifiedDate"); @@ -128,6 +138,68 @@ public class SportelloClp extends BaseModelImpl implements Sportello if (modifiedDate != null) { setModifiedDate(modifiedDate); } + + Long modifiedUserId = (Long)attributes.get("modifiedUserId"); + + if (modifiedUserId != null) { + setModifiedUserId(modifiedUserId); + } + + String modifiedUserName = (String)attributes.get("modifiedUserName"); + + if (modifiedUserName != null) { + setModifiedUserName(modifiedUserName); + } + + String userName = (String)attributes.get("userName"); + + if (userName != null) { + setUserName(userName); + } + + String email = (String)attributes.get("email"); + + if (email != null) { + setEmail(email); + } + + Long comuneId = (Long)attributes.get("comuneId"); + + if (comuneId != null) { + setComuneId(comuneId); + } + + Boolean attivo = (Boolean)attributes.get("attivo"); + + if (attivo != null) { + setAttivo(attivo); + } + + String password = (String)attributes.get("password"); + + if (password != null) { + setPassword(password); + } + + Date passwordModifiedDate = (Date)attributes.get("passwordModifiedDate"); + + if (passwordModifiedDate != null) { + setPasswordModifiedDate(passwordModifiedDate); + } + + Long passwordModifiedUserId = (Long)attributes.get( + "passwordModifiedUserId"); + + if (passwordModifiedUserId != null) { + setPasswordModifiedUserId(passwordModifiedUserId); + } + + String passwordModifiedUserName = (String)attributes.get( + "passwordModifiedUserName"); + + if (passwordModifiedUserName != null) { + setPasswordModifiedUserName(passwordModifiedUserName); + } } @Override @@ -200,21 +272,125 @@ public class SportelloClp extends BaseModelImpl implements Sportello } @Override - public long getUserId() { - return _userId; + public Date getCreateDate() { + return _createDate; + } + + @Override + public void setCreateDate(Date createDate) { + _createDate = createDate; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setCreateDate", Date.class); + + method.invoke(_sportelloRemoteModel, createDate); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getCreateUserId() { + return _createUserId; + } + + @Override + public void setCreateUserId(long createUserId) { + _createUserId = createUserId; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setCreateUserId", long.class); + + method.invoke(_sportelloRemoteModel, createUserId); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public String getCreateUserUuid() throws SystemException { + return PortalUtil.getUserValue(getCreateUserId(), "uuid", + _createUserUuid); + } + + @Override + public void setCreateUserUuid(String createUserUuid) { + _createUserUuid = createUserUuid; + } + + @Override + public String getCreateUserName() { + return _createUserName; + } + + @Override + public void setCreateUserName(String createUserName) { + _createUserName = createUserName; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setCreateUserName", + String.class); + + method.invoke(_sportelloRemoteModel, createUserName); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public Date getModifiedDate() { + return _modifiedDate; + } + + @Override + public void setModifiedDate(Date modifiedDate) { + _modifiedDate = modifiedDate; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setModifiedDate", Date.class); + + method.invoke(_sportelloRemoteModel, modifiedDate); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getModifiedUserId() { + return _modifiedUserId; } @Override - public void setUserId(long userId) { - _userId = userId; + public void setModifiedUserId(long modifiedUserId) { + _modifiedUserId = modifiedUserId; if (_sportelloRemoteModel != null) { try { Class clazz = _sportelloRemoteModel.getClass(); - Method method = clazz.getMethod("setUserId", long.class); + Method method = clazz.getMethod("setModifiedUserId", long.class); - method.invoke(_sportelloRemoteModel, userId); + method.invoke(_sportelloRemoteModel, modifiedUserId); } catch (Exception e) { throw new UnsupportedOperationException(e); @@ -223,13 +399,38 @@ public class SportelloClp extends BaseModelImpl implements Sportello } @Override - public String getUserUuid() throws SystemException { - return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid); + public String getModifiedUserUuid() throws SystemException { + return PortalUtil.getUserValue(getModifiedUserId(), "uuid", + _modifiedUserUuid); + } + + @Override + public void setModifiedUserUuid(String modifiedUserUuid) { + _modifiedUserUuid = modifiedUserUuid; + } + + @Override + public String getModifiedUserName() { + return _modifiedUserName; } @Override - public void setUserUuid(String userUuid) { - _userUuid = userUuid; + public void setModifiedUserName(String modifiedUserName) { + _modifiedUserName = modifiedUserName; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setModifiedUserName", + String.class); + + method.invoke(_sportelloRemoteModel, modifiedUserName); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } } @Override @@ -256,21 +457,21 @@ public class SportelloClp extends BaseModelImpl implements Sportello } @Override - public Date getCreateDate() { - return _createDate; + public String getEmail() { + return _email; } @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; + public void setEmail(String email) { + _email = email; if (_sportelloRemoteModel != null) { try { Class clazz = _sportelloRemoteModel.getClass(); - Method method = clazz.getMethod("setCreateDate", Date.class); + Method method = clazz.getMethod("setEmail", String.class); - method.invoke(_sportelloRemoteModel, createDate); + method.invoke(_sportelloRemoteModel, email); } catch (Exception e) { throw new UnsupportedOperationException(e); @@ -279,21 +480,21 @@ public class SportelloClp extends BaseModelImpl implements Sportello } @Override - public Date getModifiedDate() { - return _modifiedDate; + public long getComuneId() { + return _comuneId; } @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; + public void setComuneId(long comuneId) { + _comuneId = comuneId; if (_sportelloRemoteModel != null) { try { Class clazz = _sportelloRemoteModel.getClass(); - Method method = clazz.getMethod("setModifiedDate", Date.class); + Method method = clazz.getMethod("setComuneId", long.class); - method.invoke(_sportelloRemoteModel, modifiedDate); + method.invoke(_sportelloRemoteModel, comuneId); } catch (Exception e) { throw new UnsupportedOperationException(e); @@ -301,6 +502,273 @@ public class SportelloClp extends BaseModelImpl implements Sportello } } + @Override + public boolean getAttivo() { + return _attivo; + } + + @Override + public boolean isAttivo() { + return _attivo; + } + + @Override + public void setAttivo(boolean attivo) { + _attivo = attivo; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setAttivo", boolean.class); + + method.invoke(_sportelloRemoteModel, attivo); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public String getPassword() { + return _password; + } + + @Override + public void setPassword(String password) { + _password = password; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setPassword", String.class); + + method.invoke(_sportelloRemoteModel, password); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public Date getPasswordModifiedDate() { + return _passwordModifiedDate; + } + + @Override + public void setPasswordModifiedDate(Date passwordModifiedDate) { + _passwordModifiedDate = passwordModifiedDate; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setPasswordModifiedDate", + Date.class); + + method.invoke(_sportelloRemoteModel, passwordModifiedDate); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public long getPasswordModifiedUserId() { + return _passwordModifiedUserId; + } + + @Override + public void setPasswordModifiedUserId(long passwordModifiedUserId) { + _passwordModifiedUserId = passwordModifiedUserId; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setPasswordModifiedUserId", + long.class); + + method.invoke(_sportelloRemoteModel, passwordModifiedUserId); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public String getPasswordModifiedUserUuid() throws SystemException { + return PortalUtil.getUserValue(getPasswordModifiedUserId(), "uuid", + _passwordModifiedUserUuid); + } + + @Override + public void setPasswordModifiedUserUuid(String passwordModifiedUserUuid) { + _passwordModifiedUserUuid = passwordModifiedUserUuid; + } + + @Override + public String getPasswordModifiedUserName() { + return _passwordModifiedUserName; + } + + @Override + public void setPasswordModifiedUserName(String passwordModifiedUserName) { + _passwordModifiedUserName = passwordModifiedUserName; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setPasswordModifiedUserName", + String.class); + + method.invoke(_sportelloRemoteModel, passwordModifiedUserName); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public java.lang.String encryptPassword(java.lang.String password) { + try { + String methodName = "encryptPassword"; + + Class[] parameterTypes = new Class[] { java.lang.String.class }; + + Object[] parameterValues = new Object[] { password }; + + java.lang.String returnObj = (java.lang.String)invokeOnRemoteModel(methodName, + parameterTypes, parameterValues); + + return returnObj; + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + + @Override + public java.lang.String getNomeComune() { + try { + String methodName = "getNomeComune"; + + Class[] parameterTypes = new Class[] { }; + + Object[] parameterValues = new Object[] { }; + + java.lang.String returnObj = (java.lang.String)invokeOnRemoteModel(methodName, + parameterTypes, parameterValues); + + return returnObj; + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + + @Override + public java.lang.String getCodiceProvincia() { + try { + String methodName = "getCodiceProvincia"; + + Class[] parameterTypes = new Class[] { }; + + Object[] parameterValues = new Object[] { }; + + java.lang.String returnObj = (java.lang.String)invokeOnRemoteModel(methodName, + parameterTypes, parameterValues); + + return returnObj; + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + + @Override + public java.lang.String getNomeProvincia() { + try { + String methodName = "getNomeProvincia"; + + Class[] parameterTypes = new Class[] { }; + + Object[] parameterValues = new Object[] { }; + + java.lang.String returnObj = (java.lang.String)invokeOnRemoteModel(methodName, + parameterTypes, parameterValues); + + return returnObj; + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + + @Override + public it.tref.liferay.portos.bo.model.Comune getComune() { + try { + String methodName = "getComune"; + + Class[] parameterTypes = new Class[] { }; + + Object[] parameterValues = new Object[] { }; + + it.tref.liferay.portos.bo.model.Comune returnObj = (it.tref.liferay.portos.bo.model.Comune)invokeOnRemoteModel(methodName, + parameterTypes, parameterValues); + + return returnObj; + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + + @Override + public boolean checkPassword(java.lang.String password) { + try { + String methodName = "checkPassword"; + + Class[] parameterTypes = new Class[] { java.lang.String.class }; + + Object[] parameterValues = new Object[] { password }; + + Boolean returnObj = (Boolean)invokeOnRemoteModel(methodName, + parameterTypes, parameterValues); + + return returnObj; + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + + @Override + public void setEncryptedPassword(java.lang.String password, + com.liferay.portal.model.User user) { + try { + String methodName = "setEncryptedPassword"; + + Class[] parameterTypes = new Class[] { + java.lang.String.class, com.liferay.portal.model.User.class + }; + + Object[] parameterValues = new Object[] { password, user }; + + invokeOnRemoteModel(methodName, parameterTypes, parameterValues); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + public BaseModel getSportelloRemoteModel() { return _sportelloRemoteModel; } @@ -373,10 +841,20 @@ public class SportelloClp extends BaseModelImpl implements Sportello clone.setSportelloId(getSportelloId()); clone.setGroupId(getGroupId()); clone.setCompanyId(getCompanyId()); - clone.setUserId(getUserId()); - clone.setUserName(getUserName()); clone.setCreateDate(getCreateDate()); + clone.setCreateUserId(getCreateUserId()); + clone.setCreateUserName(getCreateUserName()); clone.setModifiedDate(getModifiedDate()); + clone.setModifiedUserId(getModifiedUserId()); + clone.setModifiedUserName(getModifiedUserName()); + clone.setUserName(getUserName()); + clone.setEmail(getEmail()); + clone.setComuneId(getComuneId()); + clone.setAttivo(getAttivo()); + clone.setPassword(getPassword()); + clone.setPasswordModifiedDate(getPasswordModifiedDate()); + clone.setPasswordModifiedUserId(getPasswordModifiedUserId()); + clone.setPasswordModifiedUserName(getPasswordModifiedUserName()); return clone; } @@ -429,7 +907,7 @@ public class SportelloClp extends BaseModelImpl implements Sportello @Override public String toString() { - StringBundler sb = new StringBundler(15); + StringBundler sb = new StringBundler(35); sb.append("{sportelloId="); sb.append(getSportelloId()); @@ -437,14 +915,34 @@ public class SportelloClp extends BaseModelImpl implements Sportello sb.append(getGroupId()); sb.append(", companyId="); sb.append(getCompanyId()); - sb.append(", userId="); - sb.append(getUserId()); - sb.append(", userName="); - sb.append(getUserName()); sb.append(", createDate="); sb.append(getCreateDate()); + sb.append(", createUserId="); + sb.append(getCreateUserId()); + sb.append(", createUserName="); + sb.append(getCreateUserName()); sb.append(", modifiedDate="); sb.append(getModifiedDate()); + sb.append(", modifiedUserId="); + sb.append(getModifiedUserId()); + sb.append(", modifiedUserName="); + sb.append(getModifiedUserName()); + sb.append(", userName="); + sb.append(getUserName()); + sb.append(", email="); + sb.append(getEmail()); + sb.append(", comuneId="); + sb.append(getComuneId()); + sb.append(", attivo="); + sb.append(getAttivo()); + sb.append(", password="); + sb.append(getPassword()); + sb.append(", passwordModifiedDate="); + sb.append(getPasswordModifiedDate()); + sb.append(", passwordModifiedUserId="); + sb.append(getPasswordModifiedUserId()); + sb.append(", passwordModifiedUserName="); + sb.append(getPasswordModifiedUserName()); sb.append("}"); return sb.toString(); @@ -452,7 +950,7 @@ public class SportelloClp extends BaseModelImpl implements Sportello @Override public String toXmlString() { - StringBundler sb = new StringBundler(25); + StringBundler sb = new StringBundler(55); sb.append(""); sb.append("it.mwg.sicilia.sue.model.Sportello"); @@ -471,21 +969,61 @@ public class SportelloClp extends BaseModelImpl implements Sportello sb.append(getCompanyId()); sb.append("]]>
"); sb.append( - "userIdcreateDate"); sb.append( - "userNamecreateUserId"); sb.append( - "createDatecreateUserName"); sb.append( "modifiedDate"); + sb.append( + "modifiedUserId"); + sb.append( + "modifiedUserName"); + sb.append( + "userName"); + sb.append( + "email"); + sb.append( + "comuneId"); + sb.append( + "attivo"); + sb.append( + "password"); + sb.append( + "passwordModifiedDate"); + sb.append( + "passwordModifiedUserId"); + sb.append( + "passwordModifiedUserName"); sb.append(""); @@ -495,11 +1033,23 @@ public class SportelloClp extends BaseModelImpl implements Sportello private long _sportelloId; private long _groupId; private long _companyId; - private long _userId; - private String _userUuid; - private String _userName; private Date _createDate; + private long _createUserId; + private String _createUserUuid; + private String _createUserName; private Date _modifiedDate; + private long _modifiedUserId; + private String _modifiedUserUuid; + private String _modifiedUserName; + private String _userName; + private String _email; + private long _comuneId; + private boolean _attivo; + private String _password; + private Date _passwordModifiedDate; + private long _passwordModifiedUserId; + private String _passwordModifiedUserUuid; + private String _passwordModifiedUserName; private BaseModel _sportelloRemoteModel; private Class _clpSerializerClass = it.mwg.sicilia.sue.service.ClpSerializer.class; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloModel.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloModel.java index d443d45c..10b102b7 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloModel.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloModel.java @@ -18,7 +18,6 @@ import com.liferay.portal.kernel.bean.AutoEscape; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.model.BaseModel; import com.liferay.portal.model.CacheModel; -import com.liferay.portal.model.GroupedModel; import com.liferay.portal.service.ServiceContext; import com.liferay.portlet.expando.model.ExpandoBridge; @@ -40,7 +39,7 @@ import java.util.Date; * @see it.mwg.sicilia.sue.model.impl.SportelloModelImpl * @generated */ -public interface SportelloModel extends BaseModel, GroupedModel { +public interface SportelloModel extends BaseModel { /* * NOTE FOR DEVELOPERS: * @@ -80,7 +79,6 @@ public interface SportelloModel extends BaseModel, GroupedModel { * * @return the group ID of this sportello */ - @Override public long getGroupId(); /** @@ -88,7 +86,6 @@ public interface SportelloModel extends BaseModel, GroupedModel { * * @param groupId the group ID of this sportello */ - @Override public void setGroupId(long groupId); /** @@ -96,7 +93,6 @@ public interface SportelloModel extends BaseModel, GroupedModel { * * @return the company ID of this sportello */ - @Override public long getCompanyId(); /** @@ -104,41 +100,123 @@ public interface SportelloModel extends BaseModel, GroupedModel { * * @param companyId the company ID of this sportello */ - @Override public void setCompanyId(long companyId); /** - * Returns the user ID of this sportello. + * Returns the create date of this sportello. * - * @return the user ID of this sportello + * @return the create date of this sportello */ - @Override - public long getUserId(); + public Date getCreateDate(); /** - * Sets the user ID of this sportello. + * Sets the create date of this sportello. * - * @param userId the user ID of this sportello + * @param createDate the create date of this sportello */ - @Override - public void setUserId(long userId); + public void setCreateDate(Date createDate); /** - * Returns the user uuid of this sportello. + * Returns the create user ID of this sportello. * - * @return the user uuid of this sportello + * @return the create user ID of this sportello + */ + public long getCreateUserId(); + + /** + * Sets the create user ID of this sportello. + * + * @param createUserId the create user ID of this sportello + */ + public void setCreateUserId(long createUserId); + + /** + * Returns the create user uuid of this sportello. + * + * @return the create user uuid of this sportello * @throws SystemException if a system exception occurred */ - @Override - public String getUserUuid() throws SystemException; + public String getCreateUserUuid() throws SystemException; /** - * Sets the user uuid of this sportello. + * Sets the create user uuid of this sportello. * - * @param userUuid the user uuid of this sportello + * @param createUserUuid the create user uuid of this sportello */ - @Override - public void setUserUuid(String userUuid); + public void setCreateUserUuid(String createUserUuid); + + /** + * Returns the create user name of this sportello. + * + * @return the create user name of this sportello + */ + @AutoEscape + public String getCreateUserName(); + + /** + * Sets the create user name of this sportello. + * + * @param createUserName the create user name of this sportello + */ + public void setCreateUserName(String createUserName); + + /** + * Returns the modified date of this sportello. + * + * @return the modified date of this sportello + */ + public Date getModifiedDate(); + + /** + * Sets the modified date of this sportello. + * + * @param modifiedDate the modified date of this sportello + */ + public void setModifiedDate(Date modifiedDate); + + /** + * Returns the modified user ID of this sportello. + * + * @return the modified user ID of this sportello + */ + public long getModifiedUserId(); + + /** + * Sets the modified user ID of this sportello. + * + * @param modifiedUserId the modified user ID of this sportello + */ + public void setModifiedUserId(long modifiedUserId); + + /** + * Returns the modified user uuid of this sportello. + * + * @return the modified user uuid of this sportello + * @throws SystemException if a system exception occurred + */ + public String getModifiedUserUuid() throws SystemException; + + /** + * Sets the modified user uuid of this sportello. + * + * @param modifiedUserUuid the modified user uuid of this sportello + */ + public void setModifiedUserUuid(String modifiedUserUuid); + + /** + * Returns the modified user name of this sportello. + * + * @return the modified user name of this sportello + */ + @AutoEscape + public String getModifiedUserName(); + + /** + * Sets the modified user name of this sportello. + * + * @param modifiedUserName the modified user name of this sportello + */ + public void setModifiedUserName(String modifiedUserName); /** * Returns the user name of this sportello. @@ -146,7 +224,6 @@ public interface SportelloModel extends BaseModel, GroupedModel { * @return the user name of this sportello */ @AutoEscape - @Override public String getUserName(); /** @@ -154,40 +231,130 @@ public interface SportelloModel extends BaseModel, GroupedModel { * * @param userName the user name of this sportello */ - @Override public void setUserName(String userName); /** - * Returns the create date of this sportello. + * Returns the email of this sportello. * - * @return the create date of this sportello + * @return the email of this sportello */ - @Override - public Date getCreateDate(); + @AutoEscape + public String getEmail(); /** - * Sets the create date of this sportello. + * Sets the email of this sportello. * - * @param createDate the create date of this sportello + * @param email the email of this sportello */ - @Override - public void setCreateDate(Date createDate); + public void setEmail(String email); /** - * Returns the modified date of this sportello. + * Returns the comune ID of this sportello. * - * @return the modified date of this sportello + * @return the comune ID of this sportello */ - @Override - public Date getModifiedDate(); + public long getComuneId(); /** - * Sets the modified date of this sportello. + * Sets the comune ID of this sportello. * - * @param modifiedDate the modified date of this sportello + * @param comuneId the comune ID of this sportello */ - @Override - public void setModifiedDate(Date modifiedDate); + public void setComuneId(long comuneId); + + /** + * Returns the attivo of this sportello. + * + * @return the attivo of this sportello + */ + public boolean getAttivo(); + + /** + * Returns true if this sportello is attivo. + * + * @return true if this sportello is attivo; false otherwise + */ + public boolean isAttivo(); + + /** + * Sets whether this sportello is attivo. + * + * @param attivo the attivo of this sportello + */ + public void setAttivo(boolean attivo); + + /** + * Returns the password of this sportello. + * + * @return the password of this sportello + */ + @AutoEscape + public String getPassword(); + + /** + * Sets the password of this sportello. + * + * @param password the password of this sportello + */ + public void setPassword(String password); + + /** + * Returns the password modified date of this sportello. + * + * @return the password modified date of this sportello + */ + public Date getPasswordModifiedDate(); + + /** + * Sets the password modified date of this sportello. + * + * @param passwordModifiedDate the password modified date of this sportello + */ + public void setPasswordModifiedDate(Date passwordModifiedDate); + + /** + * Returns the password modified user ID of this sportello. + * + * @return the password modified user ID of this sportello + */ + public long getPasswordModifiedUserId(); + + /** + * Sets the password modified user ID of this sportello. + * + * @param passwordModifiedUserId the password modified user ID of this sportello + */ + public void setPasswordModifiedUserId(long passwordModifiedUserId); + + /** + * Returns the password modified user uuid of this sportello. + * + * @return the password modified user uuid of this sportello + * @throws SystemException if a system exception occurred + */ + public String getPasswordModifiedUserUuid() throws SystemException; + + /** + * Sets the password modified user uuid of this sportello. + * + * @param passwordModifiedUserUuid the password modified user uuid of this sportello + */ + public void setPasswordModifiedUserUuid(String passwordModifiedUserUuid); + + /** + * Returns the password modified user name of this sportello. + * + * @return the password modified user name of this sportello + */ + @AutoEscape + public String getPasswordModifiedUserName(); + + /** + * Sets the password modified user name of this sportello. + * + * @param passwordModifiedUserName the password modified user name of this sportello + */ + public void setPasswordModifiedUserName(String passwordModifiedUserName); @Override public boolean isNew(); diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloSoap.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloSoap.java index b1174da7..9ba70b01 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloSoap.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloSoap.java @@ -34,10 +34,20 @@ public class SportelloSoap implements Serializable { soapModel.setSportelloId(model.getSportelloId()); soapModel.setGroupId(model.getGroupId()); soapModel.setCompanyId(model.getCompanyId()); - soapModel.setUserId(model.getUserId()); - soapModel.setUserName(model.getUserName()); soapModel.setCreateDate(model.getCreateDate()); + soapModel.setCreateUserId(model.getCreateUserId()); + soapModel.setCreateUserName(model.getCreateUserName()); soapModel.setModifiedDate(model.getModifiedDate()); + soapModel.setModifiedUserId(model.getModifiedUserId()); + soapModel.setModifiedUserName(model.getModifiedUserName()); + soapModel.setUserName(model.getUserName()); + soapModel.setEmail(model.getEmail()); + soapModel.setComuneId(model.getComuneId()); + soapModel.setAttivo(model.getAttivo()); + soapModel.setPassword(model.getPassword()); + soapModel.setPasswordModifiedDate(model.getPasswordModifiedDate()); + soapModel.setPasswordModifiedUserId(model.getPasswordModifiedUserId()); + soapModel.setPasswordModifiedUserName(model.getPasswordModifiedUserName()); return soapModel; } @@ -114,28 +124,28 @@ public class SportelloSoap implements Serializable { _companyId = companyId; } - public long getUserId() { - return _userId; + public Date getCreateDate() { + return _createDate; } - public void setUserId(long userId) { - _userId = userId; + public void setCreateDate(Date createDate) { + _createDate = createDate; } - public String getUserName() { - return _userName; + public long getCreateUserId() { + return _createUserId; } - public void setUserName(String userName) { - _userName = userName; + public void setCreateUserId(long createUserId) { + _createUserId = createUserId; } - public Date getCreateDate() { - return _createDate; + public String getCreateUserName() { + return _createUserName; } - public void setCreateDate(Date createDate) { - _createDate = createDate; + public void setCreateUserName(String createUserName) { + _createUserName = createUserName; } public Date getModifiedDate() { @@ -146,11 +156,105 @@ public class SportelloSoap implements Serializable { _modifiedDate = modifiedDate; } + public long getModifiedUserId() { + return _modifiedUserId; + } + + public void setModifiedUserId(long modifiedUserId) { + _modifiedUserId = modifiedUserId; + } + + public String getModifiedUserName() { + return _modifiedUserName; + } + + public void setModifiedUserName(String modifiedUserName) { + _modifiedUserName = modifiedUserName; + } + + public String getUserName() { + return _userName; + } + + public void setUserName(String userName) { + _userName = userName; + } + + public String getEmail() { + return _email; + } + + public void setEmail(String email) { + _email = email; + } + + public long getComuneId() { + return _comuneId; + } + + public void setComuneId(long comuneId) { + _comuneId = comuneId; + } + + public boolean getAttivo() { + return _attivo; + } + + public boolean isAttivo() { + return _attivo; + } + + public void setAttivo(boolean attivo) { + _attivo = attivo; + } + + public String getPassword() { + return _password; + } + + public void setPassword(String password) { + _password = password; + } + + public Date getPasswordModifiedDate() { + return _passwordModifiedDate; + } + + public void setPasswordModifiedDate(Date passwordModifiedDate) { + _passwordModifiedDate = passwordModifiedDate; + } + + public long getPasswordModifiedUserId() { + return _passwordModifiedUserId; + } + + public void setPasswordModifiedUserId(long passwordModifiedUserId) { + _passwordModifiedUserId = passwordModifiedUserId; + } + + public String getPasswordModifiedUserName() { + return _passwordModifiedUserName; + } + + public void setPasswordModifiedUserName(String passwordModifiedUserName) { + _passwordModifiedUserName = passwordModifiedUserName; + } + private long _sportelloId; private long _groupId; private long _companyId; - private long _userId; - private String _userName; private Date _createDate; + private long _createUserId; + private String _createUserName; private Date _modifiedDate; + private long _modifiedUserId; + private String _modifiedUserName; + private String _userName; + private String _email; + private long _comuneId; + private boolean _attivo; + private String _password; + private Date _passwordModifiedDate; + private long _passwordModifiedUserId; + private String _passwordModifiedUserName; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloWrapper.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloWrapper.java index 69fcbad7..12def0da 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloWrapper.java @@ -52,10 +52,20 @@ public class SportelloWrapper implements Sportello, ModelWrapper { attributes.put("sportelloId", getSportelloId()); attributes.put("groupId", getGroupId()); attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); attributes.put("createDate", getCreateDate()); + attributes.put("createUserId", getCreateUserId()); + attributes.put("createUserName", getCreateUserName()); attributes.put("modifiedDate", getModifiedDate()); + attributes.put("modifiedUserId", getModifiedUserId()); + attributes.put("modifiedUserName", getModifiedUserName()); + attributes.put("userName", getUserName()); + attributes.put("email", getEmail()); + attributes.put("comuneId", getComuneId()); + attributes.put("attivo", getAttivo()); + attributes.put("password", getPassword()); + attributes.put("passwordModifiedDate", getPasswordModifiedDate()); + attributes.put("passwordModifiedUserId", getPasswordModifiedUserId()); + attributes.put("passwordModifiedUserName", getPasswordModifiedUserName()); return attributes; } @@ -80,22 +90,22 @@ public class SportelloWrapper implements Sportello, ModelWrapper { setCompanyId(companyId); } - Long userId = (Long)attributes.get("userId"); + Date createDate = (Date)attributes.get("createDate"); - if (userId != null) { - setUserId(userId); + if (createDate != null) { + setCreateDate(createDate); } - String userName = (String)attributes.get("userName"); + Long createUserId = (Long)attributes.get("createUserId"); - if (userName != null) { - setUserName(userName); + if (createUserId != null) { + setCreateUserId(createUserId); } - Date createDate = (Date)attributes.get("createDate"); + String createUserName = (String)attributes.get("createUserName"); - if (createDate != null) { - setCreateDate(createDate); + if (createUserName != null) { + setCreateUserName(createUserName); } Date modifiedDate = (Date)attributes.get("modifiedDate"); @@ -103,6 +113,68 @@ public class SportelloWrapper implements Sportello, ModelWrapper { if (modifiedDate != null) { setModifiedDate(modifiedDate); } + + Long modifiedUserId = (Long)attributes.get("modifiedUserId"); + + if (modifiedUserId != null) { + setModifiedUserId(modifiedUserId); + } + + String modifiedUserName = (String)attributes.get("modifiedUserName"); + + if (modifiedUserName != null) { + setModifiedUserName(modifiedUserName); + } + + String userName = (String)attributes.get("userName"); + + if (userName != null) { + setUserName(userName); + } + + String email = (String)attributes.get("email"); + + if (email != null) { + setEmail(email); + } + + Long comuneId = (Long)attributes.get("comuneId"); + + if (comuneId != null) { + setComuneId(comuneId); + } + + Boolean attivo = (Boolean)attributes.get("attivo"); + + if (attivo != null) { + setAttivo(attivo); + } + + String password = (String)attributes.get("password"); + + if (password != null) { + setPassword(password); + } + + Date passwordModifiedDate = (Date)attributes.get("passwordModifiedDate"); + + if (passwordModifiedDate != null) { + setPasswordModifiedDate(passwordModifiedDate); + } + + Long passwordModifiedUserId = (Long)attributes.get( + "passwordModifiedUserId"); + + if (passwordModifiedUserId != null) { + setPasswordModifiedUserId(passwordModifiedUserId); + } + + String passwordModifiedUserName = (String)attributes.get( + "passwordModifiedUserName"); + + if (passwordModifiedUserName != null) { + setPasswordModifiedUserName(passwordModifiedUserName); + } } /** @@ -186,45 +258,167 @@ public class SportelloWrapper implements Sportello, ModelWrapper { } /** - * Returns the user ID of this sportello. + * Returns the create date of this sportello. + * + * @return the create date of this sportello + */ + @Override + public java.util.Date getCreateDate() { + return _sportello.getCreateDate(); + } + + /** + * Sets the create date of this sportello. + * + * @param createDate the create date of this sportello + */ + @Override + public void setCreateDate(java.util.Date createDate) { + _sportello.setCreateDate(createDate); + } + + /** + * Returns the create user ID of this sportello. * - * @return the user ID of this sportello + * @return the create user ID of this sportello */ @Override - public long getUserId() { - return _sportello.getUserId(); + public long getCreateUserId() { + return _sportello.getCreateUserId(); } /** - * Sets the user ID of this sportello. + * Sets the create user ID of this sportello. * - * @param userId the user ID of this sportello + * @param createUserId the create user ID of this sportello */ @Override - public void setUserId(long userId) { - _sportello.setUserId(userId); + public void setCreateUserId(long createUserId) { + _sportello.setCreateUserId(createUserId); } /** - * Returns the user uuid of this sportello. + * Returns the create user uuid of this sportello. * - * @return the user uuid of this sportello + * @return the create user uuid of this sportello * @throws SystemException if a system exception occurred */ @Override - public java.lang.String getUserUuid() + public java.lang.String getCreateUserUuid() throws com.liferay.portal.kernel.exception.SystemException { - return _sportello.getUserUuid(); + return _sportello.getCreateUserUuid(); + } + + /** + * Sets the create user uuid of this sportello. + * + * @param createUserUuid the create user uuid of this sportello + */ + @Override + public void setCreateUserUuid(java.lang.String createUserUuid) { + _sportello.setCreateUserUuid(createUserUuid); + } + + /** + * Returns the create user name of this sportello. + * + * @return the create user name of this sportello + */ + @Override + public java.lang.String getCreateUserName() { + return _sportello.getCreateUserName(); + } + + /** + * Sets the create user name of this sportello. + * + * @param createUserName the create user name of this sportello + */ + @Override + public void setCreateUserName(java.lang.String createUserName) { + _sportello.setCreateUserName(createUserName); } /** - * Sets the user uuid of this sportello. + * Returns the modified date of this sportello. * - * @param userUuid the user uuid of this sportello + * @return the modified date of this sportello */ @Override - public void setUserUuid(java.lang.String userUuid) { - _sportello.setUserUuid(userUuid); + public java.util.Date getModifiedDate() { + return _sportello.getModifiedDate(); + } + + /** + * Sets the modified date of this sportello. + * + * @param modifiedDate the modified date of this sportello + */ + @Override + public void setModifiedDate(java.util.Date modifiedDate) { + _sportello.setModifiedDate(modifiedDate); + } + + /** + * Returns the modified user ID of this sportello. + * + * @return the modified user ID of this sportello + */ + @Override + public long getModifiedUserId() { + return _sportello.getModifiedUserId(); + } + + /** + * Sets the modified user ID of this sportello. + * + * @param modifiedUserId the modified user ID of this sportello + */ + @Override + public void setModifiedUserId(long modifiedUserId) { + _sportello.setModifiedUserId(modifiedUserId); + } + + /** + * Returns the modified user uuid of this sportello. + * + * @return the modified user uuid of this sportello + * @throws SystemException if a system exception occurred + */ + @Override + public java.lang.String getModifiedUserUuid() + throws com.liferay.portal.kernel.exception.SystemException { + return _sportello.getModifiedUserUuid(); + } + + /** + * Sets the modified user uuid of this sportello. + * + * @param modifiedUserUuid the modified user uuid of this sportello + */ + @Override + public void setModifiedUserUuid(java.lang.String modifiedUserUuid) { + _sportello.setModifiedUserUuid(modifiedUserUuid); + } + + /** + * Returns the modified user name of this sportello. + * + * @return the modified user name of this sportello + */ + @Override + public java.lang.String getModifiedUserName() { + return _sportello.getModifiedUserName(); + } + + /** + * Sets the modified user name of this sportello. + * + * @param modifiedUserName the modified user name of this sportello + */ + @Override + public void setModifiedUserName(java.lang.String modifiedUserName) { + _sportello.setModifiedUserName(modifiedUserName); } /** @@ -248,43 +442,177 @@ public class SportelloWrapper implements Sportello, ModelWrapper { } /** - * Returns the create date of this sportello. + * Returns the email of this sportello. * - * @return the create date of this sportello + * @return the email of this sportello */ @Override - public java.util.Date getCreateDate() { - return _sportello.getCreateDate(); + public java.lang.String getEmail() { + return _sportello.getEmail(); } /** - * Sets the create date of this sportello. + * Sets the email of this sportello. * - * @param createDate the create date of this sportello + * @param email the email of this sportello */ @Override - public void setCreateDate(java.util.Date createDate) { - _sportello.setCreateDate(createDate); + public void setEmail(java.lang.String email) { + _sportello.setEmail(email); } /** - * Returns the modified date of this sportello. + * Returns the comune ID of this sportello. * - * @return the modified date of this sportello + * @return the comune ID of this sportello */ @Override - public java.util.Date getModifiedDate() { - return _sportello.getModifiedDate(); + public long getComuneId() { + return _sportello.getComuneId(); } /** - * Sets the modified date of this sportello. + * Sets the comune ID of this sportello. * - * @param modifiedDate the modified date of this sportello + * @param comuneId the comune ID of this sportello */ @Override - public void setModifiedDate(java.util.Date modifiedDate) { - _sportello.setModifiedDate(modifiedDate); + public void setComuneId(long comuneId) { + _sportello.setComuneId(comuneId); + } + + /** + * Returns the attivo of this sportello. + * + * @return the attivo of this sportello + */ + @Override + public boolean getAttivo() { + return _sportello.getAttivo(); + } + + /** + * Returns true if this sportello is attivo. + * + * @return true if this sportello is attivo; false otherwise + */ + @Override + public boolean isAttivo() { + return _sportello.isAttivo(); + } + + /** + * Sets whether this sportello is attivo. + * + * @param attivo the attivo of this sportello + */ + @Override + public void setAttivo(boolean attivo) { + _sportello.setAttivo(attivo); + } + + /** + * Returns the password of this sportello. + * + * @return the password of this sportello + */ + @Override + public java.lang.String getPassword() { + return _sportello.getPassword(); + } + + /** + * Sets the password of this sportello. + * + * @param password the password of this sportello + */ + @Override + public void setPassword(java.lang.String password) { + _sportello.setPassword(password); + } + + /** + * Returns the password modified date of this sportello. + * + * @return the password modified date of this sportello + */ + @Override + public java.util.Date getPasswordModifiedDate() { + return _sportello.getPasswordModifiedDate(); + } + + /** + * Sets the password modified date of this sportello. + * + * @param passwordModifiedDate the password modified date of this sportello + */ + @Override + public void setPasswordModifiedDate(java.util.Date passwordModifiedDate) { + _sportello.setPasswordModifiedDate(passwordModifiedDate); + } + + /** + * Returns the password modified user ID of this sportello. + * + * @return the password modified user ID of this sportello + */ + @Override + public long getPasswordModifiedUserId() { + return _sportello.getPasswordModifiedUserId(); + } + + /** + * Sets the password modified user ID of this sportello. + * + * @param passwordModifiedUserId the password modified user ID of this sportello + */ + @Override + public void setPasswordModifiedUserId(long passwordModifiedUserId) { + _sportello.setPasswordModifiedUserId(passwordModifiedUserId); + } + + /** + * Returns the password modified user uuid of this sportello. + * + * @return the password modified user uuid of this sportello + * @throws SystemException if a system exception occurred + */ + @Override + public java.lang.String getPasswordModifiedUserUuid() + throws com.liferay.portal.kernel.exception.SystemException { + return _sportello.getPasswordModifiedUserUuid(); + } + + /** + * Sets the password modified user uuid of this sportello. + * + * @param passwordModifiedUserUuid the password modified user uuid of this sportello + */ + @Override + public void setPasswordModifiedUserUuid( + java.lang.String passwordModifiedUserUuid) { + _sportello.setPasswordModifiedUserUuid(passwordModifiedUserUuid); + } + + /** + * Returns the password modified user name of this sportello. + * + * @return the password modified user name of this sportello + */ + @Override + public java.lang.String getPasswordModifiedUserName() { + return _sportello.getPasswordModifiedUserName(); + } + + /** + * Sets the password modified user name of this sportello. + * + * @param passwordModifiedUserName the password modified user name of this sportello + */ + @Override + public void setPasswordModifiedUserName( + java.lang.String passwordModifiedUserName) { + _sportello.setPasswordModifiedUserName(passwordModifiedUserName); } @Override @@ -391,6 +719,50 @@ public class SportelloWrapper implements Sportello, ModelWrapper { _sportello.persist(); } + @Override + public java.lang.String encryptPassword(java.lang.String password) { + return _sportello.encryptPassword(password); + } + + @Override + public boolean checkPassword(java.lang.String password) { + return _sportello.checkPassword(password); + } + + @Override + public void setEncryptedPassword(java.lang.String password, + com.liferay.portal.model.User user) { + _sportello.setEncryptedPassword(password, user); + } + + @Override + public java.lang.String getCodiceProvincia() + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _sportello.getCodiceProvincia(); + } + + @Override + public java.lang.String getNomeComune() + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _sportello.getNomeComune(); + } + + @Override + public java.lang.String getNomeProvincia() + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _sportello.getNomeProvincia(); + } + + @Override + public it.tref.liferay.portos.bo.model.Comune getComune() + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _sportello.getComune(); + } + @Override public boolean equals(Object obj) { if (this == obj) { diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingLocalService.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingLocalService.java new file mode 100644 index 00000000..758870e9 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingLocalService.java @@ -0,0 +1,259 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Propagation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.service.BaseLocalService; +import com.liferay.portal.service.InvokableLocalService; +import com.liferay.portal.service.PersistedModelLocalService; + +/** + * Provides the local service interface for ApiSetting. Methods of this + * service will not have security checks based on the propagated JAAS + * credentials because this service can only be accessed from within the same + * VM. + * + * @author Manifattura Web Group Srl + * @see ApiSettingLocalServiceUtil + * @see it.mwg.sicilia.sue.service.base.ApiSettingLocalServiceBaseImpl + * @see it.mwg.sicilia.sue.service.impl.ApiSettingLocalServiceImpl + * @generated + */ +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface ApiSettingLocalService extends BaseLocalService, + InvokableLocalService, PersistedModelLocalService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link ApiSettingLocalServiceUtil} to access the api setting local service. Add custom service methods to {@link it.mwg.sicilia.sue.service.impl.ApiSettingLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Adds the api setting to the database. Also notifies the appropriate model listeners. + * + * @param apiSetting the api setting + * @return the api setting that was added + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) + public it.mwg.sicilia.sue.model.ApiSetting addApiSetting( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Creates a new api setting with the primary key. Does not add the api setting to the database. + * + * @param id the primary key for the new api setting + * @return the new api setting + */ + public it.mwg.sicilia.sue.model.ApiSetting createApiSetting(long id); + + /** + * Deletes the api setting with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param id the primary key of the api setting + * @return the api setting that was removed + * @throws PortalException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) + public it.mwg.sicilia.sue.model.ApiSetting deleteApiSetting(long id) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + /** + * Deletes the api setting from the database. Also notifies the appropriate model listeners. + * + * @param apiSetting the api setting + * @return the api setting that was removed + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) + public it.mwg.sicilia.sue.model.ApiSetting deleteApiSetting( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws com.liferay.portal.kernel.exception.SystemException; + + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public it.mwg.sicilia.sue.model.ApiSetting fetchApiSetting(long id) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the api setting with the primary key. + * + * @param id the primary key of the api setting + * @return the api setting + * @throws PortalException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public it.mwg.sicilia.sue.model.ApiSetting getApiSetting(long id) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + @Override + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns a range of all the api settings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api settings + * @param end the upper bound of the range of api settings (not inclusive) + * @return the range of api settings + * @throws SystemException if a system exception occurred + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.util.List getApiSettings( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of api settings. + * + * @return the number of api settings + * @throws SystemException if a system exception occurred + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getApiSettingsCount() + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Updates the api setting in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param apiSetting the api setting + * @return the api setting that was updated + * @throws SystemException if a system exception occurred + */ + @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) + public it.mwg.sicilia.sue.model.ApiSetting updateApiSetting( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public java.lang.String getBeanIdentifier(); + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public void setBeanIdentifier(java.lang.String beanIdentifier); + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public java.lang.String get(long companyId, long key) + throws com.liferay.portal.kernel.exception.SystemException; + + public void set(long companyId, long key, java.lang.String value) + throws com.liferay.portal.kernel.exception.SystemException; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingLocalServiceClp.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingLocalServiceClp.java new file mode 100644 index 00000000..c4af2bcc --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingLocalServiceClp.java @@ -0,0 +1,770 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service; + +import com.liferay.portal.service.InvokableLocalService; + +/** + * @author Manifattura Web Group Srl + * @generated + */ +public class ApiSettingLocalServiceClp implements ApiSettingLocalService { + public ApiSettingLocalServiceClp( + InvokableLocalService invokableLocalService) { + _invokableLocalService = invokableLocalService; + + _methodName0 = "addApiSetting"; + + _methodParameterTypes0 = new String[] { + "it.mwg.sicilia.sue.model.ApiSetting" + }; + + _methodName1 = "createApiSetting"; + + _methodParameterTypes1 = new String[] { "long" }; + + _methodName2 = "deleteApiSetting"; + + _methodParameterTypes2 = new String[] { "long" }; + + _methodName3 = "deleteApiSetting"; + + _methodParameterTypes3 = new String[] { + "it.mwg.sicilia.sue.model.ApiSetting" + }; + + _methodName4 = "dynamicQuery"; + + _methodParameterTypes4 = new String[] { }; + + _methodName5 = "dynamicQuery"; + + _methodParameterTypes5 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName6 = "dynamicQuery"; + + _methodParameterTypes6 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int" + }; + + _methodName7 = "dynamicQuery"; + + _methodParameterTypes7 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int", + "com.liferay.portal.kernel.util.OrderByComparator" + }; + + _methodName8 = "dynamicQueryCount"; + + _methodParameterTypes8 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName9 = "dynamicQueryCount"; + + _methodParameterTypes9 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", + "com.liferay.portal.kernel.dao.orm.Projection" + }; + + _methodName10 = "fetchApiSetting"; + + _methodParameterTypes10 = new String[] { "long" }; + + _methodName11 = "getApiSetting"; + + _methodParameterTypes11 = new String[] { "long" }; + + _methodName12 = "getPersistedModel"; + + _methodParameterTypes12 = new String[] { "java.io.Serializable" }; + + _methodName13 = "getApiSettings"; + + _methodParameterTypes13 = new String[] { "int", "int" }; + + _methodName14 = "getApiSettingsCount"; + + _methodParameterTypes14 = new String[] { }; + + _methodName15 = "updateApiSetting"; + + _methodParameterTypes15 = new String[] { + "it.mwg.sicilia.sue.model.ApiSetting" + }; + + _methodName16 = "getBeanIdentifier"; + + _methodParameterTypes16 = new String[] { }; + + _methodName17 = "setBeanIdentifier"; + + _methodParameterTypes17 = new String[] { "java.lang.String" }; + + _methodName19 = "get"; + + _methodParameterTypes19 = new String[] { "long", "long" }; + + _methodName20 = "set"; + + _methodParameterTypes20 = new String[] { + "long", "long", "java.lang.String" + }; + } + + @Override + public it.mwg.sicilia.sue.model.ApiSetting addApiSetting( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName0, + _methodParameterTypes0, + new Object[] { ClpSerializer.translateInput(apiSetting) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (it.mwg.sicilia.sue.model.ApiSetting)ClpSerializer.translateOutput(returnObj); + } + + @Override + public it.mwg.sicilia.sue.model.ApiSetting createApiSetting(long id) { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName1, + _methodParameterTypes1, new Object[] { id }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (it.mwg.sicilia.sue.model.ApiSetting)ClpSerializer.translateOutput(returnObj); + } + + @Override + public it.mwg.sicilia.sue.model.ApiSetting deleteApiSetting(long id) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName2, + _methodParameterTypes2, new Object[] { id }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (it.mwg.sicilia.sue.model.ApiSetting)ClpSerializer.translateOutput(returnObj); + } + + @Override + public it.mwg.sicilia.sue.model.ApiSetting deleteApiSetting( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName3, + _methodParameterTypes3, + new Object[] { ClpSerializer.translateInput(apiSetting) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (it.mwg.sicilia.sue.model.ApiSetting)ClpSerializer.translateOutput(returnObj); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName4, + _methodParameterTypes4, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (com.liferay.portal.kernel.dao.orm.DynamicQuery)ClpSerializer.translateOutput(returnObj); + } + + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName5, + _methodParameterTypes5, + new Object[] { ClpSerializer.translateInput(dynamicQuery) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName6, + _methodParameterTypes6, + new Object[] { + ClpSerializer.translateInput(dynamicQuery), + + start, + + end + }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName7, + _methodParameterTypes7, + new Object[] { + ClpSerializer.translateInput(dynamicQuery), + + start, + + end, + + ClpSerializer.translateInput(orderByComparator) + }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName8, + _methodParameterTypes8, + new Object[] { ClpSerializer.translateInput(dynamicQuery) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Long)returnObj).longValue(); + } + + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName9, + _methodParameterTypes9, + new Object[] { + ClpSerializer.translateInput(dynamicQuery), + + ClpSerializer.translateInput(projection) + }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Long)returnObj).longValue(); + } + + @Override + public it.mwg.sicilia.sue.model.ApiSetting fetchApiSetting(long id) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName10, + _methodParameterTypes10, new Object[] { id }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (it.mwg.sicilia.sue.model.ApiSetting)ClpSerializer.translateOutput(returnObj); + } + + @Override + public it.mwg.sicilia.sue.model.ApiSetting getApiSetting(long id) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName11, + _methodParameterTypes11, new Object[] { id }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (it.mwg.sicilia.sue.model.ApiSetting)ClpSerializer.translateOutput(returnObj); + } + + @Override + public com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName12, + _methodParameterTypes12, + new Object[] { ClpSerializer.translateInput(primaryKeyObj) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.PortalException) { + throw (com.liferay.portal.kernel.exception.PortalException)t; + } + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (com.liferay.portal.model.PersistedModel)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.util.List getApiSettings( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName13, + _methodParameterTypes13, new Object[] { start, end }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.util.List)ClpSerializer.translateOutput(returnObj); + } + + @Override + public int getApiSettingsCount() + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName14, + _methodParameterTypes14, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return ((Integer)returnObj).intValue(); + } + + @Override + public it.mwg.sicilia.sue.model.ApiSetting updateApiSetting( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName15, + _methodParameterTypes15, + new Object[] { ClpSerializer.translateInput(apiSetting) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (it.mwg.sicilia.sue.model.ApiSetting)ClpSerializer.translateOutput(returnObj); + } + + @Override + public java.lang.String getBeanIdentifier() { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName16, + _methodParameterTypes16, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.lang.String)ClpSerializer.translateOutput(returnObj); + } + + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + try { + _invokableLocalService.invokeMethod(_methodName17, + _methodParameterTypes17, + new Object[] { ClpSerializer.translateInput(beanIdentifier) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + throw new UnsupportedOperationException(); + } + + @Override + public java.lang.String get(long companyId, long key) + throws com.liferay.portal.kernel.exception.SystemException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName19, + _methodParameterTypes19, new Object[] { companyId, key }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.lang.String)ClpSerializer.translateOutput(returnObj); + } + + @Override + public void set(long companyId, long key, java.lang.String value) + throws com.liferay.portal.kernel.exception.SystemException { + try { + _invokableLocalService.invokeMethod(_methodName20, + _methodParameterTypes20, + new Object[] { companyId, key, ClpSerializer.translateInput( + value) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + } + + private InvokableLocalService _invokableLocalService; + private String _methodName0; + private String[] _methodParameterTypes0; + private String _methodName1; + private String[] _methodParameterTypes1; + private String _methodName2; + private String[] _methodParameterTypes2; + private String _methodName3; + private String[] _methodParameterTypes3; + private String _methodName4; + private String[] _methodParameterTypes4; + private String _methodName5; + private String[] _methodParameterTypes5; + private String _methodName6; + private String[] _methodParameterTypes6; + private String _methodName7; + private String[] _methodParameterTypes7; + private String _methodName8; + private String[] _methodParameterTypes8; + private String _methodName9; + private String[] _methodParameterTypes9; + private String _methodName10; + private String[] _methodParameterTypes10; + private String _methodName11; + private String[] _methodParameterTypes11; + private String _methodName12; + private String[] _methodParameterTypes12; + private String _methodName13; + private String[] _methodParameterTypes13; + private String _methodName14; + private String[] _methodParameterTypes14; + private String _methodName15; + private String[] _methodParameterTypes15; + private String _methodName16; + private String[] _methodParameterTypes16; + private String _methodName17; + private String[] _methodParameterTypes17; + private String _methodName19; + private String[] _methodParameterTypes19; + private String _methodName20; + private String[] _methodParameterTypes20; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingLocalServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingLocalServiceUtil.java new file mode 100644 index 00000000..b650eed0 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingLocalServiceUtil.java @@ -0,0 +1,314 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service; + +import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; +import com.liferay.portal.kernel.util.ReferenceRegistry; +import com.liferay.portal.service.InvokableLocalService; + +/** + * Provides the local service utility for ApiSetting. This utility wraps + * {@link it.mwg.sicilia.sue.service.impl.ApiSettingLocalServiceImpl} and is the + * primary access point for service operations in application layer code running + * on the local server. Methods of this service will not have security checks + * based on the propagated JAAS credentials because this service can only be + * accessed from within the same VM. + * + * @author Manifattura Web Group Srl + * @see ApiSettingLocalService + * @see it.mwg.sicilia.sue.service.base.ApiSettingLocalServiceBaseImpl + * @see it.mwg.sicilia.sue.service.impl.ApiSettingLocalServiceImpl + * @generated + */ +public class ApiSettingLocalServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link it.mwg.sicilia.sue.service.impl.ApiSettingLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Adds the api setting to the database. Also notifies the appropriate model listeners. + * + * @param apiSetting the api setting + * @return the api setting that was added + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.ApiSetting addApiSetting( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().addApiSetting(apiSetting); + } + + /** + * Creates a new api setting with the primary key. Does not add the api setting to the database. + * + * @param id the primary key for the new api setting + * @return the new api setting + */ + public static it.mwg.sicilia.sue.model.ApiSetting createApiSetting(long id) { + return getService().createApiSetting(id); + } + + /** + * Deletes the api setting with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param id the primary key of the api setting + * @return the api setting that was removed + * @throws PortalException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.ApiSetting deleteApiSetting(long id) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService().deleteApiSetting(id); + } + + /** + * Deletes the api setting from the database. Also notifies the appropriate model listeners. + * + * @param apiSetting the api setting + * @return the api setting that was removed + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.ApiSetting deleteApiSetting( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().deleteApiSetting(apiSetting); + } + + public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return getService().dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @SuppressWarnings("rawtypes") + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getService() + .dynamicQuery(dynamicQuery, start, end, orderByComparator); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().dynamicQueryCount(dynamicQuery, projection); + } + + public static it.mwg.sicilia.sue.model.ApiSetting fetchApiSetting(long id) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().fetchApiSetting(id); + } + + /** + * Returns the api setting with the primary key. + * + * @param id the primary key of the api setting + * @return the api setting + * @throws PortalException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.ApiSetting getApiSetting(long id) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService().getApiSetting(id); + } + + public static com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return getService().getPersistedModel(primaryKeyObj); + } + + /** + * Returns a range of all the api settings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api settings + * @param end the upper bound of the range of api settings (not inclusive) + * @return the range of api settings + * @throws SystemException if a system exception occurred + */ + public static java.util.List getApiSettings( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getApiSettings(start, end); + } + + /** + * Returns the number of api settings. + * + * @return the number of api settings + * @throws SystemException if a system exception occurred + */ + public static int getApiSettingsCount() + throws com.liferay.portal.kernel.exception.SystemException { + return getService().getApiSettingsCount(); + } + + /** + * Updates the api setting in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param apiSetting the api setting + * @return the api setting that was updated + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.ApiSetting updateApiSetting( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().updateApiSetting(apiSetting); + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public static java.lang.String getBeanIdentifier() { + return getService().getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public static void setBeanIdentifier(java.lang.String beanIdentifier) { + getService().setBeanIdentifier(beanIdentifier); + } + + public static java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return getService().invokeMethod(name, parameterTypes, arguments); + } + + public static java.lang.String get(long companyId, long key) + throws com.liferay.portal.kernel.exception.SystemException { + return getService().get(companyId, key); + } + + public static void set(long companyId, long key, java.lang.String value) + throws com.liferay.portal.kernel.exception.SystemException { + getService().set(companyId, key, value); + } + + public static void clearService() { + _service = null; + } + + public static ApiSettingLocalService getService() { + if (_service == null) { + InvokableLocalService invokableLocalService = (InvokableLocalService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), + ApiSettingLocalService.class.getName()); + + if (invokableLocalService instanceof ApiSettingLocalService) { + _service = (ApiSettingLocalService)invokableLocalService; + } + else { + _service = new ApiSettingLocalServiceClp(invokableLocalService); + } + + ReferenceRegistry.registerReference(ApiSettingLocalServiceUtil.class, + "_service"); + } + + return _service; + } + + /** + * @deprecated As of 6.2.0 + */ + public void setService(ApiSettingLocalService service) { + } + + private static ApiSettingLocalService _service; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingLocalServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingLocalServiceWrapper.java new file mode 100644 index 00000000..3143fb5e --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingLocalServiceWrapper.java @@ -0,0 +1,324 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service; + +import com.liferay.portal.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link ApiSettingLocalService}. + * + * @author Manifattura Web Group Srl + * @see ApiSettingLocalService + * @generated + */ +public class ApiSettingLocalServiceWrapper implements ApiSettingLocalService, + ServiceWrapper { + public ApiSettingLocalServiceWrapper( + ApiSettingLocalService apiSettingLocalService) { + _apiSettingLocalService = apiSettingLocalService; + } + + /** + * Adds the api setting to the database. Also notifies the appropriate model listeners. + * + * @param apiSetting the api setting + * @return the api setting that was added + * @throws SystemException if a system exception occurred + */ + @Override + public it.mwg.sicilia.sue.model.ApiSetting addApiSetting( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.addApiSetting(apiSetting); + } + + /** + * Creates a new api setting with the primary key. Does not add the api setting to the database. + * + * @param id the primary key for the new api setting + * @return the new api setting + */ + @Override + public it.mwg.sicilia.sue.model.ApiSetting createApiSetting(long id) { + return _apiSettingLocalService.createApiSetting(id); + } + + /** + * Deletes the api setting with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param id the primary key of the api setting + * @return the api setting that was removed + * @throws PortalException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public it.mwg.sicilia.sue.model.ApiSetting deleteApiSetting(long id) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.deleteApiSetting(id); + } + + /** + * Deletes the api setting from the database. Also notifies the appropriate model listeners. + * + * @param apiSetting the api setting + * @return the api setting that was removed + * @throws SystemException if a system exception occurred + */ + @Override + public it.mwg.sicilia.sue.model.ApiSetting deleteApiSetting( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.deleteApiSetting(apiSetting); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return _apiSettingLocalService.dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) throws com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.dynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) + throws com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) + throws com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.dynamicQueryCount(dynamicQuery, + projection); + } + + @Override + public it.mwg.sicilia.sue.model.ApiSetting fetchApiSetting(long id) + throws com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.fetchApiSetting(id); + } + + /** + * Returns the api setting with the primary key. + * + * @param id the primary key of the api setting + * @return the api setting + * @throws PortalException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public it.mwg.sicilia.sue.model.ApiSetting getApiSetting(long id) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.getApiSetting(id); + } + + @Override + public com.liferay.portal.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.getPersistedModel(primaryKeyObj); + } + + /** + * Returns a range of all the api settings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api settings + * @param end the upper bound of the range of api settings (not inclusive) + * @return the range of api settings + * @throws SystemException if a system exception occurred + */ + @Override + public java.util.List getApiSettings( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.getApiSettings(start, end); + } + + /** + * Returns the number of api settings. + * + * @return the number of api settings + * @throws SystemException if a system exception occurred + */ + @Override + public int getApiSettingsCount() + throws com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.getApiSettingsCount(); + } + + /** + * Updates the api setting in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param apiSetting the api setting + * @return the api setting that was updated + * @throws SystemException if a system exception occurred + */ + @Override + public it.mwg.sicilia.sue.model.ApiSetting updateApiSetting( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.updateApiSetting(apiSetting); + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public java.lang.String getBeanIdentifier() { + return _apiSettingLocalService.getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + _apiSettingLocalService.setBeanIdentifier(beanIdentifier); + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return _apiSettingLocalService.invokeMethod(name, parameterTypes, + arguments); + } + + @Override + public java.lang.String get(long companyId, long key) + throws com.liferay.portal.kernel.exception.SystemException { + return _apiSettingLocalService.get(companyId, key); + } + + @Override + public void set(long companyId, long key, java.lang.String value) + throws com.liferay.portal.kernel.exception.SystemException { + _apiSettingLocalService.set(companyId, key, value); + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} + */ + public ApiSettingLocalService getWrappedApiSettingLocalService() { + return _apiSettingLocalService; + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} + */ + public void setWrappedApiSettingLocalService( + ApiSettingLocalService apiSettingLocalService) { + _apiSettingLocalService = apiSettingLocalService; + } + + @Override + public ApiSettingLocalService getWrappedService() { + return _apiSettingLocalService; + } + + @Override + public void setWrappedService(ApiSettingLocalService apiSettingLocalService) { + _apiSettingLocalService = apiSettingLocalService; + } + + private ApiSettingLocalService _apiSettingLocalService; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingService.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingService.java new file mode 100644 index 00000000..3d571148 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingService.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.jsonwebservice.JSONWebService; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.security.ac.AccessControlled; +import com.liferay.portal.service.BaseService; +import com.liferay.portal.service.InvokableService; + +/** + * Provides the remote service interface for ApiSetting. Methods of this + * service are expected to have security checks based on the propagated JAAS + * credentials because this service can be accessed remotely. + * + * @author Manifattura Web Group Srl + * @see ApiSettingServiceUtil + * @see it.mwg.sicilia.sue.service.base.ApiSettingServiceBaseImpl + * @see it.mwg.sicilia.sue.service.impl.ApiSettingServiceImpl + * @generated + */ +@AccessControlled +@JSONWebService +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface ApiSettingService extends BaseService, InvokableService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link ApiSettingServiceUtil} to access the api setting remote service. Add custom service methods to {@link it.mwg.sicilia.sue.service.impl.ApiSettingServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public java.lang.String getBeanIdentifier(); + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public void setBeanIdentifier(java.lang.String beanIdentifier); + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingServiceClp.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingServiceClp.java new file mode 100644 index 00000000..600b99be --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingServiceClp.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service; + +import com.liferay.portal.service.InvokableService; + +/** + * @author Manifattura Web Group Srl + * @generated + */ +public class ApiSettingServiceClp implements ApiSettingService { + public ApiSettingServiceClp(InvokableService invokableService) { + _invokableService = invokableService; + + _methodName0 = "getBeanIdentifier"; + + _methodParameterTypes0 = new String[] { }; + + _methodName1 = "setBeanIdentifier"; + + _methodParameterTypes1 = new String[] { "java.lang.String" }; + } + + @Override + public java.lang.String getBeanIdentifier() { + Object returnObj = null; + + try { + returnObj = _invokableService.invokeMethod(_methodName0, + _methodParameterTypes0, new Object[] { }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.lang.String)ClpSerializer.translateOutput(returnObj); + } + + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + try { + _invokableService.invokeMethod(_methodName1, + _methodParameterTypes1, + new Object[] { ClpSerializer.translateInput(beanIdentifier) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + throw new UnsupportedOperationException(); + } + + private InvokableService _invokableService; + private String _methodName0; + private String[] _methodParameterTypes0; + private String _methodName1; + private String[] _methodParameterTypes1; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingServiceUtil.java new file mode 100644 index 00000000..9fee48ea --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingServiceUtil.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service; + +import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; +import com.liferay.portal.kernel.util.ReferenceRegistry; +import com.liferay.portal.service.InvokableService; + +/** + * Provides the remote service utility for ApiSetting. This utility wraps + * {@link it.mwg.sicilia.sue.service.impl.ApiSettingServiceImpl} and is the + * primary access point for service operations in application layer code running + * on a remote server. Methods of this service are expected to have security + * checks based on the propagated JAAS credentials because this service can be + * accessed remotely. + * + * @author Manifattura Web Group Srl + * @see ApiSettingService + * @see it.mwg.sicilia.sue.service.base.ApiSettingServiceBaseImpl + * @see it.mwg.sicilia.sue.service.impl.ApiSettingServiceImpl + * @generated + */ +public class ApiSettingServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link it.mwg.sicilia.sue.service.impl.ApiSettingServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + public static java.lang.String getBeanIdentifier() { + return getService().getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + public static void setBeanIdentifier(java.lang.String beanIdentifier) { + getService().setBeanIdentifier(beanIdentifier); + } + + public static java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return getService().invokeMethod(name, parameterTypes, arguments); + } + + public static void clearService() { + _service = null; + } + + public static ApiSettingService getService() { + if (_service == null) { + InvokableService invokableService = (InvokableService)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), + ApiSettingService.class.getName()); + + if (invokableService instanceof ApiSettingService) { + _service = (ApiSettingService)invokableService; + } + else { + _service = new ApiSettingServiceClp(invokableService); + } + + ReferenceRegistry.registerReference(ApiSettingServiceUtil.class, + "_service"); + } + + return _service; + } + + /** + * @deprecated As of 6.2.0 + */ + public void setService(ApiSettingService service) { + } + + private static ApiSettingService _service; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingServiceWrapper.java new file mode 100644 index 00000000..afbe6285 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ApiSettingServiceWrapper.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service; + +import com.liferay.portal.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link ApiSettingService}. + * + * @author Manifattura Web Group Srl + * @see ApiSettingService + * @generated + */ +public class ApiSettingServiceWrapper implements ApiSettingService, + ServiceWrapper { + public ApiSettingServiceWrapper(ApiSettingService apiSettingService) { + _apiSettingService = apiSettingService; + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public java.lang.String getBeanIdentifier() { + return _apiSettingService.getBeanIdentifier(); + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(java.lang.String beanIdentifier) { + _apiSettingService.setBeanIdentifier(beanIdentifier); + } + + @Override + public java.lang.Object invokeMethod(java.lang.String name, + java.lang.String[] parameterTypes, java.lang.Object[] arguments) + throws java.lang.Throwable { + return _apiSettingService.invokeMethod(name, parameterTypes, arguments); + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} + */ + public ApiSettingService getWrappedApiSettingService() { + return _apiSettingService; + } + + /** + * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} + */ + public void setWrappedApiSettingService(ApiSettingService apiSettingService) { + _apiSettingService = apiSettingService; + } + + @Override + public ApiSettingService getWrappedService() { + return _apiSettingService; + } + + @Override + public void setWrappedService(ApiSettingService apiSettingService) { + _apiSettingService = apiSettingService; + } + + private ApiSettingService _apiSettingService; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ClpSerializer.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ClpSerializer.java index 6b4b8f5d..e92200c8 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ClpSerializer.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/ClpSerializer.java @@ -25,6 +25,7 @@ import com.liferay.portal.kernel.util.PropsUtil; import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.model.BaseModel; +import it.mwg.sicilia.sue.model.ApiSettingClp; import it.mwg.sicilia.sue.model.SportelloClp; import java.io.ObjectInputStream; @@ -102,6 +103,10 @@ public class ClpSerializer { String oldModelClassName = oldModelClass.getName(); + if (oldModelClassName.equals(ApiSettingClp.class.getName())) { + return translateInputApiSetting(oldModel); + } + if (oldModelClassName.equals(SportelloClp.class.getName())) { return translateInputSportello(oldModel); } @@ -121,6 +126,16 @@ public class ClpSerializer { return newList; } + public static Object translateInputApiSetting(BaseModel oldModel) { + ApiSettingClp oldClpModel = (ApiSettingClp)oldModel; + + BaseModel newModel = oldClpModel.getApiSettingRemoteModel(); + + newModel.setModelAttributes(oldClpModel.getModelAttributes()); + + return newModel; + } + public static Object translateInputSportello(BaseModel oldModel) { SportelloClp oldClpModel = (SportelloClp)oldModel; @@ -148,6 +163,43 @@ public class ClpSerializer { String oldModelClassName = oldModelClass.getName(); + if (oldModelClassName.equals( + "it.mwg.sicilia.sue.model.impl.ApiSettingImpl")) { + return translateOutputApiSetting(oldModel); + } + else if (oldModelClassName.endsWith("Clp")) { + try { + ClassLoader classLoader = ClpSerializer.class.getClassLoader(); + + Method getClpSerializerClassMethod = oldModelClass.getMethod( + "getClpSerializerClass"); + + Class oldClpSerializerClass = (Class)getClpSerializerClassMethod.invoke(oldModel); + + Class newClpSerializerClass = classLoader.loadClass(oldClpSerializerClass.getName()); + + Method translateOutputMethod = newClpSerializerClass.getMethod("translateOutput", + BaseModel.class); + + Class oldModelModelClass = oldModel.getModelClass(); + + Method getRemoteModelMethod = oldModelClass.getMethod("get" + + oldModelModelClass.getSimpleName() + "RemoteModel"); + + Object oldRemoteModel = getRemoteModelMethod.invoke(oldModel); + + BaseModel newModel = (BaseModel)translateOutputMethod.invoke(null, + oldRemoteModel); + + return newModel; + } + catch (Throwable t) { + if (_log.isInfoEnabled()) { + _log.info("Unable to translate " + oldModelClassName, t); + } + } + } + if (oldModelClassName.equals( "it.mwg.sicilia.sue.model.impl.SportelloImpl")) { return translateOutputSportello(oldModel); @@ -265,6 +317,22 @@ public class ClpSerializer { return new SystemException(); } + if (className.equals("it.mwg.sicilia.sue.ExpiredTokenException")) { + return new it.mwg.sicilia.sue.ExpiredTokenException(); + } + + if (className.equals("it.mwg.sicilia.sue.InactiveSportelloException")) { + return new it.mwg.sicilia.sue.InactiveSportelloException(); + } + + if (className.equals("it.mwg.sicilia.sue.InvalidTokenException")) { + return new it.mwg.sicilia.sue.InvalidTokenException(); + } + + if (className.equals("it.mwg.sicilia.sue.NoSuchApiSettingException")) { + return new it.mwg.sicilia.sue.NoSuchApiSettingException(); + } + if (className.equals("it.mwg.sicilia.sue.NoSuchSportelloException")) { return new it.mwg.sicilia.sue.NoSuchSportelloException(); } @@ -272,6 +340,16 @@ public class ClpSerializer { return throwable; } + public static Object translateOutputApiSetting(BaseModel oldModel) { + ApiSettingClp newModel = new ApiSettingClp(); + + newModel.setModelAttributes(oldModel.getModelAttributes()); + + newModel.setApiSettingRemoteModel(oldModel); + + return newModel; + } + public static Object translateOutputSportello(BaseModel oldModel) { SportelloClp newModel = new SportelloClp(); diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalService.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalService.java index 39793741..303dd528 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalService.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalService.java @@ -249,4 +249,9 @@ public interface SportelloLocalService extends BaseLocalService, public java.lang.Object invokeMethod(java.lang.String name, java.lang.String[] parameterTypes, java.lang.Object[] arguments) throws java.lang.Throwable; + + public it.mwg.sicilia.sue.model.Sportello findByUserName( + java.lang.String userName) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalServiceClp.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalServiceClp.java index 0ef97d83..052975a2 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalServiceClp.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalServiceClp.java @@ -113,6 +113,10 @@ public class SportelloLocalServiceClp implements SportelloLocalService { _methodName17 = "setBeanIdentifier"; _methodParameterTypes17 = new String[] { "java.lang.String" }; + + _methodName19 = "findByUserName"; + + _methodParameterTypes19 = new String[] { "java.lang.String" }; } @Override @@ -661,6 +665,41 @@ public class SportelloLocalServiceClp implements SportelloLocalService { throw new UnsupportedOperationException(); } + @Override + public it.mwg.sicilia.sue.model.Sportello findByUserName( + java.lang.String userName) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException { + Object returnObj = null; + + try { + returnObj = _invokableLocalService.invokeMethod(_methodName19, + _methodParameterTypes19, + new Object[] { ClpSerializer.translateInput(userName) }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof com.liferay.portal.kernel.exception.SystemException) { + throw (com.liferay.portal.kernel.exception.SystemException)t; + } + + if (t instanceof it.mwg.sicilia.sue.NoSuchSportelloException) { + throw (it.mwg.sicilia.sue.NoSuchSportelloException)t; + } + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (it.mwg.sicilia.sue.model.Sportello)ClpSerializer.translateOutput(returnObj); + } + private InvokableLocalService _invokableLocalService; private String _methodName0; private String[] _methodParameterTypes0; @@ -698,4 +737,6 @@ public class SportelloLocalServiceClp implements SportelloLocalService { private String[] _methodParameterTypes16; private String _methodName17; private String[] _methodParameterTypes17; + private String _methodName19; + private String[] _methodParameterTypes19; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalServiceUtil.java index c2e5e6bb..ecb4c20c 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalServiceUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalServiceUtil.java @@ -275,6 +275,13 @@ public class SportelloLocalServiceUtil { return getService().invokeMethod(name, parameterTypes, arguments); } + public static it.mwg.sicilia.sue.model.Sportello findByUserName( + java.lang.String userName) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException { + return getService().findByUserName(userName); + } + public static void clearService() { _service = null; } diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalServiceWrapper.java index de7ea4a3..bc6a5cbf 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalServiceWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloLocalServiceWrapper.java @@ -282,6 +282,14 @@ public class SportelloLocalServiceWrapper implements SportelloLocalService, arguments); } + @Override + public it.mwg.sicilia.sue.model.Sportello findByUserName( + java.lang.String userName) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException { + return _sportelloLocalService.findByUserName(userName); + } + /** * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} */ diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloService.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloService.java index 69076277..43edace5 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloService.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloService.java @@ -63,4 +63,6 @@ public interface SportelloService extends BaseService, InvokableService { public java.lang.Object invokeMethod(java.lang.String name, java.lang.String[] parameterTypes, java.lang.Object[] arguments) throws java.lang.Throwable; + + public java.lang.String generaPassword(int lunghezza); } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloServiceClp.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloServiceClp.java index ac2bdf86..3ca575ff 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloServiceClp.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloServiceClp.java @@ -31,6 +31,10 @@ public class SportelloServiceClp implements SportelloService { _methodName1 = "setBeanIdentifier"; _methodParameterTypes1 = new String[] { "java.lang.String" }; + + _methodName3 = "generaPassword"; + + _methodParameterTypes3 = new String[] { "int" }; } @Override @@ -83,9 +87,34 @@ public class SportelloServiceClp implements SportelloService { throw new UnsupportedOperationException(); } + @Override + public java.lang.String generaPassword(int lunghezza) { + Object returnObj = null; + + try { + returnObj = _invokableService.invokeMethod(_methodName3, + _methodParameterTypes3, new Object[] { lunghezza }); + } + catch (Throwable t) { + t = ClpSerializer.translateThrowable(t); + + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + else { + throw new RuntimeException(t.getClass().getName() + + " is not a valid exception"); + } + } + + return (java.lang.String)ClpSerializer.translateOutput(returnObj); + } + private InvokableService _invokableService; private String _methodName0; private String[] _methodParameterTypes0; private String _methodName1; private String[] _methodParameterTypes1; + private String _methodName3; + private String[] _methodParameterTypes3; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloServiceUtil.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloServiceUtil.java index 695cdb78..d262f4df 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloServiceUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloServiceUtil.java @@ -63,6 +63,10 @@ public class SportelloServiceUtil { return getService().invokeMethod(name, parameterTypes, arguments); } + public static java.lang.String generaPassword(int lunghezza) { + return getService().generaPassword(lunghezza); + } + public static void clearService() { _service = null; } diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloServiceWrapper.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloServiceWrapper.java index 1c487d54..4a07e390 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloServiceWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/SportelloServiceWrapper.java @@ -56,6 +56,11 @@ public class SportelloServiceWrapper implements SportelloService, return _sportelloService.invokeMethod(name, parameterTypes, arguments); } + @Override + public java.lang.String generaPassword(int lunghezza) { + return _sportelloService.generaPassword(lunghezza); + } + /** * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} */ diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/messaging/ClpMessageListener.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/messaging/ClpMessageListener.java index 732ec594..553700ea 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/messaging/ClpMessageListener.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/messaging/ClpMessageListener.java @@ -17,6 +17,8 @@ package it.mwg.sicilia.sue.service.messaging; import com.liferay.portal.kernel.messaging.BaseMessageListener; import com.liferay.portal.kernel.messaging.Message; +import it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil; +import it.mwg.sicilia.sue.service.ApiSettingServiceUtil; import it.mwg.sicilia.sue.service.ClpSerializer; import it.mwg.sicilia.sue.service.SportelloLocalServiceUtil; import it.mwg.sicilia.sue.service.SportelloServiceUtil; @@ -36,6 +38,9 @@ public class ClpMessageListener extends BaseMessageListener { if (command.equals("undeploy") && servletContextName.equals(getServletContextName())) { + ApiSettingLocalServiceUtil.clearService(); + + ApiSettingServiceUtil.clearService(); SportelloLocalServiceUtil.clearService(); SportelloServiceUtil.clearService(); diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/ApiSettingActionableDynamicQuery.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/ApiSettingActionableDynamicQuery.java new file mode 100644 index 00000000..72d8ec57 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/ApiSettingActionableDynamicQuery.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service.persistence; + +import com.liferay.portal.kernel.dao.orm.BaseActionableDynamicQuery; +import com.liferay.portal.kernel.exception.SystemException; + +import it.mwg.sicilia.sue.model.ApiSetting; +import it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil; + +/** + * @author Manifattura Web Group Srl + * @generated + */ +public abstract class ApiSettingActionableDynamicQuery + extends BaseActionableDynamicQuery { + public ApiSettingActionableDynamicQuery() throws SystemException { + setBaseLocalService(ApiSettingLocalServiceUtil.getService()); + setClass(ApiSetting.class); + + setClassLoader(it.mwg.sicilia.sue.service.ClpSerializer.class.getClassLoader()); + + setPrimaryKeyPropertyName("id"); + } +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/ApiSettingPersistence.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/ApiSettingPersistence.java new file mode 100644 index 00000000..7f227b5a --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/ApiSettingPersistence.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service.persistence; + +import com.liferay.portal.service.persistence.BasePersistence; + +import it.mwg.sicilia.sue.model.ApiSetting; + +/** + * The persistence interface for the api setting service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author Manifattura Web Group Srl + * @see ApiSettingPersistenceImpl + * @see ApiSettingUtil + * @generated + */ +public interface ApiSettingPersistence extends BasePersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link ApiSettingUtil} to access the api setting persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. + */ + + /** + * Returns the api setting where companyId = ? and key = ? or throws a {@link it.mwg.sicilia.sue.NoSuchApiSettingException} if it could not be found. + * + * @param companyId the company ID + * @param key the key + * @return the matching api setting + * @throws it.mwg.sicilia.sue.NoSuchApiSettingException if a matching api setting could not be found + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.ApiSetting findByCompanyIdKey( + long companyId, long key) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchApiSettingException; + + /** + * Returns the api setting where companyId = ? and key = ? or returns null if it could not be found. Uses the finder cache. + * + * @param companyId the company ID + * @param key the key + * @return the matching api setting, or null if a matching api setting could not be found + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.ApiSetting fetchByCompanyIdKey( + long companyId, long key) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the api setting where companyId = ? and key = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param companyId the company ID + * @param key the key + * @param retrieveFromCache whether to use the finder cache + * @return the matching api setting, or null if a matching api setting could not be found + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.ApiSetting fetchByCompanyIdKey( + long companyId, long key, boolean retrieveFromCache) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Removes the api setting where companyId = ? and key = ? from the database. + * + * @param companyId the company ID + * @param key the key + * @return the api setting that was removed + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.ApiSetting removeByCompanyIdKey( + long companyId, long key) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchApiSettingException; + + /** + * Returns the number of api settings where companyId = ? and key = ?. + * + * @param companyId the company ID + * @param key the key + * @return the number of matching api settings + * @throws SystemException if a system exception occurred + */ + public int countByCompanyIdKey(long companyId, long key) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Caches the api setting in the entity cache if it is enabled. + * + * @param apiSetting the api setting + */ + public void cacheResult(it.mwg.sicilia.sue.model.ApiSetting apiSetting); + + /** + * Caches the api settings in the entity cache if it is enabled. + * + * @param apiSettings the api settings + */ + public void cacheResult( + java.util.List apiSettings); + + /** + * Creates a new api setting with the primary key. Does not add the api setting to the database. + * + * @param id the primary key for the new api setting + * @return the new api setting + */ + public it.mwg.sicilia.sue.model.ApiSetting create(long id); + + /** + * Removes the api setting with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param id the primary key of the api setting + * @return the api setting that was removed + * @throws it.mwg.sicilia.sue.NoSuchApiSettingException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.ApiSetting remove(long id) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchApiSettingException; + + public it.mwg.sicilia.sue.model.ApiSetting updateImpl( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the api setting with the primary key or throws a {@link it.mwg.sicilia.sue.NoSuchApiSettingException} if it could not be found. + * + * @param id the primary key of the api setting + * @return the api setting + * @throws it.mwg.sicilia.sue.NoSuchApiSettingException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.ApiSetting findByPrimaryKey(long id) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchApiSettingException; + + /** + * Returns the api setting with the primary key or returns null if it could not be found. + * + * @param id the primary key of the api setting + * @return the api setting, or null if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.ApiSetting fetchByPrimaryKey(long id) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns all the api settings. + * + * @return the api settings + * @throws SystemException if a system exception occurred + */ + public java.util.List findAll() + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns a range of all the api settings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api settings + * @param end the upper bound of the range of api settings (not inclusive) + * @return the range of api settings + * @throws SystemException if a system exception occurred + */ + public java.util.List findAll( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns an ordered range of all the api settings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api settings + * @param end the upper bound of the range of api settings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of api settings + * @throws SystemException if a system exception occurred + */ + public java.util.List findAll( + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Removes all the api settings from the database. + * + * @throws SystemException if a system exception occurred + */ + public void removeAll() + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the number of api settings. + * + * @return the number of api settings + * @throws SystemException if a system exception occurred + */ + public int countAll() + throws com.liferay.portal.kernel.exception.SystemException; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/ApiSettingUtil.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/ApiSettingUtil.java new file mode 100644 index 00000000..9cf3f1da --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/ApiSettingUtil.java @@ -0,0 +1,352 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service.persistence; + +import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.ReferenceRegistry; +import com.liferay.portal.service.ServiceContext; + +import it.mwg.sicilia.sue.model.ApiSetting; + +import java.util.List; + +/** + * The persistence utility for the api setting service. This utility wraps {@link ApiSettingPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author Manifattura Web Group Srl + * @see ApiSettingPersistence + * @see ApiSettingPersistenceImpl + * @generated + */ +public class ApiSettingUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() + */ + public static void clearCache() { + getPersistence().clearCache(); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) + */ + public static void clearCache(ApiSetting apiSetting) { + getPersistence().clearCache(apiSetting); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) + */ + public static long countWithDynamicQuery(DynamicQuery dynamicQuery) + throws SystemException { + return getPersistence().countWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery) throws SystemException { + return getPersistence().findWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end) + throws SystemException { + return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end, + OrderByComparator orderByComparator) throws SystemException { + return getPersistence() + .findWithDynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) + */ + public static ApiSetting update(ApiSetting apiSetting) + throws SystemException { + return getPersistence().update(apiSetting); + } + + /** + * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) + */ + public static ApiSetting update(ApiSetting apiSetting, + ServiceContext serviceContext) throws SystemException { + return getPersistence().update(apiSetting, serviceContext); + } + + /** + * Returns the api setting where companyId = ? and key = ? or throws a {@link it.mwg.sicilia.sue.NoSuchApiSettingException} if it could not be found. + * + * @param companyId the company ID + * @param key the key + * @return the matching api setting + * @throws it.mwg.sicilia.sue.NoSuchApiSettingException if a matching api setting could not be found + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.ApiSetting findByCompanyIdKey( + long companyId, long key) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchApiSettingException { + return getPersistence().findByCompanyIdKey(companyId, key); + } + + /** + * Returns the api setting where companyId = ? and key = ? or returns null if it could not be found. Uses the finder cache. + * + * @param companyId the company ID + * @param key the key + * @return the matching api setting, or null if a matching api setting could not be found + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.ApiSetting fetchByCompanyIdKey( + long companyId, long key) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByCompanyIdKey(companyId, key); + } + + /** + * Returns the api setting where companyId = ? and key = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param companyId the company ID + * @param key the key + * @param retrieveFromCache whether to use the finder cache + * @return the matching api setting, or null if a matching api setting could not be found + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.ApiSetting fetchByCompanyIdKey( + long companyId, long key, boolean retrieveFromCache) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence() + .fetchByCompanyIdKey(companyId, key, retrieveFromCache); + } + + /** + * Removes the api setting where companyId = ? and key = ? from the database. + * + * @param companyId the company ID + * @param key the key + * @return the api setting that was removed + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.ApiSetting removeByCompanyIdKey( + long companyId, long key) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchApiSettingException { + return getPersistence().removeByCompanyIdKey(companyId, key); + } + + /** + * Returns the number of api settings where companyId = ? and key = ?. + * + * @param companyId the company ID + * @param key the key + * @return the number of matching api settings + * @throws SystemException if a system exception occurred + */ + public static int countByCompanyIdKey(long companyId, long key) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().countByCompanyIdKey(companyId, key); + } + + /** + * Caches the api setting in the entity cache if it is enabled. + * + * @param apiSetting the api setting + */ + public static void cacheResult( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) { + getPersistence().cacheResult(apiSetting); + } + + /** + * Caches the api settings in the entity cache if it is enabled. + * + * @param apiSettings the api settings + */ + public static void cacheResult( + java.util.List apiSettings) { + getPersistence().cacheResult(apiSettings); + } + + /** + * Creates a new api setting with the primary key. Does not add the api setting to the database. + * + * @param id the primary key for the new api setting + * @return the new api setting + */ + public static it.mwg.sicilia.sue.model.ApiSetting create(long id) { + return getPersistence().create(id); + } + + /** + * Removes the api setting with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param id the primary key of the api setting + * @return the api setting that was removed + * @throws it.mwg.sicilia.sue.NoSuchApiSettingException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.ApiSetting remove(long id) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchApiSettingException { + return getPersistence().remove(id); + } + + public static it.mwg.sicilia.sue.model.ApiSetting updateImpl( + it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().updateImpl(apiSetting); + } + + /** + * Returns the api setting with the primary key or throws a {@link it.mwg.sicilia.sue.NoSuchApiSettingException} if it could not be found. + * + * @param id the primary key of the api setting + * @return the api setting + * @throws it.mwg.sicilia.sue.NoSuchApiSettingException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.ApiSetting findByPrimaryKey(long id) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchApiSettingException { + return getPersistence().findByPrimaryKey(id); + } + + /** + * Returns the api setting with the primary key or returns null if it could not be found. + * + * @param id the primary key of the api setting + * @return the api setting, or null if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.ApiSetting fetchByPrimaryKey(long id) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByPrimaryKey(id); + } + + /** + * Returns all the api settings. + * + * @return the api settings + * @throws SystemException if a system exception occurred + */ + public static java.util.List findAll() + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findAll(); + } + + /** + * Returns a range of all the api settings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api settings + * @param end the upper bound of the range of api settings (not inclusive) + * @return the range of api settings + * @throws SystemException if a system exception occurred + */ + public static java.util.List findAll( + int start, int end) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findAll(start, end); + } + + /** + * Returns an ordered range of all the api settings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api settings + * @param end the upper bound of the range of api settings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of api settings + * @throws SystemException if a system exception occurred + */ + public static java.util.List findAll( + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().findAll(start, end, orderByComparator); + } + + /** + * Removes all the api settings from the database. + * + * @throws SystemException if a system exception occurred + */ + public static void removeAll() + throws com.liferay.portal.kernel.exception.SystemException { + getPersistence().removeAll(); + } + + /** + * Returns the number of api settings. + * + * @return the number of api settings + * @throws SystemException if a system exception occurred + */ + public static int countAll() + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().countAll(); + } + + public static ApiSettingPersistence getPersistence() { + if (_persistence == null) { + _persistence = (ApiSettingPersistence)PortletBeanLocatorUtil.locate(it.mwg.sicilia.sue.service.ClpSerializer.getServletContextName(), + ApiSettingPersistence.class.getName()); + + ReferenceRegistry.registerReference(ApiSettingUtil.class, + "_persistence"); + } + + return _persistence; + } + + /** + * @deprecated As of 6.2.0 + */ + public void setPersistence(ApiSettingPersistence persistence) { + } + + private static ApiSettingPersistence _persistence; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/SportelloPersistence.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/SportelloPersistence.java index 2ba88c26..69282a64 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/SportelloPersistence.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/SportelloPersistence.java @@ -37,6 +37,119 @@ public interface SportelloPersistence extends BasePersistence { * Never modify or reference this interface directly. Always use {@link SportelloUtil} to access the sportello persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. */ + /** + * Returns the sportello where comuneId = ? or throws a {@link it.mwg.sicilia.sue.NoSuchSportelloException} if it could not be found. + * + * @param comuneId the comune ID + * @return the matching sportello + * @throws it.mwg.sicilia.sue.NoSuchSportelloException if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.Sportello findByComuneId(long comuneId) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException; + + /** + * Returns the sportello where comuneId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param comuneId the comune ID + * @return the matching sportello, or null if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.Sportello fetchByComuneId(long comuneId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the sportello where comuneId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param comuneId the comune ID + * @param retrieveFromCache whether to use the finder cache + * @return the matching sportello, or null if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.Sportello fetchByComuneId(long comuneId, + boolean retrieveFromCache) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Removes the sportello where comuneId = ? from the database. + * + * @param comuneId the comune ID + * @return the sportello that was removed + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.Sportello removeByComuneId(long comuneId) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException; + + /** + * Returns the number of sportellos where comuneId = ?. + * + * @param comuneId the comune ID + * @return the number of matching sportellos + * @throws SystemException if a system exception occurred + */ + public int countByComuneId(long comuneId) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the sportello where userName = ? or throws a {@link it.mwg.sicilia.sue.NoSuchSportelloException} if it could not be found. + * + * @param userName the user name + * @return the matching sportello + * @throws it.mwg.sicilia.sue.NoSuchSportelloException if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.Sportello findByUserName( + java.lang.String userName) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException; + + /** + * Returns the sportello where userName = ? or returns null if it could not be found. Uses the finder cache. + * + * @param userName the user name + * @return the matching sportello, or null if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.Sportello fetchByUserName( + java.lang.String userName) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the sportello where userName = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param userName the user name + * @param retrieveFromCache whether to use the finder cache + * @return the matching sportello, or null if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.Sportello fetchByUserName( + java.lang.String userName, boolean retrieveFromCache) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Removes the sportello where userName = ? from the database. + * + * @param userName the user name + * @return the sportello that was removed + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.Sportello removeByUserName( + java.lang.String userName) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException; + + /** + * Returns the number of sportellos where userName = ?. + * + * @param userName the user name + * @return the number of matching sportellos + * @throws SystemException if a system exception occurred + */ + public int countByUserName(java.lang.String userName) + throws com.liferay.portal.kernel.exception.SystemException; + /** * Caches the sportello in the entity cache if it is enabled. * diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/SportelloUtil.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/SportelloUtil.java index b3be8d28..2d2afe73 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/SportelloUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/SportelloUtil.java @@ -110,6 +110,142 @@ public class SportelloUtil { return getPersistence().update(sportello, serviceContext); } + /** + * Returns the sportello where comuneId = ? or throws a {@link it.mwg.sicilia.sue.NoSuchSportelloException} if it could not be found. + * + * @param comuneId the comune ID + * @return the matching sportello + * @throws it.mwg.sicilia.sue.NoSuchSportelloException if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.Sportello findByComuneId( + long comuneId) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException { + return getPersistence().findByComuneId(comuneId); + } + + /** + * Returns the sportello where comuneId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param comuneId the comune ID + * @return the matching sportello, or null if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.Sportello fetchByComuneId( + long comuneId) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByComuneId(comuneId); + } + + /** + * Returns the sportello where comuneId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param comuneId the comune ID + * @param retrieveFromCache whether to use the finder cache + * @return the matching sportello, or null if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.Sportello fetchByComuneId( + long comuneId, boolean retrieveFromCache) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByComuneId(comuneId, retrieveFromCache); + } + + /** + * Removes the sportello where comuneId = ? from the database. + * + * @param comuneId the comune ID + * @return the sportello that was removed + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.Sportello removeByComuneId( + long comuneId) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException { + return getPersistence().removeByComuneId(comuneId); + } + + /** + * Returns the number of sportellos where comuneId = ?. + * + * @param comuneId the comune ID + * @return the number of matching sportellos + * @throws SystemException if a system exception occurred + */ + public static int countByComuneId(long comuneId) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().countByComuneId(comuneId); + } + + /** + * Returns the sportello where userName = ? or throws a {@link it.mwg.sicilia.sue.NoSuchSportelloException} if it could not be found. + * + * @param userName the user name + * @return the matching sportello + * @throws it.mwg.sicilia.sue.NoSuchSportelloException if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.Sportello findByUserName( + java.lang.String userName) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException { + return getPersistence().findByUserName(userName); + } + + /** + * Returns the sportello where userName = ? or returns null if it could not be found. Uses the finder cache. + * + * @param userName the user name + * @return the matching sportello, or null if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.Sportello fetchByUserName( + java.lang.String userName) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByUserName(userName); + } + + /** + * Returns the sportello where userName = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param userName the user name + * @param retrieveFromCache whether to use the finder cache + * @return the matching sportello, or null if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.Sportello fetchByUserName( + java.lang.String userName, boolean retrieveFromCache) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByUserName(userName, retrieveFromCache); + } + + /** + * Removes the sportello where userName = ? from the database. + * + * @param userName the user name + * @return the sportello that was removed + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.Sportello removeByUserName( + java.lang.String userName) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException { + return getPersistence().removeByUserName(userName); + } + + /** + * Returns the number of sportellos where userName = ?. + * + * @param userName the user name + * @return the number of matching sportellos + * @throws SystemException if a system exception occurred + */ + public static int countByUserName(java.lang.String userName) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().countByUserName(userName); + } + /** * Caches the sportello in the entity cache if it is enabled. * diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.properties b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.properties index e69de29b..6d9c3855 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.properties +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.properties @@ -0,0 +1,4 @@ +IX_7B780A8D=sicilia_sue_ApiSetting.CompanyIdKey + +IX_8B2AB20B=sicilia_sue_Sportello.ComuneId +IX_F4E738BB=sicilia_sue_Sportello.UserName \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.sql b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.sql index e69de29b..125d6c6c 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.sql +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.sql @@ -0,0 +1,4 @@ +create unique index IX_7B780A8D on sicilia_sue_ApiSetting (companyId, key_); + +create unique index IX_8B2AB20B on sicilia_sue_Sportello (comuneId); +create unique index IX_F4E738BB on sicilia_sue_Sportello (userName); \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/tables.sql b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/tables.sql index bb349f0f..4dd0bee4 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/tables.sql +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/tables.sql @@ -1,9 +1,26 @@ +create table sicilia_sue_ApiSetting ( + id_ LONG not null primary key, + companyId LONG, + key_ LONG, + value STRING null +); + create table sicilia_sue_Sportello ( sportelloId LONG not null primary key, groupId LONG, companyId LONG, - userId LONG, - userName VARCHAR(75) null, createDate DATE null, - modifiedDate DATE null + createUserId LONG, + createUserName VARCHAR(75) null, + modifiedDate DATE null, + modifiedUserId LONG, + modifiedUserName VARCHAR(75) null, + userName VARCHAR(75) null, + email VARCHAR(240) null, + comuneId LONG, + attivo BOOLEAN, + password_ VARCHAR(75) null, + passwordModifiedDate DATE null, + passwordModifiedUserId LONG, + passwordModifiedUserName VARCHAR(240) null ); \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml index ced55db3..f3590625 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml @@ -2,7 +2,17 @@ + + + + + + + + + + @@ -10,9 +20,19 @@ - - + + + + + + + + + + + + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml index 351e85b8..87e5cf33 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml @@ -1,13 +1,35 @@ + + + + + + 4000 + + - - + + + + + + + 240 + + + + + + + + 240 + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml index 1dfb8bf5..3864ca2a 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml @@ -7,25 +7,60 @@ PROPERTY + + + + + + + + + + + + + + + - - TIMESTAMP + + TIMESTAMP + + + + + + + + + + + TIMESTAMP + + + + + + - + + + +
diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-spring.xml b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-spring.xml index 04dd3545..2ff6d79a 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-spring.xml +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-spring.xml @@ -1,6 +1,9 @@ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/content/Language.properties b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/content/Language.properties new file mode 100644 index 00000000..8e710091 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/content/Language.properties @@ -0,0 +1,4 @@ +email = Email +nomeComune = Comune +nomeProvincia = Provincia +userName = Login diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/common/Action.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/common/Action.java deleted file mode 100644 index 1336daa7..00000000 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/common/Action.java +++ /dev/null @@ -1,40 +0,0 @@ -package it.mwg.sicilia.sue.api.common; - - -public class Action { - - private String name; - private String description; - private String method; - - public Action(String name, String description, String method) { - - this.name = name; - this.description = description; - this.method = method; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getMethod() { - return method; - } - - public void setMethod(String method) { - this.method = method; - } -} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/common/ApiResponse.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/common/ApiResponse.java deleted file mode 100644 index 03892ab5..00000000 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/common/ApiResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -package it.mwg.sicilia.sue.api.common; - -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONSerializer; - -public class ApiResponse { - - private int code; - private String message; - - private static final JSONSerializer serializer = JSONFactoryUtil.createJSONSerializer().exclude("class"); - - public ApiResponse(int code, String message) { - - this.setCode(code); - this.setMessage(message); - } - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - @Override - public String toString() { - return serializer.serialize(this); - } -} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/AccessToken.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/AccessToken.java new file mode 100644 index 00000000..e7b357b8 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/AccessToken.java @@ -0,0 +1,93 @@ +package it.mwg.sicilia.sue.api.v1; + +import it.mwg.sicilia.sue.ExpiredTokenException; +import it.mwg.sicilia.sue.InactiveSportelloException; +import it.mwg.sicilia.sue.InvalidTokenException; +import it.mwg.sicilia.sue.model.Sportello; +import it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil; +import it.mwg.sicilia.sue.service.SportelloLocalServiceUtil; + +import java.security.KeyFactory; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import java.util.Date; + +import javax.crypto.Cipher; + +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.security.SecureRandom; +import com.liferay.portal.kernel.util.Validator; +import com.sun.org.apache.xml.internal.security.utils.Base64; + +public class AccessToken { + + private long timestamp; + private long sportelloId; + private String token; + + private static final long MAX_AGE = 15 * 60 * 1000; + + private static final String TIMESTAMP = "t"; + private static final String SPORTELLO_ID = "i"; + private static final String SALT = "s"; + + public AccessToken(Sportello sportello) throws Exception { + + timestamp = new Date().getTime(); + sportelloId = sportello.getSportelloId(); + JSONObject payload = JSONFactoryUtil.createJSONObject(); + payload.put(TIMESTAMP, timestamp); + payload.put(SPORTELLO_ID, sportelloId); + SecureRandom rnd = new SecureRandom(); + payload.put(SALT, rnd.nextInt()); + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + String key = ApiSettingLocalServiceUtil.get(sportello.getCompanyId(), ApiConstants.API_PRIVATE_KEY); + PKCS8EncodedKeySpec privKeySpec = new PKCS8EncodedKeySpec(Base64.decode(key)); + PrivateKey privateKey = keyFactory.generatePrivate(privKeySpec); + Cipher cipher = Cipher.getInstance("RSA"); + cipher.init(Cipher.ENCRYPT_MODE, privateKey); + token = Base64.encode(cipher.doFinal(payload.toString().getBytes()), 0); + } + + public AccessToken(String token) throws Exception { + + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + // TODO companyId + String key = ApiSettingLocalServiceUtil.get(20155, ApiConstants.API_PUBLIC_KEY); + X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(Base64.decode(key)); + PublicKey publicKey = keyFactory.generatePublic(pubKeySpec); + Cipher cipher = Cipher.getInstance("RSA"); + cipher.init(Cipher.DECRYPT_MODE, publicKey); + JSONObject payload; + try { + String json = new String(cipher.doFinal(Base64.decode(token))); + payload = JSONFactoryUtil.createJSONObject(json); + } catch (Exception e) { + throw new InvalidTokenException(); + } + timestamp = payload.getLong(TIMESTAMP); + long current = new Date().getTime(); + if ((current < timestamp) || (current - timestamp > MAX_AGE)) { + throw new ExpiredTokenException(); + } + sportelloId = payload.getLong(SPORTELLO_ID); + Sportello sportello = SportelloLocalServiceUtil.getSportello(sportelloId); + if (Validator.isNull(sportello) || !sportello.isAttivo()) { + throw new InactiveSportelloException(); + } + this.token = token; + } + + public long getSportelloId() { + + return sportelloId; + } + + public String getToken() { + + return token; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Actions.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Actions.java deleted file mode 100644 index fcbfb4fc..00000000 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Actions.java +++ /dev/null @@ -1,22 +0,0 @@ -package it.mwg.sicilia.sue.api.v1; - -import it.mwg.sicilia.sue.api.common.Action; - -import java.util.ArrayList; -import java.util.List; - -import com.liferay.portal.kernel.servlet.HttpMethods; - -public class Actions { - - @SuppressWarnings("serial") - private static final List ACTIONS = new ArrayList() { - { - add(new Action("login", "Login", HttpMethods.POST)); - } - }; - - public static List getActions() { - return ACTIONS; - } -} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/ApiConstants.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/ApiConstants.java new file mode 100644 index 00000000..4c2da7a5 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/ApiConstants.java @@ -0,0 +1,8 @@ +package it.mwg.sicilia.sue.api.v1; + +public class ApiConstants { + + public static final long API_SECRET = 1; + public static final long API_PUBLIC_KEY = 2; + public static final long API_PRIVATE_KEY = 3; +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/ApiServlet.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/ApiServlet.java index ea256770..706e5c1a 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/ApiServlet.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/ApiServlet.java @@ -1,6 +1,7 @@ package it.mwg.sicilia.sue.api.v1; -import it.mwg.sicilia.sue.api.common.ApiResponse; +import it.mwg.sicilia.sue.api.v1.command.Command; +import it.mwg.sicilia.sue.api.v1.command.CommandList; import java.io.IOException; @@ -9,7 +10,10 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import com.liferay.portal.kernel.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; /** * @author Manifattura Web Group Srl @@ -17,27 +21,46 @@ import com.liferay.portal.kernel.servlet.ServletResponseUtil; @SuppressWarnings("serial") public class ApiServlet extends HttpServlet { + private static final Log _log = LogFactoryUtil.getLog(ApiServlet.class); + @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String path = request.getPathInfo().substring(1); - switch (path) { - case "login": - ServletResponseUtil.write(response, new ApiResponse(0, "Ok").toString()); - break; - default: - response.sendError(HttpServletResponse.SC_NOT_FOUND, request.getRequestURI()); - } + process(request, response); } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String path = request.getPathInfo().substring(1); - switch (path) { - default: - response.sendError(HttpServletResponse.SC_NOT_FOUND, request.getRequestURI()); + process(request, response); + } + + @Override + protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + process(request, response); + } + + private void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + String pathInfo = request.getPathInfo(); + if (Validator.isNull(pathInfo)) { + pathInfo = StringPool.BLANK; + } else { + pathInfo = request.getPathInfo().substring(1); + } + Command command = CommandList.get(pathInfo); + if (Validator.isNull(command)) { + response.sendError(HttpServletResponse.SC_NOT_FOUND); + } else if (!command.getMethods().contains(request.getMethod())) { + response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED); + } else { + try { + command.run(request, response); + } catch (Exception e) { + _log.error(e.getMessage(), e); + } } } } diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/ApiUtil.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/ApiUtil.java new file mode 100644 index 00000000..8eae6aae --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/ApiUtil.java @@ -0,0 +1,59 @@ +package it.mwg.sicilia.sue.api.v1; + +import it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil; + +import java.security.KeyFactory; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; + +import javax.crypto.Cipher; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.security.SecureRandom; +import com.liferay.portal.kernel.util.StringPool; +import com.sun.org.apache.xml.internal.security.utils.Base64; + +public class ApiUtil { + + private static final Log _log = LogFactoryUtil.getLog(ApiUtil.class); + + public static String getToken(long companyId, long sportelloId) throws Exception { + + SecureRandom rnd = new SecureRandom(); + + JSONObject object = JSONFactoryUtil.createJSONObject(); + object.put("id", sportelloId); + object.put("rnd", rnd.nextLong()); + _log.info(object.toString()); + + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + String key = ApiSettingLocalServiceUtil.get(companyId, ApiConstants.API_PRIVATE_KEY); + PKCS8EncodedKeySpec privKeySpec = new PKCS8EncodedKeySpec(Base64.decode(key)); + PrivateKey privateKey = keyFactory.generatePrivate(privKeySpec); + key = ApiSettingLocalServiceUtil.get(companyId, ApiConstants.API_PUBLIC_KEY); + X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(Base64.decode(key)); + PublicKey publicKey = keyFactory.generatePublic(pubKeySpec); + + Cipher cipher = Cipher.getInstance("RSA"); + cipher.init(Cipher.ENCRYPT_MODE, privateKey); + String enc = Base64.encode(cipher.doFinal(object.toString().getBytes())); + _log.info("Enc: " + enc); + cipher.init(Cipher.DECRYPT_MODE, publicKey); + String dec = new String(cipher.doFinal(Base64.decode(enc))); + _log.info("Dec: " + dec); + + byte[] bytes = new byte[512]; + rnd.nextBytes(bytes); + String hash = DigestUtils.sha256Hex(bytes); + String secret = ApiSettingLocalServiceUtil.get(companyId, ApiConstants.API_SECRET); + String check = DigestUtils.sha256Hex(hash + secret); + return hash + StringPool.PERIOD + check; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Parameters.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Parameters.java new file mode 100644 index 00000000..d0695d15 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Parameters.java @@ -0,0 +1,23 @@ +package it.mwg.sicilia.sue.api.v1; + +public class Parameters { + + public static final String ADDITIONAL_INFO = "additionalInfo"; + public static final String APPLICATION = "application"; + public static final String APPLICATION_ID = "applicationId"; + public static final String APPLICATIONS = "applications"; + public static final String CODE = "code"; + public static final String DESCRIPTION = "description"; + public static final String DOCUMENTS = "documents"; + public static final String FIRST_NAME = "firstName"; + public static final String LAST_NAME = "lastName"; + public static final String PASSWORD = "password"; + public static final String STATUS_CODE = "statusCode"; + public static final String STATUS_MESSAGE = "statusMessage"; + public static final String SUE_ID = "sueId"; + public static final String TOKEN = "token"; + public static final String TYPE = "type"; + public static final String USERNAME = "username"; + public static final String VAT_ID = "vatId"; + public static final String X_AUTH_TOKEN = "X-Auth-Token"; +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Response.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Response.java new file mode 100644 index 00000000..48052488 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Response.java @@ -0,0 +1,44 @@ +package it.mwg.sicilia.sue.api.v1; + +import java.io.IOException; +import java.io.Serializable; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.StringUtils; + +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONSerializer; +import com.liferay.portal.kernel.util.StringPool; + +public class Response { + + private static final JSONSerializer serializer = JSONFactoryUtil.createJSONSerializer().exclude("*.class"); + + public static String get(int statusCode, Map extraData, List additionalInfo) { + + Map map = new LinkedHashMap<>(); + map.put(Parameters.STATUS_CODE, statusCode); + map.put(Parameters.STATUS_MESSAGE, Status.getStatusDescription(statusCode)); + if (null != extraData) { + map.putAll(extraData); + } + if (null != additionalInfo) { + map.put(Parameters.ADDITIONAL_INFO, StringUtils.join(additionalInfo, StringPool.NEW_LINE)); + } + return serializer.serializeDeep(map); + } + + public static String get(int statusCode) throws IOException { + return get(statusCode, null, null); + } + + public static String get(int statusCode, Map extraData) { + return get(statusCode, extraData, null); + } + + public static String get(int statusCode, List additionalInfo) { + return get(statusCode, null, additionalInfo); + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Status.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Status.java new file mode 100644 index 00000000..e17a7ba6 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Status.java @@ -0,0 +1,35 @@ +package it.mwg.sicilia.sue.api.v1; + +import java.util.HashMap; +import java.util.Map; + +public class Status { + + public static final int OK = 0; + public static final int EXPIRED_TOKEN = 1; + public static final int INACTIVE_USER = 2; + public static final int INVALID_INPUT = 3; + public static final int INVALID_TOKEN = 4; + public static final int MALFORMED_REQUEST = 5; + public static final int SERVER_ERROR = 6; + public static final int WRONG_USERNAME_OR_PASSWORD = 7; + + @SuppressWarnings("serial") + private static final Map messages = new HashMap() { + { + put(OK, "OK"); + put(EXPIRED_TOKEN, "Questo token è scaduto"); + put(INACTIVE_USER, "L'utente non è attivo"); + put(INVALID_INPUT, "Dati forniti non validi"); + put(INVALID_TOKEN, "Token non valido"); + put(MALFORMED_REQUEST, "Richiesta non corretta"); + put(SERVER_ERROR, "Errore interno del server"); + put(WRONG_USERNAME_OR_PASSWORD, "Nome utente o password errati"); + } + }; + + public static String getStatusDescription(int statusCode) { + + return messages.get(statusCode); + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Application.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Application.java new file mode 100644 index 00000000..642acb44 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Application.java @@ -0,0 +1,30 @@ +package it.mwg.sicilia.sue.api.v1.bean; + +import java.io.Serializable; + +@SuppressWarnings("serial") +public class Application implements Serializable { + + private long applicationId; + private String type; + private String vatId; + + public Application(long applicationId, String type, String vatId) { + + this.applicationId = applicationId; + this.type = type; + this.vatId = vatId; + } + + public long getApplicationId() { + return applicationId; + } + + public String getType() { + return type; + } + + public String getVatId() { + return vatId; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/ApplicationType.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/ApplicationType.java new file mode 100644 index 00000000..8e1f2dc5 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/ApplicationType.java @@ -0,0 +1,26 @@ +package it.mwg.sicilia.sue.api.v1.bean; + +import java.io.Serializable; + +@SuppressWarnings("serial") +public class ApplicationType implements Serializable { + + private String code; + private String description; + + public ApplicationType(String code, String description) { + + this.code = code; + this.description = description; + } + + public String getCode() { + + return code; + } + + public String getDescription() { + + return description; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Document.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Document.java new file mode 100644 index 00000000..3c08430b --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/bean/Document.java @@ -0,0 +1,26 @@ +package it.mwg.sicilia.sue.api.v1.bean; + +import java.io.Serializable; + +@SuppressWarnings("serial") +public class Document implements Serializable { + + private String code; + private String description; + + public Document(String code, String description) { + + this.code = code; + this.description = description; + } + + public String getCode() { + + return code; + } + + public String getDescription() { + + return description; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/Command.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/Command.java new file mode 100644 index 00000000..5779956e --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/Command.java @@ -0,0 +1,171 @@ +package it.mwg.sicilia.sue.api.v1.command; + +import it.mwg.sicilia.sue.ExpiredTokenException; +import it.mwg.sicilia.sue.InvalidTokenException; +import it.mwg.sicilia.sue.api.v1.AccessToken; +import it.mwg.sicilia.sue.api.v1.Parameters; +import it.mwg.sicilia.sue.api.v1.Response; +import it.mwg.sicilia.sue.api.v1.Status; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.mwg.sicilia.sue.model.Sportello; +import it.mwg.sicilia.sue.service.SportelloLocalServiceUtil; + +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.json.JSONDeserializer; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.servlet.HttpMethods; +import com.liferay.portal.kernel.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.util.ContentTypes; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; + +public abstract class Command { + + protected static final Log _log = LogFactoryUtil.getLog(Command.class); + protected static final List EMPTY_PARAMETERS = new ArrayList<>(); + @SuppressWarnings("serial") + protected static final List BASE_OUTPUT_PARAMETERS = new ArrayList() { + { + add(new Parameter(Parameters.STATUS_CODE, Parameter.TYPES.INTEGER, "Codice di stato")); + add(new Parameter(Parameters.STATUS_MESSAGE, Parameter.TYPES.STRING, "Breve descrizione dello stato")); + } + }; + + protected Map parameters = null; + protected Sportello sportello = null; + + private String verb; + private List methods; + private String description; + private AccessToken accessToken; + + private static final String[] defaultMethods = { HttpMethods.POST }; + private static final JSONDeserializer> deserializer = JSONFactoryUtil + .createJSONDeserializer(); + + public Command(String description, String... methods) { + + this.verb = getCommandName(); + this.methods = Arrays.asList(methods.length > 0 ? methods : defaultMethods); + this.description = description; + } + + public String getVerb() { + return verb; + } + + public List getMethods() { + return methods; + } + + public String getDescription() { + return description; + } + + public abstract void run(HttpServletRequest request, HttpServletResponse response) throws Exception; + + public abstract List getInputParameters(); + + public abstract List getOutputParameters(); + + public boolean isSecure() { + return true; + } + + protected Map readParameters(HttpServletRequest request) throws IOException { + + parameters = new HashMap<>(); + if (request.getMethod().equals(HttpMethods.POST)) { + try { + parameters = deserializer.deserialize(new InputStreamReader(request.getInputStream())); + } catch (Exception e) { + } + } else if (request.getMethod().equals(HttpMethods.GET)) { + String token = request.getHeader(Parameters.X_AUTH_TOKEN); + if (Validator.isNotNull(token)) { + parameters.put(Parameters.TOKEN, token); + } + } + return parameters; + } + + protected String getCommandName() { + return getCommandName(getClass().getSimpleName()); + } + + protected static String getCommandName(Class clazz) { + return getCommandName(clazz.getSimpleName()); + } + + protected static String getCommandName(String simpleName) { + return simpleName.replaceAll("([A-Z])", "_$1").substring(1).toLowerCase(); + } + + protected void setJson(HttpServletResponse response) { + + response.setContentType(ContentTypes.APPLICATION_JSON); + response.setCharacterEncoding(StringPool.UTF8); + } + + protected void setTextPlain(HttpServletResponse response) { + response.setContentType(ContentTypes.TEXT_PLAIN_UTF8); + } + + protected void setTextHtml(HttpServletResponse response) { + response.setContentType(ContentTypes.TEXT_HTML_UTF8); + } + + protected boolean verifyAccessToken(HttpServletRequest request, HttpServletResponse response) throws IOException { + + setJson(response); + readParameters(request); + String token = (String) parameters.get(Parameters.TOKEN); + if (Validator.isNull(token)) { + response.sendError(HttpServletResponse.SC_BAD_REQUEST); + } else { + try { + try { + accessToken = new AccessToken(token); + sportello = SportelloLocalServiceUtil.getSportello(accessToken.getSportelloId()); + } catch (InvalidTokenException e) { + ServletResponseUtil.write(response, Response.get(Status.INVALID_TOKEN)); + } catch (ExpiredTokenException e) { + ServletResponseUtil.write(response, Response.get(Status.EXPIRED_TOKEN)); + } catch (PortalException | SystemException e) { + ServletResponseUtil.write(response, Response.get(Status.INACTIVE_USER)); + } catch (Exception e) { + ServletResponseUtil.write(response, Response.get(Status.SERVER_ERROR)); + } + return true; + } catch (IOException e) { + } + } + return false; + } + + protected Sportello getSportello() { + + if (null == sportello) { + try { + sportello = SportelloLocalServiceUtil.getSportello(accessToken.getSportelloId()); + } catch (PortalException | SystemException e) { + } + } + return sportello; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/CommandList.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/CommandList.java new file mode 100644 index 00000000..39c778f1 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/CommandList.java @@ -0,0 +1,51 @@ +package it.mwg.sicilia.sue.api.v1.command; + +import it.mwg.sicilia.sue.api.v1.command.impl.AddApplication; +import it.mwg.sicilia.sue.api.v1.command.impl.Applications; +import it.mwg.sicilia.sue.api.v1.command.impl.DeleteApplication; +import it.mwg.sicilia.sue.api.v1.command.impl.Documents; +import it.mwg.sicilia.sue.api.v1.command.impl.ListApplications; +import it.mwg.sicilia.sue.api.v1.command.impl.Login; +import it.mwg.sicilia.sue.api.v1.command.impl.Manual; +import it.mwg.sicilia.sue.api.v1.command.impl.ManualHtml; +import it.mwg.sicilia.sue.api.v1.command.impl.Nop; + +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.Map; + +import com.liferay.portal.kernel.servlet.HttpMethods; + +public class CommandList { + + private static final Map commands = new LinkedHashMap<>(); + static { + addCommand(new Manual("Restituisce la documentazione dell'API generata automaticamente", HttpMethods.GET, + HttpMethods.POST)); + addCommand(new ManualHtml("Restituisce la documentazione dell'API generata automaticamente in versione HTML", + HttpMethods.GET, HttpMethods.POST)); + addCommand(new Login("Esegue l'accesso con nome email e password e restituisce un token di accesso")); + addCommand(new Applications("Riceve l'elenco delle istanze valide contenenti codice e descrizione", + HttpMethods.GET, HttpMethods.POST)); + addCommand(new AddApplication( + "Crea una nuova istanza di endoprocedimento, crea l'utente se non esiste ancora sul portale")); + addCommand(new ListApplications("Elenca le istanze in lavorazione da questo SUE", HttpMethods.GET, + HttpMethods.POST)); + addCommand(new DeleteApplication("Elimina un'istanza")); + addCommand(new Documents("Riceve l'elenco dei documenti riconosciuti dal portale con codice e descrizione", + HttpMethods.GET, HttpMethods.POST)); + addCommand(new Nop("NOP verifica la connettività senza eseguire operazioni", HttpMethods.GET, HttpMethods.POST)); + } + + private static void addCommand(Command command) { + commands.put(command.getVerb(), command); + } + + public static Command get(String verb) { + return commands.get(verb); + } + + public static Collection getList() { + return commands.values(); + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/AddApplication.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/AddApplication.java new file mode 100644 index 00000000..a2012902 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/AddApplication.java @@ -0,0 +1,190 @@ +package it.mwg.sicilia.sue.api.v1.command.impl; + +import it.mwg.sicilia.sue.api.v1.Parameters; +import it.mwg.sicilia.sue.api.v1.Response; +import it.mwg.sicilia.sue.api.v1.Status; +import it.mwg.sicilia.sue.api.v1.command.Command; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.tref.liferay.portos.bo.model.Comune; +import it.tref.liferay.portos.bo.model.DettPratica; +import it.tref.liferay.portos.bo.model.IntPratica; +import it.tref.liferay.portos.bo.model.Territorio; +import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; + +import java.io.Serializable; +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.util.MapUtil; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.model.User; +import com.liferay.portal.service.ServiceContext; +import com.liferay.portal.service.UserLocalServiceUtil; + +public class AddApplication extends Command { + + @SuppressWarnings("serial") + private static final List INPUT_PARAMETERS = new ArrayList() { + { + add(new Parameter(Parameters.VAT_ID, Parameter.TYPES.STRING, "Codice fiscale del titolare digitale")); + add(new Parameter(Parameters.FIRST_NAME, Parameter.TYPES.STRING, "Nome del titolare digitale", false)); + add(new Parameter(Parameters.LAST_NAME, Parameter.TYPES.STRING, "Cognome del titolare digitale", false)); + add(new Parameter(Parameters.TYPE, Parameter.TYPES.STRING, + "Codice del tipo di istanza, come restituito da /" + getCommandName(Applications.class))); + add(new Parameter(Parameters.SUE_ID, Parameter.TYPES.STRING, "Estremi pratica SUE/SUAP", false)); + } + }; + + @SuppressWarnings("serial") + private static final List OUTPUT_PARAMETERS = new ArrayList() { + { + addAll(BASE_OUTPUT_PARAMETERS); + add(new Parameter(Parameters.APPLICATION_ID, Parameter.TYPES.INTEGER, + "Identificatore del procedimento creato, da utilizzare nelle successive operazioni")); + add(new Parameter(Parameters.ADDITIONAL_INFO, Parameter.TYPES.STRING, + "Eventuali informazioni aggiuntive sull'operazione o sugli errori incontrati")); + } + }; + + public AddApplication(String description, String... methods) { + super(description, methods); + } + + @Override + public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { + + if (verifyAccessToken(request, response)) { + List additionalInfo = new ArrayList<>(); + String screenName = MapUtil.getString(parameters, Parameters.VAT_ID); + if (Validator.isNull(screenName)) { + additionalInfo.add("Parametro " + Parameters.VAT_ID + " mancante"); + ServletResponseUtil.write(response, Response.get(Status.MALFORMED_REQUEST, additionalInfo)); + return; + } + String tipoProcedura = MapUtil.getString(parameters, Parameters.TYPE); + if (Validator.isNull(tipoProcedura) + || !IntPraticaLocalServiceUtil.getTipiProcedure().containsKey(tipoProcedura)) { + additionalInfo.add("Tipo pratica non specificato o non valido"); + ServletResponseUtil.write(response, Response.get(Status.MALFORMED_REQUEST, additionalInfo)); + return; + } + String lastName = MapUtil.getString(parameters, Parameters.LAST_NAME, screenName); + String firstName = MapUtil.getString(parameters, Parameters.FIRST_NAME, lastName); + Comune comune = null; + Territorio territorio = null; + try { + comune = sportello.getComune(); + territorio = TerritorioLocalServiceUtil.findByComuneId(comune.getComuneId(), 0, 1).get(0); + } catch (PortalException | SystemException e) { + additionalInfo.add("Errore del server durante il caricamento del comune"); + ServletResponseUtil.write(response, Response.get(Status.INACTIVE_USER, additionalInfo)); + return; + } + Date date = new Date(); + long companyId = comune.getCompanyId(); + User user = null; + try { + user = UserLocalServiceUtil.fetchUserByScreenName(companyId, screenName); + if (Validator.isNull(user)) { + long creatorUserId = UserLocalServiceUtil.getDefaultUserId(companyId); + boolean autoPassword = true; + String password = randomPassword(24); + boolean autoScreenName = false; + String emailAddress = screenName + "@no-email.regione.sicilia.it"; + long facebookId = 0; + String openId = StringPool.BLANK; + Locale locale = Locale.ITALY; + String middleName = StringPool.BLANK; + int prefixId = 0; + int suffixId = 0; + boolean male = true; + int birthdayMonth = 0; + int birthdayDay = 1; + int birthdayYear = 1970; + String jobTitle = StringPool.BLANK; + long[] groupIds = null; + long[] organizationIds = null; + long[] roleIds = null; + long[] userGroupIds = null; + boolean sendEmail = false; + ServiceContext serviceContext = new ServiceContext(); + user = UserLocalServiceUtil.addUser(creatorUserId, companyId, autoPassword, password, password, + autoScreenName, screenName, emailAddress, facebookId, openId, locale, firstName, + middleName, lastName, prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear, + jobTitle, groupIds, organizationIds, roleIds, userGroupIds, sendEmail, serviceContext); + user.setPasswordModified(true); + user.setPasswordModifiedDate(date); + user.setPasswordReset(false); + UserLocalServiceUtil.updateUser(user); + additionalInfo.add("L'utente " + screenName + " è stato creato"); + } else { + additionalInfo.add("L'utente " + screenName + " esiste"); + } + } catch (PortalException | SystemException e) { + additionalInfo.add("Errore durante la creazione dell'utente " + screenName); + ServletResponseUtil.write(response, Response.get(Status.SERVER_ERROR, additionalInfo)); + return; + } + ServiceContext serviceContext = new ServiceContext(); + serviceContext.setCompanyId(sportello.getCompanyId()); + serviceContext.setScopeGroupId(sportello.getGroupId()); + serviceContext.setUserId(user.getUserId()); + serviceContext.setCreateDate(date); + serviceContext.setModifiedDate(date); + DettPratica dettPratica = null; + try { + dettPratica = DettPraticaLocalServiceUtil.addDettPratica(territorio.getTerritorioId(), tipoProcedura, + serviceContext); + String sueId = MapUtil.getString(parameters, Parameters.SUE_ID); + if (Validator.isNotNull(sueId)) { + dettPratica.setEstremiPratCom(sueId); + DettPraticaLocalServiceUtil.updateDettPratica(dettPratica); + } + IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); + intPratica.setInLavorazioneSue(true); + IntPraticaLocalServiceUtil.updateIntPratica(intPratica); + } catch (PortalException | SystemException e) { + additionalInfo.add("Errore durante la creazione dell'istanza"); + ServletResponseUtil.write(response, Response.get(Status.SERVER_ERROR, additionalInfo)); + return; + } + Map result = new HashMap<>(); + result.put(Parameters.APPLICATION_ID, dettPratica.getIntPraticaId()); + ServletResponseUtil.write(response, Response.get(Status.OK, result, additionalInfo)); + } + } + + private String randomPassword(int length) { + + SecureRandom rnd = new SecureRandom(); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + sb.append((char) (32 + rnd.nextInt(95))); + } + return sb.toString(); + } + + @Override + public List getInputParameters() { + return INPUT_PARAMETERS; + } + + @Override + public List getOutputParameters() { + return OUTPUT_PARAMETERS; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Applications.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Applications.java new file mode 100644 index 00000000..9fb10228 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Applications.java @@ -0,0 +1,64 @@ +package it.mwg.sicilia.sue.api.v1.command.impl; + +import it.mwg.sicilia.sue.api.v1.Parameters; +import it.mwg.sicilia.sue.api.v1.Response; +import it.mwg.sicilia.sue.api.v1.Status; +import it.mwg.sicilia.sue.api.v1.bean.ApplicationType; +import it.mwg.sicilia.sue.api.v1.command.Command; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.liferay.portal.kernel.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.util.StringPool; + +public class Applications extends Command { + + private static final List OUTPUT_PARAMETERS = new ArrayList(); + static { + OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS); + Parameter p = new Parameter(Parameters.DOCUMENTS, Parameter.TYPES.ARRAY, "Elenco di istanze presentabili"); + p.addSubParameter(new Parameter(Parameters.CODE, Parameter.TYPES.STRING, "Codice dell'istanza")); + p.addSubParameter(new Parameter(Parameters.DESCRIPTION, Parameter.TYPES.STRING, "Descrizione dell'istanza")); + OUTPUT_PARAMETERS.add(p); + }; + + public Applications(String description, String... methods) { + super(description, methods); + } + + @Override + public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { + + if (verifyAccessToken(request, response)) { + Map procedure = IntPraticaLocalServiceUtil.getTipiProcedure(); + List list = new ArrayList<>(procedure.size()); + for (Entry entry : procedure.entrySet()) { + list.add(new ApplicationType(entry.getKey(), entry.getValue().replaceAll("^[0-9\\.]+\\)\\s*", + StringPool.BLANK))); + } + Map result = new HashMap<>(); + result.put(Parameters.APPLICATIONS, (Serializable) list); + ServletResponseUtil.write(response, Response.get(Status.OK, result)); + } + } + + @Override + public List getInputParameters() { + return EMPTY_PARAMETERS; + } + + @Override + public List getOutputParameters() { + return OUTPUT_PARAMETERS; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/DeleteApplication.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/DeleteApplication.java new file mode 100644 index 00000000..02181684 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/DeleteApplication.java @@ -0,0 +1,83 @@ +package it.mwg.sicilia.sue.api.v1.command.impl; + +import it.mwg.sicilia.sue.api.v1.Parameters; +import it.mwg.sicilia.sue.api.v1.Response; +import it.mwg.sicilia.sue.api.v1.Status; +import it.mwg.sicilia.sue.api.v1.command.Command; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.tref.liferay.portos.bo.model.IntPratica; +import it.tref.liferay.portos.bo.model.Territorio; +import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; + +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.util.MapUtil; + +public class DeleteApplication extends Command { + + @SuppressWarnings("serial") + private static final List INPUT_PARAMETERS = new ArrayList() { + { + add(new Parameter(Parameters.APPLICATION_ID, Parameter.TYPES.INTEGER, "Id dell'istanza")); + } + }; + + public DeleteApplication(String description, String... methods) { + super(description, methods); + } + + @Override + public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { + + if (verifyAccessToken(request, response)) { + List additionalInfo = new ArrayList(); + if (!parameters.containsKey(Parameters.APPLICATION_ID)) { + additionalInfo.add("Parametro " + Parameters.APPLICATION_ID + " mancante"); + ServletResponseUtil.write(response, Response.get(Status.MALFORMED_REQUEST, additionalInfo)); + return; + } + long applicationId = MapUtil.getLong(parameters, Parameters.APPLICATION_ID); + IntPratica intPratica = null; + try { + intPratica = IntPraticaLocalServiceUtil.getIntPratica(applicationId); + } catch (PortalException | SystemException e) { + additionalInfo.add("Istanza " + applicationId + " non trovata"); + ServletResponseUtil.write(response, Response.get(Status.INVALID_INPUT, additionalInfo)); + return; + } + try { + Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); + if (territorio.getComuneId() != sportello.getComuneId() || !intPratica.isInLavorazioneSue()) { + additionalInfo.add("Istanza " + applicationId + " non cancellabile"); + ServletResponseUtil.write(response, Response.get(Status.INVALID_INPUT, additionalInfo)); + return; + } + } catch (PortalException | SystemException e) { + additionalInfo.add("Errore del server durante il caricamento dell'istanza"); + ServletResponseUtil.write(response, Response.get(Status.INVALID_INPUT, additionalInfo)); + return; + } + IntPraticaLocalServiceUtil.deleteIntPratica(intPratica, true); + ServletResponseUtil.write(response, Response.get(Status.OK)); + } + } + + @Override + public List getInputParameters() { + return INPUT_PARAMETERS; + } + + @Override + public List getOutputParameters() { + return BASE_OUTPUT_PARAMETERS; + } + +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Documents.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Documents.java new file mode 100644 index 00000000..8e6bdbaa --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Documents.java @@ -0,0 +1,64 @@ +package it.mwg.sicilia.sue.api.v1.command.impl; + +import it.mwg.sicilia.sue.api.v1.Parameters; +import it.mwg.sicilia.sue.api.v1.Response; +import it.mwg.sicilia.sue.api.v1.Status; +import it.mwg.sicilia.sue.api.v1.bean.Document; +import it.mwg.sicilia.sue.api.v1.command.Command; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.tref.liferay.portos.bo.util.DocumentiPraticaUtil; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.liferay.portal.kernel.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.util.StringPool; + +public class Documents extends Command { + + private static final List OUTPUT_PARAMETERS = new ArrayList(); + static { + OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS); + Parameter p = new Parameter(Parameters.DOCUMENTS, Parameter.TYPES.ARRAY, "Elenco di documenti"); + p.addSubParameter(new Parameter(Parameters.CODE, Parameter.TYPES.STRING, "Codice del documento")); + p.addSubParameter(new Parameter(Parameters.DESCRIPTION, Parameter.TYPES.STRING, "Descrizione del documento")); + OUTPUT_PARAMETERS.add(p); + }; + + public Documents(String description, String... methods) { + super(description, methods); + } + + @Override + public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { + + if (verifyAccessToken(request, response)) { + Map documents = DocumentiPraticaUtil.getTipiDocDomanda(); + List list = new ArrayList<>(documents.size()); + for (Entry entry : documents.entrySet()) { + list.add(new Document(entry.getKey(), entry.getValue() + .replaceAll("^A[0-9]+\\s*-\\s*", StringPool.BLANK))); + } + Map result = new HashMap<>(); + result.put(Parameters.DOCUMENTS, (Serializable) list); + ServletResponseUtil.write(response, Response.get(Status.OK, result)); + } + } + + @Override + public List getInputParameters() { + return EMPTY_PARAMETERS; + } + + @Override + public List getOutputParameters() { + return OUTPUT_PARAMETERS; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListApplications.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListApplications.java new file mode 100644 index 00000000..4b13309c --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ListApplications.java @@ -0,0 +1,74 @@ +package it.mwg.sicilia.sue.api.v1.command.impl; + +import it.mwg.sicilia.sue.api.v1.Parameters; +import it.mwg.sicilia.sue.api.v1.Response; +import it.mwg.sicilia.sue.api.v1.Status; +import it.mwg.sicilia.sue.api.v1.bean.Application; +import it.mwg.sicilia.sue.api.v1.command.Command; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.tref.liferay.portos.bo.model.IntPratica; +import it.tref.liferay.portos.bo.model.Territorio; +import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.servlet.ServletResponseUtil; + +public class ListApplications extends Command { + + private static final List OUTPUT_PARAMETERS = new ArrayList(); + static { + OUTPUT_PARAMETERS.addAll(BASE_OUTPUT_PARAMETERS); + Parameter p = new Parameter(Parameters.APPLICATIONS, Parameter.TYPES.ARRAY, "Elenco di istanze presentate"); + p.addSubParameter(new Parameter(Parameters.APPLICATION_ID, Parameter.TYPES.INTEGER, + "Identificatore dell'istanza")); + p.addSubParameter(new Parameter(Parameters.TYPE, Parameter.TYPES.STRING, "Tipo dell'istanza")); + p.addSubParameter(new Parameter(Parameters.VAT_ID, Parameter.TYPES.STRING, + "Codice fiscale del titolare digitale")); + OUTPUT_PARAMETERS.add(p); + }; + + public ListApplications(String description, String... methods) { + super(description, methods); + } + + @Override + public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { + + if (verifyAccessToken(request, response)) { + List applications = new ArrayList<>(); + for (Territorio territorio : TerritorioLocalServiceUtil.findByComuneId(sportello.getComuneId(), + QueryUtil.ALL_POS, QueryUtil.ALL_POS)) { + for (IntPratica intPratica : IntPraticaLocalServiceUtil + .findByTerritorioId(territorio.getTerritorioId())) { + if (intPratica.getInLavorazioneSue()) { + applications.add(new Application(intPratica.getIntPraticaId(), intPratica.getTipoProcedura(), + intPratica.getUserName())); + } + } + } + Map result = new HashMap<>(); + result.put(Parameters.APPLICATIONS, (Serializable) applications); + ServletResponseUtil.write(response, Response.get(Status.OK, result)); + } + } + + @Override + public List getInputParameters() { + return EMPTY_PARAMETERS; + } + + @Override + public List getOutputParameters() { + return OUTPUT_PARAMETERS; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Login.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Login.java new file mode 100644 index 00000000..a7e1f22d --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Login.java @@ -0,0 +1,88 @@ +package it.mwg.sicilia.sue.api.v1.command.impl; + +import it.mwg.sicilia.sue.NoSuchSportelloException; +import it.mwg.sicilia.sue.api.v1.AccessToken; +import it.mwg.sicilia.sue.api.v1.Parameters; +import it.mwg.sicilia.sue.api.v1.Response; +import it.mwg.sicilia.sue.api.v1.Status; +import it.mwg.sicilia.sue.api.v1.command.Command; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; +import it.mwg.sicilia.sue.model.Sportello; +import it.mwg.sicilia.sue.service.SportelloLocalServiceUtil; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.util.Validator; + +public class Login extends Command { + + @SuppressWarnings("serial") + private static final List INPUT_PARAMETERS = new ArrayList() { + { + add(new Parameter(Parameters.USERNAME, Parameter.TYPES.STRING, "Nome utente")); + add(new Parameter(Parameters.PASSWORD, Parameter.TYPES.STRING, "Password")); + } + }; + @SuppressWarnings("serial") + private static final List OUTPUT_PARAMETERS = new ArrayList() { + { + addAll(BASE_OUTPUT_PARAMETERS); + add(new Parameter(Parameters.TOKEN, Parameter.TYPES.STRING, "Token di autorizzazione")); + } + }; + + public Login(String description, String... methods) { + super(description, methods); + } + + @Override + public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { + + setJson(response); + readParameters(request); + String userName = (String) parameters.get(Parameters.USERNAME); + String password = (String) parameters.get(Parameters.PASSWORD); + if (Validator.isNull(userName) || Validator.isNull(password)) { + response.sendError(HttpServletResponse.SC_BAD_REQUEST); + } else { + Sportello sportello = null; + try { + sportello = SportelloLocalServiceUtil.findByUserName(userName); + } catch (NoSuchSportelloException | SystemException e) { + } + if (Validator.isNull(sportello) || !sportello.checkPassword(password)) { + ServletResponseUtil.write(response, Response.get(Status.WRONG_USERNAME_OR_PASSWORD)); + } else if (!sportello.isAttivo()) { + ServletResponseUtil.write(response, Response.get(Status.INACTIVE_USER)); + } else { + Map result = new HashMap<>(); + result.put(Parameters.TOKEN, new AccessToken(sportello).getToken()); + ServletResponseUtil.write(response, Response.get(Status.OK, result)); + } + } + } + + @Override + public boolean isSecure() { + return false; + } + + @Override + public List getInputParameters() { + return INPUT_PARAMETERS; + } + + @Override + public List getOutputParameters() { + return OUTPUT_PARAMETERS; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Manual.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Manual.java new file mode 100644 index 00000000..0c057ce7 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Manual.java @@ -0,0 +1,164 @@ +package it.mwg.sicilia.sue.api.v1.command.impl; + +import it.mwg.sicilia.sue.api.v1.Parameters; +import it.mwg.sicilia.sue.api.v1.command.Command; +import it.mwg.sicilia.sue.api.v1.command.CommandList; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; + +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONSerializer; +import com.liferay.portal.kernel.servlet.HttpMethods; +import com.liferay.portal.kernel.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.util.Http; +import com.liferay.portal.kernel.util.StringPool; + +public class Manual extends Command { + + @SuppressWarnings("serial") + private static final List OUTPUT_PARAMETERS = new ArrayList() { + { + add(new Parameter(StringPool.BLANK, Parameter.TYPES.TEXT_PLAIN, "Il testo del manuale (questa pagina)")); + } + }; + + private static String baseUrl = null; + + private static final JSONSerializer serializer = JSONFactoryUtil.createJSONSerializer(); + + public Manual(String description, String... methods) { + super(description, methods); + } + + @Override + public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { + + StringBuilder result = new StringBuilder(); + Iterator commands = CommandList.getList().iterator(); + while (commands.hasNext()) { + Command command = commands.next(); + result.append("Comando: /").append(command.getVerb()); + if (command.isSecure()) { + result.append(" [T]"); + } + result.append(StringPool.NEW_LINE); + result.append(command.getDescription()).append(StringPool.NEW_LINE); + result.append("Metodi: ").append(StringUtils.join(command.getMethods(), StringPool.COMMA_AND_SPACE)) + .append(StringPool.NEW_LINE); + result.append("Parametri:"); + List parameters = command.getInputParameters(); + if (parameters.isEmpty()) { + result.append(" Nessuno\n"); + } else { + result.append(StringPool.NEW_LINE); + for (Parameter parameter : parameters) { + result.append(StringPool.TAB).append(parameter.getName()); + if (parameter.isRequired()) { + result.append(StringPool.STAR); + } + result.append(" (").append(parameter.getType().toString()).append(") - ") + .append(parameter.getDescription()).append(StringPool.NEW_LINE); + } + } + parameters = command.getOutputParameters(); + if (!parameters.isEmpty()) { + result.append("Restituisce:\n"); + for (Parameter parameter : parameters) { + result.append(StringPool.TAB).append(parameter.getName()).append(" (") + .append(parameter.getType().toString()).append(") - ").append(parameter.getDescription()) + .append(StringPool.NEW_LINE); + if (parameter.getType().equals(Parameter.TYPES.ARRAY)) { + for (Parameter subParameter : parameter.getSubParameters()) { + result.append(StringPool.TAB).append(StringPool.TAB).append(subParameter.getName()) + .append(" (").append(subParameter.getType().toString()).append(") - ") + .append(subParameter.getDescription()).append(StringPool.NEW_LINE); + } + } + } + } + result.append("Esempio:\n").append(getCurlExample(command, getBaseUrl(request))); + if (commands.hasNext()) { + result.append("================================================================================\n"); + } + } + result.append("\nNote:\n[T] = Richiede token di autenticazione: header di richiesta \"") + .append(Parameters.X_AUTH_TOKEN).append("\" oppure parametro \"").append(Parameters.TOKEN) + .append("\"\n * = Parametro obbligatorio\n"); + setTextPlain(response); + ServletResponseUtil.write(response, result.toString()); + } + + protected String getCurlExample(Command command, String baseUrl) { + + StringBuilder sb = new StringBuilder(); + sb.append("\tcurl "); + if (command.isSecure()) { + sb.append("--header \"").append(Parameters.X_AUTH_TOKEN).append(": $TOKEN\"").append(" \\\n\t\t"); + } + if (command.getMethods().contains(HttpMethods.GET)) { + } else { + sb.append("--header \"Content-Type: application/json; charset=UTF-8\" \\\n\t\t"); + sb.append("--request POST \\\n\t\t"); + Map data = new LinkedHashMap<>(); + for (Parameter parameter : command.getInputParameters()) { + if (parameter.getType().equals(Parameter.TYPES.STRING)) { + String value = parameter.getName().substring(0, 1).toUpperCase() + parameter.getName().substring(1); + value = value.replaceAll("([A-Z])", " $1").substring(1); + data.put(parameter.getName(), value); + } else if (parameter.getType().equals(Parameter.TYPES.INTEGER)) { + data.put(parameter.getName(), 123456); + } else if (parameter.getType().equals(Parameter.TYPES.BOOLEAN)) { + data.put(parameter.getName(), true); + } + } + if (data.size() > 0) { + sb.append("--data '").append(serializer.serialize(data)).append("' \\\n\t\t"); + } + } + sb.append(StringPool.APOSTROPHE).append(baseUrl).append(command.getVerb()).append(StringPool.APOSTROPHE) + .append(StringPool.NEW_LINE); + return sb.toString(); + } + + protected String getBaseUrl(HttpServletRequest request) { + + if (null == baseUrl) { + StringBuilder sb = new StringBuilder(); + sb.append(request.isSecure() ? Http.HTTPS_WITH_SLASH : Http.HTTP_WITH_SLASH); + sb.append(request.getServerName()); + if ((request.isSecure() && (request.getServerPort() != Http.HTTPS_PORT)) + || (!request.isSecure() && (request.getServerPort() != Http.HTTP_PORT))) { + sb.append(StringPool.COLON).append(request.getServerPort()); + } + sb.append(request.getContextPath()).append(request.getServletPath()).append(StringPool.FORWARD_SLASH); + baseUrl = sb.toString(); + } + return baseUrl; + } + + @Override + public boolean isSecure() { + return false; + } + + @Override + public List getInputParameters() { + return EMPTY_PARAMETERS; + } + + @Override + public List getOutputParameters() { + return OUTPUT_PARAMETERS; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ManualHtml.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ManualHtml.java new file mode 100644 index 00000000..1fef85ca --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/ManualHtml.java @@ -0,0 +1,100 @@ +package it.mwg.sicilia.sue.api.v1.command.impl; + +import it.mwg.sicilia.sue.api.v1.Parameters; +import it.mwg.sicilia.sue.api.v1.command.Command; +import it.mwg.sicilia.sue.api.v1.command.CommandList; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; + +import com.liferay.portal.kernel.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.util.StringPool; + +public class ManualHtml extends Manual { + + @SuppressWarnings("serial") + private static final List OUTPUT_PARAMETERS = new ArrayList() { + { + add(new Parameter(StringPool.BLANK, Parameter.TYPES.TEXT_HTML, "Il testo del manuale (questa pagina)")); + } + }; + + public ManualHtml(String description, String... methods) { + super(description, methods); + } + + @Override + public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { + + String cssFile = "/css/api/v1/api.css"; + StringBuilder result = new StringBuilder(); + result.append("").append("") + .append("") + .append("Manual").append("") + .append(""); + for (Command command : CommandList.getList()) { + result.append("
Comando: /").append(command.getVerb()).append(""); + if (command.isSecure()) { + result.append(" [T]"); + } + result.append("
").append(command.getDescription()).append(".
"); + result.append("
Metodi: ") + .append(StringUtils.join(command.getMethods(), StringPool.COMMA_AND_SPACE)).append("
"); + result.append("
Parametri:"); + List parameters = command.getInputParameters(); + if (parameters.isEmpty()) { + result.append(" Nessuno
"); + } else { + for (Parameter parameter : parameters) { + result.append("
").append(parameter.getName()); + if (parameter.isRequired()) { + result.append(StringPool.STAR); + } + result.append(" (").append(parameter.getType().toString()).append(") - ") + .append(parameter.getDescription()).append("
"); + } + result.append("
"); + } + parameters = command.getOutputParameters(); + if (!parameters.isEmpty()) { + result.append("
Restituisce:"); + for (Parameter parameter : parameters) { + result.append("
").append(parameter.getName()).append(" (") + .append(parameter.getType().toString()).append(") - ").append(parameter.getDescription()); + if (parameter.getType().equals(Parameter.TYPES.ARRAY)) { + for (Parameter subParameter : parameter.getSubParameters()) { + result.append("
").append(subParameter.getName()).append(" (") + .append(subParameter.getType().toString()).append(") - ") + .append(subParameter.getDescription()).append("
"); + } + } + result.append("
"); + } + result.append("
"); + } + result.append("
Esempio:
").append(getCurlExample(command, getBaseUrl(request)))
+					.append("
"); + result.append(""); // class="command" + } + result.append("
Note:
[T] = Richiede token di autenticazione: header di richiesta \"") + .append(Parameters.X_AUTH_TOKEN).append("\" oppure parametro \"").append(Parameters.TOKEN) + .append("\"
* = Parametro obbligatorio
"); + result.append(""); + setTextHtml(response); + ServletResponseUtil.write(response, result.toString()); + } + + @Override + public List getOutputParameters() { + return OUTPUT_PARAMETERS; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Nop.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Nop.java new file mode 100644 index 00000000..81621868 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/command/impl/Nop.java @@ -0,0 +1,44 @@ +package it.mwg.sicilia.sue.api.v1.command.impl; + +import it.mwg.sicilia.sue.api.v1.Response; +import it.mwg.sicilia.sue.api.v1.Status; +import it.mwg.sicilia.sue.api.v1.command.Command; +import it.mwg.sicilia.sue.api.v1.parameter.Parameter; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.liferay.portal.kernel.servlet.ServletResponseUtil; +import com.liferay.portal.kernel.util.StringPool; + +public class Nop extends Command { + + public Nop(String description, String... methods) { + super(description, methods); + } + + @Override + protected String getCommandName() { + return StringPool.BLANK; + } + + @Override + public void run(HttpServletRequest request, HttpServletResponse response) throws Exception { + + if (verifyAccessToken(request, response)) { + ServletResponseUtil.write(response, Response.get(Status.OK)); + } + } + + @Override + public List getInputParameters() { + return EMPTY_PARAMETERS; + } + + @Override + public List getOutputParameters() { + return BASE_OUTPUT_PARAMETERS; + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/parameter/Parameter.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/parameter/Parameter.java new file mode 100644 index 00000000..07ab89cf --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/parameter/Parameter.java @@ -0,0 +1,61 @@ +package it.mwg.sicilia.sue.api.v1.parameter; + +import java.util.ArrayList; +import java.util.List; + +public class Parameter { + + private String name; + private TYPES type; + private String description; + private boolean required; + private List subParameters = null; + + public Parameter(String name, TYPES type, String description, boolean required) { + + this.name = name; + this.type = type; + this.description = description; + this.required = required; + } + + public Parameter(String name, TYPES type, String description) { + + this.name = name; + this.type = type; + this.description = description; + this.required = true; + } + + public String getName() { + return name; + } + + public TYPES getType() { + return type; + } + + public String getDescription() { + return description; + } + + public boolean isRequired() { + return required; + } + + public void addSubParameter(Parameter parameter) { + + if (null == subParameters) { + subParameters = new ArrayList<>(); + } + subParameters.add(parameter); + } + + public List getSubParameters() { + return subParameters; + } + + public static enum TYPES { + ARRAY, BOOLEAN, INTEGER, STRING, TEXT_HTML, TEXT_PLAIN + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingBaseImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingBaseImpl.java new file mode 100644 index 00000000..89584fef --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingBaseImpl.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.model.impl; + +import com.liferay.portal.kernel.exception.SystemException; + +import it.mwg.sicilia.sue.model.ApiSetting; +import it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil; + +/** + * The extended model base implementation for the ApiSetting service. Represents a row in the "sicilia_sue_ApiSetting" database table, with each column mapped to a property of this class. + * + *

+ * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link ApiSettingImpl}. + *

+ * + * @author Manifattura Web Group Srl + * @see ApiSettingImpl + * @see it.mwg.sicilia.sue.model.ApiSetting + * @generated + */ +public abstract class ApiSettingBaseImpl extends ApiSettingModelImpl + implements ApiSetting { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a api setting model instance should use the {@link ApiSetting} interface instead. + */ + @Override + public void persist() throws SystemException { + if (this.isNew()) { + ApiSettingLocalServiceUtil.addApiSetting(this); + } + else { + ApiSettingLocalServiceUtil.updateApiSetting(this); + } + } +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingCacheModel.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingCacheModel.java new file mode 100644 index 00000000..1f3d3910 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingCacheModel.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.model.impl; + +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.model.CacheModel; + +import it.mwg.sicilia.sue.model.ApiSetting; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +/** + * The cache model class for representing ApiSetting in entity cache. + * + * @author Manifattura Web Group Srl + * @see ApiSetting + * @generated + */ +public class ApiSettingCacheModel implements CacheModel, + Externalizable { + @Override + public String toString() { + StringBundler sb = new StringBundler(9); + + sb.append("{id="); + sb.append(id); + sb.append(", companyId="); + sb.append(companyId); + sb.append(", key="); + sb.append(key); + sb.append(", value="); + sb.append(value); + sb.append("}"); + + return sb.toString(); + } + + @Override + public ApiSetting toEntityModel() { + ApiSettingImpl apiSettingImpl = new ApiSettingImpl(); + + apiSettingImpl.setId(id); + apiSettingImpl.setCompanyId(companyId); + apiSettingImpl.setKey(key); + + if (value == null) { + apiSettingImpl.setValue(StringPool.BLANK); + } + else { + apiSettingImpl.setValue(value); + } + + apiSettingImpl.resetOriginalValues(); + + return apiSettingImpl; + } + + @Override + public void readExternal(ObjectInput objectInput) throws IOException { + id = objectInput.readLong(); + companyId = objectInput.readLong(); + key = objectInput.readLong(); + value = objectInput.readUTF(); + } + + @Override + public void writeExternal(ObjectOutput objectOutput) + throws IOException { + objectOutput.writeLong(id); + objectOutput.writeLong(companyId); + objectOutput.writeLong(key); + + if (value == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(value); + } + } + + public long id; + public long companyId; + public long key; + public String value; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingImpl.java new file mode 100644 index 00000000..f85dec6c --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingImpl.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.model.impl; + +/** + * The extended model implementation for the ApiSetting service. Represents a row in the + * "sicilia_sue_ApiSetting" database table, with each column mapped to a property of this class. + * + *

+ * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun + * ServiceBuilder to copy their definitions into the {@link it.mwg.sicilia.sue.model.ApiSetting} interface. + *

+ * + * @author Manifattura Web Group Srl + */ +@SuppressWarnings("serial") +public class ApiSettingImpl extends ApiSettingBaseImpl { + /* + * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a api setting model instance + * should use the {@link it.mwg.sicilia.sue.model.ApiSetting} interface instead. + */ + public ApiSettingImpl() { + } +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingModelImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingModelImpl.java new file mode 100644 index 00000000..fc4b84bd --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingModelImpl.java @@ -0,0 +1,460 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.model.impl; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.json.JSON; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.model.impl.BaseModelImpl; +import com.liferay.portal.service.ServiceContext; + +import com.liferay.portlet.expando.model.ExpandoBridge; +import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil; + +import it.mwg.sicilia.sue.model.ApiSetting; +import it.mwg.sicilia.sue.model.ApiSettingModel; +import it.mwg.sicilia.sue.model.ApiSettingSoap; + +import java.io.Serializable; + +import java.sql.Types; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * The base model implementation for the ApiSetting service. Represents a row in the "sicilia_sue_ApiSetting" database table, with each column mapped to a property of this class. + * + *

+ * This implementation and its corresponding interface {@link it.mwg.sicilia.sue.model.ApiSettingModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link ApiSettingImpl}. + *

+ * + * @author Manifattura Web Group Srl + * @see ApiSettingImpl + * @see it.mwg.sicilia.sue.model.ApiSetting + * @see it.mwg.sicilia.sue.model.ApiSettingModel + * @generated + */ +@JSON(strict = true) +public class ApiSettingModelImpl extends BaseModelImpl + implements ApiSettingModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a api setting model instance should use the {@link it.mwg.sicilia.sue.model.ApiSetting} interface instead. + */ + public static final String TABLE_NAME = "sicilia_sue_ApiSetting"; + public static final Object[][] TABLE_COLUMNS = { + { "id_", Types.BIGINT }, + { "companyId", Types.BIGINT }, + { "key_", Types.BIGINT }, + { "value", Types.VARCHAR } + }; + public static final String TABLE_SQL_CREATE = "create table sicilia_sue_ApiSetting (id_ LONG not null primary key,companyId LONG,key_ LONG,value STRING null)"; + public static final String TABLE_SQL_DROP = "drop table sicilia_sue_ApiSetting"; + public static final String ORDER_BY_JPQL = " ORDER BY apiSetting.id ASC"; + public static final String ORDER_BY_SQL = " ORDER BY sicilia_sue_ApiSetting.id_ ASC"; + public static final String DATA_SOURCE = "liferayDataSource"; + public static final String SESSION_FACTORY = "liferaySessionFactory"; + public static final String TX_MANAGER = "liferayTransactionManager"; + public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( + "value.object.entity.cache.enabled.it.mwg.sicilia.sue.model.ApiSetting"), + true); + public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( + "value.object.finder.cache.enabled.it.mwg.sicilia.sue.model.ApiSetting"), + true); + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( + "value.object.column.bitmask.enabled.it.mwg.sicilia.sue.model.ApiSetting"), + true); + public static long COMPANYID_COLUMN_BITMASK = 1L; + public static long KEY_COLUMN_BITMASK = 2L; + public static long ID_COLUMN_BITMASK = 4L; + + /** + * Converts the soap model instance into a normal model instance. + * + * @param soapModel the soap model instance to convert + * @return the normal model instance + */ + public static ApiSetting toModel(ApiSettingSoap soapModel) { + if (soapModel == null) { + return null; + } + + ApiSetting model = new ApiSettingImpl(); + + model.setId(soapModel.getId()); + model.setCompanyId(soapModel.getCompanyId()); + model.setKey(soapModel.getKey()); + model.setValue(soapModel.getValue()); + + return model; + } + + /** + * Converts the soap model instances into normal model instances. + * + * @param soapModels the soap model instances to convert + * @return the normal model instances + */ + public static List toModels(ApiSettingSoap[] soapModels) { + if (soapModels == null) { + return null; + } + + List models = new ArrayList(soapModels.length); + + for (ApiSettingSoap soapModel : soapModels) { + models.add(toModel(soapModel)); + } + + return models; + } + + public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get( + "lock.expiration.time.it.mwg.sicilia.sue.model.ApiSetting")); + + public ApiSettingModelImpl() { + } + + @Override + public long getPrimaryKey() { + return _id; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _id; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Class getModelClass() { + return ApiSetting.class; + } + + @Override + public String getModelClassName() { + return ApiSetting.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("id", getId()); + attributes.put("companyId", getCompanyId()); + attributes.put("key", getKey()); + attributes.put("value", getValue()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + Long id = (Long)attributes.get("id"); + + if (id != null) { + setId(id); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Long key = (Long)attributes.get("key"); + + if (key != null) { + setKey(key); + } + + String value = (String)attributes.get("value"); + + if (value != null) { + setValue(value); + } + } + + @JSON + @Override + public long getId() { + return _id; + } + + @Override + public void setId(long id) { + _id = id; + } + + @JSON + @Override + public long getCompanyId() { + return _companyId; + } + + @Override + public void setCompanyId(long companyId) { + _columnBitmask |= COMPANYID_COLUMN_BITMASK; + + if (!_setOriginalCompanyId) { + _setOriginalCompanyId = true; + + _originalCompanyId = _companyId; + } + + _companyId = companyId; + } + + public long getOriginalCompanyId() { + return _originalCompanyId; + } + + @JSON + @Override + public long getKey() { + return _key; + } + + @Override + public void setKey(long key) { + _columnBitmask |= KEY_COLUMN_BITMASK; + + if (!_setOriginalKey) { + _setOriginalKey = true; + + _originalKey = _key; + } + + _key = key; + } + + public long getOriginalKey() { + return _originalKey; + } + + @JSON + @Override + public String getValue() { + if (_value == null) { + return StringPool.BLANK; + } + else { + return _value; + } + } + + @Override + public void setValue(String value) { + _value = value; + } + + public long getColumnBitmask() { + return _columnBitmask; + } + + @Override + public ExpandoBridge getExpandoBridge() { + return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), + ApiSetting.class.getName(), getPrimaryKey()); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + ExpandoBridge expandoBridge = getExpandoBridge(); + + expandoBridge.setAttributes(serviceContext); + } + + @Override + public ApiSetting toEscapedModel() { + if (_escapedModel == null) { + _escapedModel = (ApiSetting)ProxyUtil.newProxyInstance(_classLoader, + _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); + } + + return _escapedModel; + } + + @Override + public Object clone() { + ApiSettingImpl apiSettingImpl = new ApiSettingImpl(); + + apiSettingImpl.setId(getId()); + apiSettingImpl.setCompanyId(getCompanyId()); + apiSettingImpl.setKey(getKey()); + apiSettingImpl.setValue(getValue()); + + apiSettingImpl.resetOriginalValues(); + + return apiSettingImpl; + } + + @Override + public int compareTo(ApiSetting apiSetting) { + long primaryKey = apiSetting.getPrimaryKey(); + + if (getPrimaryKey() < primaryKey) { + return -1; + } + else if (getPrimaryKey() > primaryKey) { + return 1; + } + else { + return 0; + } + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof ApiSetting)) { + return false; + } + + ApiSetting apiSetting = (ApiSetting)obj; + + long primaryKey = apiSetting.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public void resetOriginalValues() { + ApiSettingModelImpl apiSettingModelImpl = this; + + apiSettingModelImpl._originalCompanyId = apiSettingModelImpl._companyId; + + apiSettingModelImpl._setOriginalCompanyId = false; + + apiSettingModelImpl._originalKey = apiSettingModelImpl._key; + + apiSettingModelImpl._setOriginalKey = false; + + apiSettingModelImpl._columnBitmask = 0; + } + + @Override + public CacheModel toCacheModel() { + ApiSettingCacheModel apiSettingCacheModel = new ApiSettingCacheModel(); + + apiSettingCacheModel.id = getId(); + + apiSettingCacheModel.companyId = getCompanyId(); + + apiSettingCacheModel.key = getKey(); + + apiSettingCacheModel.value = getValue(); + + String value = apiSettingCacheModel.value; + + if ((value != null) && (value.length() == 0)) { + apiSettingCacheModel.value = null; + } + + return apiSettingCacheModel; + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(9); + + sb.append("{id="); + sb.append(getId()); + sb.append(", companyId="); + sb.append(getCompanyId()); + sb.append(", key="); + sb.append(getKey()); + sb.append(", value="); + sb.append(getValue()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(16); + + sb.append(""); + sb.append("it.mwg.sicilia.sue.model.ApiSetting"); + sb.append(""); + + sb.append( + "id"); + sb.append( + "companyId"); + sb.append( + "key"); + sb.append( + "value"); + + sb.append(""); + + return sb.toString(); + } + + private static ClassLoader _classLoader = ApiSetting.class.getClassLoader(); + private static Class[] _escapedModelInterfaces = new Class[] { + ApiSetting.class + }; + private long _id; + private long _companyId; + private long _originalCompanyId; + private boolean _setOriginalCompanyId; + private long _key; + private long _originalKey; + private boolean _setOriginalKey; + private String _value; + private long _columnBitmask; + private ApiSetting _escapedModel; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloCacheModel.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloCacheModel.java index 433694e4..f6b7deba 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloCacheModel.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloCacheModel.java @@ -38,7 +38,7 @@ public class SportelloCacheModel implements CacheModel, Externalizable { @Override public String toString() { - StringBundler sb = new StringBundler(15); + StringBundler sb = new StringBundler(35); sb.append("{sportelloId="); sb.append(sportelloId); @@ -46,14 +46,34 @@ public class SportelloCacheModel implements CacheModel, sb.append(groupId); sb.append(", companyId="); sb.append(companyId); - sb.append(", userId="); - sb.append(userId); - sb.append(", userName="); - sb.append(userName); sb.append(", createDate="); sb.append(createDate); + sb.append(", createUserId="); + sb.append(createUserId); + sb.append(", createUserName="); + sb.append(createUserName); sb.append(", modifiedDate="); sb.append(modifiedDate); + sb.append(", modifiedUserId="); + sb.append(modifiedUserId); + sb.append(", modifiedUserName="); + sb.append(modifiedUserName); + sb.append(", userName="); + sb.append(userName); + sb.append(", email="); + sb.append(email); + sb.append(", comuneId="); + sb.append(comuneId); + sb.append(", attivo="); + sb.append(attivo); + sb.append(", password="); + sb.append(password); + sb.append(", passwordModifiedDate="); + sb.append(passwordModifiedDate); + sb.append(", passwordModifiedUserId="); + sb.append(passwordModifiedUserId); + sb.append(", passwordModifiedUserName="); + sb.append(passwordModifiedUserName); sb.append("}"); return sb.toString(); @@ -66,20 +86,21 @@ public class SportelloCacheModel implements CacheModel, sportelloImpl.setSportelloId(sportelloId); sportelloImpl.setGroupId(groupId); sportelloImpl.setCompanyId(companyId); - sportelloImpl.setUserId(userId); - if (userName == null) { - sportelloImpl.setUserName(StringPool.BLANK); + if (createDate == Long.MIN_VALUE) { + sportelloImpl.setCreateDate(null); } else { - sportelloImpl.setUserName(userName); + sportelloImpl.setCreateDate(new Date(createDate)); } - if (createDate == Long.MIN_VALUE) { - sportelloImpl.setCreateDate(null); + sportelloImpl.setCreateUserId(createUserId); + + if (createUserName == null) { + sportelloImpl.setCreateUserName(StringPool.BLANK); } else { - sportelloImpl.setCreateDate(new Date(createDate)); + sportelloImpl.setCreateUserName(createUserName); } if (modifiedDate == Long.MIN_VALUE) { @@ -89,6 +110,55 @@ public class SportelloCacheModel implements CacheModel, sportelloImpl.setModifiedDate(new Date(modifiedDate)); } + sportelloImpl.setModifiedUserId(modifiedUserId); + + if (modifiedUserName == null) { + sportelloImpl.setModifiedUserName(StringPool.BLANK); + } + else { + sportelloImpl.setModifiedUserName(modifiedUserName); + } + + if (userName == null) { + sportelloImpl.setUserName(StringPool.BLANK); + } + else { + sportelloImpl.setUserName(userName); + } + + if (email == null) { + sportelloImpl.setEmail(StringPool.BLANK); + } + else { + sportelloImpl.setEmail(email); + } + + sportelloImpl.setComuneId(comuneId); + sportelloImpl.setAttivo(attivo); + + if (password == null) { + sportelloImpl.setPassword(StringPool.BLANK); + } + else { + sportelloImpl.setPassword(password); + } + + if (passwordModifiedDate == Long.MIN_VALUE) { + sportelloImpl.setPasswordModifiedDate(null); + } + else { + sportelloImpl.setPasswordModifiedDate(new Date(passwordModifiedDate)); + } + + sportelloImpl.setPasswordModifiedUserId(passwordModifiedUserId); + + if (passwordModifiedUserName == null) { + sportelloImpl.setPasswordModifiedUserName(StringPool.BLANK); + } + else { + sportelloImpl.setPasswordModifiedUserName(passwordModifiedUserName); + } + sportelloImpl.resetOriginalValues(); return sportelloImpl; @@ -99,10 +169,20 @@ public class SportelloCacheModel implements CacheModel, sportelloId = objectInput.readLong(); groupId = objectInput.readLong(); companyId = objectInput.readLong(); - userId = objectInput.readLong(); - userName = objectInput.readUTF(); createDate = objectInput.readLong(); + createUserId = objectInput.readLong(); + createUserName = objectInput.readUTF(); modifiedDate = objectInput.readLong(); + modifiedUserId = objectInput.readLong(); + modifiedUserName = objectInput.readUTF(); + userName = objectInput.readUTF(); + email = objectInput.readUTF(); + comuneId = objectInput.readLong(); + attivo = objectInput.readBoolean(); + password = objectInput.readUTF(); + passwordModifiedDate = objectInput.readLong(); + passwordModifiedUserId = objectInput.readLong(); + passwordModifiedUserName = objectInput.readUTF(); } @Override @@ -111,7 +191,25 @@ public class SportelloCacheModel implements CacheModel, objectOutput.writeLong(sportelloId); objectOutput.writeLong(groupId); objectOutput.writeLong(companyId); - objectOutput.writeLong(userId); + objectOutput.writeLong(createDate); + objectOutput.writeLong(createUserId); + + if (createUserName == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(createUserName); + } + + objectOutput.writeLong(modifiedDate); + objectOutput.writeLong(modifiedUserId); + + if (modifiedUserName == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(modifiedUserName); + } if (userName == null) { objectOutput.writeUTF(StringPool.BLANK); @@ -120,15 +218,49 @@ public class SportelloCacheModel implements CacheModel, objectOutput.writeUTF(userName); } - objectOutput.writeLong(createDate); - objectOutput.writeLong(modifiedDate); + if (email == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(email); + } + + objectOutput.writeLong(comuneId); + objectOutput.writeBoolean(attivo); + + if (password == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(password); + } + + objectOutput.writeLong(passwordModifiedDate); + objectOutput.writeLong(passwordModifiedUserId); + + if (passwordModifiedUserName == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(passwordModifiedUserName); + } } public long sportelloId; public long groupId; public long companyId; - public long userId; - public String userName; public long createDate; + public long createUserId; + public String createUserName; public long modifiedDate; + public long modifiedUserId; + public String modifiedUserName; + public String userName; + public String email; + public long comuneId; + public boolean attivo; + public String password; + public long passwordModifiedDate; + public long passwordModifiedUserId; + public String passwordModifiedUserName; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloImpl.java index 395857db..c29ccb3e 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloImpl.java @@ -14,11 +14,32 @@ package it.mwg.sicilia.sue.model.impl; +import it.mwg.sicilia.sue.api.v1.ApiConstants; +import it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil; +import it.tref.liferay.portos.bo.model.Comune; +import it.tref.liferay.portos.bo.model.Provincia; +import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil; +import it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil; + +import java.util.Date; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.model.User; + /** - * The extended model implementation for the Sportello service. Represents a row in the "sicilia_sue_Sportello" database table, with each column mapped to a property of this class. + * The extended model implementation for the Sportello service. Represents a row in the + * "sicilia_sue_Sportello" database table, with each column mapped to a property of this class. * *

- * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.mwg.sicilia.sue.model.Sportello} interface. + * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun + * ServiceBuilder to copy their definitions into the {@link it.mwg.sicilia.sue.model.Sportello} interface. *

* * @author Manifattura Web Group Srl @@ -26,10 +47,79 @@ package it.mwg.sicilia.sue.model.impl; @SuppressWarnings("serial") public class SportelloImpl extends SportelloBaseImpl { /* - * NOTE FOR DEVELOPERS: - * - * Never reference this class directly. All methods that expect a sportello model instance should use the {@link it.mwg.sicilia.sue.model.Sportello} interface instead. + * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a sportello model instance + * should use the {@link it.mwg.sicilia.sue.model.Sportello} interface instead. */ + private Comune comune = null; + private Provincia provincia = null; + + private static final Log _log = LogFactoryUtil.getLog(SportelloImpl.class); + public SportelloImpl() { } + + @Override + public String encryptPassword(String password) { + + String encrypted = StringPool.BLANK; + try { + encrypted = DigestUtils.sha256Hex(getSportelloId() + + ApiSettingLocalServiceUtil.get(getCompanyId(), ApiConstants.API_SECRET) + password); + } catch (SystemException e) { + } + return encrypted; + } + + @Override + public boolean checkPassword(String password) { + + return encryptPassword(password).equals(getPassword()); + } + + @Override + public void setEncryptedPassword(String password, User user) { + + String encrypted = encryptPassword(password); + if (!encrypted.equals(getPassword())) { + setPassword(encrypted); + setPasswordModifiedDate(new Date()); + setPasswordModifiedUserId(user.getUserId()); + setPasswordModifiedUserName(user.getFullName()); + } + }; + + @Override + public String getCodiceProvincia() throws PortalException, SystemException { + + return getComune().getCodiceProvincia(); + } + + @Override + public String getNomeComune() throws PortalException, SystemException { + + return getComune().getDenominazione(); + } + + @Override + public String getNomeProvincia() throws SystemException, PortalException { + + return getProvincia().getProvincia(); + } + + public synchronized Comune getComune() throws PortalException, SystemException { + + if (Validator.isNull(comune)) { + comune = ComuneLocalServiceUtil.getComune(getComuneId()); + } + return comune; + } + + private synchronized Provincia getProvincia() throws SystemException, PortalException { + + if (Validator.isNull(provincia)) { + provincia = ProvinciaLocalServiceUtil.fetchByC_C(getComune().getCompanyId(), getComune() + .getCodiceProvincia()); + } + return provincia; + } } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloModelImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloModelImpl.java index 9d5542bc..704d901b 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloModelImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloModelImpl.java @@ -69,12 +69,22 @@ public class SportelloModelImpl extends BaseModelImpl { "sportelloId", Types.BIGINT }, { "groupId", Types.BIGINT }, { "companyId", Types.BIGINT }, - { "userId", Types.BIGINT }, - { "userName", Types.VARCHAR }, { "createDate", Types.TIMESTAMP }, - { "modifiedDate", Types.TIMESTAMP } + { "createUserId", Types.BIGINT }, + { "createUserName", Types.VARCHAR }, + { "modifiedDate", Types.TIMESTAMP }, + { "modifiedUserId", Types.BIGINT }, + { "modifiedUserName", Types.VARCHAR }, + { "userName", Types.VARCHAR }, + { "email", Types.VARCHAR }, + { "comuneId", Types.BIGINT }, + { "attivo", Types.BOOLEAN }, + { "password_", Types.VARCHAR }, + { "passwordModifiedDate", Types.TIMESTAMP }, + { "passwordModifiedUserId", Types.BIGINT }, + { "passwordModifiedUserName", Types.VARCHAR } }; - public static final String TABLE_SQL_CREATE = "create table sicilia_sue_Sportello (sportelloId LONG not null primary key,groupId LONG,companyId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null)"; + public static final String TABLE_SQL_CREATE = "create table sicilia_sue_Sportello (sportelloId LONG not null primary key,groupId LONG,companyId LONG,createDate DATE null,createUserId LONG,createUserName VARCHAR(75) null,modifiedDate DATE null,modifiedUserId LONG,modifiedUserName VARCHAR(75) null,userName VARCHAR(75) null,email VARCHAR(240) null,comuneId LONG,attivo BOOLEAN,password_ VARCHAR(75) null,passwordModifiedDate DATE null,passwordModifiedUserId LONG,passwordModifiedUserName VARCHAR(240) null)"; public static final String TABLE_SQL_DROP = "drop table sicilia_sue_Sportello"; public static final String ORDER_BY_JPQL = " ORDER BY sportello.sportelloId ASC"; public static final String ORDER_BY_SQL = " ORDER BY sicilia_sue_Sportello.sportelloId ASC"; @@ -87,7 +97,12 @@ public class SportelloModelImpl extends BaseModelImpl public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( "value.object.finder.cache.enabled.it.mwg.sicilia.sue.model.Sportello"), true); - public static final boolean COLUMN_BITMASK_ENABLED = false; + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( + "value.object.column.bitmask.enabled.it.mwg.sicilia.sue.model.Sportello"), + true); + public static long COMUNEID_COLUMN_BITMASK = 1L; + public static long USERNAME_COLUMN_BITMASK = 2L; + public static long SPORTELLOID_COLUMN_BITMASK = 4L; /** * Converts the soap model instance into a normal model instance. @@ -105,10 +120,20 @@ public class SportelloModelImpl extends BaseModelImpl model.setSportelloId(soapModel.getSportelloId()); model.setGroupId(soapModel.getGroupId()); model.setCompanyId(soapModel.getCompanyId()); - model.setUserId(soapModel.getUserId()); - model.setUserName(soapModel.getUserName()); model.setCreateDate(soapModel.getCreateDate()); + model.setCreateUserId(soapModel.getCreateUserId()); + model.setCreateUserName(soapModel.getCreateUserName()); model.setModifiedDate(soapModel.getModifiedDate()); + model.setModifiedUserId(soapModel.getModifiedUserId()); + model.setModifiedUserName(soapModel.getModifiedUserName()); + model.setUserName(soapModel.getUserName()); + model.setEmail(soapModel.getEmail()); + model.setComuneId(soapModel.getComuneId()); + model.setAttivo(soapModel.getAttivo()); + model.setPassword(soapModel.getPassword()); + model.setPasswordModifiedDate(soapModel.getPasswordModifiedDate()); + model.setPasswordModifiedUserId(soapModel.getPasswordModifiedUserId()); + model.setPasswordModifiedUserName(soapModel.getPasswordModifiedUserName()); return model; } @@ -176,10 +201,20 @@ public class SportelloModelImpl extends BaseModelImpl attributes.put("sportelloId", getSportelloId()); attributes.put("groupId", getGroupId()); attributes.put("companyId", getCompanyId()); - attributes.put("userId", getUserId()); - attributes.put("userName", getUserName()); attributes.put("createDate", getCreateDate()); + attributes.put("createUserId", getCreateUserId()); + attributes.put("createUserName", getCreateUserName()); attributes.put("modifiedDate", getModifiedDate()); + attributes.put("modifiedUserId", getModifiedUserId()); + attributes.put("modifiedUserName", getModifiedUserName()); + attributes.put("userName", getUserName()); + attributes.put("email", getEmail()); + attributes.put("comuneId", getComuneId()); + attributes.put("attivo", getAttivo()); + attributes.put("password", getPassword()); + attributes.put("passwordModifiedDate", getPasswordModifiedDate()); + attributes.put("passwordModifiedUserId", getPasswordModifiedUserId()); + attributes.put("passwordModifiedUserName", getPasswordModifiedUserName()); return attributes; } @@ -204,22 +239,22 @@ public class SportelloModelImpl extends BaseModelImpl setCompanyId(companyId); } - Long userId = (Long)attributes.get("userId"); + Date createDate = (Date)attributes.get("createDate"); - if (userId != null) { - setUserId(userId); + if (createDate != null) { + setCreateDate(createDate); } - String userName = (String)attributes.get("userName"); + Long createUserId = (Long)attributes.get("createUserId"); - if (userName != null) { - setUserName(userName); + if (createUserId != null) { + setCreateUserId(createUserId); } - Date createDate = (Date)attributes.get("createDate"); + String createUserName = (String)attributes.get("createUserName"); - if (createDate != null) { - setCreateDate(createDate); + if (createUserName != null) { + setCreateUserName(createUserName); } Date modifiedDate = (Date)attributes.get("modifiedDate"); @@ -227,6 +262,68 @@ public class SportelloModelImpl extends BaseModelImpl if (modifiedDate != null) { setModifiedDate(modifiedDate); } + + Long modifiedUserId = (Long)attributes.get("modifiedUserId"); + + if (modifiedUserId != null) { + setModifiedUserId(modifiedUserId); + } + + String modifiedUserName = (String)attributes.get("modifiedUserName"); + + if (modifiedUserName != null) { + setModifiedUserName(modifiedUserName); + } + + String userName = (String)attributes.get("userName"); + + if (userName != null) { + setUserName(userName); + } + + String email = (String)attributes.get("email"); + + if (email != null) { + setEmail(email); + } + + Long comuneId = (Long)attributes.get("comuneId"); + + if (comuneId != null) { + setComuneId(comuneId); + } + + Boolean attivo = (Boolean)attributes.get("attivo"); + + if (attivo != null) { + setAttivo(attivo); + } + + String password = (String)attributes.get("password"); + + if (password != null) { + setPassword(password); + } + + Date passwordModifiedDate = (Date)attributes.get("passwordModifiedDate"); + + if (passwordModifiedDate != null) { + setPasswordModifiedDate(passwordModifiedDate); + } + + Long passwordModifiedUserId = (Long)attributes.get( + "passwordModifiedUserId"); + + if (passwordModifiedUserId != null) { + setPasswordModifiedUserId(passwordModifiedUserId); + } + + String passwordModifiedUserName = (String)attributes.get( + "passwordModifiedUserName"); + + if (passwordModifiedUserName != null) { + setPasswordModifiedUserName(passwordModifiedUserName); + } } @JSON @@ -264,23 +361,100 @@ public class SportelloModelImpl extends BaseModelImpl @JSON @Override - public long getUserId() { - return _userId; + public Date getCreateDate() { + return _createDate; + } + + @Override + public void setCreateDate(Date createDate) { + _createDate = createDate; + } + + @JSON + @Override + public long getCreateUserId() { + return _createUserId; } @Override - public void setUserId(long userId) { - _userId = userId; + public void setCreateUserId(long createUserId) { + _createUserId = createUserId; } @Override - public String getUserUuid() throws SystemException { - return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid); + public String getCreateUserUuid() throws SystemException { + return PortalUtil.getUserValue(getCreateUserId(), "uuid", + _createUserUuid); } @Override - public void setUserUuid(String userUuid) { - _userUuid = userUuid; + public void setCreateUserUuid(String createUserUuid) { + _createUserUuid = createUserUuid; + } + + @JSON + @Override + public String getCreateUserName() { + if (_createUserName == null) { + return StringPool.BLANK; + } + else { + return _createUserName; + } + } + + @Override + public void setCreateUserName(String createUserName) { + _createUserName = createUserName; + } + + @JSON + @Override + public Date getModifiedDate() { + return _modifiedDate; + } + + @Override + public void setModifiedDate(Date modifiedDate) { + _modifiedDate = modifiedDate; + } + + @JSON + @Override + public long getModifiedUserId() { + return _modifiedUserId; + } + + @Override + public void setModifiedUserId(long modifiedUserId) { + _modifiedUserId = modifiedUserId; + } + + @Override + public String getModifiedUserUuid() throws SystemException { + return PortalUtil.getUserValue(getModifiedUserId(), "uuid", + _modifiedUserUuid); + } + + @Override + public void setModifiedUserUuid(String modifiedUserUuid) { + _modifiedUserUuid = modifiedUserUuid; + } + + @JSON + @Override + public String getModifiedUserName() { + if (_modifiedUserName == null) { + return StringPool.BLANK; + } + else { + return _modifiedUserName; + } + } + + @Override + public void setModifiedUserName(String modifiedUserName) { + _modifiedUserName = modifiedUserName; } @JSON @@ -296,29 +470,141 @@ public class SportelloModelImpl extends BaseModelImpl @Override public void setUserName(String userName) { + _columnBitmask |= USERNAME_COLUMN_BITMASK; + + if (_originalUserName == null) { + _originalUserName = _userName; + } + _userName = userName; } + public String getOriginalUserName() { + return GetterUtil.getString(_originalUserName); + } + @JSON @Override - public Date getCreateDate() { - return _createDate; + public String getEmail() { + if (_email == null) { + return StringPool.BLANK; + } + else { + return _email; + } } @Override - public void setCreateDate(Date createDate) { - _createDate = createDate; + public void setEmail(String email) { + _email = email; } @JSON @Override - public Date getModifiedDate() { - return _modifiedDate; + public long getComuneId() { + return _comuneId; } @Override - public void setModifiedDate(Date modifiedDate) { - _modifiedDate = modifiedDate; + public void setComuneId(long comuneId) { + _columnBitmask |= COMUNEID_COLUMN_BITMASK; + + if (!_setOriginalComuneId) { + _setOriginalComuneId = true; + + _originalComuneId = _comuneId; + } + + _comuneId = comuneId; + } + + public long getOriginalComuneId() { + return _originalComuneId; + } + + @JSON + @Override + public boolean getAttivo() { + return _attivo; + } + + @Override + public boolean isAttivo() { + return _attivo; + } + + @Override + public void setAttivo(boolean attivo) { + _attivo = attivo; + } + + @JSON + @Override + public String getPassword() { + if (_password == null) { + return StringPool.BLANK; + } + else { + return _password; + } + } + + @Override + public void setPassword(String password) { + _password = password; + } + + @JSON + @Override + public Date getPasswordModifiedDate() { + return _passwordModifiedDate; + } + + @Override + public void setPasswordModifiedDate(Date passwordModifiedDate) { + _passwordModifiedDate = passwordModifiedDate; + } + + @JSON + @Override + public long getPasswordModifiedUserId() { + return _passwordModifiedUserId; + } + + @Override + public void setPasswordModifiedUserId(long passwordModifiedUserId) { + _passwordModifiedUserId = passwordModifiedUserId; + } + + @Override + public String getPasswordModifiedUserUuid() throws SystemException { + return PortalUtil.getUserValue(getPasswordModifiedUserId(), "uuid", + _passwordModifiedUserUuid); + } + + @Override + public void setPasswordModifiedUserUuid(String passwordModifiedUserUuid) { + _passwordModifiedUserUuid = passwordModifiedUserUuid; + } + + @JSON + @Override + public String getPasswordModifiedUserName() { + if (_passwordModifiedUserName == null) { + return StringPool.BLANK; + } + else { + return _passwordModifiedUserName; + } + } + + @Override + public void setPasswordModifiedUserName(String passwordModifiedUserName) { + _passwordModifiedUserName = passwordModifiedUserName; + } + + public long getColumnBitmask() { + return _columnBitmask; } @Override @@ -351,10 +637,20 @@ public class SportelloModelImpl extends BaseModelImpl sportelloImpl.setSportelloId(getSportelloId()); sportelloImpl.setGroupId(getGroupId()); sportelloImpl.setCompanyId(getCompanyId()); - sportelloImpl.setUserId(getUserId()); - sportelloImpl.setUserName(getUserName()); sportelloImpl.setCreateDate(getCreateDate()); + sportelloImpl.setCreateUserId(getCreateUserId()); + sportelloImpl.setCreateUserName(getCreateUserName()); sportelloImpl.setModifiedDate(getModifiedDate()); + sportelloImpl.setModifiedUserId(getModifiedUserId()); + sportelloImpl.setModifiedUserName(getModifiedUserName()); + sportelloImpl.setUserName(getUserName()); + sportelloImpl.setEmail(getEmail()); + sportelloImpl.setComuneId(getComuneId()); + sportelloImpl.setAttivo(getAttivo()); + sportelloImpl.setPassword(getPassword()); + sportelloImpl.setPasswordModifiedDate(getPasswordModifiedDate()); + sportelloImpl.setPasswordModifiedUserId(getPasswordModifiedUserId()); + sportelloImpl.setPasswordModifiedUserName(getPasswordModifiedUserName()); sportelloImpl.resetOriginalValues(); @@ -405,6 +701,15 @@ public class SportelloModelImpl extends BaseModelImpl @Override public void resetOriginalValues() { + SportelloModelImpl sportelloModelImpl = this; + + sportelloModelImpl._originalUserName = sportelloModelImpl._userName; + + sportelloModelImpl._originalComuneId = sportelloModelImpl._comuneId; + + sportelloModelImpl._setOriginalComuneId = false; + + sportelloModelImpl._columnBitmask = 0; } @Override @@ -417,16 +722,6 @@ public class SportelloModelImpl extends BaseModelImpl sportelloCacheModel.companyId = getCompanyId(); - sportelloCacheModel.userId = getUserId(); - - sportelloCacheModel.userName = getUserName(); - - String userName = sportelloCacheModel.userName; - - if ((userName != null) && (userName.length() == 0)) { - sportelloCacheModel.userName = null; - } - Date createDate = getCreateDate(); if (createDate != null) { @@ -436,6 +731,16 @@ public class SportelloModelImpl extends BaseModelImpl sportelloCacheModel.createDate = Long.MIN_VALUE; } + sportelloCacheModel.createUserId = getCreateUserId(); + + sportelloCacheModel.createUserName = getCreateUserName(); + + String createUserName = sportelloCacheModel.createUserName; + + if ((createUserName != null) && (createUserName.length() == 0)) { + sportelloCacheModel.createUserName = null; + } + Date modifiedDate = getModifiedDate(); if (modifiedDate != null) { @@ -445,12 +750,70 @@ public class SportelloModelImpl extends BaseModelImpl sportelloCacheModel.modifiedDate = Long.MIN_VALUE; } + sportelloCacheModel.modifiedUserId = getModifiedUserId(); + + sportelloCacheModel.modifiedUserName = getModifiedUserName(); + + String modifiedUserName = sportelloCacheModel.modifiedUserName; + + if ((modifiedUserName != null) && (modifiedUserName.length() == 0)) { + sportelloCacheModel.modifiedUserName = null; + } + + sportelloCacheModel.userName = getUserName(); + + String userName = sportelloCacheModel.userName; + + if ((userName != null) && (userName.length() == 0)) { + sportelloCacheModel.userName = null; + } + + sportelloCacheModel.email = getEmail(); + + String email = sportelloCacheModel.email; + + if ((email != null) && (email.length() == 0)) { + sportelloCacheModel.email = null; + } + + sportelloCacheModel.comuneId = getComuneId(); + + sportelloCacheModel.attivo = getAttivo(); + + sportelloCacheModel.password = getPassword(); + + String password = sportelloCacheModel.password; + + if ((password != null) && (password.length() == 0)) { + sportelloCacheModel.password = null; + } + + Date passwordModifiedDate = getPasswordModifiedDate(); + + if (passwordModifiedDate != null) { + sportelloCacheModel.passwordModifiedDate = passwordModifiedDate.getTime(); + } + else { + sportelloCacheModel.passwordModifiedDate = Long.MIN_VALUE; + } + + sportelloCacheModel.passwordModifiedUserId = getPasswordModifiedUserId(); + + sportelloCacheModel.passwordModifiedUserName = getPasswordModifiedUserName(); + + String passwordModifiedUserName = sportelloCacheModel.passwordModifiedUserName; + + if ((passwordModifiedUserName != null) && + (passwordModifiedUserName.length() == 0)) { + sportelloCacheModel.passwordModifiedUserName = null; + } + return sportelloCacheModel; } @Override public String toString() { - StringBundler sb = new StringBundler(15); + StringBundler sb = new StringBundler(35); sb.append("{sportelloId="); sb.append(getSportelloId()); @@ -458,14 +821,34 @@ public class SportelloModelImpl extends BaseModelImpl sb.append(getGroupId()); sb.append(", companyId="); sb.append(getCompanyId()); - sb.append(", userId="); - sb.append(getUserId()); - sb.append(", userName="); - sb.append(getUserName()); sb.append(", createDate="); sb.append(getCreateDate()); + sb.append(", createUserId="); + sb.append(getCreateUserId()); + sb.append(", createUserName="); + sb.append(getCreateUserName()); sb.append(", modifiedDate="); sb.append(getModifiedDate()); + sb.append(", modifiedUserId="); + sb.append(getModifiedUserId()); + sb.append(", modifiedUserName="); + sb.append(getModifiedUserName()); + sb.append(", userName="); + sb.append(getUserName()); + sb.append(", email="); + sb.append(getEmail()); + sb.append(", comuneId="); + sb.append(getComuneId()); + sb.append(", attivo="); + sb.append(getAttivo()); + sb.append(", password="); + sb.append(getPassword()); + sb.append(", passwordModifiedDate="); + sb.append(getPasswordModifiedDate()); + sb.append(", passwordModifiedUserId="); + sb.append(getPasswordModifiedUserId()); + sb.append(", passwordModifiedUserName="); + sb.append(getPasswordModifiedUserName()); sb.append("}"); return sb.toString(); @@ -473,7 +856,7 @@ public class SportelloModelImpl extends BaseModelImpl @Override public String toXmlString() { - StringBundler sb = new StringBundler(25); + StringBundler sb = new StringBundler(55); sb.append(""); sb.append("it.mwg.sicilia.sue.model.Sportello"); @@ -492,21 +875,61 @@ public class SportelloModelImpl extends BaseModelImpl sb.append(getCompanyId()); sb.append("]]>"); sb.append( - "userIdcreateDate"); sb.append( - "userNamecreateUserId"); sb.append( - "createDatecreateUserName"); sb.append( "modifiedDate"); + sb.append( + "modifiedUserId"); + sb.append( + "modifiedUserName"); + sb.append( + "userName"); + sb.append( + "email"); + sb.append( + "comuneId"); + sb.append( + "attivo"); + sb.append( + "password"); + sb.append( + "passwordModifiedDate"); + sb.append( + "passwordModifiedUserId"); + sb.append( + "passwordModifiedUserName"); sb.append(""); @@ -520,10 +943,26 @@ public class SportelloModelImpl extends BaseModelImpl private long _sportelloId; private long _groupId; private long _companyId; - private long _userId; - private String _userUuid; - private String _userName; private Date _createDate; + private long _createUserId; + private String _createUserUuid; + private String _createUserName; private Date _modifiedDate; + private long _modifiedUserId; + private String _modifiedUserUuid; + private String _modifiedUserName; + private String _userName; + private String _originalUserName; + private String _email; + private long _comuneId; + private long _originalComuneId; + private boolean _setOriginalComuneId; + private boolean _attivo; + private String _password; + private Date _passwordModifiedDate; + private long _passwordModifiedUserId; + private String _passwordModifiedUserUuid; + private String _passwordModifiedUserName; + private long _columnBitmask; private Sportello _escapedModel; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/portlet/SueAdministrationPortlet.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/portlet/SueAdministrationPortlet.java new file mode 100644 index 00000000..eaa2f12d --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/portlet/SueAdministrationPortlet.java @@ -0,0 +1,139 @@ +package it.mwg.sicilia.sue.portlet; + +import it.mwg.sicilia.sue.model.Sportello; +import it.mwg.sicilia.sue.service.SportelloLocalServiceUtil; +import it.tref.liferay.portos.bo.model.Comune; +import it.tref.liferay.portos.bo.model.Provincia; +import it.tref.liferay.portos.bo.model.Territorio; +import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil; +import it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil; +import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; + +import java.io.IOException; +import java.util.Date; + +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.PortletException; +import javax.portlet.ResourceRequest; +import javax.portlet.ResourceResponse; +import javax.servlet.http.HttpServletResponse; + +import com.liferay.counter.service.CounterLocalServiceUtil; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.json.JSONArray; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.portlet.PortletResponseUtil; +import com.liferay.portal.kernel.util.ContentTypes; +import com.liferay.portal.kernel.util.ParamUtil; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.model.User; +import com.liferay.portal.service.ServiceContext; +import com.liferay.portal.service.ServiceContextFactory; +import com.liferay.portal.service.UserLocalServiceUtil; +import com.liferay.util.bridges.mvc.MVCPortlet; + +public class SueAdministrationPortlet extends MVCPortlet { + + public static final String RESOURCE_PROVINCE = "province"; + public static final String RESOURCE_COMUNI = "comuni"; + + private static final Log _log = LogFactoryUtil.getLog(SueAdministrationPortlet.class); + + public void editSportello(ActionRequest actionRequest, ActionResponse actionResponse) throws SystemException, + PortalException { + + Date data = new Date(); + ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest); + User user = UserLocalServiceUtil.getUser(serviceContext.getUserId()); + long sportelloId = ParamUtil.getLong(actionRequest, "sportelloId", 0); + long comuneId = ParamUtil.getLong(actionRequest, "comune", 0); + Territorio territorio = TerritorioLocalServiceUtil.findByComuneId(comuneId, 0, 1).get(0); + String userName = ParamUtil.getString(actionRequest, "userName"); + String email = ParamUtil.getString(actionRequest, "email"); + String password = ParamUtil.getString(actionRequest, "password"); + boolean attivo = ParamUtil.getBoolean(actionRequest, "attivo", false); + Sportello sportello = null; + if (sportelloId != 0) { + try { + sportello = SportelloLocalServiceUtil.getSportello(sportelloId); + } catch (PortalException | SystemException e) { + + } + } + if (Validator.isNull(sportello)) { + sportello = SportelloLocalServiceUtil.createSportello(CounterLocalServiceUtil.increment(Sportello.class + .getName())); + sportello.setGroupId(territorio.getGroupId()); + sportello.setCompanyId(territorio.getCompanyId()); + sportello.setCreateDate(data); + sportello.setCreateUserId(user.getUserId()); + sportello.setCreateUserName(user.getFullName()); + } + sportello.setUserName(userName); + sportello.setModifiedDate(data); + sportello.setModifiedUserId(user.getUserId()); + sportello.setModifiedUserName(user.getFullName()); + sportello.setComuneId(comuneId); + sportello.setEmail(email); + sportello.setAttivo(attivo); + if (Validator.isNotNull(password)) { + sportello.setEncryptedPassword(password, user); + } + SportelloLocalServiceUtil.updateSportello(sportello); + } + + public void attivaSportello(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException, + SystemException { + + long sportelloId = ParamUtil.get(actionRequest, "sportelloId", 0L); + boolean attivo = ParamUtil.get(actionRequest, "attivo", false); + Sportello sportello = SportelloLocalServiceUtil.getSportello(sportelloId); + sportello.setAttivo(attivo); + SportelloLocalServiceUtil.updateSportello(sportello); + } + + @Override + public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException, + PortletException { + + String id = resourceRequest.getResourceID(); + try { + ServiceContext serviceContext = ServiceContextFactory.getInstance(resourceRequest); + long companyId = serviceContext.getCompanyId(); + JSONArray array = JSONFactoryUtil.createJSONArray(); + switch (id) { + case RESOURCE_PROVINCE: + for (String codice : TerritorioLocalServiceUtil.getActiveProvince()) { + Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(companyId, codice); + array.put(JSONFactoryUtil.createJSONObject().put("id", codice) + .put("desc", provincia.getSigla() + " - " + provincia.getProvincia())); + } + resourceResponse.setContentType(ContentTypes.APPLICATION_JSON); + resourceResponse.setCharacterEncoding(StringPool.UTF8); + PortletResponseUtil.write(resourceResponse, array.toString()); + break; + case RESOURCE_COMUNI: + String codice = ParamUtil.getString(resourceRequest, "codice"); + for (long comuneId : TerritorioLocalServiceUtil.getActiveComuniByCodiceProvincia(codice)) { + Comune comune = ComuneLocalServiceUtil.getComune(comuneId); + array.put(JSONFactoryUtil.createJSONObject().put("id", comuneId) + .put("desc", comune.getDenominazione())); + } + resourceResponse.setContentType(ContentTypes.APPLICATION_JSON); + resourceResponse.setCharacterEncoding(StringPool.UTF8); + PortletResponseUtil.write(resourceResponse, array.toString()); + break; + default: + resourceResponse.setProperty(ResourceResponse.HTTP_STATUS_CODE, + String.valueOf(HttpServletResponse.SC_NOT_FOUND)); + } + } catch (PortalException | SystemException e) { + throw new IOException(e); + } + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingLocalServiceBaseImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingLocalServiceBaseImpl.java new file mode 100644 index 00000000..b3817a3d --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingLocalServiceBaseImpl.java @@ -0,0 +1,598 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service.base; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.bean.IdentifiableBean; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.model.PersistedModel; +import com.liferay.portal.service.BaseLocalServiceImpl; +import com.liferay.portal.service.PersistedModelLocalServiceRegistryUtil; +import com.liferay.portal.service.persistence.UserPersistence; + +import it.mwg.sicilia.sue.model.ApiSetting; +import it.mwg.sicilia.sue.service.ApiSettingLocalService; +import it.mwg.sicilia.sue.service.persistence.ApiSettingPersistence; +import it.mwg.sicilia.sue.service.persistence.SportelloPersistence; + +import java.io.Serializable; + +import java.util.List; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the api setting local service. + * + *

+ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link it.mwg.sicilia.sue.service.impl.ApiSettingLocalServiceImpl}. + *

+ * + * @author Manifattura Web Group Srl + * @see it.mwg.sicilia.sue.service.impl.ApiSettingLocalServiceImpl + * @see it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil + * @generated + */ +public abstract class ApiSettingLocalServiceBaseImpl + extends BaseLocalServiceImpl implements ApiSettingLocalService, + IdentifiableBean { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil} to access the api setting local service. + */ + + /** + * Adds the api setting to the database. Also notifies the appropriate model listeners. + * + * @param apiSetting the api setting + * @return the api setting that was added + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public ApiSetting addApiSetting(ApiSetting apiSetting) + throws SystemException { + apiSetting.setNew(true); + + return apiSettingPersistence.update(apiSetting); + } + + /** + * Creates a new api setting with the primary key. Does not add the api setting to the database. + * + * @param id the primary key for the new api setting + * @return the new api setting + */ + @Override + public ApiSetting createApiSetting(long id) { + return apiSettingPersistence.create(id); + } + + /** + * Deletes the api setting with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param id the primary key of the api setting + * @return the api setting that was removed + * @throws PortalException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.DELETE) + @Override + public ApiSetting deleteApiSetting(long id) + throws PortalException, SystemException { + return apiSettingPersistence.remove(id); + } + + /** + * Deletes the api setting from the database. Also notifies the appropriate model listeners. + * + * @param apiSetting the api setting + * @return the api setting that was removed + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.DELETE) + @Override + public ApiSetting deleteApiSetting(ApiSetting apiSetting) + throws SystemException { + return apiSettingPersistence.remove(apiSetting); + } + + @Override + public DynamicQuery dynamicQuery() { + Class clazz = getClass(); + + return DynamicQueryFactoryUtil.forClass(ApiSetting.class, + clazz.getClassLoader()); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public List dynamicQuery(DynamicQuery dynamicQuery) + throws SystemException { + return apiSettingPersistence.findWithDynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end) + throws SystemException { + return apiSettingPersistence.findWithDynamicQuery(dynamicQuery, start, + end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, + OrderByComparator orderByComparator) throws SystemException { + return apiSettingPersistence.findWithDynamicQuery(dynamicQuery, start, + end, orderByComparator); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery) + throws SystemException { + return apiSettingPersistence.countWithDynamicQuery(dynamicQuery); + } + + /** + * Returns the number of rows that match the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows that match the dynamic query + * @throws SystemException if a system exception occurred + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection) throws SystemException { + return apiSettingPersistence.countWithDynamicQuery(dynamicQuery, + projection); + } + + @Override + public ApiSetting fetchApiSetting(long id) throws SystemException { + return apiSettingPersistence.fetchByPrimaryKey(id); + } + + /** + * Returns the api setting with the primary key. + * + * @param id the primary key of the api setting + * @return the api setting + * @throws PortalException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ApiSetting getApiSetting(long id) + throws PortalException, SystemException { + return apiSettingPersistence.findByPrimaryKey(id); + } + + @Override + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException, SystemException { + return apiSettingPersistence.findByPrimaryKey(primaryKeyObj); + } + + /** + * Returns a range of all the api settings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api settings + * @param end the upper bound of the range of api settings (not inclusive) + * @return the range of api settings + * @throws SystemException if a system exception occurred + */ + @Override + public List getApiSettings(int start, int end) + throws SystemException { + return apiSettingPersistence.findAll(start, end); + } + + /** + * Returns the number of api settings. + * + * @return the number of api settings + * @throws SystemException if a system exception occurred + */ + @Override + public int getApiSettingsCount() throws SystemException { + return apiSettingPersistence.countAll(); + } + + /** + * Updates the api setting in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param apiSetting the api setting + * @return the api setting that was updated + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public ApiSetting updateApiSetting(ApiSetting apiSetting) + throws SystemException { + return apiSettingPersistence.update(apiSetting); + } + + /** + * Returns the api setting local service. + * + * @return the api setting local service + */ + public it.mwg.sicilia.sue.service.ApiSettingLocalService getApiSettingLocalService() { + return apiSettingLocalService; + } + + /** + * Sets the api setting local service. + * + * @param apiSettingLocalService the api setting local service + */ + public void setApiSettingLocalService( + it.mwg.sicilia.sue.service.ApiSettingLocalService apiSettingLocalService) { + this.apiSettingLocalService = apiSettingLocalService; + } + + /** + * Returns the api setting remote service. + * + * @return the api setting remote service + */ + public it.mwg.sicilia.sue.service.ApiSettingService getApiSettingService() { + return apiSettingService; + } + + /** + * Sets the api setting remote service. + * + * @param apiSettingService the api setting remote service + */ + public void setApiSettingService( + it.mwg.sicilia.sue.service.ApiSettingService apiSettingService) { + this.apiSettingService = apiSettingService; + } + + /** + * Returns the api setting persistence. + * + * @return the api setting persistence + */ + public ApiSettingPersistence getApiSettingPersistence() { + return apiSettingPersistence; + } + + /** + * Sets the api setting persistence. + * + * @param apiSettingPersistence the api setting persistence + */ + public void setApiSettingPersistence( + ApiSettingPersistence apiSettingPersistence) { + this.apiSettingPersistence = apiSettingPersistence; + } + + /** + * Returns the sportello local service. + * + * @return the sportello local service + */ + public it.mwg.sicilia.sue.service.SportelloLocalService getSportelloLocalService() { + return sportelloLocalService; + } + + /** + * Sets the sportello local service. + * + * @param sportelloLocalService the sportello local service + */ + public void setSportelloLocalService( + it.mwg.sicilia.sue.service.SportelloLocalService sportelloLocalService) { + this.sportelloLocalService = sportelloLocalService; + } + + /** + * Returns the sportello remote service. + * + * @return the sportello remote service + */ + public it.mwg.sicilia.sue.service.SportelloService getSportelloService() { + return sportelloService; + } + + /** + * Sets the sportello remote service. + * + * @param sportelloService the sportello remote service + */ + public void setSportelloService( + it.mwg.sicilia.sue.service.SportelloService sportelloService) { + this.sportelloService = sportelloService; + } + + /** + * Returns the sportello persistence. + * + * @return the sportello persistence + */ + public SportelloPersistence getSportelloPersistence() { + return sportelloPersistence; + } + + /** + * Sets the sportello persistence. + * + * @param sportelloPersistence the sportello persistence + */ + public void setSportelloPersistence( + SportelloPersistence sportelloPersistence) { + this.sportelloPersistence = sportelloPersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user remote service. + * + * @return the user remote service + */ + public com.liferay.portal.service.UserService getUserService() { + return userService; + } + + /** + * Sets the user remote service. + * + * @param userService the user remote service + */ + public void setUserService( + com.liferay.portal.service.UserService userService) { + this.userService = userService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + Class clazz = getClass(); + + _classLoader = clazz.getClassLoader(); + + PersistedModelLocalServiceRegistryUtil.register("it.mwg.sicilia.sue.model.ApiSetting", + apiSettingLocalService); + } + + public void destroy() { + PersistedModelLocalServiceRegistryUtil.unregister( + "it.mwg.sicilia.sue.model.ApiSetting"); + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public String getBeanIdentifier() { + return _beanIdentifier; + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(String beanIdentifier) { + _beanIdentifier = beanIdentifier; + } + + @Override + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + Thread currentThread = Thread.currentThread(); + + ClassLoader contextClassLoader = currentThread.getContextClassLoader(); + + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(_classLoader); + } + + try { + return _clpInvoker.invokeMethod(name, parameterTypes, arguments); + } + finally { + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(contextClassLoader); + } + } + } + + protected Class getModelClass() { + return ApiSetting.class; + } + + protected String getModelClassName() { + return ApiSetting.class.getName(); + } + + /** + * Performs an SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) throws SystemException { + try { + DataSource dataSource = apiSettingPersistence.getDataSource(); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql, new int[0]); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = it.mwg.sicilia.sue.service.ApiSettingLocalService.class) + protected it.mwg.sicilia.sue.service.ApiSettingLocalService apiSettingLocalService; + @BeanReference(type = it.mwg.sicilia.sue.service.ApiSettingService.class) + protected it.mwg.sicilia.sue.service.ApiSettingService apiSettingService; + @BeanReference(type = ApiSettingPersistence.class) + protected ApiSettingPersistence apiSettingPersistence; + @BeanReference(type = it.mwg.sicilia.sue.service.SportelloLocalService.class) + protected it.mwg.sicilia.sue.service.SportelloLocalService sportelloLocalService; + @BeanReference(type = it.mwg.sicilia.sue.service.SportelloService.class) + protected it.mwg.sicilia.sue.service.SportelloService sportelloService; + @BeanReference(type = SportelloPersistence.class) + protected SportelloPersistence sportelloPersistence; + @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) + protected com.liferay.counter.service.CounterLocalService counterLocalService; + @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class) + protected com.liferay.portal.service.ResourceLocalService resourceLocalService; + @BeanReference(type = com.liferay.portal.service.UserLocalService.class) + protected com.liferay.portal.service.UserLocalService userLocalService; + @BeanReference(type = com.liferay.portal.service.UserService.class) + protected com.liferay.portal.service.UserService userService; + @BeanReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + private String _beanIdentifier; + private ClassLoader _classLoader; + private ApiSettingLocalServiceClpInvoker _clpInvoker = new ApiSettingLocalServiceClpInvoker(); +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingLocalServiceClpInvoker.java new file mode 100644 index 00000000..ea185e7d --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingLocalServiceClpInvoker.java @@ -0,0 +1,286 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service.base; + +import it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil; + +import java.util.Arrays; + +/** + * @author Manifattura Web Group Srl + * @generated + */ +public class ApiSettingLocalServiceClpInvoker { + public ApiSettingLocalServiceClpInvoker() { + _methodName0 = "addApiSetting"; + + _methodParameterTypes0 = new String[] { + "it.mwg.sicilia.sue.model.ApiSetting" + }; + + _methodName1 = "createApiSetting"; + + _methodParameterTypes1 = new String[] { "long" }; + + _methodName2 = "deleteApiSetting"; + + _methodParameterTypes2 = new String[] { "long" }; + + _methodName3 = "deleteApiSetting"; + + _methodParameterTypes3 = new String[] { + "it.mwg.sicilia.sue.model.ApiSetting" + }; + + _methodName4 = "dynamicQuery"; + + _methodParameterTypes4 = new String[] { }; + + _methodName5 = "dynamicQuery"; + + _methodParameterTypes5 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName6 = "dynamicQuery"; + + _methodParameterTypes6 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int" + }; + + _methodName7 = "dynamicQuery"; + + _methodParameterTypes7 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", "int", "int", + "com.liferay.portal.kernel.util.OrderByComparator" + }; + + _methodName8 = "dynamicQueryCount"; + + _methodParameterTypes8 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery" + }; + + _methodName9 = "dynamicQueryCount"; + + _methodParameterTypes9 = new String[] { + "com.liferay.portal.kernel.dao.orm.DynamicQuery", + "com.liferay.portal.kernel.dao.orm.Projection" + }; + + _methodName10 = "fetchApiSetting"; + + _methodParameterTypes10 = new String[] { "long" }; + + _methodName11 = "getApiSetting"; + + _methodParameterTypes11 = new String[] { "long" }; + + _methodName12 = "getPersistedModel"; + + _methodParameterTypes12 = new String[] { "java.io.Serializable" }; + + _methodName13 = "getApiSettings"; + + _methodParameterTypes13 = new String[] { "int", "int" }; + + _methodName14 = "getApiSettingsCount"; + + _methodParameterTypes14 = new String[] { }; + + _methodName15 = "updateApiSetting"; + + _methodParameterTypes15 = new String[] { + "it.mwg.sicilia.sue.model.ApiSetting" + }; + + _methodName40 = "getBeanIdentifier"; + + _methodParameterTypes40 = new String[] { }; + + _methodName41 = "setBeanIdentifier"; + + _methodParameterTypes41 = new String[] { "java.lang.String" }; + + _methodName46 = "get"; + + _methodParameterTypes46 = new String[] { "long", "long" }; + + _methodName47 = "set"; + + _methodParameterTypes47 = new String[] { + "long", "long", "java.lang.String" + }; + } + + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + if (_methodName0.equals(name) && + Arrays.deepEquals(_methodParameterTypes0, parameterTypes)) { + return ApiSettingLocalServiceUtil.addApiSetting((it.mwg.sicilia.sue.model.ApiSetting)arguments[0]); + } + + if (_methodName1.equals(name) && + Arrays.deepEquals(_methodParameterTypes1, parameterTypes)) { + return ApiSettingLocalServiceUtil.createApiSetting(((Long)arguments[0]).longValue()); + } + + if (_methodName2.equals(name) && + Arrays.deepEquals(_methodParameterTypes2, parameterTypes)) { + return ApiSettingLocalServiceUtil.deleteApiSetting(((Long)arguments[0]).longValue()); + } + + if (_methodName3.equals(name) && + Arrays.deepEquals(_methodParameterTypes3, parameterTypes)) { + return ApiSettingLocalServiceUtil.deleteApiSetting((it.mwg.sicilia.sue.model.ApiSetting)arguments[0]); + } + + if (_methodName4.equals(name) && + Arrays.deepEquals(_methodParameterTypes4, parameterTypes)) { + return ApiSettingLocalServiceUtil.dynamicQuery(); + } + + if (_methodName5.equals(name) && + Arrays.deepEquals(_methodParameterTypes5, parameterTypes)) { + return ApiSettingLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); + } + + if (_methodName6.equals(name) && + Arrays.deepEquals(_methodParameterTypes6, parameterTypes)) { + return ApiSettingLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], + ((Integer)arguments[1]).intValue(), + ((Integer)arguments[2]).intValue()); + } + + if (_methodName7.equals(name) && + Arrays.deepEquals(_methodParameterTypes7, parameterTypes)) { + return ApiSettingLocalServiceUtil.dynamicQuery((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], + ((Integer)arguments[1]).intValue(), + ((Integer)arguments[2]).intValue(), + (com.liferay.portal.kernel.util.OrderByComparator)arguments[3]); + } + + if (_methodName8.equals(name) && + Arrays.deepEquals(_methodParameterTypes8, parameterTypes)) { + return ApiSettingLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0]); + } + + if (_methodName9.equals(name) && + Arrays.deepEquals(_methodParameterTypes9, parameterTypes)) { + return ApiSettingLocalServiceUtil.dynamicQueryCount((com.liferay.portal.kernel.dao.orm.DynamicQuery)arguments[0], + (com.liferay.portal.kernel.dao.orm.Projection)arguments[1]); + } + + if (_methodName10.equals(name) && + Arrays.deepEquals(_methodParameterTypes10, parameterTypes)) { + return ApiSettingLocalServiceUtil.fetchApiSetting(((Long)arguments[0]).longValue()); + } + + if (_methodName11.equals(name) && + Arrays.deepEquals(_methodParameterTypes11, parameterTypes)) { + return ApiSettingLocalServiceUtil.getApiSetting(((Long)arguments[0]).longValue()); + } + + if (_methodName12.equals(name) && + Arrays.deepEquals(_methodParameterTypes12, parameterTypes)) { + return ApiSettingLocalServiceUtil.getPersistedModel((java.io.Serializable)arguments[0]); + } + + if (_methodName13.equals(name) && + Arrays.deepEquals(_methodParameterTypes13, parameterTypes)) { + return ApiSettingLocalServiceUtil.getApiSettings(((Integer)arguments[0]).intValue(), + ((Integer)arguments[1]).intValue()); + } + + if (_methodName14.equals(name) && + Arrays.deepEquals(_methodParameterTypes14, parameterTypes)) { + return ApiSettingLocalServiceUtil.getApiSettingsCount(); + } + + if (_methodName15.equals(name) && + Arrays.deepEquals(_methodParameterTypes15, parameterTypes)) { + return ApiSettingLocalServiceUtil.updateApiSetting((it.mwg.sicilia.sue.model.ApiSetting)arguments[0]); + } + + if (_methodName40.equals(name) && + Arrays.deepEquals(_methodParameterTypes40, parameterTypes)) { + return ApiSettingLocalServiceUtil.getBeanIdentifier(); + } + + if (_methodName41.equals(name) && + Arrays.deepEquals(_methodParameterTypes41, parameterTypes)) { + ApiSettingLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); + + return null; + } + + if (_methodName46.equals(name) && + Arrays.deepEquals(_methodParameterTypes46, parameterTypes)) { + return ApiSettingLocalServiceUtil.get(((Long)arguments[0]).longValue(), + ((Long)arguments[1]).longValue()); + } + + if (_methodName47.equals(name) && + Arrays.deepEquals(_methodParameterTypes47, parameterTypes)) { + ApiSettingLocalServiceUtil.set(((Long)arguments[0]).longValue(), + ((Long)arguments[1]).longValue(), (java.lang.String)arguments[2]); + + return null; + } + + throw new UnsupportedOperationException(); + } + + private String _methodName0; + private String[] _methodParameterTypes0; + private String _methodName1; + private String[] _methodParameterTypes1; + private String _methodName2; + private String[] _methodParameterTypes2; + private String _methodName3; + private String[] _methodParameterTypes3; + private String _methodName4; + private String[] _methodParameterTypes4; + private String _methodName5; + private String[] _methodParameterTypes5; + private String _methodName6; + private String[] _methodParameterTypes6; + private String _methodName7; + private String[] _methodParameterTypes7; + private String _methodName8; + private String[] _methodParameterTypes8; + private String _methodName9; + private String[] _methodParameterTypes9; + private String _methodName10; + private String[] _methodParameterTypes10; + private String _methodName11; + private String[] _methodParameterTypes11; + private String _methodName12; + private String[] _methodParameterTypes12; + private String _methodName13; + private String[] _methodParameterTypes13; + private String _methodName14; + private String[] _methodParameterTypes14; + private String _methodName15; + private String[] _methodParameterTypes15; + private String _methodName40; + private String[] _methodParameterTypes40; + private String _methodName41; + private String[] _methodParameterTypes41; + private String _methodName46; + private String[] _methodParameterTypes46; + private String _methodName47; + private String[] _methodParameterTypes47; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingServiceBaseImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingServiceBaseImpl.java new file mode 100644 index 00000000..ab303383 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingServiceBaseImpl.java @@ -0,0 +1,362 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service.base; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.bean.IdentifiableBean; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.service.BaseServiceImpl; +import com.liferay.portal.service.persistence.UserPersistence; + +import it.mwg.sicilia.sue.model.ApiSetting; +import it.mwg.sicilia.sue.service.ApiSettingService; +import it.mwg.sicilia.sue.service.persistence.ApiSettingPersistence; +import it.mwg.sicilia.sue.service.persistence.SportelloPersistence; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the api setting remote service. + * + *

+ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link it.mwg.sicilia.sue.service.impl.ApiSettingServiceImpl}. + *

+ * + * @author Manifattura Web Group Srl + * @see it.mwg.sicilia.sue.service.impl.ApiSettingServiceImpl + * @see it.mwg.sicilia.sue.service.ApiSettingServiceUtil + * @generated + */ +public abstract class ApiSettingServiceBaseImpl extends BaseServiceImpl + implements ApiSettingService, IdentifiableBean { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link it.mwg.sicilia.sue.service.ApiSettingServiceUtil} to access the api setting remote service. + */ + + /** + * Returns the api setting local service. + * + * @return the api setting local service + */ + public it.mwg.sicilia.sue.service.ApiSettingLocalService getApiSettingLocalService() { + return apiSettingLocalService; + } + + /** + * Sets the api setting local service. + * + * @param apiSettingLocalService the api setting local service + */ + public void setApiSettingLocalService( + it.mwg.sicilia.sue.service.ApiSettingLocalService apiSettingLocalService) { + this.apiSettingLocalService = apiSettingLocalService; + } + + /** + * Returns the api setting remote service. + * + * @return the api setting remote service + */ + public it.mwg.sicilia.sue.service.ApiSettingService getApiSettingService() { + return apiSettingService; + } + + /** + * Sets the api setting remote service. + * + * @param apiSettingService the api setting remote service + */ + public void setApiSettingService( + it.mwg.sicilia.sue.service.ApiSettingService apiSettingService) { + this.apiSettingService = apiSettingService; + } + + /** + * Returns the api setting persistence. + * + * @return the api setting persistence + */ + public ApiSettingPersistence getApiSettingPersistence() { + return apiSettingPersistence; + } + + /** + * Sets the api setting persistence. + * + * @param apiSettingPersistence the api setting persistence + */ + public void setApiSettingPersistence( + ApiSettingPersistence apiSettingPersistence) { + this.apiSettingPersistence = apiSettingPersistence; + } + + /** + * Returns the sportello local service. + * + * @return the sportello local service + */ + public it.mwg.sicilia.sue.service.SportelloLocalService getSportelloLocalService() { + return sportelloLocalService; + } + + /** + * Sets the sportello local service. + * + * @param sportelloLocalService the sportello local service + */ + public void setSportelloLocalService( + it.mwg.sicilia.sue.service.SportelloLocalService sportelloLocalService) { + this.sportelloLocalService = sportelloLocalService; + } + + /** + * Returns the sportello remote service. + * + * @return the sportello remote service + */ + public it.mwg.sicilia.sue.service.SportelloService getSportelloService() { + return sportelloService; + } + + /** + * Sets the sportello remote service. + * + * @param sportelloService the sportello remote service + */ + public void setSportelloService( + it.mwg.sicilia.sue.service.SportelloService sportelloService) { + this.sportelloService = sportelloService; + } + + /** + * Returns the sportello persistence. + * + * @return the sportello persistence + */ + public SportelloPersistence getSportelloPersistence() { + return sportelloPersistence; + } + + /** + * Sets the sportello persistence. + * + * @param sportelloPersistence the sportello persistence + */ + public void setSportelloPersistence( + SportelloPersistence sportelloPersistence) { + this.sportelloPersistence = sportelloPersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user remote service. + * + * @return the user remote service + */ + public com.liferay.portal.service.UserService getUserService() { + return userService; + } + + /** + * Sets the user remote service. + * + * @param userService the user remote service + */ + public void setUserService( + com.liferay.portal.service.UserService userService) { + this.userService = userService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + Class clazz = getClass(); + + _classLoader = clazz.getClassLoader(); + } + + public void destroy() { + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public String getBeanIdentifier() { + return _beanIdentifier; + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(String beanIdentifier) { + _beanIdentifier = beanIdentifier; + } + + @Override + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + Thread currentThread = Thread.currentThread(); + + ClassLoader contextClassLoader = currentThread.getContextClassLoader(); + + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(_classLoader); + } + + try { + return _clpInvoker.invokeMethod(name, parameterTypes, arguments); + } + finally { + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(contextClassLoader); + } + } + } + + protected Class getModelClass() { + return ApiSetting.class; + } + + protected String getModelClassName() { + return ApiSetting.class.getName(); + } + + /** + * Performs an SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) throws SystemException { + try { + DataSource dataSource = apiSettingPersistence.getDataSource(); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql, new int[0]); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = it.mwg.sicilia.sue.service.ApiSettingLocalService.class) + protected it.mwg.sicilia.sue.service.ApiSettingLocalService apiSettingLocalService; + @BeanReference(type = it.mwg.sicilia.sue.service.ApiSettingService.class) + protected it.mwg.sicilia.sue.service.ApiSettingService apiSettingService; + @BeanReference(type = ApiSettingPersistence.class) + protected ApiSettingPersistence apiSettingPersistence; + @BeanReference(type = it.mwg.sicilia.sue.service.SportelloLocalService.class) + protected it.mwg.sicilia.sue.service.SportelloLocalService sportelloLocalService; + @BeanReference(type = it.mwg.sicilia.sue.service.SportelloService.class) + protected it.mwg.sicilia.sue.service.SportelloService sportelloService; + @BeanReference(type = SportelloPersistence.class) + protected SportelloPersistence sportelloPersistence; + @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) + protected com.liferay.counter.service.CounterLocalService counterLocalService; + @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class) + protected com.liferay.portal.service.ResourceLocalService resourceLocalService; + @BeanReference(type = com.liferay.portal.service.UserLocalService.class) + protected com.liferay.portal.service.UserLocalService userLocalService; + @BeanReference(type = com.liferay.portal.service.UserService.class) + protected com.liferay.portal.service.UserService userService; + @BeanReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + private String _beanIdentifier; + private ClassLoader _classLoader; + private ApiSettingServiceClpInvoker _clpInvoker = new ApiSettingServiceClpInvoker(); +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingServiceClpInvoker.java new file mode 100644 index 00000000..8942d24d --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingServiceClpInvoker.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service.base; + +import it.mwg.sicilia.sue.service.ApiSettingServiceUtil; + +import java.util.Arrays; + +/** + * @author Manifattura Web Group Srl + * @generated + */ +public class ApiSettingServiceClpInvoker { + public ApiSettingServiceClpInvoker() { + _methodName24 = "getBeanIdentifier"; + + _methodParameterTypes24 = new String[] { }; + + _methodName25 = "setBeanIdentifier"; + + _methodParameterTypes25 = new String[] { "java.lang.String" }; + } + + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + if (_methodName24.equals(name) && + Arrays.deepEquals(_methodParameterTypes24, parameterTypes)) { + return ApiSettingServiceUtil.getBeanIdentifier(); + } + + if (_methodName25.equals(name) && + Arrays.deepEquals(_methodParameterTypes25, parameterTypes)) { + ApiSettingServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); + + return null; + } + + throw new UnsupportedOperationException(); + } + + private String _methodName24; + private String[] _methodParameterTypes24; + private String _methodName25; + private String[] _methodParameterTypes25; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceBaseImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceBaseImpl.java index 737f1dfe..3c4bbce5 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceBaseImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceBaseImpl.java @@ -33,6 +33,7 @@ import com.liferay.portal.service.persistence.UserPersistence; import it.mwg.sicilia.sue.model.Sportello; import it.mwg.sicilia.sue.service.SportelloLocalService; +import it.mwg.sicilia.sue.service.persistence.ApiSettingPersistence; import it.mwg.sicilia.sue.service.persistence.SportelloPersistence; import java.io.Serializable; @@ -278,6 +279,63 @@ public abstract class SportelloLocalServiceBaseImpl extends BaseLocalServiceImpl return sportelloPersistence.update(sportello); } + /** + * Returns the api setting local service. + * + * @return the api setting local service + */ + public it.mwg.sicilia.sue.service.ApiSettingLocalService getApiSettingLocalService() { + return apiSettingLocalService; + } + + /** + * Sets the api setting local service. + * + * @param apiSettingLocalService the api setting local service + */ + public void setApiSettingLocalService( + it.mwg.sicilia.sue.service.ApiSettingLocalService apiSettingLocalService) { + this.apiSettingLocalService = apiSettingLocalService; + } + + /** + * Returns the api setting remote service. + * + * @return the api setting remote service + */ + public it.mwg.sicilia.sue.service.ApiSettingService getApiSettingService() { + return apiSettingService; + } + + /** + * Sets the api setting remote service. + * + * @param apiSettingService the api setting remote service + */ + public void setApiSettingService( + it.mwg.sicilia.sue.service.ApiSettingService apiSettingService) { + this.apiSettingService = apiSettingService; + } + + /** + * Returns the api setting persistence. + * + * @return the api setting persistence + */ + public ApiSettingPersistence getApiSettingPersistence() { + return apiSettingPersistence; + } + + /** + * Sets the api setting persistence. + * + * @param apiSettingPersistence the api setting persistence + */ + public void setApiSettingPersistence( + ApiSettingPersistence apiSettingPersistence) { + this.apiSettingPersistence = apiSettingPersistence; + } + /** * Returns the sportello local service. * @@ -511,6 +569,12 @@ public abstract class SportelloLocalServiceBaseImpl extends BaseLocalServiceImpl } } + @BeanReference(type = it.mwg.sicilia.sue.service.ApiSettingLocalService.class) + protected it.mwg.sicilia.sue.service.ApiSettingLocalService apiSettingLocalService; + @BeanReference(type = it.mwg.sicilia.sue.service.ApiSettingService.class) + protected it.mwg.sicilia.sue.service.ApiSettingService apiSettingService; + @BeanReference(type = ApiSettingPersistence.class) + protected ApiSettingPersistence apiSettingPersistence; @BeanReference(type = it.mwg.sicilia.sue.service.SportelloLocalService.class) protected it.mwg.sicilia.sue.service.SportelloLocalService sportelloLocalService; @BeanReference(type = it.mwg.sicilia.sue.service.SportelloService.class) diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceClpInvoker.java index e064b6fa..60188a09 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceClpInvoker.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceClpInvoker.java @@ -106,13 +106,17 @@ public class SportelloLocalServiceClpInvoker { "it.mwg.sicilia.sue.model.Sportello" }; - _methodName34 = "getBeanIdentifier"; + _methodName40 = "getBeanIdentifier"; - _methodParameterTypes34 = new String[] { }; + _methodParameterTypes40 = new String[] { }; - _methodName35 = "setBeanIdentifier"; + _methodName41 = "setBeanIdentifier"; - _methodParameterTypes35 = new String[] { "java.lang.String" }; + _methodParameterTypes41 = new String[] { "java.lang.String" }; + + _methodName46 = "findByUserName"; + + _methodParameterTypes46 = new String[] { "java.lang.String" }; } public Object invokeMethod(String name, String[] parameterTypes, @@ -204,18 +208,23 @@ public class SportelloLocalServiceClpInvoker { return SportelloLocalServiceUtil.updateSportello((it.mwg.sicilia.sue.model.Sportello)arguments[0]); } - if (_methodName34.equals(name) && - Arrays.deepEquals(_methodParameterTypes34, parameterTypes)) { + if (_methodName40.equals(name) && + Arrays.deepEquals(_methodParameterTypes40, parameterTypes)) { return SportelloLocalServiceUtil.getBeanIdentifier(); } - if (_methodName35.equals(name) && - Arrays.deepEquals(_methodParameterTypes35, parameterTypes)) { + if (_methodName41.equals(name) && + Arrays.deepEquals(_methodParameterTypes41, parameterTypes)) { SportelloLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); return null; } + if (_methodName46.equals(name) && + Arrays.deepEquals(_methodParameterTypes46, parameterTypes)) { + return SportelloLocalServiceUtil.findByUserName((java.lang.String)arguments[0]); + } + throw new UnsupportedOperationException(); } @@ -251,8 +260,10 @@ public class SportelloLocalServiceClpInvoker { private String[] _methodParameterTypes14; private String _methodName15; private String[] _methodParameterTypes15; - private String _methodName34; - private String[] _methodParameterTypes34; - private String _methodName35; - private String[] _methodParameterTypes35; + private String _methodName40; + private String[] _methodParameterTypes40; + private String _methodName41; + private String[] _methodParameterTypes41; + private String _methodName46; + private String[] _methodParameterTypes46; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceBaseImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceBaseImpl.java index 09bad918..c3471ced 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceBaseImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceBaseImpl.java @@ -24,6 +24,7 @@ import com.liferay.portal.service.persistence.UserPersistence; import it.mwg.sicilia.sue.model.Sportello; import it.mwg.sicilia.sue.service.SportelloService; +import it.mwg.sicilia.sue.service.persistence.ApiSettingPersistence; import it.mwg.sicilia.sue.service.persistence.SportelloPersistence; import javax.sql.DataSource; @@ -48,6 +49,63 @@ public abstract class SportelloServiceBaseImpl extends BaseServiceImpl * Never modify or reference this class directly. Always use {@link it.mwg.sicilia.sue.service.SportelloServiceUtil} to access the sportello remote service. */ + /** + * Returns the api setting local service. + * + * @return the api setting local service + */ + public it.mwg.sicilia.sue.service.ApiSettingLocalService getApiSettingLocalService() { + return apiSettingLocalService; + } + + /** + * Sets the api setting local service. + * + * @param apiSettingLocalService the api setting local service + */ + public void setApiSettingLocalService( + it.mwg.sicilia.sue.service.ApiSettingLocalService apiSettingLocalService) { + this.apiSettingLocalService = apiSettingLocalService; + } + + /** + * Returns the api setting remote service. + * + * @return the api setting remote service + */ + public it.mwg.sicilia.sue.service.ApiSettingService getApiSettingService() { + return apiSettingService; + } + + /** + * Sets the api setting remote service. + * + * @param apiSettingService the api setting remote service + */ + public void setApiSettingService( + it.mwg.sicilia.sue.service.ApiSettingService apiSettingService) { + this.apiSettingService = apiSettingService; + } + + /** + * Returns the api setting persistence. + * + * @return the api setting persistence + */ + public ApiSettingPersistence getApiSettingPersistence() { + return apiSettingPersistence; + } + + /** + * Sets the api setting persistence. + * + * @param apiSettingPersistence the api setting persistence + */ + public void setApiSettingPersistence( + ApiSettingPersistence apiSettingPersistence) { + this.apiSettingPersistence = apiSettingPersistence; + } + /** * Returns the sportello local service. * @@ -276,6 +334,12 @@ public abstract class SportelloServiceBaseImpl extends BaseServiceImpl } } + @BeanReference(type = it.mwg.sicilia.sue.service.ApiSettingLocalService.class) + protected it.mwg.sicilia.sue.service.ApiSettingLocalService apiSettingLocalService; + @BeanReference(type = it.mwg.sicilia.sue.service.ApiSettingService.class) + protected it.mwg.sicilia.sue.service.ApiSettingService apiSettingService; + @BeanReference(type = ApiSettingPersistence.class) + protected ApiSettingPersistence apiSettingPersistence; @BeanReference(type = it.mwg.sicilia.sue.service.SportelloLocalService.class) protected it.mwg.sicilia.sue.service.SportelloLocalService sportelloLocalService; @BeanReference(type = it.mwg.sicilia.sue.service.SportelloService.class) diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceClpInvoker.java index 2c3d2b46..178a4ae3 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceClpInvoker.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceClpInvoker.java @@ -24,34 +24,45 @@ import java.util.Arrays; */ public class SportelloServiceClpInvoker { public SportelloServiceClpInvoker() { - _methodName18 = "getBeanIdentifier"; + _methodName24 = "getBeanIdentifier"; - _methodParameterTypes18 = new String[] { }; + _methodParameterTypes24 = new String[] { }; - _methodName19 = "setBeanIdentifier"; + _methodName25 = "setBeanIdentifier"; - _methodParameterTypes19 = new String[] { "java.lang.String" }; + _methodParameterTypes25 = new String[] { "java.lang.String" }; + + _methodName30 = "generaPassword"; + + _methodParameterTypes30 = new String[] { "int" }; } public Object invokeMethod(String name, String[] parameterTypes, Object[] arguments) throws Throwable { - if (_methodName18.equals(name) && - Arrays.deepEquals(_methodParameterTypes18, parameterTypes)) { + if (_methodName24.equals(name) && + Arrays.deepEquals(_methodParameterTypes24, parameterTypes)) { return SportelloServiceUtil.getBeanIdentifier(); } - if (_methodName19.equals(name) && - Arrays.deepEquals(_methodParameterTypes19, parameterTypes)) { + if (_methodName25.equals(name) && + Arrays.deepEquals(_methodParameterTypes25, parameterTypes)) { SportelloServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); return null; } + if (_methodName30.equals(name) && + Arrays.deepEquals(_methodParameterTypes30, parameterTypes)) { + return SportelloServiceUtil.generaPassword(((Integer)arguments[0]).intValue()); + } + throw new UnsupportedOperationException(); } - private String _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; + private String _methodName24; + private String[] _methodParameterTypes24; + private String _methodName25; + private String[] _methodParameterTypes25; + private String _methodName30; + private String[] _methodParameterTypes30; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/http/ApiSettingServiceSoap.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/http/ApiSettingServiceSoap.java new file mode 100644 index 00000000..4078f7e1 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/http/ApiSettingServiceSoap.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service.http; + +/** + * Provides the SOAP utility for the + * {@link it.mwg.sicilia.sue.service.ApiSettingServiceUtil} service utility. The + * static methods of this class calls the same methods of the service utility. + * However, the signatures are different because it is difficult for SOAP to + * support certain types. + * + *

+ * ServiceBuilder follows certain rules in translating the methods. For example, + * if the method in the service utility returns a {@link java.util.List}, that + * is translated to an array of {@link it.mwg.sicilia.sue.model.ApiSettingSoap}. + * If the method in the service utility returns a + * {@link it.mwg.sicilia.sue.model.ApiSetting}, that is translated to a + * {@link it.mwg.sicilia.sue.model.ApiSettingSoap}. Methods that SOAP cannot + * safely wire are skipped. + *

+ * + *

+ * The benefits of using the SOAP utility is that it is cross platform + * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and + * even Perl, to call the generated services. One drawback of SOAP is that it is + * slow because it needs to serialize all calls into a text format (XML). + *

+ * + *

+ * You can see a list of services at http://localhost:8080/api/axis. Set the + * property axis.servlet.hosts.allowed in portal.properties to configure + * security. + *

+ * + *

+ * The SOAP utility is only generated for remote services. + *

+ * + * @author Manifattura Web Group Srl + * @see ApiSettingServiceHttp + * @see it.mwg.sicilia.sue.model.ApiSettingSoap + * @see it.mwg.sicilia.sue.service.ApiSettingServiceUtil + * @generated + */ +public class ApiSettingServiceSoap { +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/http/SportelloServiceSoap.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/http/SportelloServiceSoap.java index adc3fec7..fcd7a131 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/http/SportelloServiceSoap.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/http/SportelloServiceSoap.java @@ -14,6 +14,13 @@ package it.mwg.sicilia.sue.service.http; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; + +import it.mwg.sicilia.sue.service.SportelloServiceUtil; + +import java.rmi.RemoteException; + /** * Provides the SOAP utility for the * {@link it.mwg.sicilia.sue.service.SportelloServiceUtil} service utility. The @@ -55,4 +62,19 @@ package it.mwg.sicilia.sue.service.http; * @generated */ public class SportelloServiceSoap { + public static java.lang.String generaPassword(int lunghezza) + throws RemoteException { + try { + java.lang.String returnValue = SportelloServiceUtil.generaPassword(lunghezza); + + return returnValue; + } + catch (Exception e) { + _log.error(e, e); + + throw new RemoteException(e.getMessage()); + } + } + + private static Log _log = LogFactoryUtil.getLog(SportelloServiceSoap.class); } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/ApiSettingLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/ApiSettingLocalServiceImpl.java new file mode 100644 index 00000000..74f41c1a --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/ApiSettingLocalServiceImpl.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service.impl; + +import it.mwg.sicilia.sue.model.ApiSetting; +import it.mwg.sicilia.sue.service.base.ApiSettingLocalServiceBaseImpl; + +import com.liferay.counter.service.CounterLocalServiceUtil; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.Validator; + +/** + * The implementation of the api setting local service. + * + *

+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy + * their definitions into the {@link it.mwg.sicilia.sue.service.ApiSettingLocalService} interface. + * + *

+ * This is a local service. Methods of this service will not have security checks based on the propagated JAAS + * credentials because this service can only be accessed from within the same VM. + *

+ * + * @author Manifattura Web Group Srl + * @see it.mwg.sicilia.sue.service.base.ApiSettingLocalServiceBaseImpl + * @see it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil + */ +public class ApiSettingLocalServiceImpl extends ApiSettingLocalServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link + * it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil} to access the api setting local service. + */ + private static final Log _log = LogFactoryUtil.getLog(ApiSettingLocalServiceImpl.class); + + @Override + public String get(long companyId, long key) throws SystemException { + + ApiSetting apiSetting = apiSettingPersistence.fetchByCompanyIdKey(companyId, key); + return Validator.isNull(apiSetting) ? null : apiSetting.getValue(); + } + + @Override + public void set(long companyId, long key, String value) throws SystemException { + + ApiSetting apiSetting = apiSettingPersistence.fetchByCompanyIdKey(companyId, key); + if (Validator.isNull(apiSetting)) { + apiSetting = createApiSetting(CounterLocalServiceUtil.increment(ApiSetting.class.getName())); + apiSetting.setCompanyId(companyId); + apiSetting.setKey(key); + } + apiSetting.setValue(value); + updateApiSetting(apiSetting); + } +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/ApiSettingServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/ApiSettingServiceImpl.java new file mode 100644 index 00000000..0ac73253 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/ApiSettingServiceImpl.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service.impl; + +import it.mwg.sicilia.sue.service.base.ApiSettingServiceBaseImpl; + +/** + * The implementation of the api setting remote service. + * + *

+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.mwg.sicilia.sue.service.ApiSettingService} interface. + * + *

+ * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely. + *

+ * + * @author Manifattura Web Group Srl + * @see it.mwg.sicilia.sue.service.base.ApiSettingServiceBaseImpl + * @see it.mwg.sicilia.sue.service.ApiSettingServiceUtil + */ +public class ApiSettingServiceImpl extends ApiSettingServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link it.mwg.sicilia.sue.service.ApiSettingServiceUtil} to access the api setting remote service. + */ +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/SportelloLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/SportelloLocalServiceImpl.java index 995af4d1..ccb02f69 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/SportelloLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/SportelloLocalServiceImpl.java @@ -14,16 +14,22 @@ package it.mwg.sicilia.sue.service.impl; +import it.mwg.sicilia.sue.NoSuchSportelloException; +import it.mwg.sicilia.sue.model.Sportello; import it.mwg.sicilia.sue.service.base.SportelloLocalServiceBaseImpl; +import com.liferay.portal.kernel.exception.SystemException; + /** * The implementation of the sportello local service. * *

- * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.mwg.sicilia.sue.service.SportelloLocalService} interface. + * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy + * their definitions into the {@link it.mwg.sicilia.sue.service.SportelloLocalService} interface. * *

- * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. + * This is a local service. Methods of this service will not have security checks based on the propagated JAAS + * credentials because this service can only be accessed from within the same VM. *

* * @author Manifattura Web Group Srl @@ -32,8 +38,13 @@ import it.mwg.sicilia.sue.service.base.SportelloLocalServiceBaseImpl; */ public class SportelloLocalServiceImpl extends SportelloLocalServiceBaseImpl { /* - * NOTE FOR DEVELOPERS: - * - * Never reference this interface directly. Always use {@link it.mwg.sicilia.sue.service.SportelloLocalServiceUtil} to access the sportello local service. + * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link + * it.mwg.sicilia.sue.service.SportelloLocalServiceUtil} to access the sportello local service. */ + + @Override + public Sportello findByUserName(String userName) throws NoSuchSportelloException, SystemException { + + return sportelloPersistence.findByUserName(userName); + } } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/SportelloServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/SportelloServiceImpl.java index 7fa2d07a..5bb51a9d 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/SportelloServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/SportelloServiceImpl.java @@ -16,14 +16,18 @@ package it.mwg.sicilia.sue.service.impl; import it.mwg.sicilia.sue.service.base.SportelloServiceBaseImpl; +import java.security.SecureRandom; + /** * The implementation of the sportello remote service. * *

- * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link it.mwg.sicilia.sue.service.SportelloService} interface. + * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy + * their definitions into the {@link it.mwg.sicilia.sue.service.SportelloService} interface. * *

- * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely. + * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS + * credentials because this service can be accessed remotely. *

* * @author Manifattura Web Group Srl @@ -32,8 +36,37 @@ import it.mwg.sicilia.sue.service.base.SportelloServiceBaseImpl; */ public class SportelloServiceImpl extends SportelloServiceBaseImpl { /* - * NOTE FOR DEVELOPERS: - * - * Never reference this interface directly. Always use {@link it.mwg.sicilia.sue.service.SportelloServiceUtil} to access the sportello remote service. + * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link + * it.mwg.sicilia.sue.service.SportelloServiceUtil} to access the sportello remote service. */ + + private static final char[] consonanti = { 'b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'r', 's', + 't', 'v', 'w', 'x', 'y', 'z' }; + private static final char[] vocali = { 'a', 'e', 'i', 'o', 'u' }; + private static final char[] speciali = { '!', '@', '#', '$', '%', '^', '*', '&', '*', '-', '+', '?' }; + + @Override + public String generaPassword(int lunghezza) { + + if (lunghezza < 8) { + lunghezza = 8; + } else if (1 == lunghezza % 2) { + lunghezza++; + } + int max = (lunghezza - 4) / 2; + StringBuilder password = new StringBuilder(); + SecureRandom rnd = new SecureRandom(); + if (rnd.nextInt(2) == 1) { + password.append(consonanti[rnd.nextInt(consonanti.length)]); + } else { + password.append(Character.toUpperCase(consonanti[rnd.nextInt(consonanti.length)])); + } + for (int i = 0; i < max; i++) { + password.append(vocali[rnd.nextInt(vocali.length)]); + password.append(consonanti[rnd.nextInt(consonanti.length)]); + } + password.append(speciali[rnd.nextInt(speciali.length)]); + password.append(rnd.nextInt(90) + 10); + return password.toString(); + } } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/persistence/ApiSettingPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/persistence/ApiSettingPersistenceImpl.java new file mode 100644 index 00000000..2d332caf --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/persistence/ApiSettingPersistenceImpl.java @@ -0,0 +1,967 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package it.mwg.sicilia.sue.service.persistence; + +import com.liferay.portal.kernel.cache.CacheRegistryUtil; +import com.liferay.portal.kernel.dao.orm.EntityCacheUtil; +import com.liferay.portal.kernel.dao.orm.FinderCacheUtil; +import com.liferay.portal.kernel.dao.orm.FinderPath; +import com.liferay.portal.kernel.dao.orm.Query; +import com.liferay.portal.kernel.dao.orm.QueryPos; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.dao.orm.Session; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.InstanceFactory; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.PropsKeys; +import com.liferay.portal.kernel.util.PropsUtil; +import com.liferay.portal.kernel.util.SetUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.kernel.util.UnmodifiableList; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.model.ModelListener; +import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; + +import it.mwg.sicilia.sue.NoSuchApiSettingException; +import it.mwg.sicilia.sue.model.ApiSetting; +import it.mwg.sicilia.sue.model.impl.ApiSettingImpl; +import it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl; +import it.mwg.sicilia.sue.service.persistence.ApiSettingPersistence; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Set; + +/** + * The persistence implementation for the api setting service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author Manifattura Web Group Srl + * @see ApiSettingPersistence + * @see ApiSettingUtil + * @generated + */ +public class ApiSettingPersistenceImpl extends BasePersistenceImpl + implements ApiSettingPersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link ApiSettingUtil} to access the api setting persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + public static final String FINDER_CLASS_NAME_ENTITY = ApiSettingImpl.class.getName(); + public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List1"; + public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List2"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(ApiSettingModelImpl.ENTITY_CACHE_ENABLED, + ApiSettingModelImpl.FINDER_CACHE_ENABLED, ApiSettingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(ApiSettingModelImpl.ENTITY_CACHE_ENABLED, + ApiSettingModelImpl.FINDER_CACHE_ENABLED, ApiSettingImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(ApiSettingModelImpl.ENTITY_CACHE_ENABLED, + ApiSettingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); + public static final FinderPath FINDER_PATH_FETCH_BY_COMPANYIDKEY = new FinderPath(ApiSettingModelImpl.ENTITY_CACHE_ENABLED, + ApiSettingModelImpl.FINDER_CACHE_ENABLED, ApiSettingImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByCompanyIdKey", + new String[] { Long.class.getName(), Long.class.getName() }, + ApiSettingModelImpl.COMPANYID_COLUMN_BITMASK | + ApiSettingModelImpl.KEY_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_COMPANYIDKEY = new FinderPath(ApiSettingModelImpl.ENTITY_CACHE_ENABLED, + ApiSettingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByCompanyIdKey", + new String[] { Long.class.getName(), Long.class.getName() }); + + /** + * Returns the api setting where companyId = ? and key = ? or throws a {@link it.mwg.sicilia.sue.NoSuchApiSettingException} if it could not be found. + * + * @param companyId the company ID + * @param key the key + * @return the matching api setting + * @throws it.mwg.sicilia.sue.NoSuchApiSettingException if a matching api setting could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ApiSetting findByCompanyIdKey(long companyId, long key) + throws NoSuchApiSettingException, SystemException { + ApiSetting apiSetting = fetchByCompanyIdKey(companyId, key); + + if (apiSetting == null) { + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("companyId="); + msg.append(companyId); + + msg.append(", key="); + msg.append(key); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + if (_log.isWarnEnabled()) { + _log.warn(msg.toString()); + } + + throw new NoSuchApiSettingException(msg.toString()); + } + + return apiSetting; + } + + /** + * Returns the api setting where companyId = ? and key = ? or returns null if it could not be found. Uses the finder cache. + * + * @param companyId the company ID + * @param key the key + * @return the matching api setting, or null if a matching api setting could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ApiSetting fetchByCompanyIdKey(long companyId, long key) + throws SystemException { + return fetchByCompanyIdKey(companyId, key, true); + } + + /** + * Returns the api setting where companyId = ? and key = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param companyId the company ID + * @param key the key + * @param retrieveFromCache whether to use the finder cache + * @return the matching api setting, or null if a matching api setting could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ApiSetting fetchByCompanyIdKey(long companyId, long key, + boolean retrieveFromCache) throws SystemException { + Object[] finderArgs = new Object[] { companyId, key }; + + Object result = null; + + if (retrieveFromCache) { + result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_COMPANYIDKEY, + finderArgs, this); + } + + if (result instanceof ApiSetting) { + ApiSetting apiSetting = (ApiSetting)result; + + if ((companyId != apiSetting.getCompanyId()) || + (key != apiSetting.getKey())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_SELECT_APISETTING_WHERE); + + query.append(_FINDER_COLUMN_COMPANYIDKEY_COMPANYID_2); + + query.append(_FINDER_COLUMN_COMPANYIDKEY_KEY_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(companyId); + + qPos.add(key); + + List list = q.list(); + + if (list.isEmpty()) { + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_COMPANYIDKEY, + finderArgs, list); + } + else { + ApiSetting apiSetting = list.get(0); + + result = apiSetting; + + cacheResult(apiSetting); + + if ((apiSetting.getCompanyId() != companyId) || + (apiSetting.getKey() != key)) { + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_COMPANYIDKEY, + finderArgs, apiSetting); + } + } + } + catch (Exception e) { + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_COMPANYIDKEY, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (ApiSetting)result; + } + } + + /** + * Removes the api setting where companyId = ? and key = ? from the database. + * + * @param companyId the company ID + * @param key the key + * @return the api setting that was removed + * @throws SystemException if a system exception occurred + */ + @Override + public ApiSetting removeByCompanyIdKey(long companyId, long key) + throws NoSuchApiSettingException, SystemException { + ApiSetting apiSetting = findByCompanyIdKey(companyId, key); + + return remove(apiSetting); + } + + /** + * Returns the number of api settings where companyId = ? and key = ?. + * + * @param companyId the company ID + * @param key the key + * @return the number of matching api settings + * @throws SystemException if a system exception occurred + */ + @Override + public int countByCompanyIdKey(long companyId, long key) + throws SystemException { + FinderPath finderPath = FINDER_PATH_COUNT_BY_COMPANYIDKEY; + + Object[] finderArgs = new Object[] { companyId, key }; + + Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, + this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_APISETTING_WHERE); + + query.append(_FINDER_COLUMN_COMPANYIDKEY_COMPANYID_2); + + query.append(_FINDER_COLUMN_COMPANYIDKEY_KEY_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(companyId); + + qPos.add(key); + + count = (Long)q.uniqueResult(); + + FinderCacheUtil.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_COMPANYIDKEY_COMPANYID_2 = "apiSetting.companyId = ? AND "; + private static final String _FINDER_COLUMN_COMPANYIDKEY_KEY_2 = "apiSetting.key = ?"; + + public ApiSettingPersistenceImpl() { + setModelClass(ApiSetting.class); + } + + /** + * Caches the api setting in the entity cache if it is enabled. + * + * @param apiSetting the api setting + */ + @Override + public void cacheResult(ApiSetting apiSetting) { + EntityCacheUtil.putResult(ApiSettingModelImpl.ENTITY_CACHE_ENABLED, + ApiSettingImpl.class, apiSetting.getPrimaryKey(), apiSetting); + + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_COMPANYIDKEY, + new Object[] { apiSetting.getCompanyId(), apiSetting.getKey() }, + apiSetting); + + apiSetting.resetOriginalValues(); + } + + /** + * Caches the api settings in the entity cache if it is enabled. + * + * @param apiSettings the api settings + */ + @Override + public void cacheResult(List apiSettings) { + for (ApiSetting apiSetting : apiSettings) { + if (EntityCacheUtil.getResult( + ApiSettingModelImpl.ENTITY_CACHE_ENABLED, + ApiSettingImpl.class, apiSetting.getPrimaryKey()) == null) { + cacheResult(apiSetting); + } + else { + apiSetting.resetOriginalValues(); + } + } + } + + /** + * Clears the cache for all api settings. + * + *

+ * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache() { + if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { + CacheRegistryUtil.clear(ApiSettingImpl.class.getName()); + } + + EntityCacheUtil.clearCache(ApiSettingImpl.class.getName()); + + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + /** + * Clears the cache for the api setting. + * + *

+ * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache(ApiSetting apiSetting) { + EntityCacheUtil.removeResult(ApiSettingModelImpl.ENTITY_CACHE_ENABLED, + ApiSettingImpl.class, apiSetting.getPrimaryKey()); + + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + clearUniqueFindersCache(apiSetting); + } + + @Override + public void clearCache(List apiSettings) { + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + for (ApiSetting apiSetting : apiSettings) { + EntityCacheUtil.removeResult(ApiSettingModelImpl.ENTITY_CACHE_ENABLED, + ApiSettingImpl.class, apiSetting.getPrimaryKey()); + + clearUniqueFindersCache(apiSetting); + } + } + + protected void cacheUniqueFindersCache(ApiSetting apiSetting) { + if (apiSetting.isNew()) { + Object[] args = new Object[] { + apiSetting.getCompanyId(), apiSetting.getKey() + }; + + FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_COMPANYIDKEY, args, + Long.valueOf(1)); + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_COMPANYIDKEY, args, + apiSetting); + } + else { + ApiSettingModelImpl apiSettingModelImpl = (ApiSettingModelImpl)apiSetting; + + if ((apiSettingModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_COMPANYIDKEY.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + apiSetting.getCompanyId(), apiSetting.getKey() + }; + + FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_COMPANYIDKEY, + args, Long.valueOf(1)); + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_COMPANYIDKEY, + args, apiSetting); + } + } + } + + protected void clearUniqueFindersCache(ApiSetting apiSetting) { + ApiSettingModelImpl apiSettingModelImpl = (ApiSettingModelImpl)apiSetting; + + Object[] args = new Object[] { + apiSetting.getCompanyId(), apiSetting.getKey() + }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMPANYIDKEY, args); + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_COMPANYIDKEY, args); + + if ((apiSettingModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_COMPANYIDKEY.getColumnBitmask()) != 0) { + args = new Object[] { + apiSettingModelImpl.getOriginalCompanyId(), + apiSettingModelImpl.getOriginalKey() + }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMPANYIDKEY, args); + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_COMPANYIDKEY, args); + } + } + + /** + * Creates a new api setting with the primary key. Does not add the api setting to the database. + * + * @param id the primary key for the new api setting + * @return the new api setting + */ + @Override + public ApiSetting create(long id) { + ApiSetting apiSetting = new ApiSettingImpl(); + + apiSetting.setNew(true); + apiSetting.setPrimaryKey(id); + + return apiSetting; + } + + /** + * Removes the api setting with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param id the primary key of the api setting + * @return the api setting that was removed + * @throws it.mwg.sicilia.sue.NoSuchApiSettingException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ApiSetting remove(long id) + throws NoSuchApiSettingException, SystemException { + return remove((Serializable)id); + } + + /** + * Removes the api setting with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param primaryKey the primary key of the api setting + * @return the api setting that was removed + * @throws it.mwg.sicilia.sue.NoSuchApiSettingException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ApiSetting remove(Serializable primaryKey) + throws NoSuchApiSettingException, SystemException { + Session session = null; + + try { + session = openSession(); + + ApiSetting apiSetting = (ApiSetting)session.get(ApiSettingImpl.class, + primaryKey); + + if (apiSetting == null) { + if (_log.isWarnEnabled()) { + _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchApiSettingException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return remove(apiSetting); + } + catch (NoSuchApiSettingException nsee) { + throw nsee; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + @Override + protected ApiSetting removeImpl(ApiSetting apiSetting) + throws SystemException { + apiSetting = toUnwrappedModel(apiSetting); + + Session session = null; + + try { + session = openSession(); + + if (!session.contains(apiSetting)) { + apiSetting = (ApiSetting)session.get(ApiSettingImpl.class, + apiSetting.getPrimaryKeyObj()); + } + + if (apiSetting != null) { + session.delete(apiSetting); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + if (apiSetting != null) { + clearCache(apiSetting); + } + + return apiSetting; + } + + @Override + public ApiSetting updateImpl(it.mwg.sicilia.sue.model.ApiSetting apiSetting) + throws SystemException { + apiSetting = toUnwrappedModel(apiSetting); + + boolean isNew = apiSetting.isNew(); + + Session session = null; + + try { + session = openSession(); + + if (apiSetting.isNew()) { + session.save(apiSetting); + + apiSetting.setNew(false); + } + else { + session.merge(apiSetting); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + + if (isNew || !ApiSettingModelImpl.COLUMN_BITMASK_ENABLED) { + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + EntityCacheUtil.putResult(ApiSettingModelImpl.ENTITY_CACHE_ENABLED, + ApiSettingImpl.class, apiSetting.getPrimaryKey(), apiSetting); + + clearUniqueFindersCache(apiSetting); + cacheUniqueFindersCache(apiSetting); + + return apiSetting; + } + + protected ApiSetting toUnwrappedModel(ApiSetting apiSetting) { + if (apiSetting instanceof ApiSettingImpl) { + return apiSetting; + } + + ApiSettingImpl apiSettingImpl = new ApiSettingImpl(); + + apiSettingImpl.setNew(apiSetting.isNew()); + apiSettingImpl.setPrimaryKey(apiSetting.getPrimaryKey()); + + apiSettingImpl.setId(apiSetting.getId()); + apiSettingImpl.setCompanyId(apiSetting.getCompanyId()); + apiSettingImpl.setKey(apiSetting.getKey()); + apiSettingImpl.setValue(apiSetting.getValue()); + + return apiSettingImpl; + } + + /** + * Returns the api setting with the primary key or throws a {@link com.liferay.portal.NoSuchModelException} if it could not be found. + * + * @param primaryKey the primary key of the api setting + * @return the api setting + * @throws it.mwg.sicilia.sue.NoSuchApiSettingException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ApiSetting findByPrimaryKey(Serializable primaryKey) + throws NoSuchApiSettingException, SystemException { + ApiSetting apiSetting = fetchByPrimaryKey(primaryKey); + + if (apiSetting == null) { + if (_log.isWarnEnabled()) { + _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchApiSettingException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return apiSetting; + } + + /** + * Returns the api setting with the primary key or throws a {@link it.mwg.sicilia.sue.NoSuchApiSettingException} if it could not be found. + * + * @param id the primary key of the api setting + * @return the api setting + * @throws it.mwg.sicilia.sue.NoSuchApiSettingException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ApiSetting findByPrimaryKey(long id) + throws NoSuchApiSettingException, SystemException { + return findByPrimaryKey((Serializable)id); + } + + /** + * Returns the api setting with the primary key or returns null if it could not be found. + * + * @param primaryKey the primary key of the api setting + * @return the api setting, or null if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ApiSetting fetchByPrimaryKey(Serializable primaryKey) + throws SystemException { + ApiSetting apiSetting = (ApiSetting)EntityCacheUtil.getResult(ApiSettingModelImpl.ENTITY_CACHE_ENABLED, + ApiSettingImpl.class, primaryKey); + + if (apiSetting == _nullApiSetting) { + return null; + } + + if (apiSetting == null) { + Session session = null; + + try { + session = openSession(); + + apiSetting = (ApiSetting)session.get(ApiSettingImpl.class, + primaryKey); + + if (apiSetting != null) { + cacheResult(apiSetting); + } + else { + EntityCacheUtil.putResult(ApiSettingModelImpl.ENTITY_CACHE_ENABLED, + ApiSettingImpl.class, primaryKey, _nullApiSetting); + } + } + catch (Exception e) { + EntityCacheUtil.removeResult(ApiSettingModelImpl.ENTITY_CACHE_ENABLED, + ApiSettingImpl.class, primaryKey); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return apiSetting; + } + + /** + * Returns the api setting with the primary key or returns null if it could not be found. + * + * @param id the primary key of the api setting + * @return the api setting, or null if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public ApiSetting fetchByPrimaryKey(long id) throws SystemException { + return fetchByPrimaryKey((Serializable)id); + } + + /** + * Returns all the api settings. + * + * @return the api settings + * @throws SystemException if a system exception occurred + */ + @Override + public List findAll() throws SystemException { + return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the api settings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api settings + * @param end the upper bound of the range of api settings (not inclusive) + * @return the range of api settings + * @throws SystemException if a system exception occurred + */ + @Override + public List findAll(int start, int end) + throws SystemException { + return findAll(start, end, null); + } + + /** + * Returns an ordered range of all the api settings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api settings + * @param end the upper bound of the range of api settings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of api settings + * @throws SystemException if a system exception occurred + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator) throws SystemException { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL; + finderArgs = FINDER_ARGS_EMPTY; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL; + finderArgs = new Object[] { start, end, orderByComparator }; + } + + List list = (List)FinderCacheUtil.getResult(finderPath, + finderArgs, this); + + if (list == null) { + StringBundler query = null; + String sql = null; + + if (orderByComparator != null) { + query = new StringBundler(2 + + (orderByComparator.getOrderByFields().length * 3)); + + query.append(_SQL_SELECT_APISETTING); + + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + + sql = query.toString(); + } + else { + sql = _SQL_SELECT_APISETTING; + + if (pagination) { + sql = sql.concat(ApiSettingModelImpl.ORDER_BY_JPQL); + } + } + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = new UnmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + FinderCacheUtil.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Removes all the api settings from the database. + * + * @throws SystemException if a system exception occurred + */ + @Override + public void removeAll() throws SystemException { + for (ApiSetting apiSetting : findAll()) { + remove(apiSetting); + } + } + + /** + * Returns the number of api settings. + * + * @return the number of api settings + * @throws SystemException if a system exception occurred + */ + @Override + public int countAll() throws SystemException { + Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, this); + + if (count == null) { + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(_SQL_COUNT_APISETTING); + + count = (Long)q.uniqueResult(); + + FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, count); + } + catch (Exception e) { + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + @Override + protected Set getBadColumnNames() { + return _badColumnNames; + } + + /** + * Initializes the api setting persistence. + */ + public void afterPropertiesSet() { + String[] listenerClassNames = StringUtil.split(GetterUtil.getString( + com.liferay.util.service.ServiceProps.get( + "value.object.listener.it.mwg.sicilia.sue.model.ApiSetting"))); + + if (listenerClassNames.length > 0) { + try { + List> listenersList = new ArrayList>(); + + for (String listenerClassName : listenerClassNames) { + listenersList.add((ModelListener)InstanceFactory.newInstance( + getClassLoader(), listenerClassName)); + } + + listeners = listenersList.toArray(new ModelListener[listenersList.size()]); + } + catch (Exception e) { + _log.error(e); + } + } + } + + public void destroy() { + EntityCacheUtil.removeCache(ApiSettingImpl.class.getName()); + FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY); + FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + private static final String _SQL_SELECT_APISETTING = "SELECT apiSetting FROM ApiSetting apiSetting"; + private static final String _SQL_SELECT_APISETTING_WHERE = "SELECT apiSetting FROM ApiSetting apiSetting WHERE "; + private static final String _SQL_COUNT_APISETTING = "SELECT COUNT(apiSetting) FROM ApiSetting apiSetting"; + private static final String _SQL_COUNT_APISETTING_WHERE = "SELECT COUNT(apiSetting) FROM ApiSetting apiSetting WHERE "; + private static final String _ORDER_BY_ENTITY_ALIAS = "apiSetting."; + private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No ApiSetting exists with the primary key "; + private static final String _NO_SUCH_ENTITY_WITH_KEY = "No ApiSetting exists with the key {"; + private static final boolean _HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE = GetterUtil.getBoolean(PropsUtil.get( + PropsKeys.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE)); + private static Log _log = LogFactoryUtil.getLog(ApiSettingPersistenceImpl.class); + private static Set _badColumnNames = SetUtil.fromArray(new String[] { + "id", "key" + }); + private static ApiSetting _nullApiSetting = new ApiSettingImpl() { + @Override + public Object clone() { + return this; + } + + @Override + public CacheModel toCacheModel() { + return _nullApiSettingCacheModel; + } + }; + + private static CacheModel _nullApiSettingCacheModel = new CacheModel() { + @Override + public ApiSetting toEntityModel() { + return _nullApiSetting; + } + }; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/persistence/SportelloPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/persistence/SportelloPersistenceImpl.java index 693b50c7..5d8bbd46 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/persistence/SportelloPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/persistence/SportelloPersistenceImpl.java @@ -19,6 +19,7 @@ import com.liferay.portal.kernel.dao.orm.EntityCacheUtil; import com.liferay.portal.kernel.dao.orm.FinderCacheUtil; import com.liferay.portal.kernel.dao.orm.FinderPath; import com.liferay.portal.kernel.dao.orm.Query; +import com.liferay.portal.kernel.dao.orm.QueryPos; import com.liferay.portal.kernel.dao.orm.QueryUtil; import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.exception.SystemException; @@ -29,9 +30,12 @@ import com.liferay.portal.kernel.util.InstanceFactory; import com.liferay.portal.kernel.util.OrderByComparator; import com.liferay.portal.kernel.util.PropsKeys; import com.liferay.portal.kernel.util.PropsUtil; +import com.liferay.portal.kernel.util.SetUtil; import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringUtil; import com.liferay.portal.kernel.util.UnmodifiableList; +import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.model.CacheModel; import com.liferay.portal.model.ModelListener; import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; @@ -47,6 +51,7 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.Set; /** * The persistence implementation for the sportello service. @@ -81,6 +86,457 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, SportelloModelImpl.FINDER_CACHE_ENABLED, Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); + public static final FinderPath FINDER_PATH_FETCH_BY_COMUNEID = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, + SportelloModelImpl.FINDER_CACHE_ENABLED, SportelloImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByComuneId", + new String[] { Long.class.getName() }, + SportelloModelImpl.COMUNEID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_COMUNEID = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, + SportelloModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByComuneId", + new String[] { Long.class.getName() }); + + /** + * Returns the sportello where comuneId = ? or throws a {@link it.mwg.sicilia.sue.NoSuchSportelloException} if it could not be found. + * + * @param comuneId the comune ID + * @return the matching sportello + * @throws it.mwg.sicilia.sue.NoSuchSportelloException if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Sportello findByComuneId(long comuneId) + throws NoSuchSportelloException, SystemException { + Sportello sportello = fetchByComuneId(comuneId); + + if (sportello == null) { + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("comuneId="); + msg.append(comuneId); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + if (_log.isWarnEnabled()) { + _log.warn(msg.toString()); + } + + throw new NoSuchSportelloException(msg.toString()); + } + + return sportello; + } + + /** + * Returns the sportello where comuneId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param comuneId the comune ID + * @return the matching sportello, or null if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Sportello fetchByComuneId(long comuneId) throws SystemException { + return fetchByComuneId(comuneId, true); + } + + /** + * Returns the sportello where comuneId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param comuneId the comune ID + * @param retrieveFromCache whether to use the finder cache + * @return the matching sportello, or null if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Sportello fetchByComuneId(long comuneId, boolean retrieveFromCache) + throws SystemException { + Object[] finderArgs = new Object[] { comuneId }; + + Object result = null; + + if (retrieveFromCache) { + result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_COMUNEID, + finderArgs, this); + } + + if (result instanceof Sportello) { + Sportello sportello = (Sportello)result; + + if ((comuneId != sportello.getComuneId())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_SELECT_SPORTELLO_WHERE); + + query.append(_FINDER_COLUMN_COMUNEID_COMUNEID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(comuneId); + + List list = q.list(); + + if (list.isEmpty()) { + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_COMUNEID, + finderArgs, list); + } + else { + Sportello sportello = list.get(0); + + result = sportello; + + cacheResult(sportello); + + if ((sportello.getComuneId() != comuneId)) { + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_COMUNEID, + finderArgs, sportello); + } + } + } + catch (Exception e) { + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_COMUNEID, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (Sportello)result; + } + } + + /** + * Removes the sportello where comuneId = ? from the database. + * + * @param comuneId the comune ID + * @return the sportello that was removed + * @throws SystemException if a system exception occurred + */ + @Override + public Sportello removeByComuneId(long comuneId) + throws NoSuchSportelloException, SystemException { + Sportello sportello = findByComuneId(comuneId); + + return remove(sportello); + } + + /** + * Returns the number of sportellos where comuneId = ?. + * + * @param comuneId the comune ID + * @return the number of matching sportellos + * @throws SystemException if a system exception occurred + */ + @Override + public int countByComuneId(long comuneId) throws SystemException { + FinderPath finderPath = FINDER_PATH_COUNT_BY_COMUNEID; + + Object[] finderArgs = new Object[] { comuneId }; + + Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, + this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_SPORTELLO_WHERE); + + query.append(_FINDER_COLUMN_COMUNEID_COMUNEID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(comuneId); + + count = (Long)q.uniqueResult(); + + FinderCacheUtil.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_COMUNEID_COMUNEID_2 = "sportello.comuneId = ?"; + public static final FinderPath FINDER_PATH_FETCH_BY_USERNAME = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, + SportelloModelImpl.FINDER_CACHE_ENABLED, SportelloImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByUserName", + new String[] { String.class.getName() }, + SportelloModelImpl.USERNAME_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_USERNAME = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, + SportelloModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUserName", + new String[] { String.class.getName() }); + + /** + * Returns the sportello where userName = ? or throws a {@link it.mwg.sicilia.sue.NoSuchSportelloException} if it could not be found. + * + * @param userName the user name + * @return the matching sportello + * @throws it.mwg.sicilia.sue.NoSuchSportelloException if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Sportello findByUserName(String userName) + throws NoSuchSportelloException, SystemException { + Sportello sportello = fetchByUserName(userName); + + if (sportello == null) { + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("userName="); + msg.append(userName); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + if (_log.isWarnEnabled()) { + _log.warn(msg.toString()); + } + + throw new NoSuchSportelloException(msg.toString()); + } + + return sportello; + } + + /** + * Returns the sportello where userName = ? or returns null if it could not be found. Uses the finder cache. + * + * @param userName the user name + * @return the matching sportello, or null if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Sportello fetchByUserName(String userName) throws SystemException { + return fetchByUserName(userName, true); + } + + /** + * Returns the sportello where userName = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param userName the user name + * @param retrieveFromCache whether to use the finder cache + * @return the matching sportello, or null if a matching sportello could not be found + * @throws SystemException if a system exception occurred + */ + @Override + public Sportello fetchByUserName(String userName, boolean retrieveFromCache) + throws SystemException { + Object[] finderArgs = new Object[] { userName }; + + Object result = null; + + if (retrieveFromCache) { + result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_USERNAME, + finderArgs, this); + } + + if (result instanceof Sportello) { + Sportello sportello = (Sportello)result; + + if (!Validator.equals(userName, sportello.getUserName())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_SELECT_SPORTELLO_WHERE); + + boolean bindUserName = false; + + if (userName == null) { + query.append(_FINDER_COLUMN_USERNAME_USERNAME_1); + } + else if (userName.equals(StringPool.BLANK)) { + query.append(_FINDER_COLUMN_USERNAME_USERNAME_3); + } + else { + bindUserName = true; + + query.append(_FINDER_COLUMN_USERNAME_USERNAME_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUserName) { + qPos.add(userName); + } + + List list = q.list(); + + if (list.isEmpty()) { + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_USERNAME, + finderArgs, list); + } + else { + Sportello sportello = list.get(0); + + result = sportello; + + cacheResult(sportello); + + if ((sportello.getUserName() == null) || + !sportello.getUserName().equals(userName)) { + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_USERNAME, + finderArgs, sportello); + } + } + } + catch (Exception e) { + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_USERNAME, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (Sportello)result; + } + } + + /** + * Removes the sportello where userName = ? from the database. + * + * @param userName the user name + * @return the sportello that was removed + * @throws SystemException if a system exception occurred + */ + @Override + public Sportello removeByUserName(String userName) + throws NoSuchSportelloException, SystemException { + Sportello sportello = findByUserName(userName); + + return remove(sportello); + } + + /** + * Returns the number of sportellos where userName = ?. + * + * @param userName the user name + * @return the number of matching sportellos + * @throws SystemException if a system exception occurred + */ + @Override + public int countByUserName(String userName) throws SystemException { + FinderPath finderPath = FINDER_PATH_COUNT_BY_USERNAME; + + Object[] finderArgs = new Object[] { userName }; + + Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, + this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_SPORTELLO_WHERE); + + boolean bindUserName = false; + + if (userName == null) { + query.append(_FINDER_COLUMN_USERNAME_USERNAME_1); + } + else if (userName.equals(StringPool.BLANK)) { + query.append(_FINDER_COLUMN_USERNAME_USERNAME_3); + } + else { + bindUserName = true; + + query.append(_FINDER_COLUMN_USERNAME_USERNAME_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUserName) { + qPos.add(userName); + } + + count = (Long)q.uniqueResult(); + + FinderCacheUtil.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + FinderCacheUtil.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_USERNAME_USERNAME_1 = "sportello.userName IS NULL"; + private static final String _FINDER_COLUMN_USERNAME_USERNAME_2 = "sportello.userName = ?"; + private static final String _FINDER_COLUMN_USERNAME_USERNAME_3 = "(sportello.userName IS NULL OR sportello.userName = '')"; public SportelloPersistenceImpl() { setModelClass(Sportello.class); @@ -96,6 +552,12 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl EntityCacheUtil.putResult(SportelloModelImpl.ENTITY_CACHE_ENABLED, SportelloImpl.class, sportello.getPrimaryKey(), sportello); + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_COMUNEID, + new Object[] { sportello.getComuneId() }, sportello); + + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_USERNAME, + new Object[] { sportello.getUserName() }, sportello); + sportello.resetOriginalValues(); } @@ -152,6 +614,8 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + clearUniqueFindersCache(sportello); } @Override @@ -162,6 +626,79 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl for (Sportello sportello : sportellos) { EntityCacheUtil.removeResult(SportelloModelImpl.ENTITY_CACHE_ENABLED, SportelloImpl.class, sportello.getPrimaryKey()); + + clearUniqueFindersCache(sportello); + } + } + + protected void cacheUniqueFindersCache(Sportello sportello) { + if (sportello.isNew()) { + Object[] args = new Object[] { sportello.getComuneId() }; + + FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_COMUNEID, args, + Long.valueOf(1)); + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_COMUNEID, args, + sportello); + + args = new Object[] { sportello.getUserName() }; + + FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_USERNAME, args, + Long.valueOf(1)); + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_USERNAME, args, + sportello); + } + else { + SportelloModelImpl sportelloModelImpl = (SportelloModelImpl)sportello; + + if ((sportelloModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_COMUNEID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { sportello.getComuneId() }; + + FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_COMUNEID, args, + Long.valueOf(1)); + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_COMUNEID, args, + sportello); + } + + if ((sportelloModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_USERNAME.getColumnBitmask()) != 0) { + Object[] args = new Object[] { sportello.getUserName() }; + + FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_USERNAME, args, + Long.valueOf(1)); + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_USERNAME, args, + sportello); + } + } + } + + protected void clearUniqueFindersCache(Sportello sportello) { + SportelloModelImpl sportelloModelImpl = (SportelloModelImpl)sportello; + + Object[] args = new Object[] { sportello.getComuneId() }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMUNEID, args); + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_COMUNEID, args); + + if ((sportelloModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_COMUNEID.getColumnBitmask()) != 0) { + args = new Object[] { sportelloModelImpl.getOriginalComuneId() }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COMUNEID, args); + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_COMUNEID, args); + } + + args = new Object[] { sportello.getUserName() }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERNAME, args); + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_USERNAME, args); + + if ((sportelloModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_USERNAME.getColumnBitmask()) != 0) { + args = new Object[] { sportelloModelImpl.getOriginalUserName() }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERNAME, args); + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_USERNAME, args); } } @@ -299,13 +836,16 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); - if (isNew) { + if (isNew || !SportelloModelImpl.COLUMN_BITMASK_ENABLED) { FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); } EntityCacheUtil.putResult(SportelloModelImpl.ENTITY_CACHE_ENABLED, SportelloImpl.class, sportello.getPrimaryKey(), sportello); + clearUniqueFindersCache(sportello); + cacheUniqueFindersCache(sportello); + return sportello; } @@ -322,10 +862,20 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl sportelloImpl.setSportelloId(sportello.getSportelloId()); sportelloImpl.setGroupId(sportello.getGroupId()); sportelloImpl.setCompanyId(sportello.getCompanyId()); - sportelloImpl.setUserId(sportello.getUserId()); - sportelloImpl.setUserName(sportello.getUserName()); sportelloImpl.setCreateDate(sportello.getCreateDate()); + sportelloImpl.setCreateUserId(sportello.getCreateUserId()); + sportelloImpl.setCreateUserName(sportello.getCreateUserName()); sportelloImpl.setModifiedDate(sportello.getModifiedDate()); + sportelloImpl.setModifiedUserId(sportello.getModifiedUserId()); + sportelloImpl.setModifiedUserName(sportello.getModifiedUserName()); + sportelloImpl.setUserName(sportello.getUserName()); + sportelloImpl.setEmail(sportello.getEmail()); + sportelloImpl.setComuneId(sportello.getComuneId()); + sportelloImpl.setAttivo(sportello.isAttivo()); + sportelloImpl.setPassword(sportello.getPassword()); + sportelloImpl.setPasswordModifiedDate(sportello.getPasswordModifiedDate()); + sportelloImpl.setPasswordModifiedUserId(sportello.getPasswordModifiedUserId()); + sportelloImpl.setPasswordModifiedUserName(sportello.getPasswordModifiedUserName()); return sportelloImpl; } @@ -603,6 +1153,11 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl return count.intValue(); } + @Override + protected Set getBadColumnNames() { + return _badColumnNames; + } + /** * Initializes the sportello persistence. */ @@ -636,12 +1191,18 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl } private static final String _SQL_SELECT_SPORTELLO = "SELECT sportello FROM Sportello sportello"; + private static final String _SQL_SELECT_SPORTELLO_WHERE = "SELECT sportello FROM Sportello sportello WHERE "; private static final String _SQL_COUNT_SPORTELLO = "SELECT COUNT(sportello) FROM Sportello sportello"; + private static final String _SQL_COUNT_SPORTELLO_WHERE = "SELECT COUNT(sportello) FROM Sportello sportello WHERE "; private static final String _ORDER_BY_ENTITY_ALIAS = "sportello."; private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No Sportello exists with the primary key "; + private static final String _NO_SUCH_ENTITY_WITH_KEY = "No Sportello exists with the key {"; private static final boolean _HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE = GetterUtil.getBoolean(PropsUtil.get( PropsKeys.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE)); private static Log _log = LogFactoryUtil.getLog(SportelloPersistenceImpl.class); + private static Set _badColumnNames = SetUtil.fromArray(new String[] { + "password" + }); private static Sportello _nullSportello = new SportelloImpl() { @Override public Object clone() { diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/startup/Startup.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/startup/Startup.java new file mode 100644 index 00000000..ed69380f --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/startup/Startup.java @@ -0,0 +1,75 @@ +package it.mwg.sicilia.sue.startup; + +import it.mwg.sicilia.sue.api.v1.ApiConstants; +import it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil; + +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.NoSuchAlgorithmException; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.liferay.portal.kernel.events.ActionException; +import com.liferay.portal.kernel.events.SimpleAction; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.security.SecureRandom; +import com.liferay.portal.kernel.util.Base64; +import com.liferay.portal.kernel.util.Validator; + +public class Startup extends SimpleAction { + + private static final Log _log = LogFactoryUtil.getLog(Startup.class); + + @Override + public void run(String[] ids) throws ActionException { + for (String id : ids) { + long companyId = Long.parseLong(id); + String secret = null; + try { + secret = ApiSettingLocalServiceUtil.get(companyId, ApiConstants.API_SECRET); + _log.info("apiSetting = " + secret); + if (Validator.isNull(secret)) { + SecureRandom rnd = new SecureRandom(); + byte[] bytes = new byte[32]; + rnd.nextBytes(bytes); + ApiSettingLocalServiceUtil.set(companyId, ApiConstants.API_SECRET, DigestUtils.sha256Hex(bytes)); + } + } catch (SystemException e) { + _log.error(e, e); + } + chiavi(companyId); + } + } + + private void chiavi(long companyId) { + + String s1 = null; + String s2 = null; + try { + s1 = ApiSettingLocalServiceUtil.get(companyId, ApiConstants.API_PRIVATE_KEY); + s2 = ApiSettingLocalServiceUtil.get(companyId, ApiConstants.API_PUBLIC_KEY); + } catch (SystemException e1) { + } + if (Validator.isNull(s1) || Validator.isNull(s2)) { + KeyPairGenerator generator = null; + try { + generator = KeyPairGenerator.getInstance("RSA"); + } catch (NoSuchAlgorithmException e) { + } + if (Validator.isNotNull(generator)) { + generator.initialize(1536); + KeyPair pair = generator.generateKeyPair(); + try { + ApiSettingLocalServiceUtil.set(companyId, ApiConstants.API_PRIVATE_KEY, + Base64.encode(pair.getPrivate().getEncoded())); + ApiSettingLocalServiceUtil.set(companyId, ApiConstants.API_PUBLIC_KEY, + Base64.encode(pair.getPublic().getEncoded())); + } catch (SystemException e) { + e.printStackTrace(); + } + } + } + } +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/portal.properties b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/portal.properties new file mode 100644 index 00000000..5d5ae049 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/portal.properties @@ -0,0 +1 @@ +application.startup.events=it.mwg.sicilia.sue.startup.Startup diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/service.properties index a546194e..504a75f0 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=sicilia_sue - build.number=4 - build.date=1621344885196 + build.number=62 + build.date=1624370773646 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/css/api/v1/api.css b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/css/api/v1/api.css new file mode 100644 index 00000000..52a7226e --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/css/api/v1/api.css @@ -0,0 +1,70 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) */ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +/* End reset.css */ +body { + margin: 10px; + font-family: sans-serif; +} +div { + margin-bottom: 5px; +} +b { + font-weight: bold; +} +pre { + background-color: #ccc; + width: fit-content; + padding: 10px; + border: 1px solid #999; +} +.command { + border-bottom: 1px solid #999; + padding: 10px 0; +} +.parameter { + margin-left: 40px; +} diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/edit_sportello.jsp b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/edit_sportello.jsp new file mode 100644 index 00000000..bb7bf10a --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/edit_sportello.jsp @@ -0,0 +1,115 @@ +<%@page import="it.mwg.sicilia.sue.service.SportelloServiceUtil"%> +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.liferay.portal.kernel.util.ParamUtil"%> +<%@page import="com.liferay.portal.kernel.util.StringPool"%> +<%@page import="com.liferay.portal.kernel.util.Validator"%> +<%@page import="it.mwg.sicilia.sue.model.Sportello"%> +<%@page import="it.mwg.sicilia.sue.portlet.SueAdministrationPortlet"%> +<%@page import="it.mwg.sicilia.sue.service.SportelloLocalServiceUtil"%> +<%@include file="/html/init.jsp"%> + +<% +long sportelloId = ParamUtil.getLong(request, "sportelloId", 0); +Sportello sportello = sportelloId == 0 ? null : SportelloLocalServiceUtil.getSportello(sportelloId); +%> + + + + + + + + + + + + + + + + + + + + + + + + + +A.one('#generate').on('click', function(event) { + Liferay.Service( + '/sicilia-sue-connector-portlet.sportello/genera-password', + { + lunghezza: 12, + }, + function(obj) { + A.one('#password').set('value', obj); + } + ); +}); +A.mix( + A.config.FormValidator.RULES, { + requiredSelect: function(value, fieldNode, ruleValue) { + return value !== '0' && value !== '' && value !== undefined; + }, + }, + true +); +new A.FormValidator({ + boundingBox: document.edit, + rules: { + provincia:{ + requiredSelect:'provincia' + }, + comune:{ + requiredSelect:'comune' + }, + }, +}); +var getProvince = function(callback) { + A.io.request('<%= getProvinceURL %>', { + dataType: 'json', + on: { + success: function() { + callback(this.get('responseData')); + }, + }, + }); +}; +var getComuni = function(callback, codice) { + A.io.request('<%= getComuniURL %>', { + data: { + codice: codice, + }, + dataType: 'json', + on: { + success: function() { + callback(this.get('responseData')); + }, + }, + }); +}; +new Liferay.DynamicSelect([ + { + select: 'provincia', + selectData: getProvince, + selectDesc: 'desc', + selectId: 'id', + selectSort: true, + selectVal: '<%= Validator.isNull(sportello) ? "0" : sportello.getCodiceProvincia() %>', + }, + { + select: 'comune', + selectData: getComuni, + selectDesc: 'desc', + selectId: 'id', + selectSort: true, + selectVal: '<%= Validator.isNull(sportello) ? 0 : sportello.getComuneId() %>', + }, +]); + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/view.jsp b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/view.jsp new file mode 100644 index 00000000..f66b0005 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/view.jsp @@ -0,0 +1,58 @@ +<%@page import="com.liferay.portal.kernel.util.Constants"%> +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%> +<%@page import="java.text.NumberFormat"%> +<%@page import="it.mwg.sicilia.sue.model.Sportello"%> +<%@page import="it.mwg.sicilia.sue.service.SportelloLocalServiceUtil"%> +<%@include file="/html/init.jsp"%> + + + + + + + + + + + + <% + NumberFormat format = NumberFormat.getInstance(); + String redirect = searchContainer.getIteratorURL().toString(); + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/init.jsp b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/init.jsp new file mode 100644 index 00000000..4fc16bf4 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/init.jsp @@ -0,0 +1,20 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%> +<%@taglib uri="http://liferay.com/tld/aui" prefix="aui"%> +<%@taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet"%> +<%@taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme"%> +<%@taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui"%> +<%@taglib uri="http://liferay.com/tld/util" prefix="liferay-util"%> + +<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> +<%@page import="com.liferay.portlet.PortletURLUtil"%> +<%@page import="javax.portlet.PortletURL"%> + + + +<% +PortletURL portletURL = PortletURLUtil.getCurrent(liferayPortletRequest, liferayPortletResponse); +PortletURL iteratorURL = liferayPortletResponse.createRenderURL(); +%> \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/themes/provatema-theme/build.xml b/liferay-plugins-sdk-6.2/themes/provatema-theme/build.xml deleted file mode 100644 index e21a3b23..00000000 --- a/liferay-plugins-sdk-6.2/themes/provatema-theme/build.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/META-INF/MANIFEST.MF b/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e1..00000000 --- a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/commons-logging.jar b/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/commons-logging.jar deleted file mode 100644 index 8758a96b..00000000 Binary files a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/commons-logging.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/log4j.jar b/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/log4j.jar deleted file mode 100644 index 068867eb..00000000 Binary files a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/log4j.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-bridges.jar b/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-bridges.jar deleted file mode 100644 index 7d7435fe..00000000 Binary files a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-bridges.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-java.jar b/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-java.jar deleted file mode 100644 index 6b5d95f8..00000000 Binary files a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-java.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-taglib.jar b/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-taglib.jar deleted file mode 100644 index fbba5f0a..00000000 Binary files a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-taglib.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/liferay-look-and-feel.xml b/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/liferay-look-and-feel.xml deleted file mode 100644 index fbc576b2..00000000 --- a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/liferay-look-and-feel.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - 6.2.5+ - - - ftl - - \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/liferay-plugin-package.properties b/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/liferay-plugin-package.properties deleted file mode 100644 index 822b7e75..00000000 --- a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/liferay-plugin-package.properties +++ /dev/null @@ -1,16 +0,0 @@ -name=Provatema -module-group-id=liferay -module-incremental-version=1 -tags= -short-description= -long-description= -change-log= -page-url=http://www.liferay.com -author=Liferay, Inc. -licenses=LGPL -liferay-versions=6.2.0+ - -#required-deployment-contexts=\ -# resources-importer-web - -resources-importer-developer-mode-enabled=true \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/src/resources-importer/readme.txt b/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/src/resources-importer/readme.txt deleted file mode 100644 index bc25439f..00000000 --- a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/src/resources-importer/readme.txt +++ /dev/null @@ -1,2 +0,0 @@ -See http://www.liferay.com/community/wiki/-/wiki/Main/Resources+Importer+Web -for more information about the Resources Importer. \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/src/resources-importer/sitemap.json b/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/src/resources-importer/sitemap.json deleted file mode 100644 index e4f13d46..00000000 --- a/liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/src/resources-importer/sitemap.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "layoutTemplateId": "2_columns_ii", - "privatePages": [ - { - "columns": [ - [ - { - "portletId": "58" - } - ], - [ - { - "portletId": "47" - } - ] - ], - "friendlyURL": "/home", - "name": "Welcome", - "title": "Welcome" - } - ] -} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/edit_workflow_task.jsp b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/edit_workflow_task.jsp index 26534e11..0839d88f 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/edit_workflow_task.jsp +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/edit_workflow_task.jsp @@ -29,12 +29,10 @@ WorkflowTask workflowTask = (WorkflowTask)request.getAttribute(WebKeys.WORKFLOW_ WorkflowInstance workflowInstance = WorkflowInstanceManagerUtil.getWorkflowInstance(company.getCompanyId(), workflowTask.getWorkflowInstanceId()); Map workflowContext = workflowInstance.getWorkflowContext(); - long companyId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_COMPANY_ID)); long groupId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_GROUP_ID)); String className = (String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME); long classPK = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); - WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil.getWorkflowHandler(className); AssetRenderer assetRenderer = workflowHandler.getAssetRenderer(classPK); diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties index 25d02bc1..24c3efb0 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties @@ -13,13 +13,8 @@ ## build.namespace=Kaleo -<<<<<<< HEAD - build.number=46 - build.date=1620737685752 -======= - build.number=47 - build.date=1621850598948 ->>>>>>> paesaggistica + build.number=49 + build.date=1624443212030 build.auto.upgrade=true ##