Sfoglia il codice sorgente
# Conflicts: # liferay-plugins-sdk-6.2/dist/portos-audit-shared-6.2.0.1.jar # liferay-plugins-sdk-6.2/dist/portos-bo-shared-6.2.0.1.jar # liferay-plugins-sdk-6.2/dist/portos-kaleo-shared-6.2.0.1.jar # liferay-plugins-sdk-6.2/dist/portos-mail-manager-shared-6.2.0.1.jar # liferay-plugins-sdk-6.2/dist/portos-report-shared-6.2.0.1.jar # liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-audit-shared.jar # liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-bo-shared.jar # liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-kaleo-shared.jar # liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-mail-manager-shared.jar # liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/portos-report-shared.jar # liferay-plugins-sdk-6.2/portlets/quarkus-bridge-portlet/.classpath # liferay-plugins-sdk-6.2/portlets/quarkus-bridge-portlet/docroot/WEB-INF/lib/portos-bo-shared.jarfeatures/quarkus-rest-bridge
E-A
2 anni fa
57 ha cambiato i file con 2433 aggiunte e 685 eliminazioni
@ -0,0 +1,15 @@
|
||||
# Managed by Liferay IDE (remove this comment to prevent future updates) |
||||
|
||||
#Managed by Liferay IDE (remove this comment to prevent future updates) |
||||
#Fri Feb 17 13:42:23 CET 2023 |
||||
app.server.tomcat.lib.global.dir = C:\\liferay-sviluppo\\sicilia\\pae\\liferay-portal-6.2-ce-ga6-patched6.2.5\\tomcat-7.0.62\\lib\\ext |
||||
app.server.tomcat.deploy.dir = C:\\liferay-sviluppo\\sicilia\\pae\\liferay-portal-6.2-ce-ga6-patched6.2.5\\tomcat-7.0.62\\webapps |
||||
app.server.parent.dir = C:\\liferay-sviluppo\\sicilia\\pae\\liferay-portal-6.2-ce-ga6-patched6.2.5 |
||||
app.server.tomcat.dir = C:\\liferay-sviluppo\\sicilia\\pae\\liferay-portal-6.2-ce-ga6-patched6.2.5\\tomcat-7.0.62 |
||||
app.server.type = tomcat |
||||
app.server.tomcat.portal.dir = C:\\liferay-sviluppo\\sicilia\\pae\\liferay-portal-6.2-ce-ga6-patched6.2.5\\tomcat-7.0.62\\webapps\\ROOT |
||||
ant.build.javac.source = 1.7 |
||||
ant.build.javac.target = 1.7 |
||||
|
||||
ivy.version = 2.4.0 |
||||
ivy.jar.url = http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar |
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
File binario non mostrato.
@ -0,0 +1,572 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
||||
<taglib xmlns="http://java.sun.com/xml/ns/javaee" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd" |
||||
version="2.1"> |
||||
|
||||
<description>JSTL 1.2 core library</description> |
||||
<display-name>JSTL core</display-name> |
||||
<tlib-version>1.2</tlib-version> |
||||
<short-name>c</short-name> |
||||
<uri>http://java.sun.com/jsp/jstl/core</uri> |
||||
|
||||
<validator> |
||||
<description> |
||||
Provides core validation features for JSTL tags. |
||||
</description> |
||||
<validator-class> |
||||
org.apache.taglibs.standard.tlv.JstlCoreTLV |
||||
</validator-class> |
||||
</validator> |
||||
|
||||
<tag> |
||||
<description> |
||||
Catches any Throwable that occurs in its body and optionally |
||||
exposes it. |
||||
</description> |
||||
<name>catch</name> |
||||
<tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class> |
||||
<body-content>JSP</body-content> |
||||
<attribute> |
||||
<description> |
||||
Name of the exported scoped variable for the |
||||
exception thrown from a nested action. The type of the |
||||
scoped variable is the type of the exception thrown. |
||||
</description> |
||||
<name>var</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
</tag> |
||||
|
||||
<tag> |
||||
<description> |
||||
Simple conditional tag that establishes a context for |
||||
mutually exclusive conditional operations, marked by |
||||
<when> and <otherwise> |
||||
</description> |
||||
<name>choose</name> |
||||
<tag-class>com.liferay.taglib.core.ChooseTag</tag-class> |
||||
<body-content>JSP</body-content> |
||||
</tag> |
||||
|
||||
<tag> |
||||
<description> |
||||
Simple conditional tag, which evalutes its body if the |
||||
supplied condition is true and optionally exposes a Boolean |
||||
scripting variable representing the evaluation of this condition |
||||
</description> |
||||
<name>if</name> |
||||
<tag-class>com.liferay.taglib.core.IfTag</tag-class> |
||||
<body-content>JSP</body-content> |
||||
<attribute> |
||||
<description> |
||||
The test condition that determines whether or |
||||
not the body content should be processed. |
||||
</description> |
||||
<name>test</name> |
||||
<required>true</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
<type>boolean</type> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Name of the exported scoped variable for the |
||||
resulting value of the test condition. The type |
||||
of the scoped variable is Boolean. |
||||
</description> |
||||
<name>var</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Scope for var. |
||||
</description> |
||||
<name>scope</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
</tag> |
||||
|
||||
<tag> |
||||
<description> |
||||
Retrieves an absolute or relative URL and exposes its contents |
||||
to either the page, a String in 'var', or a Reader in 'varReader'. |
||||
</description> |
||||
<name>import</name> |
||||
<tag-class>org.apache.taglibs.standard.tag.rt.core.ImportTag</tag-class> |
||||
<tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class> |
||||
<body-content>JSP</body-content> |
||||
<attribute> |
||||
<description> |
||||
The URL of the resource to import. |
||||
</description> |
||||
<name>url</name> |
||||
<required>true</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Name of the exported scoped variable for the |
||||
resource's content. The type of the scoped |
||||
variable is String. |
||||
</description> |
||||
<name>var</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Scope for var. |
||||
</description> |
||||
<name>scope</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Name of the exported scoped variable for the |
||||
resource's content. The type of the scoped |
||||
variable is Reader. |
||||
</description> |
||||
<name>varReader</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Name of the context when accessing a relative |
||||
URL resource that belongs to a foreign |
||||
context. |
||||
</description> |
||||
<name>context</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Character encoding of the content at the input |
||||
resource. |
||||
</description> |
||||
<name>charEncoding</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
</attribute> |
||||
</tag> |
||||
|
||||
<tag> |
||||
<description> |
||||
The basic iteration tag, accepting many different |
||||
collection types and supporting subsetting and other |
||||
functionality |
||||
</description> |
||||
<name>forEach</name> |
||||
<tag-class>org.apache.taglibs.standard.tag.rt.core.ForEachTag</tag-class> |
||||
<tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class> |
||||
<body-content>JSP</body-content> |
||||
<attribute> |
||||
<description> |
||||
Collection of items to iterate over. |
||||
</description> |
||||
<name>items</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
<type>java.lang.Object</type> |
||||
<deferred-value> |
||||
<type>java.lang.Object</type> |
||||
</deferred-value> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
If items specified: |
||||
Iteration begins at the item located at the |
||||
specified index. First item of the collection has |
||||
index 0. |
||||
If items not specified: |
||||
Iteration begins with index set at the value |
||||
specified. |
||||
</description> |
||||
<name>begin</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
<type>int</type> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
If items specified: |
||||
Iteration ends at the item located at the |
||||
specified index (inclusive). |
||||
If items not specified: |
||||
Iteration ends when index reaches the value |
||||
specified. |
||||
</description> |
||||
<name>end</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
<type>int</type> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Iteration will only process every step items of |
||||
the collection, starting with the first one. |
||||
</description> |
||||
<name>step</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
<type>int</type> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Name of the exported scoped variable for the |
||||
current item of the iteration. This scoped |
||||
variable has nested visibility. Its type depends |
||||
on the object of the underlying collection. |
||||
</description> |
||||
<name>var</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Name of the exported scoped variable for the |
||||
status of the iteration. Object exported is of type |
||||
javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested |
||||
visibility. |
||||
</description> |
||||
<name>varStatus</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
</tag> |
||||
|
||||
<tag> |
||||
<description> |
||||
Iterates over tokens, separated by the supplied delimeters |
||||
</description> |
||||
<name>forTokens</name> |
||||
<tag-class>org.apache.taglibs.standard.tag.rt.core.ForTokensTag</tag-class> |
||||
<body-content>JSP</body-content> |
||||
<attribute> |
||||
<description> |
||||
String of tokens to iterate over. |
||||
</description> |
||||
<name>items</name> |
||||
<required>true</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
<type>java.lang.String</type> |
||||
<deferred-value> |
||||
<type>java.lang.String</type> |
||||
</deferred-value> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
The set of delimiters (the characters that |
||||
separate the tokens in the string). |
||||
</description> |
||||
<name>delims</name> |
||||
<required>true</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
<type>java.lang.String</type> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Iteration begins at the token located at the |
||||
specified index. First token has index 0. |
||||
</description> |
||||
<name>begin</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
<type>int</type> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Iteration ends at the token located at the |
||||
specified index (inclusive). |
||||
</description> |
||||
<name>end</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
<type>int</type> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Iteration will only process every step tokens |
||||
of the string, starting with the first one. |
||||
</description> |
||||
<name>step</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
<type>int</type> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Name of the exported scoped variable for the |
||||
current item of the iteration. This scoped |
||||
variable has nested visibility. |
||||
</description> |
||||
<name>var</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Name of the exported scoped variable for the |
||||
status of the iteration. Object exported is of |
||||
type |
||||
javax.servlet.jsp.jstl.core.LoopTag |
||||
Status. This scoped variable has nested |
||||
visibility. |
||||
</description> |
||||
<name>varStatus</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
</tag> |
||||
|
||||
<tag> |
||||
<description> |
||||
Like <%= ... >, but for expressions. |
||||
</description> |
||||
<name>out</name> |
||||
<tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class> |
||||
<body-content>JSP</body-content> |
||||
<attribute> |
||||
<description> |
||||
Expression to be evaluated. |
||||
</description> |
||||
<name>value</name> |
||||
<required>true</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Default value if the resulting value is null. |
||||
</description> |
||||
<name>default</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Determines whether characters <,>,&,'," in the |
||||
resulting string should be converted to their |
||||
corresponding character entity codes. Default value is |
||||
true. |
||||
</description> |
||||
<name>escapeXml</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
</attribute> |
||||
</tag> |
||||
|
||||
|
||||
<tag> |
||||
<description> |
||||
Subtag of <choose> that follows <when> tags |
||||
and runs only if all of the prior conditions evaluated to |
||||
'false' |
||||
</description> |
||||
<name>otherwise</name> |
||||
<tag-class>com.liferay.taglib.core.OtherwiseTag</tag-class> |
||||
<body-content>JSP</body-content> |
||||
</tag> |
||||
|
||||
<tag> |
||||
<description> |
||||
Adds a parameter to a containing 'import' tag's URL. |
||||
</description> |
||||
<name>param</name> |
||||
<tag-class>org.apache.taglibs.standard.tag.rt.core.ParamTag</tag-class> |
||||
<body-content>JSP</body-content> |
||||
<attribute> |
||||
<description> |
||||
Name of the query string parameter. |
||||
</description> |
||||
<name>name</name> |
||||
<required>true</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Value of the parameter. |
||||
</description> |
||||
<name>value</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
</attribute> |
||||
</tag> |
||||
|
||||
<tag> |
||||
<description> |
||||
Redirects to a new URL. |
||||
</description> |
||||
<name>redirect</name> |
||||
<tag-class>org.apache.taglibs.standard.tag.rt.core.RedirectTag</tag-class> |
||||
<body-content>JSP</body-content> |
||||
<attribute> |
||||
<description> |
||||
The URL of the resource to redirect to. |
||||
</description> |
||||
<name>url</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Name of the context when redirecting to a relative URL |
||||
resource that belongs to a foreign context. |
||||
</description> |
||||
<name>context</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
</attribute> |
||||
</tag> |
||||
|
||||
<tag> |
||||
<description> |
||||
Removes a scoped variable (from a particular scope, if specified). |
||||
</description> |
||||
<name>remove</name> |
||||
<tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class> |
||||
<body-content>empty</body-content> |
||||
<attribute> |
||||
<description> |
||||
Name of the scoped variable to be removed. |
||||
</description> |
||||
<name>var</name> |
||||
<required>true</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Scope for var. |
||||
</description> |
||||
<name>scope</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
</tag> |
||||
|
||||
<tag> |
||||
<description> |
||||
Sets the result of an expression evaluation in a 'scope' |
||||
</description> |
||||
<name>set</name> |
||||
<tag-class>org.apache.taglibs.standard.tag.rt.core.SetTag</tag-class> |
||||
<body-content>JSP</body-content> |
||||
<attribute> |
||||
<description> |
||||
Name of the exported scoped variable to hold the value |
||||
specified in the action. The type of the scoped variable is |
||||
whatever type the value expression evaluates to. |
||||
</description> |
||||
<name>var</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Expression to be evaluated. |
||||
</description> |
||||
<name>value</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
<deferred-value> |
||||
<type>java.lang.Object</type> |
||||
</deferred-value> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Target object whose property will be set. Must evaluate to |
||||
a JavaBeans object with setter property property, or to a |
||||
java.util.Map object. |
||||
</description> |
||||
<name>target</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Name of the property to be set in the target object. |
||||
</description> |
||||
<name>property</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Scope for var. |
||||
</description> |
||||
<name>scope</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
</tag> |
||||
|
||||
<tag> |
||||
<description> |
||||
Creates a URL with optional query parameters. |
||||
</description> |
||||
<name>url</name> |
||||
<tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class> |
||||
<body-content>JSP</body-content> |
||||
<attribute> |
||||
<description> |
||||
Name of the exported scoped variable for the |
||||
processed url. The type of the scoped variable is |
||||
String. |
||||
</description> |
||||
<name>var</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Scope for var. |
||||
</description> |
||||
<name>scope</name> |
||||
<required>false</required> |
||||
<rtexprvalue>false</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
URL to be processed. |
||||
</description> |
||||
<name>value</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
</attribute> |
||||
<attribute> |
||||
<description> |
||||
Name of the context when specifying a relative URL |
||||
resource that belongs to a foreign context. |
||||
</description> |
||||
<name>context</name> |
||||
<required>false</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
</attribute> |
||||
</tag> |
||||
|
||||
<tag> |
||||
<description> |
||||
Subtag of <choose> that includes its body if its |
||||
condition evalutes to 'true' |
||||
</description> |
||||
<name>when</name> |
||||
<tag-class>com.liferay.taglib.core.WhenTag</tag-class> |
||||
<body-content>JSP</body-content> |
||||
<attribute> |
||||
<description> |
||||
The test condition that determines whether or not the |
||||
body content should be processed. |
||||
</description> |
||||
<name>test</name> |
||||
<required>true</required> |
||||
<rtexprvalue>true</rtexprvalue> |
||||
<type>boolean</type> |
||||
</attribute> |
||||
</tag> |
||||
|
||||
</taglib> |
File binario non mostrato.
File binario non mostrato.
@ -0,0 +1 @@
|
||||
application.startup.events=portos.nextmind.liferay.bridge.action.StartUpAction |
@ -0,0 +1,102 @@
|
||||
package portos.nextmind.liferay.bridge.action; |
||||
|
||||
import com.liferay.portal.kernel.events.ActionException; |
||||
import com.liferay.portal.kernel.events.SimpleAction; |
||||
import com.liferay.portal.kernel.exception.PortalException; |
||||
import com.liferay.portal.kernel.exception.SystemException; |
||||
import com.liferay.portal.kernel.log.Log; |
||||
import com.liferay.portal.kernel.log.LogFactoryUtil; |
||||
import com.liferay.portal.kernel.util.GetterUtil; |
||||
import com.liferay.portal.kernel.util.UnicodeProperties; |
||||
import com.liferay.portal.model.Company; |
||||
import com.liferay.portal.model.ResourceConstants; |
||||
import com.liferay.portal.model.Role; |
||||
import com.liferay.portal.model.RoleConstants; |
||||
import com.liferay.portal.security.permission.ActionKeys; |
||||
import com.liferay.portal.service.ResourcePermissionLocalServiceUtil; |
||||
import com.liferay.portal.service.RoleLocalServiceUtil; |
||||
import com.liferay.portal.util.PortalUtil; |
||||
import com.liferay.portlet.expando.model.ExpandoColumn; |
||||
import com.liferay.portlet.expando.model.ExpandoColumnConstants; |
||||
import com.liferay.portlet.expando.model.ExpandoTable; |
||||
import com.liferay.portlet.expando.model.ExpandoTableConstants; |
||||
import com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil; |
||||
import com.liferay.portlet.expando.service.ExpandoTableLocalServiceUtil; |
||||
|
||||
import portos.nextmind.quarkus.bridge.api.QuarkusBridgeConstants; |
||||
|
||||
public class StartUpAction extends SimpleAction { |
||||
|
||||
private final static Log _log = LogFactoryUtil.getLog(StartUpAction.class); |
||||
|
||||
@Override |
||||
public void run(String[] companyIds) throws ActionException { |
||||
|
||||
for (String id : companyIds) { |
||||
try { |
||||
long companyId = GetterUtil.getLong(id); |
||||
String[] defaultActions = { ActionKeys.VIEW, ActionKeys.UPDATE }; |
||||
String[] guestActions = { ActionKeys.VIEW }; |
||||
// Organization custom fields
|
||||
_log.info("Adding QuarkusBridgeConstants.QUARKUS_BASE_URL Company custom field"); |
||||
addExpandoColumnIfNotExists(companyId, Company.class.getName(), QuarkusBridgeConstants.QUARKUS_BASE_URL, |
||||
ExpandoColumnConstants.STRING, true, false, defaultActions, guestActions); |
||||
} catch (Exception e) { |
||||
_log.error("Errore nella procedura automatizzata di configurazione", e); |
||||
} |
||||
} |
||||
} |
||||
|
||||
private ExpandoColumn addExpandoColumnIfNotExists(long companyId, String className, String name, int type, |
||||
boolean indexed, boolean hidden, String[] defaultActions, String[] guestActions) throws SystemException { |
||||
|
||||
long classNameId = PortalUtil.getClassNameId(className); |
||||
ExpandoTable expandoTable = null; |
||||
try { |
||||
expandoTable = ExpandoTableLocalServiceUtil.getTable(companyId, classNameId, |
||||
ExpandoTableConstants.DEFAULT_TABLE_NAME); |
||||
} catch (PortalException e) { |
||||
try { |
||||
expandoTable = ExpandoTableLocalServiceUtil.addTable(companyId, classNameId, |
||||
ExpandoTableConstants.DEFAULT_TABLE_NAME); |
||||
} catch (PortalException e1) { |
||||
} |
||||
} |
||||
ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getColumn(expandoTable.getTableId(), name); |
||||
if (expandoColumn == null) { |
||||
try { |
||||
expandoColumn = ExpandoColumnLocalServiceUtil.addColumn(expandoTable.getTableId(), name, type); |
||||
} catch (PortalException e) { |
||||
} |
||||
} |
||||
try { |
||||
if (indexed) { |
||||
UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); |
||||
typeSettingsProperties.put(ExpandoColumnConstants.INDEX_TYPE, |
||||
String.valueOf(ExpandoColumnConstants.INDEX_TYPE_TEXT)); |
||||
expandoColumn.setTypeSettingsProperties(typeSettingsProperties); |
||||
expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); |
||||
} |
||||
if (hidden) { |
||||
UnicodeProperties typeSettingsProperties = expandoColumn.getTypeSettingsProperties(); |
||||
typeSettingsProperties.put(ExpandoColumnConstants.PROPERTY_HIDDEN, String.valueOf(1)); |
||||
expandoColumn.setTypeSettingsProperties(typeSettingsProperties); |
||||
expandoColumn = ExpandoColumnLocalServiceUtil.updateExpandoColumn(expandoColumn); |
||||
} |
||||
Role roleGuest = RoleLocalServiceUtil.getRole(companyId, RoleConstants.GUEST); |
||||
Role rolePowerUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.POWER_USER); |
||||
Role roleUser = RoleLocalServiceUtil.getRole(companyId, RoleConstants.USER); |
||||
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(), |
||||
ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), |
||||
roleGuest.getRoleId(), guestActions); |
||||
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(), |
||||
ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), |
||||
rolePowerUser.getRoleId(), defaultActions); |
||||
ResourcePermissionLocalServiceUtil.setResourcePermissions(companyId, ExpandoColumn.class.getName(), |
||||
ResourceConstants.SCOPE_INDIVIDUAL, String.valueOf(expandoColumn.getColumnId()), |
||||
roleUser.getRoleId(), defaultActions); |
||||
} catch (PortalException e) { |
||||
} |
||||
return expandoColumn; |
||||
} |
||||
} |
Caricamento…
Reference in new issue