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/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties index bed90e50..eddf0a24 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=3145 - build.date=1621866062117 + build.number=3146 + build.date=1622551721804 build.auto.upgrade=true ## 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-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/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..985e89cf 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-plugin-package.properties b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-plugin-package.properties index 066b9eef..ce76ffaa 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,10 @@ 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,\ + 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..49ff4f07 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 @@ -31,4 +31,35 @@ user + + sicilia-sue-administration + Amministrazione Connettore SUE + it.mwg.sicilia.sue.portlet.SueAdministrationPortlet + + view-template + /html/administration/view.jsp + + 0 + + text/html + view + + + 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..4a3af20e 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 @@ -15,7 +15,13 @@ + + + + + + \ 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..c4561e05 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 @@ -81,6 +81,9 @@ public class SportelloClp extends BaseModelImpl implements Sportello attributes.put("userName", getUserName()); attributes.put("createDate", getCreateDate()); attributes.put("modifiedDate", getModifiedDate()); + attributes.put("loginName", getLoginName()); + attributes.put("password", getPassword()); + attributes.put("nonce", getNonce()); return attributes; } @@ -128,6 +131,24 @@ public class SportelloClp extends BaseModelImpl implements Sportello if (modifiedDate != null) { setModifiedDate(modifiedDate); } + + String loginName = (String)attributes.get("loginName"); + + if (loginName != null) { + setLoginName(loginName); + } + + String password = (String)attributes.get("password"); + + if (password != null) { + setPassword(password); + } + + String nonce = (String)attributes.get("nonce"); + + if (nonce != null) { + setNonce(nonce); + } } @Override @@ -301,6 +322,75 @@ public class SportelloClp extends BaseModelImpl implements Sportello } } + @Override + public String getLoginName() { + return _loginName; + } + + @Override + public void setLoginName(String loginName) { + _loginName = loginName; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setLoginName", String.class); + + method.invoke(_sportelloRemoteModel, loginName); + } + 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 String getNonce() { + return _nonce; + } + + @Override + public void setNonce(String nonce) { + _nonce = nonce; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setNonce", String.class); + + method.invoke(_sportelloRemoteModel, nonce); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + public BaseModel getSportelloRemoteModel() { return _sportelloRemoteModel; } @@ -377,6 +467,9 @@ public class SportelloClp extends BaseModelImpl implements Sportello clone.setUserName(getUserName()); clone.setCreateDate(getCreateDate()); clone.setModifiedDate(getModifiedDate()); + clone.setLoginName(getLoginName()); + clone.setPassword(getPassword()); + clone.setNonce(getNonce()); return clone; } @@ -429,7 +522,7 @@ public class SportelloClp extends BaseModelImpl implements Sportello @Override public String toString() { - StringBundler sb = new StringBundler(15); + StringBundler sb = new StringBundler(21); sb.append("{sportelloId="); sb.append(getSportelloId()); @@ -445,6 +538,12 @@ public class SportelloClp extends BaseModelImpl implements Sportello sb.append(getCreateDate()); sb.append(", modifiedDate="); sb.append(getModifiedDate()); + sb.append(", loginName="); + sb.append(getLoginName()); + sb.append(", password="); + sb.append(getPassword()); + sb.append(", nonce="); + sb.append(getNonce()); sb.append("}"); return sb.toString(); @@ -452,7 +551,7 @@ public class SportelloClp extends BaseModelImpl implements Sportello @Override public String toXmlString() { - StringBundler sb = new StringBundler(25); + StringBundler sb = new StringBundler(34); sb.append(""); sb.append("it.mwg.sicilia.sue.model.Sportello"); @@ -486,6 +585,18 @@ public class SportelloClp extends BaseModelImpl implements Sportello "modifiedDate"); + sb.append( + "loginName"); + sb.append( + "password"); + sb.append( + "nonce"); sb.append(""); @@ -500,6 +611,9 @@ public class SportelloClp extends BaseModelImpl implements Sportello private String _userName; private Date _createDate; private Date _modifiedDate; + private String _loginName; + private String _password; + private String _nonce; 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..bbe670cf 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 @@ -189,6 +189,51 @@ public interface SportelloModel extends BaseModel, GroupedModel { @Override public void setModifiedDate(Date modifiedDate); + /** + * Returns the login name of this sportello. + * + * @return the login name of this sportello + */ + @AutoEscape + public String getLoginName(); + + /** + * Sets the login name of this sportello. + * + * @param loginName the login name of this sportello + */ + public void setLoginName(String loginName); + + /** + * 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 nonce of this sportello. + * + * @return the nonce of this sportello + */ + @AutoEscape + public String getNonce(); + + /** + * Sets the nonce of this sportello. + * + * @param nonce the nonce of this sportello + */ + public void setNonce(String nonce); + @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..1dc57500 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 @@ -38,6 +38,9 @@ public class SportelloSoap implements Serializable { soapModel.setUserName(model.getUserName()); soapModel.setCreateDate(model.getCreateDate()); soapModel.setModifiedDate(model.getModifiedDate()); + soapModel.setLoginName(model.getLoginName()); + soapModel.setPassword(model.getPassword()); + soapModel.setNonce(model.getNonce()); return soapModel; } @@ -146,6 +149,30 @@ public class SportelloSoap implements Serializable { _modifiedDate = modifiedDate; } + public String getLoginName() { + return _loginName; + } + + public void setLoginName(String loginName) { + _loginName = loginName; + } + + public String getPassword() { + return _password; + } + + public void setPassword(String password) { + _password = password; + } + + public String getNonce() { + return _nonce; + } + + public void setNonce(String nonce) { + _nonce = nonce; + } + private long _sportelloId; private long _groupId; private long _companyId; @@ -153,4 +180,7 @@ public class SportelloSoap implements Serializable { private String _userName; private Date _createDate; private Date _modifiedDate; + private String _loginName; + private String _password; + private String _nonce; } \ 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..db1e12c2 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 @@ -56,6 +56,9 @@ public class SportelloWrapper implements Sportello, ModelWrapper { attributes.put("userName", getUserName()); attributes.put("createDate", getCreateDate()); attributes.put("modifiedDate", getModifiedDate()); + attributes.put("loginName", getLoginName()); + attributes.put("password", getPassword()); + attributes.put("nonce", getNonce()); return attributes; } @@ -103,6 +106,24 @@ public class SportelloWrapper implements Sportello, ModelWrapper { if (modifiedDate != null) { setModifiedDate(modifiedDate); } + + String loginName = (String)attributes.get("loginName"); + + if (loginName != null) { + setLoginName(loginName); + } + + String password = (String)attributes.get("password"); + + if (password != null) { + setPassword(password); + } + + String nonce = (String)attributes.get("nonce"); + + if (nonce != null) { + setNonce(nonce); + } } /** @@ -287,6 +308,66 @@ public class SportelloWrapper implements Sportello, ModelWrapper { _sportello.setModifiedDate(modifiedDate); } + /** + * Returns the login name of this sportello. + * + * @return the login name of this sportello + */ + @Override + public java.lang.String getLoginName() { + return _sportello.getLoginName(); + } + + /** + * Sets the login name of this sportello. + * + * @param loginName the login name of this sportello + */ + @Override + public void setLoginName(java.lang.String loginName) { + _sportello.setLoginName(loginName); + } + + /** + * 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 nonce of this sportello. + * + * @return the nonce of this sportello + */ + @Override + public java.lang.String getNonce() { + return _sportello.getNonce(); + } + + /** + * Sets the nonce of this sportello. + * + * @param nonce the nonce of this sportello + */ + @Override + public void setNonce(java.lang.String nonce) { + _sportello.setNonce(nonce); + } + @Override public boolean isNew() { return _sportello.isNew(); 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..a30c21ec 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,64 @@ 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 loginName = ? or throws a {@link it.mwg.sicilia.sue.NoSuchSportelloException} if it could not be found. + * + * @param loginName the login 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 findByLoginName( + java.lang.String loginName) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException; + + /** + * Returns the sportello where loginName = ? or returns null if it could not be found. Uses the finder cache. + * + * @param loginName the login 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 fetchByLoginName( + java.lang.String loginName) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Returns the sportello where loginName = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param loginName the login 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 fetchByLoginName( + java.lang.String loginName, boolean retrieveFromCache) + throws com.liferay.portal.kernel.exception.SystemException; + + /** + * Removes the sportello where loginName = ? from the database. + * + * @param loginName the login name + * @return the sportello that was removed + * @throws SystemException if a system exception occurred + */ + public it.mwg.sicilia.sue.model.Sportello removeByLoginName( + java.lang.String loginName) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException; + + /** + * Returns the number of sportellos where loginName = ?. + * + * @param loginName the login name + * @return the number of matching sportellos + * @throws SystemException if a system exception occurred + */ + public int countByLoginName(java.lang.String loginName) + 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..b0cc8a25 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,74 @@ public class SportelloUtil { return getPersistence().update(sportello, serviceContext); } + /** + * Returns the sportello where loginName = ? or throws a {@link it.mwg.sicilia.sue.NoSuchSportelloException} if it could not be found. + * + * @param loginName the login 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 findByLoginName( + java.lang.String loginName) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException { + return getPersistence().findByLoginName(loginName); + } + + /** + * Returns the sportello where loginName = ? or returns null if it could not be found. Uses the finder cache. + * + * @param loginName the login 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 fetchByLoginName( + java.lang.String loginName) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByLoginName(loginName); + } + + /** + * Returns the sportello where loginName = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param loginName the login 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 fetchByLoginName( + java.lang.String loginName, boolean retrieveFromCache) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().fetchByLoginName(loginName, retrieveFromCache); + } + + /** + * Removes the sportello where loginName = ? from the database. + * + * @param loginName the login name + * @return the sportello that was removed + * @throws SystemException if a system exception occurred + */ + public static it.mwg.sicilia.sue.model.Sportello removeByLoginName( + java.lang.String loginName) + throws com.liferay.portal.kernel.exception.SystemException, + it.mwg.sicilia.sue.NoSuchSportelloException { + return getPersistence().removeByLoginName(loginName); + } + + /** + * Returns the number of sportellos where loginName = ?. + * + * @param loginName the login name + * @return the number of matching sportellos + * @throws SystemException if a system exception occurred + */ + public static int countByLoginName(java.lang.String loginName) + throws com.liferay.portal.kernel.exception.SystemException { + return getPersistence().countByLoginName(loginName); + } + /** * 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..fed69cef 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,3 @@ +IX_9824D813=sicilia_sue_Sportello.LoginName +IX_9824D813=sicilia_sue_Sportello.loginName +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..924eb0ad 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,2 @@ +create index IX_9824D813 on sicilia_sue_Sportello (loginName); +create 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..7116a560 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 @@ -5,5 +5,8 @@ create table sicilia_sue_Sportello ( userId LONG, userName VARCHAR(75) null, createDate DATE null, - modifiedDate DATE null + modifiedDate DATE null, + loginName VARCHAR(75) null, + password_ VARCHAR(75) null, + nonce VARCHAR(75) 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..a56874b8 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 @@ -14,5 +14,8 @@ + + + \ 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..dbf41d21 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 @@ -9,5 +9,8 @@ + + + \ 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..1c997821 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 @@ -20,6 +20,11 @@ TIMESTAMP + + + + + 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 index 1336daa7..071e786b 100644 --- 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 @@ -15,26 +15,32 @@ public class Action { } 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/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..22753952 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,15 +1,33 @@ package it.mwg.sicilia.sue.api.v1; -import it.mwg.sicilia.sue.api.common.ApiResponse; +import it.mwg.sicilia.sue.NoSuchSportelloException; +import it.mwg.sicilia.sue.model.Sportello; +import it.mwg.sicilia.sue.service.SportelloLocalServiceUtil; +import it.mwg.sicilia.sue.service.persistence.SportelloUtil; import java.io.IOException; +import java.io.InputStreamReader; +import java.io.Serializable; +import java.security.SecureRandom; +import java.util.LinkedHashMap; +import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.codec.digest.DigestUtils; + +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.ServletResponseUtil; +import com.liferay.portal.kernel.util.ContentTypes; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; /** * @author Manifattura Web Group Srl @@ -17,27 +35,64 @@ import com.liferay.portal.kernel.servlet.ServletResponseUtil; @SuppressWarnings("serial") public class ApiServlet extends HttpServlet { + private static final Log _log = LogFactoryUtil.getLog(ApiServlet.class); + private static final JSONDeserializer> deserializer = JSONFactoryUtil + .createJSONDeserializer(); + @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()); - } + response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED); } @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()); + String info = request.getPathInfo(); + if (Validator.isNotNull(info) && !info.equals(StringPool.FORWARD_SLASH)) { + response.sendError(HttpServletResponse.SC_NOT_FOUND); + return; + } + Map parameters = deserializer + .deserialize(new InputStreamReader(request.getInputStream())); + response.setContentType(ContentTypes.APPLICATION_JSON); + response.setCharacterEncoding(StringPool.UTF8); + ServletResponseUtil.write(response, process(parameters)); + } + + private String process(Map parameters) throws IOException { + if (Validator.isNull(parameters)) { + return Response.get(Status.PARSE_ERROR); + } else if (!parameters.containsKey(Parameters.COMMAND)) { + return Response.get(Status.NO_COMMAND_GIVEN); + } else { + switch ((String) parameters.get(Parameters.COMMAND)) { + case Parameters.COMMAND_LOGIN: + return login(parameters); + } + } + return Response.get(Status.INVALID_COMMAND); + } + + private String login(Map parameters) throws IOException { + if (!parameters.containsKey(Parameters.USERNAME)) { + return Response.get(Status.NO_USERNAME_GIVEN); + } + Map extraData = new LinkedHashMap<>(); + String loginName = (String) parameters.get(Parameters.USERNAME); + byte[] bytes = new byte[32]; + SecureRandom rnd = new SecureRandom(); + rnd.nextBytes(bytes); + String nonce = DigestUtils.sha256Hex(bytes); + extraData.put(Parameters.NONCE, nonce); + Sportello sportello = null; + try { + sportello = SportelloUtil.findByLoginName(loginName); + sportello.setNonce(nonce); + SportelloLocalServiceUtil.updateSportello(sportello); + } catch (NoSuchSportelloException | SystemException e) { } + return Response.get(Status.OK, extraData); } } diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Commands.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Commands.java new file mode 100644 index 00000000..b3e8f605 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Commands.java @@ -0,0 +1,5 @@ +package it.mwg.sicilia.sue.api.v1; + +public class Commands { + +} 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..e7c23741 --- /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,7 @@ +package it.mwg.sicilia.sue.api.v1; + +public class Parameters { + + public static final String STATUS_CODE = "status"; + public static final String STATUS_DESCRIPTION = "description"; +} 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..8ab5294a --- /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,31 @@ +package it.mwg.sicilia.sue.api.v1; + +import java.io.IOException; +import java.io.Serializable; +import java.util.LinkedHashMap; +import java.util.Map; + +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONSerializer; +import com.liferay.portal.kernel.util.Validator; + +public class Response { + + private static final JSONSerializer serializer = JSONFactoryUtil.createJSONSerializer(); + + public static String get(int statusCode) throws IOException { + + return get(statusCode, null); + } + + public static String get(int statusCode, Map extraData) { + + Map map = new LinkedHashMap<>(); + map.put(Parameters.STATUS_CODE, statusCode); + map.put(Parameters.STATUS_DESCRIPTION, Status.getStatusDescription(statusCode)); + if (Validator.isNotNull(extraData)) { + map.putAll(extraData); + } + return serializer.serialize(map); + } +} 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..f0f3ca4b --- /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,28 @@ +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 INVALID_COMMAND = 1; + public static final int NO_COMMAND_GIVEN = 2; + public static final int NO_USERNAME_GIVEN = 3; + public static final int PARSE_ERROR = 4; + + @SuppressWarnings("serial") + private static final Map messages = new HashMap() { + { + put(OK, "OK"); + put(INVALID_COMMAND, "Invalid command"); + put(NO_COMMAND_GIVEN, "No command given"); + put(NO_USERNAME_GIVEN, "No username given"); + put(PARSE_ERROR, "Parse error"); + } + }; + + 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/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..bf50585a 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(21); sb.append("{sportelloId="); sb.append(sportelloId); @@ -54,6 +54,12 @@ public class SportelloCacheModel implements CacheModel, sb.append(createDate); sb.append(", modifiedDate="); sb.append(modifiedDate); + sb.append(", loginName="); + sb.append(loginName); + sb.append(", password="); + sb.append(password); + sb.append(", nonce="); + sb.append(nonce); sb.append("}"); return sb.toString(); @@ -89,6 +95,27 @@ public class SportelloCacheModel implements CacheModel, sportelloImpl.setModifiedDate(new Date(modifiedDate)); } + if (loginName == null) { + sportelloImpl.setLoginName(StringPool.BLANK); + } + else { + sportelloImpl.setLoginName(loginName); + } + + if (password == null) { + sportelloImpl.setPassword(StringPool.BLANK); + } + else { + sportelloImpl.setPassword(password); + } + + if (nonce == null) { + sportelloImpl.setNonce(StringPool.BLANK); + } + else { + sportelloImpl.setNonce(nonce); + } + sportelloImpl.resetOriginalValues(); return sportelloImpl; @@ -103,6 +130,9 @@ public class SportelloCacheModel implements CacheModel, userName = objectInput.readUTF(); createDate = objectInput.readLong(); modifiedDate = objectInput.readLong(); + loginName = objectInput.readUTF(); + password = objectInput.readUTF(); + nonce = objectInput.readUTF(); } @Override @@ -122,6 +152,27 @@ public class SportelloCacheModel implements CacheModel, objectOutput.writeLong(createDate); objectOutput.writeLong(modifiedDate); + + if (loginName == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(loginName); + } + + if (password == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(password); + } + + if (nonce == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(nonce); + } } public long sportelloId; @@ -131,4 +182,7 @@ public class SportelloCacheModel implements CacheModel, public String userName; public long createDate; public long modifiedDate; + public String loginName; + public String password; + public String nonce; } \ 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..75ef949f 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 @@ -72,9 +72,12 @@ public class SportelloModelImpl extends BaseModelImpl { "userId", Types.BIGINT }, { "userName", Types.VARCHAR }, { "createDate", Types.TIMESTAMP }, - { "modifiedDate", Types.TIMESTAMP } + { "modifiedDate", Types.TIMESTAMP }, + { "loginName", Types.VARCHAR }, + { "password_", Types.VARCHAR }, + { "nonce", 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,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,loginName VARCHAR(75) null,password_ VARCHAR(75) null,nonce VARCHAR(75) 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 +90,11 @@ 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 LOGINNAME_COLUMN_BITMASK = 1L; + public static long SPORTELLOID_COLUMN_BITMASK = 2L; /** * Converts the soap model instance into a normal model instance. @@ -109,6 +116,9 @@ public class SportelloModelImpl extends BaseModelImpl model.setUserName(soapModel.getUserName()); model.setCreateDate(soapModel.getCreateDate()); model.setModifiedDate(soapModel.getModifiedDate()); + model.setLoginName(soapModel.getLoginName()); + model.setPassword(soapModel.getPassword()); + model.setNonce(soapModel.getNonce()); return model; } @@ -180,6 +190,9 @@ public class SportelloModelImpl extends BaseModelImpl attributes.put("userName", getUserName()); attributes.put("createDate", getCreateDate()); attributes.put("modifiedDate", getModifiedDate()); + attributes.put("loginName", getLoginName()); + attributes.put("password", getPassword()); + attributes.put("nonce", getNonce()); return attributes; } @@ -227,6 +240,24 @@ public class SportelloModelImpl extends BaseModelImpl if (modifiedDate != null) { setModifiedDate(modifiedDate); } + + String loginName = (String)attributes.get("loginName"); + + if (loginName != null) { + setLoginName(loginName); + } + + String password = (String)attributes.get("password"); + + if (password != null) { + setPassword(password); + } + + String nonce = (String)attributes.get("nonce"); + + if (nonce != null) { + setNonce(nonce); + } } @JSON @@ -321,6 +352,68 @@ public class SportelloModelImpl extends BaseModelImpl _modifiedDate = modifiedDate; } + @JSON + @Override + public String getLoginName() { + if (_loginName == null) { + return StringPool.BLANK; + } + else { + return _loginName; + } + } + + @Override + public void setLoginName(String loginName) { + _columnBitmask |= LOGINNAME_COLUMN_BITMASK; + + if (_originalLoginName == null) { + _originalLoginName = _loginName; + } + + _loginName = loginName; + } + + public String getOriginalLoginName() { + return GetterUtil.getString(_originalLoginName); + } + + @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 String getNonce() { + if (_nonce == null) { + return StringPool.BLANK; + } + else { + return _nonce; + } + } + + @Override + public void setNonce(String nonce) { + _nonce = nonce; + } + + public long getColumnBitmask() { + return _columnBitmask; + } + @Override public ExpandoBridge getExpandoBridge() { return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), @@ -355,6 +448,9 @@ public class SportelloModelImpl extends BaseModelImpl sportelloImpl.setUserName(getUserName()); sportelloImpl.setCreateDate(getCreateDate()); sportelloImpl.setModifiedDate(getModifiedDate()); + sportelloImpl.setLoginName(getLoginName()); + sportelloImpl.setPassword(getPassword()); + sportelloImpl.setNonce(getNonce()); sportelloImpl.resetOriginalValues(); @@ -405,6 +501,11 @@ public class SportelloModelImpl extends BaseModelImpl @Override public void resetOriginalValues() { + SportelloModelImpl sportelloModelImpl = this; + + sportelloModelImpl._originalLoginName = sportelloModelImpl._loginName; + + sportelloModelImpl._columnBitmask = 0; } @Override @@ -445,12 +546,36 @@ public class SportelloModelImpl extends BaseModelImpl sportelloCacheModel.modifiedDate = Long.MIN_VALUE; } + sportelloCacheModel.loginName = getLoginName(); + + String loginName = sportelloCacheModel.loginName; + + if ((loginName != null) && (loginName.length() == 0)) { + sportelloCacheModel.loginName = null; + } + + sportelloCacheModel.password = getPassword(); + + String password = sportelloCacheModel.password; + + if ((password != null) && (password.length() == 0)) { + sportelloCacheModel.password = null; + } + + sportelloCacheModel.nonce = getNonce(); + + String nonce = sportelloCacheModel.nonce; + + if ((nonce != null) && (nonce.length() == 0)) { + sportelloCacheModel.nonce = null; + } + return sportelloCacheModel; } @Override public String toString() { - StringBundler sb = new StringBundler(15); + StringBundler sb = new StringBundler(21); sb.append("{sportelloId="); sb.append(getSportelloId()); @@ -466,6 +591,12 @@ public class SportelloModelImpl extends BaseModelImpl sb.append(getCreateDate()); sb.append(", modifiedDate="); sb.append(getModifiedDate()); + sb.append(", loginName="); + sb.append(getLoginName()); + sb.append(", password="); + sb.append(getPassword()); + sb.append(", nonce="); + sb.append(getNonce()); sb.append("}"); return sb.toString(); @@ -473,7 +604,7 @@ public class SportelloModelImpl extends BaseModelImpl @Override public String toXmlString() { - StringBundler sb = new StringBundler(25); + StringBundler sb = new StringBundler(34); sb.append(""); sb.append("it.mwg.sicilia.sue.model.Sportello"); @@ -507,6 +638,18 @@ public class SportelloModelImpl extends BaseModelImpl "modifiedDate"); + sb.append( + "loginName"); + sb.append( + "password"); + sb.append( + "nonce"); sb.append(""); @@ -525,5 +668,10 @@ public class SportelloModelImpl extends BaseModelImpl private String _userName; private Date _createDate; private Date _modifiedDate; + private String _loginName; + private String _originalLoginName; + private String _password; + private String _nonce; + 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..3a4b43c8 --- /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,7 @@ +package it.mwg.sicilia.sue.portlet; + +import com.liferay.util.bridges.mvc.MVCPortlet; + +public class SueAdministrationPortlet extends MVCPortlet { + +} 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..05b7183b 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,255 @@ 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_LOGINNAME = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, + SportelloModelImpl.FINDER_CACHE_ENABLED, SportelloImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByLoginName", + new String[] { String.class.getName() }, + SportelloModelImpl.LOGINNAME_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_LOGINNAME = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, + SportelloModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByLoginName", + new String[] { String.class.getName() }); + + /** + * Returns the sportello where loginName = ? or throws a {@link it.mwg.sicilia.sue.NoSuchSportelloException} if it could not be found. + * + * @param loginName the login 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 findByLoginName(String loginName) + throws NoSuchSportelloException, SystemException { + Sportello sportello = fetchByLoginName(loginName); + + if (sportello == null) { + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("loginName="); + msg.append(loginName); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + if (_log.isWarnEnabled()) { + _log.warn(msg.toString()); + } + + throw new NoSuchSportelloException(msg.toString()); + } + + return sportello; + } + + /** + * Returns the sportello where loginName = ? or returns null if it could not be found. Uses the finder cache. + * + * @param loginName the login 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 fetchByLoginName(String loginName) + throws SystemException { + return fetchByLoginName(loginName, true); + } + + /** + * Returns the sportello where loginName = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param loginName the login 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 fetchByLoginName(String loginName, + boolean retrieveFromCache) throws SystemException { + Object[] finderArgs = new Object[] { loginName }; + + Object result = null; + + if (retrieveFromCache) { + result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_LOGINNAME, + finderArgs, this); + } + + if (result instanceof Sportello) { + Sportello sportello = (Sportello)result; + + if (!Validator.equals(loginName, sportello.getLoginName())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_SELECT_SPORTELLO_WHERE); + + boolean bindLoginName = false; + + if (loginName == null) { + query.append(_FINDER_COLUMN_LOGINNAME_LOGINNAME_1); + } + else if (loginName.equals(StringPool.BLANK)) { + query.append(_FINDER_COLUMN_LOGINNAME_LOGINNAME_3); + } + else { + bindLoginName = true; + + query.append(_FINDER_COLUMN_LOGINNAME_LOGINNAME_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindLoginName) { + qPos.add(loginName); + } + + List list = q.list(); + + if (list.isEmpty()) { + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_LOGINNAME, + finderArgs, list); + } + else { + if ((list.size() > 1) && _log.isWarnEnabled()) { + _log.warn( + "SportelloPersistenceImpl.fetchByLoginName(String, boolean) with parameters (" + + StringUtil.merge(finderArgs) + + ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); + } + + Sportello sportello = list.get(0); + + result = sportello; + + cacheResult(sportello); + + if ((sportello.getLoginName() == null) || + !sportello.getLoginName().equals(loginName)) { + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_LOGINNAME, + finderArgs, sportello); + } + } + } + catch (Exception e) { + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_LOGINNAME, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (Sportello)result; + } + } + + /** + * Removes the sportello where loginName = ? from the database. + * + * @param loginName the login name + * @return the sportello that was removed + * @throws SystemException if a system exception occurred + */ + @Override + public Sportello removeByLoginName(String loginName) + throws NoSuchSportelloException, SystemException { + Sportello sportello = findByLoginName(loginName); + + return remove(sportello); + } + + /** + * Returns the number of sportellos where loginName = ?. + * + * @param loginName the login name + * @return the number of matching sportellos + * @throws SystemException if a system exception occurred + */ + @Override + public int countByLoginName(String loginName) throws SystemException { + FinderPath finderPath = FINDER_PATH_COUNT_BY_LOGINNAME; + + Object[] finderArgs = new Object[] { loginName }; + + Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs, + this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_SPORTELLO_WHERE); + + boolean bindLoginName = false; + + if (loginName == null) { + query.append(_FINDER_COLUMN_LOGINNAME_LOGINNAME_1); + } + else if (loginName.equals(StringPool.BLANK)) { + query.append(_FINDER_COLUMN_LOGINNAME_LOGINNAME_3); + } + else { + bindLoginName = true; + + query.append(_FINDER_COLUMN_LOGINNAME_LOGINNAME_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindLoginName) { + qPos.add(loginName); + } + + 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_LOGINNAME_LOGINNAME_1 = "sportello.loginName IS NULL"; + private static final String _FINDER_COLUMN_LOGINNAME_LOGINNAME_2 = "sportello.loginName = ?"; + private static final String _FINDER_COLUMN_LOGINNAME_LOGINNAME_3 = "(sportello.loginName IS NULL OR sportello.loginName = '')"; public SportelloPersistenceImpl() { setModelClass(Sportello.class); @@ -96,6 +350,9 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl EntityCacheUtil.putResult(SportelloModelImpl.ENTITY_CACHE_ENABLED, SportelloImpl.class, sportello.getPrimaryKey(), sportello); + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_LOGINNAME, + new Object[] { sportello.getLoginName() }, sportello); + sportello.resetOriginalValues(); } @@ -152,6 +409,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 +421,49 @@ 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.getLoginName() }; + + FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_LOGINNAME, args, + Long.valueOf(1)); + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_LOGINNAME, args, + sportello); + } + else { + SportelloModelImpl sportelloModelImpl = (SportelloModelImpl)sportello; + + if ((sportelloModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_LOGINNAME.getColumnBitmask()) != 0) { + Object[] args = new Object[] { sportello.getLoginName() }; + + FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_LOGINNAME, args, + Long.valueOf(1)); + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_LOGINNAME, args, + sportello); + } + } + } + + protected void clearUniqueFindersCache(Sportello sportello) { + SportelloModelImpl sportelloModelImpl = (SportelloModelImpl)sportello; + + Object[] args = new Object[] { sportello.getLoginName() }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_LOGINNAME, args); + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_LOGINNAME, args); + + if ((sportelloModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_LOGINNAME.getColumnBitmask()) != 0) { + args = new Object[] { sportelloModelImpl.getOriginalLoginName() }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_LOGINNAME, args); + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_LOGINNAME, args); } } @@ -299,13 +601,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; } @@ -326,6 +631,9 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl sportelloImpl.setUserName(sportello.getUserName()); sportelloImpl.setCreateDate(sportello.getCreateDate()); sportelloImpl.setModifiedDate(sportello.getModifiedDate()); + sportelloImpl.setLoginName(sportello.getLoginName()); + sportelloImpl.setPassword(sportello.getPassword()); + sportelloImpl.setNonce(sportello.getNonce()); return sportelloImpl; } @@ -603,6 +911,11 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl return count.intValue(); } + @Override + protected Set getBadColumnNames() { + return _badColumnNames; + } + /** * Initializes the sportello persistence. */ @@ -636,12 +949,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/service.properties b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/service.properties index a546194e..c0e63051 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=8 + build.date=1622735407837 build.auto.upgrade=true ## 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..a515b324 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/edit_sportello.jsp @@ -0,0 +1,3 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="it.mwg.sicilia.sue.model.Sportello"%> +

Edit

\ 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..ffe03a28 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/view.jsp @@ -0,0 +1,25 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="it.mwg.sicilia.sue.model.Sportello"%> +<%@page import="it.mwg.sicilia.sue.service.SportelloLocalServiceUtil"%> +<%@page import="java.util.List"%> +<%@include file="/html/init.jsp"%> +<% +%> +

Amministrazione

+ + + + + + + + + + + + + + + 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..1497071d --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/init.jsp @@ -0,0 +1,19 @@ +<%@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"%> + +<%@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 3dcbf4f5..0293566c 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,8 +13,8 @@ ## build.namespace=Kaleo - build.number=47 - build.date=1621850598948 + build.number=48 + build.date=1622551982657 build.auto.upgrade=true ##