Salvatore La Manna 4 anni fa
parent
commit
4a86477701
  1. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-plugin-package.properties
  2. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  3. 4
      liferay-plugins-sdk-6.2/portlets/portos-firma-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/firma/servlet/FirmaServlet.java
  4. 1
      liferay-plugins-sdk-6.2/portlets/portos-mail-manager-portlet/.tern-project
  5. 1
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/.tern-project
  6. BIN
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/lib/sicilia-sue-connector-portlet-service.jar
  7. 3
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-display.xml
  8. 6
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-plugin-package.properties
  9. 9
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-portlet.xml
  10. 31
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/portlet.xml
  11. 6
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service.xml
  12. 118
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloClp.java
  13. 45
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloModel.java
  14. 30
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloSoap.java
  15. 81
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloWrapper.java
  16. 58
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/SportelloPersistence.java
  17. 68
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/SportelloUtil.java
  18. 3
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.properties
  19. 2
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.sql
  20. 5
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/tables.sql
  21. 3
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml
  22. 3
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml
  23. 5
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml
  24. 6
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/common/Action.java
  25. 39
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/common/ApiResponse.java
  26. 81
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/ApiServlet.java
  27. 5
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Commands.java
  28. 7
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Parameters.java
  29. 31
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Response.java
  30. 28
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/v1/Status.java
  31. 56
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloCacheModel.java
  32. 158
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloModelImpl.java
  33. 7
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/portlet/SueAdministrationPortlet.java
  34. 321
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/persistence/SportelloPersistenceImpl.java
  35. 4
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/service.properties
  36. 3
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/edit_sportello.jsp
  37. 25
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/administration/view.jsp
  38. 19
      liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/html/init.jsp
  39. 9
      liferay-plugins-sdk-6.2/themes/provatema-theme/build.xml
  40. 3
      liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/META-INF/MANIFEST.MF
  41. BIN
      liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/commons-logging.jar
  42. BIN
      liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/log4j.jar
  43. BIN
      liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-bridges.jar
  44. BIN
      liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-java.jar
  45. BIN
      liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-taglib.jar
  46. 11
      liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/liferay-look-and-feel.xml
  47. 16
      liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/liferay-plugin-package.properties
  48. 2
      liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/src/resources-importer/readme.txt
  49. 22
      liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/src/resources-importer/sitemap.json
  50. 2
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/edit_workflow_task.jsp
  51. 4
      liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties

3
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-api.jar,\
jstl-impl.jar,\ jstl-impl.jar,\
wsdl4j.jar,\ wsdl4j.jar,\
xml-apis.jar xml-apis.jar,\
commons-io.jar
portal-dependency-tlds=\ portal-dependency-tlds=\
c.tld c.tld
required-deployment-contexts=\ required-deployment-contexts=\

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=portos_bo build.namespace=portos_bo
build.number=3145 build.number=3146
build.date=1621866062117 build.date=1622551721804
build.auto.upgrade=true build.auto.upgrade=true
## ##

4
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.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.servlet.ServletResponseUtil; 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.StreamUtil;
import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.StringUtil; import com.liferay.portal.kernel.util.StringUtil;
@ -151,7 +152,8 @@ public class FirmaServlet extends HttpServlet {
JSONSerializer jsonSerializer = JSONFactoryUtil.createJSONSerializer(); JSONSerializer jsonSerializer = JSONFactoryUtil.createJSONSerializer();
jsonSerializer.exclude("*.class"); jsonSerializer.exclude("*.class");
String jsonResponse = jsonSerializer.serialize(risposta); 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); ServletResponseUtil.write(response, jsonResponse);
} }
} }

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

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

1
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/.tern-project

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

BIN
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/lib/sicilia-sue-connector-portlet-service.jar

File binario non mostrato.

3
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-display.xml

@ -5,4 +5,7 @@
<category name="category.tools"> <category name="category.tools">
<portlet id="sicilia-sue-connector" /> <portlet id="sicilia-sue-connector" />
</category> </category>
<category name="category.hidden">
<portlet id="sicilia-sue-administration"></portlet>
</category>
</display> </display>

6
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. author=Liferay, Inc.
licenses=LGPL licenses=LGPL
liferay-versions=6.2.0+ liferay-versions=6.2.0+
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 required-deployment-contexts=portos-bo-portlet

9
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/liferay-portlet.xml

@ -9,6 +9,15 @@
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript> <footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
<css-class-wrapper>sicilia-sue-connector</css-class-wrapper> <css-class-wrapper>sicilia-sue-connector</css-class-wrapper>
</portlet> </portlet>
<portlet>
<portlet-name>sicilia-sue-administration</portlet-name>
<icon>/icon.png</icon>
<control-panel-entry-category>configuration</control-panel-entry-category>
<control-panel-entry-weight>1.6</control-panel-entry-weight>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
<css-class-wrapper>sicilia-sue-administration</css-class-wrapper>
</portlet>
<role-mapper> <role-mapper>
<role-name>administrator</role-name> <role-name>administrator</role-name>
<role-link>Administrator</role-link> <role-link>Administrator</role-link>

31
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/portlet.xml

@ -31,4 +31,35 @@
<role-name>user</role-name> <role-name>user</role-name>
</security-role-ref> </security-role-ref>
</portlet> </portlet>
<portlet>
<portlet-name>sicilia-sue-administration</portlet-name>
<display-name>Amministrazione Connettore SUE</display-name>
<portlet-class>it.mwg.sicilia.sue.portlet.SueAdministrationPortlet</portlet-class>
<init-param>
<name>view-template</name>
<value>/html/administration/view.jsp</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<portlet-info>
<title>Amministrazione Connettore SUE</title>
<short-title>Amministrazione Connettore SUE</short-title>
<keywords></keywords>
</portlet-info>
<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>guest</role-name>
</security-role-ref>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>
</portlet-app> </portlet-app>

6
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service.xml

@ -15,7 +15,13 @@
<column name="createDate" type="Date" /> <column name="createDate" type="Date" />
<column name="modifiedDate" type="Date" /> <column name="modifiedDate" type="Date" />
<!-- Other fields --> <!-- Other fields -->
<column name="loginName" type="String" />
<column name="password" type="String" />
<column name="nonce" type="String" />
<!-- Order --> <!-- Order -->
<!-- Finder methods --> <!-- Finder methods -->
<finder return-type="Sportello" name="LoginName">
<finder-column name="loginName" />
</finder>
</entity> </entity>
</service-builder> </service-builder>

118
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<Sportello> implements Sportello
attributes.put("userName", getUserName()); attributes.put("userName", getUserName());
attributes.put("createDate", getCreateDate()); attributes.put("createDate", getCreateDate());
attributes.put("modifiedDate", getModifiedDate()); attributes.put("modifiedDate", getModifiedDate());
attributes.put("loginName", getLoginName());
attributes.put("password", getPassword());
attributes.put("nonce", getNonce());
return attributes; return attributes;
} }
@ -128,6 +131,24 @@ public class SportelloClp extends BaseModelImpl<Sportello> implements Sportello
if (modifiedDate != null) { if (modifiedDate != null) {
setModifiedDate(modifiedDate); 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 @Override
@ -301,6 +322,75 @@ public class SportelloClp extends BaseModelImpl<Sportello> 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() { public BaseModel<?> getSportelloRemoteModel() {
return _sportelloRemoteModel; return _sportelloRemoteModel;
} }
@ -377,6 +467,9 @@ public class SportelloClp extends BaseModelImpl<Sportello> implements Sportello
clone.setUserName(getUserName()); clone.setUserName(getUserName());
clone.setCreateDate(getCreateDate()); clone.setCreateDate(getCreateDate());
clone.setModifiedDate(getModifiedDate()); clone.setModifiedDate(getModifiedDate());
clone.setLoginName(getLoginName());
clone.setPassword(getPassword());
clone.setNonce(getNonce());
return clone; return clone;
} }
@ -429,7 +522,7 @@ public class SportelloClp extends BaseModelImpl<Sportello> implements Sportello
@Override @Override
public String toString() { public String toString() {
StringBundler sb = new StringBundler(15); StringBundler sb = new StringBundler(21);
sb.append("{sportelloId="); sb.append("{sportelloId=");
sb.append(getSportelloId()); sb.append(getSportelloId());
@ -445,6 +538,12 @@ public class SportelloClp extends BaseModelImpl<Sportello> implements Sportello
sb.append(getCreateDate()); sb.append(getCreateDate());
sb.append(", modifiedDate="); sb.append(", modifiedDate=");
sb.append(getModifiedDate()); sb.append(getModifiedDate());
sb.append(", loginName=");
sb.append(getLoginName());
sb.append(", password=");
sb.append(getPassword());
sb.append(", nonce=");
sb.append(getNonce());
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
@ -452,7 +551,7 @@ public class SportelloClp extends BaseModelImpl<Sportello> implements Sportello
@Override @Override
public String toXmlString() { public String toXmlString() {
StringBundler sb = new StringBundler(25); StringBundler sb = new StringBundler(34);
sb.append("<model><model-name>"); sb.append("<model><model-name>");
sb.append("it.mwg.sicilia.sue.model.Sportello"); sb.append("it.mwg.sicilia.sue.model.Sportello");
@ -486,6 +585,18 @@ public class SportelloClp extends BaseModelImpl<Sportello> implements Sportello
"<column><column-name>modifiedDate</column-name><column-value><![CDATA["); "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
sb.append(getModifiedDate()); sb.append(getModifiedDate());
sb.append("]]></column-value></column>"); sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>loginName</column-name><column-value><![CDATA[");
sb.append(getLoginName());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>password</column-name><column-value><![CDATA[");
sb.append(getPassword());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>nonce</column-name><column-value><![CDATA[");
sb.append(getNonce());
sb.append("]]></column-value></column>");
sb.append("</model>"); sb.append("</model>");
@ -500,6 +611,9 @@ public class SportelloClp extends BaseModelImpl<Sportello> implements Sportello
private String _userName; private String _userName;
private Date _createDate; private Date _createDate;
private Date _modifiedDate; private Date _modifiedDate;
private String _loginName;
private String _password;
private String _nonce;
private BaseModel<?> _sportelloRemoteModel; private BaseModel<?> _sportelloRemoteModel;
private Class<?> _clpSerializerClass = it.mwg.sicilia.sue.service.ClpSerializer.class; private Class<?> _clpSerializerClass = it.mwg.sicilia.sue.service.ClpSerializer.class;
} }

45
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<Sportello>, GroupedModel {
@Override @Override
public void setModifiedDate(Date modifiedDate); 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 @Override
public boolean isNew(); public boolean isNew();

30
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.setUserName(model.getUserName());
soapModel.setCreateDate(model.getCreateDate()); soapModel.setCreateDate(model.getCreateDate());
soapModel.setModifiedDate(model.getModifiedDate()); soapModel.setModifiedDate(model.getModifiedDate());
soapModel.setLoginName(model.getLoginName());
soapModel.setPassword(model.getPassword());
soapModel.setNonce(model.getNonce());
return soapModel; return soapModel;
} }
@ -146,6 +149,30 @@ public class SportelloSoap implements Serializable {
_modifiedDate = modifiedDate; _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 _sportelloId;
private long _groupId; private long _groupId;
private long _companyId; private long _companyId;
@ -153,4 +180,7 @@ public class SportelloSoap implements Serializable {
private String _userName; private String _userName;
private Date _createDate; private Date _createDate;
private Date _modifiedDate; private Date _modifiedDate;
private String _loginName;
private String _password;
private String _nonce;
} }

81
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<Sportello> {
attributes.put("userName", getUserName()); attributes.put("userName", getUserName());
attributes.put("createDate", getCreateDate()); attributes.put("createDate", getCreateDate());
attributes.put("modifiedDate", getModifiedDate()); attributes.put("modifiedDate", getModifiedDate());
attributes.put("loginName", getLoginName());
attributes.put("password", getPassword());
attributes.put("nonce", getNonce());
return attributes; return attributes;
} }
@ -103,6 +106,24 @@ public class SportelloWrapper implements Sportello, ModelWrapper<Sportello> {
if (modifiedDate != null) { if (modifiedDate != null) {
setModifiedDate(modifiedDate); 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> {
_sportello.setModifiedDate(modifiedDate); _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 @Override
public boolean isNew() { public boolean isNew() {
return _sportello.isNew(); return _sportello.isNew();

58
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<Sportello> {
* Never modify or reference this interface directly. Always use {@link SportelloUtil} to access the sportello persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. * Never modify or reference this interface directly. Always use {@link SportelloUtil} to access the sportello persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
*/ */
/**
* Returns the sportello where loginName = &#63; 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 = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
*
* @param loginName the login name
* @return the matching sportello, or <code>null</code> 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 = &#63; or returns <code>null</code> 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 <code>null</code> 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 = &#63; 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 = &#63;.
*
* @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. * Caches the sportello in the entity cache if it is enabled.
* *

68
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); return getPersistence().update(sportello, serviceContext);
} }
/**
* Returns the sportello where loginName = &#63; 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 = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
*
* @param loginName the login name
* @return the matching sportello, or <code>null</code> 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 = &#63; or returns <code>null</code> 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 <code>null</code> 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 = &#63; 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 = &#63;.
*
* @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. * Caches the sportello in the entity cache if it is enabled.
* *

3
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

2
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);

5
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, userId LONG,
userName VARCHAR(75) null, userName VARCHAR(75) null,
createDate DATE null, createDate DATE null,
modifiedDate DATE null modifiedDate DATE null,
loginName VARCHAR(75) null,
password_ VARCHAR(75) null,
nonce VARCHAR(75) null
); );

3
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml

@ -14,5 +14,8 @@
<property name="userName" type="com.liferay.portal.dao.orm.hibernate.StringType" /> <property name="userName" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="createDate" type="org.hibernate.type.TimestampType" /> <property name="createDate" type="org.hibernate.type.TimestampType" />
<property name="modifiedDate" type="org.hibernate.type.TimestampType" /> <property name="modifiedDate" type="org.hibernate.type.TimestampType" />
<property name="loginName" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="password" type="com.liferay.portal.dao.orm.hibernate.StringType" column="password_" />
<property name="nonce" type="com.liferay.portal.dao.orm.hibernate.StringType" />
</class> </class>
</hibernate-mapping> </hibernate-mapping>

3
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml

@ -9,5 +9,8 @@
<field name="userName" type="String" /> <field name="userName" type="String" />
<field name="createDate" type="Date" /> <field name="createDate" type="Date" />
<field name="modifiedDate" type="Date" /> <field name="modifiedDate" type="Date" />
<field name="loginName" type="String" />
<field name="password" type="String" />
<field name="nonce" type="String" />
</model> </model>
</model-hints> </model-hints>

5
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml

@ -20,6 +20,11 @@
<basic name="modifiedDate"> <basic name="modifiedDate">
<temporal>TIMESTAMP</temporal> <temporal>TIMESTAMP</temporal>
</basic> </basic>
<basic name="loginName" />
<basic name="password">
<column name="PASSWORD_" />
</basic>
<basic name="nonce" />
<transient name="modelAttributes" /> <transient name="modelAttributes" />
<transient name="primaryKey" /> <transient name="primaryKey" />
<transient name="primaryKeyObj" /> <transient name="primaryKeyObj" />

6
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() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
public String getDescription() { public String getDescription() {
return description; return description;
} }
public void setDescription(String description) { public void setDescription(String description) {
this.description = description; this.description = description;
} }
public String getMethod() { public String getMethod() {
return method; return method;
} }
public void setMethod(String method) { public void setMethod(String method) {
this.method = method; this.method = method;
} }
} }

39
liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/api/common/ApiResponse.java

@ -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);
}
}

81
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; 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.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.ServletException;
import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; 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.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 * @author Manifattura Web Group Srl
@ -17,27 +35,64 @@ import com.liferay.portal.kernel.servlet.ServletResponseUtil;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class ApiServlet extends HttpServlet { public class ApiServlet extends HttpServlet {
private static final Log _log = LogFactoryUtil.getLog(ApiServlet.class);
private static final JSONDeserializer<Map<String, Serializable>> deserializer = JSONFactoryUtil
.createJSONDeserializer();
@Override @Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String path = request.getPathInfo().substring(1); response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
switch (path) {
case "login":
ServletResponseUtil.write(response, new ApiResponse(0, "Ok").toString());
break;
default:
response.sendError(HttpServletResponse.SC_NOT_FOUND, request.getRequestURI());
}
} }
@Override @Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,
IOException { IOException {
String path = request.getPathInfo().substring(1); String info = request.getPathInfo();
switch (path) { if (Validator.isNotNull(info) && !info.equals(StringPool.FORWARD_SLASH)) {
default: response.sendError(HttpServletResponse.SC_NOT_FOUND);
response.sendError(HttpServletResponse.SC_NOT_FOUND, request.getRequestURI()); return;
}
Map<String, Serializable> 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<String, Serializable> 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<String, Serializable> parameters) throws IOException {
if (!parameters.containsKey(Parameters.USERNAME)) {
return Response.get(Status.NO_USERNAME_GIVEN);
}
Map<String, Serializable> 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);
} }
} }

5
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 {
}

7
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";
}

31
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<String, Serializable> extraData) {
Map<String, Serializable> 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);
}
}

28
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<Integer, String> messages = new HashMap<Integer, String>() {
{
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);
}
}

56
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<Sportello>,
Externalizable { Externalizable {
@Override @Override
public String toString() { public String toString() {
StringBundler sb = new StringBundler(15); StringBundler sb = new StringBundler(21);
sb.append("{sportelloId="); sb.append("{sportelloId=");
sb.append(sportelloId); sb.append(sportelloId);
@ -54,6 +54,12 @@ public class SportelloCacheModel implements CacheModel<Sportello>,
sb.append(createDate); sb.append(createDate);
sb.append(", modifiedDate="); sb.append(", modifiedDate=");
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("}"); sb.append("}");
return sb.toString(); return sb.toString();
@ -89,6 +95,27 @@ public class SportelloCacheModel implements CacheModel<Sportello>,
sportelloImpl.setModifiedDate(new Date(modifiedDate)); 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(); sportelloImpl.resetOriginalValues();
return sportelloImpl; return sportelloImpl;
@ -103,6 +130,9 @@ public class SportelloCacheModel implements CacheModel<Sportello>,
userName = objectInput.readUTF(); userName = objectInput.readUTF();
createDate = objectInput.readLong(); createDate = objectInput.readLong();
modifiedDate = objectInput.readLong(); modifiedDate = objectInput.readLong();
loginName = objectInput.readUTF();
password = objectInput.readUTF();
nonce = objectInput.readUTF();
} }
@Override @Override
@ -122,6 +152,27 @@ public class SportelloCacheModel implements CacheModel<Sportello>,
objectOutput.writeLong(createDate); objectOutput.writeLong(createDate);
objectOutput.writeLong(modifiedDate); 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; public long sportelloId;
@ -131,4 +182,7 @@ public class SportelloCacheModel implements CacheModel<Sportello>,
public String userName; public String userName;
public long createDate; public long createDate;
public long modifiedDate; public long modifiedDate;
public String loginName;
public String password;
public String nonce;
} }

158
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<Sportello>
{ "userId", Types.BIGINT }, { "userId", Types.BIGINT },
{ "userName", Types.VARCHAR }, { "userName", Types.VARCHAR },
{ "createDate", Types.TIMESTAMP }, { "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 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_JPQL = " ORDER BY sportello.sportelloId ASC";
public static final String ORDER_BY_SQL = " ORDER BY sicilia_sue_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<Sportello>
public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get( 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"), "value.object.finder.cache.enabled.it.mwg.sicilia.sue.model.Sportello"),
true); 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. * Converts the soap model instance into a normal model instance.
@ -109,6 +116,9 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
model.setUserName(soapModel.getUserName()); model.setUserName(soapModel.getUserName());
model.setCreateDate(soapModel.getCreateDate()); model.setCreateDate(soapModel.getCreateDate());
model.setModifiedDate(soapModel.getModifiedDate()); model.setModifiedDate(soapModel.getModifiedDate());
model.setLoginName(soapModel.getLoginName());
model.setPassword(soapModel.getPassword());
model.setNonce(soapModel.getNonce());
return model; return model;
} }
@ -180,6 +190,9 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
attributes.put("userName", getUserName()); attributes.put("userName", getUserName());
attributes.put("createDate", getCreateDate()); attributes.put("createDate", getCreateDate());
attributes.put("modifiedDate", getModifiedDate()); attributes.put("modifiedDate", getModifiedDate());
attributes.put("loginName", getLoginName());
attributes.put("password", getPassword());
attributes.put("nonce", getNonce());
return attributes; return attributes;
} }
@ -227,6 +240,24 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
if (modifiedDate != null) { if (modifiedDate != null) {
setModifiedDate(modifiedDate); 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 @JSON
@ -321,6 +352,68 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
_modifiedDate = modifiedDate; _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 @Override
public ExpandoBridge getExpandoBridge() { public ExpandoBridge getExpandoBridge() {
return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
@ -355,6 +448,9 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
sportelloImpl.setUserName(getUserName()); sportelloImpl.setUserName(getUserName());
sportelloImpl.setCreateDate(getCreateDate()); sportelloImpl.setCreateDate(getCreateDate());
sportelloImpl.setModifiedDate(getModifiedDate()); sportelloImpl.setModifiedDate(getModifiedDate());
sportelloImpl.setLoginName(getLoginName());
sportelloImpl.setPassword(getPassword());
sportelloImpl.setNonce(getNonce());
sportelloImpl.resetOriginalValues(); sportelloImpl.resetOriginalValues();
@ -405,6 +501,11 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
@Override @Override
public void resetOriginalValues() { public void resetOriginalValues() {
SportelloModelImpl sportelloModelImpl = this;
sportelloModelImpl._originalLoginName = sportelloModelImpl._loginName;
sportelloModelImpl._columnBitmask = 0;
} }
@Override @Override
@ -445,12 +546,36 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
sportelloCacheModel.modifiedDate = Long.MIN_VALUE; 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; return sportelloCacheModel;
} }
@Override @Override
public String toString() { public String toString() {
StringBundler sb = new StringBundler(15); StringBundler sb = new StringBundler(21);
sb.append("{sportelloId="); sb.append("{sportelloId=");
sb.append(getSportelloId()); sb.append(getSportelloId());
@ -466,6 +591,12 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
sb.append(getCreateDate()); sb.append(getCreateDate());
sb.append(", modifiedDate="); sb.append(", modifiedDate=");
sb.append(getModifiedDate()); sb.append(getModifiedDate());
sb.append(", loginName=");
sb.append(getLoginName());
sb.append(", password=");
sb.append(getPassword());
sb.append(", nonce=");
sb.append(getNonce());
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
@ -473,7 +604,7 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
@Override @Override
public String toXmlString() { public String toXmlString() {
StringBundler sb = new StringBundler(25); StringBundler sb = new StringBundler(34);
sb.append("<model><model-name>"); sb.append("<model><model-name>");
sb.append("it.mwg.sicilia.sue.model.Sportello"); sb.append("it.mwg.sicilia.sue.model.Sportello");
@ -507,6 +638,18 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
"<column><column-name>modifiedDate</column-name><column-value><![CDATA["); "<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
sb.append(getModifiedDate()); sb.append(getModifiedDate());
sb.append("]]></column-value></column>"); sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>loginName</column-name><column-value><![CDATA[");
sb.append(getLoginName());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>password</column-name><column-value><![CDATA[");
sb.append(getPassword());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>nonce</column-name><column-value><![CDATA[");
sb.append(getNonce());
sb.append("]]></column-value></column>");
sb.append("</model>"); sb.append("</model>");
@ -525,5 +668,10 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
private String _userName; private String _userName;
private Date _createDate; private Date _createDate;
private Date _modifiedDate; private Date _modifiedDate;
private String _loginName;
private String _originalLoginName;
private String _password;
private String _nonce;
private long _columnBitmask;
private Sportello _escapedModel; private Sportello _escapedModel;
} }

7
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 {
}

321
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.FinderCacheUtil;
import com.liferay.portal.kernel.dao.orm.FinderPath; import com.liferay.portal.kernel.dao.orm.FinderPath;
import com.liferay.portal.kernel.dao.orm.Query; 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.QueryUtil;
import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.dao.orm.Session;
import com.liferay.portal.kernel.exception.SystemException; 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.OrderByComparator;
import com.liferay.portal.kernel.util.PropsKeys; import com.liferay.portal.kernel.util.PropsKeys;
import com.liferay.portal.kernel.util.PropsUtil; 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.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.StringUtil; import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.util.UnmodifiableList; 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.CacheModel;
import com.liferay.portal.model.ModelListener; import com.liferay.portal.model.ModelListener;
import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
@ -47,6 +51,7 @@ import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* The persistence implementation for the sportello service. * The persistence implementation for the sportello service.
@ -81,6 +86,255 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED,
SportelloModelImpl.FINDER_CACHE_ENABLED, Long.class, SportelloModelImpl.FINDER_CACHE_ENABLED, Long.class,
FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); 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 = &#63; 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 = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
*
* @param loginName the login name
* @return the matching sportello, or <code>null</code> 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 = &#63; or returns <code>null</code> 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 <code>null</code> 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<Sportello> 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 = &#63; 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 = &#63;.
*
* @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() { public SportelloPersistenceImpl() {
setModelClass(Sportello.class); setModelClass(Sportello.class);
@ -96,6 +350,9 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
EntityCacheUtil.putResult(SportelloModelImpl.ENTITY_CACHE_ENABLED, EntityCacheUtil.putResult(SportelloModelImpl.ENTITY_CACHE_ENABLED,
SportelloImpl.class, sportello.getPrimaryKey(), sportello); SportelloImpl.class, sportello.getPrimaryKey(), sportello);
FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_LOGINNAME,
new Object[] { sportello.getLoginName() }, sportello);
sportello.resetOriginalValues(); sportello.resetOriginalValues();
} }
@ -152,6 +409,8 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
clearUniqueFindersCache(sportello);
} }
@Override @Override
@ -162,6 +421,49 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
for (Sportello sportello : sportellos) { for (Sportello sportello : sportellos) {
EntityCacheUtil.removeResult(SportelloModelImpl.ENTITY_CACHE_ENABLED, EntityCacheUtil.removeResult(SportelloModelImpl.ENTITY_CACHE_ENABLED,
SportelloImpl.class, sportello.getPrimaryKey()); 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<Sportello>
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew) { if (isNew || !SportelloModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
} }
EntityCacheUtil.putResult(SportelloModelImpl.ENTITY_CACHE_ENABLED, EntityCacheUtil.putResult(SportelloModelImpl.ENTITY_CACHE_ENABLED,
SportelloImpl.class, sportello.getPrimaryKey(), sportello); SportelloImpl.class, sportello.getPrimaryKey(), sportello);
clearUniqueFindersCache(sportello);
cacheUniqueFindersCache(sportello);
return sportello; return sportello;
} }
@ -326,6 +631,9 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
sportelloImpl.setUserName(sportello.getUserName()); sportelloImpl.setUserName(sportello.getUserName());
sportelloImpl.setCreateDate(sportello.getCreateDate()); sportelloImpl.setCreateDate(sportello.getCreateDate());
sportelloImpl.setModifiedDate(sportello.getModifiedDate()); sportelloImpl.setModifiedDate(sportello.getModifiedDate());
sportelloImpl.setLoginName(sportello.getLoginName());
sportelloImpl.setPassword(sportello.getPassword());
sportelloImpl.setNonce(sportello.getNonce());
return sportelloImpl; return sportelloImpl;
} }
@ -603,6 +911,11 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
return count.intValue(); return count.intValue();
} }
@Override
protected Set<String> getBadColumnNames() {
return _badColumnNames;
}
/** /**
* Initializes the sportello persistence. * Initializes the sportello persistence.
*/ */
@ -636,12 +949,18 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
} }
private static final String _SQL_SELECT_SPORTELLO = "SELECT sportello FROM Sportello sportello"; 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 = "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 _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_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( private static final boolean _HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE = GetterUtil.getBoolean(PropsUtil.get(
PropsKeys.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE)); PropsKeys.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE));
private static Log _log = LogFactoryUtil.getLog(SportelloPersistenceImpl.class); private static Log _log = LogFactoryUtil.getLog(SportelloPersistenceImpl.class);
private static Set<String> _badColumnNames = SetUtil.fromArray(new String[] {
"password"
});
private static Sportello _nullSportello = new SportelloImpl() { private static Sportello _nullSportello = new SportelloImpl() {
@Override @Override
public Object clone() { public Object clone() {

4
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.namespace=sicilia_sue
build.number=4 build.number=8
build.date=1621344885196 build.date=1622735407837
build.auto.upgrade=true build.auto.upgrade=true
## ##

3
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"%>
<h2>Edit</h2>

25
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"%>
<%
%>
<h1>Amministrazione</h1>
<portlet:renderURL var="addSportelloURL">
<portlet:param name="mvcPath" value="/html/administration/edit_sportello.jsp" />
<portlet:param name="backURL" value="<%= portletURL.toString() %>" />
</portlet:renderURL>
<aui:nav-bar>
<aui:nav>
<aui:nav-item href="<%= addSportelloURL %>" iconCssClass="icon-plus" label="add" />
</aui:nav>
</aui:nav-bar>
<liferay-ui:search-container emptyResultsMessage="no-entries-were-found">
<liferay-ui:search-container-results total="<%= SportelloLocalServiceUtil.getSportellosCount() %>"
results="<%= SportelloLocalServiceUtil.getSportellos(searchContainer.getStart(),
searchContainer.getEnd()) %>" />
<liferay-ui:search-container-row className="it.mwg.sicilia.sue.model.Sportello" modelVar="sportello">
</liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="true" />
</liferay-ui:search-container>

19
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"%>
<liferay-theme:defineObjects />
<portlet:defineObjects />
<%
PortletURL portletURL = PortletURLUtil.getCurrent(liferayPortletRequest, liferayPortletResponse);
PortletURL iteratorURL = liferayPortletResponse.createRenderURL();
%>

9
liferay-plugins-sdk-6.2/themes/provatema-theme/build.xml

@ -1,9 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="provatema-theme" basedir="." default="deploy">
<property name="theme.parent" value="_styled" />
<import file="../build-common-theme.xml" />
<property name="theme.type" value="ftl" />
</project>

3
liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/META-INF/MANIFEST.MF

@ -1,3 +0,0 @@
Manifest-Version: 1.0
Class-Path:

BIN
liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/commons-logging.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/log4j.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-bridges.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-java.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

11
liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/liferay-look-and-feel.xml

@ -1,11 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE look-and-feel PUBLIC "-//Liferay//DTD Look and Feel 6.2.0//EN" "http://www.liferay.com/dtd/liferay-look-and-feel_6_2_0.dtd">
<look-and-feel>
<compatibility>
<version>6.2.5+</version>
</compatibility>
<theme id="provatema" name="Provatema">
<template-extension>ftl</template-extension>
</theme>
</look-and-feel>

16
liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/liferay-plugin-package.properties

@ -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

2
liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/src/resources-importer/readme.txt

@ -1,2 +0,0 @@
See http://www.liferay.com/community/wiki/-/wiki/Main/Resources+Importer+Web
for more information about the Resources Importer.

22
liferay-plugins-sdk-6.2/themes/provatema-theme/docroot/WEB-INF/src/resources-importer/sitemap.json

@ -1,22 +0,0 @@
{
"layoutTemplateId": "2_columns_ii",
"privatePages": [
{
"columns": [
[
{
"portletId": "58"
}
],
[
{
"portletId": "47"
}
]
],
"friendlyURL": "/home",
"name": "Welcome",
"title": "Welcome"
}
]
}

2
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()); WorkflowInstance workflowInstance = WorkflowInstanceManagerUtil.getWorkflowInstance(company.getCompanyId(), workflowTask.getWorkflowInstanceId());
Map<String, Serializable> workflowContext = workflowInstance.getWorkflowContext(); Map<String, Serializable> workflowContext = workflowInstance.getWorkflowContext();
long companyId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_COMPANY_ID)); long companyId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_COMPANY_ID));
long groupId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_GROUP_ID)); long groupId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_GROUP_ID));
String className = (String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME); String className = (String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME);
long classPK = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); long classPK = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK));
WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil.getWorkflowHandler(className); WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil.getWorkflowHandler(className);
AssetRenderer assetRenderer = workflowHandler.getAssetRenderer(classPK); AssetRenderer assetRenderer = workflowHandler.getAssetRenderer(classPK);

4
liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=Kaleo build.namespace=Kaleo
build.number=47 build.number=48
build.date=1621850598948 build.date=1622551982657
build.auto.upgrade=true build.auto.upgrade=true
## ##

Caricamento…
Annulla
Salva