diff --git a/liferay-plugins-sdk-6.2/build.ture.properties b/liferay-plugins-sdk-6.2/build.ture.properties index 012cdaa7..e3b7ca4b 100644 --- a/liferay-plugins-sdk-6.2/build.ture.properties +++ b/liferay-plugins-sdk-6.2/build.ture.properties @@ -7,3 +7,6 @@ app.server.tomcat.dir = /home/ture/liferay/portali/sismica/tomcat-7.0.62 app.server.type = tomcat app.server.tomcat.portal.dir = /home/ture/liferay/portali/sismica/tomcat-7.0.62/webapps/ROOT javac.encoding = UTF-8 +ext.work.dir = /home/ture/liferay/src/work +app.server.dir = /home/ture/liferay/src/work/liferay-portal-6.2-ce-ga6/tomcat-7.0.62 +app.server.zip.name = /home/ture/liferay/src/liferay-portal-tomcat-6.2-ce-ga6-patched.zip diff --git a/liferay-plugins-sdk-6.2/build.ture.properties.save b/liferay-plugins-sdk-6.2/build.ture.properties.save new file mode 100644 index 00000000..dc422914 --- /dev/null +++ b/liferay-plugins-sdk-6.2/build.ture.properties.save @@ -0,0 +1,11 @@ +app.server.tomcat.lib.global.dir = /home/ture/liferay/portali/sismica/tomcat-7.0.62/lib/ext +app.server.tomcat.deploy.dir = /home/ture/liferay/portali/sismica/tomcat-7.0.62/webapps +app.server.parent.dir = /home/ture/liferay/portali/sismica +app.server.tomcat.dir = /home/ture/liferay/portali/sismica/tomcat-7.0.62 +app.server.type = tomcat +app.server.tomcat.portal.dir = /home/ture/liferay/portali/sismica/tomcat-7.0.62/webapps/ROOT +javac.encoding = UTF-8 +ext.work.dir=/home/ture/liferay/src/work +app.server.dir=/home/ture/liferay/src/work/liferay-portal-6.2-ce-ga6/tomcat-7.0.62 +app.server.zip.name=/home/ture/liferay/src/liferay-portal-tomcat-6.2-ce-ga6-patched.zip + diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.classpath b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.classpath new file mode 100644 index 00000000..e3c152b9 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.project b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.project new file mode 100644 index 00000000..bdf6cb46 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.project @@ -0,0 +1,37 @@ + + + sicilia-p7m-preview-hook + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.apache.ivyde.eclipse.ivynature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/.jsdtscope b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/.jsdtscope new file mode 100644 index 00000000..840a01d5 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.jdt.core.prefs b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..f42de363 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.common.component b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.common.component new file mode 100644 index 00000000..dd2bfd9b --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml new file mode 100644 index 00000000..1f9ee534 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.common.project.facet.core.xml b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 00000000..02ccc82b --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.jsdt.ui.superType.container b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 00000000..3bd5d0a4 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.jsdt.ui.superType.name b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 00000000..05bd71b6 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/build.xml b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/build.xml new file mode 100644 index 00000000..67e0fac4 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/build.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/META-INF/MANIFEST.MF b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5e949512 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/.gitignore b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/.gitignore new file mode 100644 index 00000000..840e7d31 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/.gitignore @@ -0,0 +1 @@ +/classes/ diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/liferay-hook.xml b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/liferay-hook.xml new file mode 100644 index 00000000..f03239d2 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/liferay-hook.xml @@ -0,0 +1,6 @@ + + + + + portal-ext.properties + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/liferay-plugin-package.properties b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/liferay-plugin-package.properties new file mode 100644 index 00000000..9a83f664 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/liferay-plugin-package.properties @@ -0,0 +1,34 @@ +name=Sicilia P7M preview +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+ +portal-dependency-jars= \ + ant.jar, \ + chardet.jar, \ + commons-beanutils.jar, \ + commons-collections.jar, \ + commons-compress.jar, \ + commons-configuration.jar, \ + commons-digester.jar, \ + commons-io.jar, \ + commons-lang.jar, \ + easyconf.jar, \ + gif89.jar, \ + im4java.jar, \ + jai_codec.jar, \ + jai_core.jar, \ + jodconverter.jar, \ + pdfbox.jar, \ + poi.jar, \ + portal-service.jar, \ + ridl.jar, \ + tika-core.jar, \ + xpp3.jar, \ + xstream.jar diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/configuration/ConfigurationImpl.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/configuration/ConfigurationImpl.java new file mode 100644 index 00000000..861ae182 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/configuration/ConfigurationImpl.java @@ -0,0 +1,462 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.configuration; + +import com.germinus.easyconf.ComponentConfiguration; +import com.germinus.easyconf.ComponentProperties; + +import com.liferay.portal.configuration.easyconf.ClassLoaderAggregateProperties; +import com.liferay.portal.configuration.easyconf.ClassLoaderComponentConfiguration; +import com.liferay.portal.kernel.configuration.Filter; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.ArrayUtil; +import com.liferay.portal.kernel.util.PropertiesUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.model.Company; +import com.liferay.portal.model.CompanyConstants; +import com.liferay.portal.service.CompanyLocalServiceUtil; + +import java.lang.reflect.Field; + +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; + +import org.apache.commons.configuration.CompositeConfiguration; +import org.apache.commons.configuration.Configuration; +import org.apache.commons.configuration.MapConfiguration; + +/** + * @author Brian Wing Shun Chan + * @author Shuyang Zhou + */ +public class ConfigurationImpl + implements com.liferay.portal.kernel.configuration.Configuration { + + public ConfigurationImpl(ClassLoader classLoader, String name) { + this(classLoader, name, CompanyConstants.SYSTEM); + } + + public ConfigurationImpl( + ClassLoader classLoader, String name, long companyId) { + + String webId = null; + + if (companyId > CompanyConstants.SYSTEM) { + try { + Company company = CompanyLocalServiceUtil.getCompanyById( + companyId); + + webId = company.getWebId(); + } + catch (Exception e) { + _log.error(e, e); + } + } + + _componentConfiguration = new ClassLoaderComponentConfiguration( + classLoader, webId, name); + + printSources(companyId, webId); + } + + @Override + public void addProperties(Properties properties) { + try { + ComponentProperties componentProperties = + _componentConfiguration.getProperties(); + + ClassLoaderAggregateProperties classLoaderAggregateProperties = + (ClassLoaderAggregateProperties) + componentProperties.toConfiguration(); + + Field field1 = CompositeConfiguration.class.getDeclaredField( + "configList"); + + field1.setAccessible(true); + + // Add to configList of base conf + + List configurations = + (List)field1.get(classLoaderAggregateProperties); + + MapConfiguration newConfiguration = new MapConfiguration( + properties); + + configurations.add(0, newConfiguration); + + // Add to configList of AggregatedProperties itself + + CompositeConfiguration compositeConfiguration = + classLoaderAggregateProperties.getBaseConfiguration(); + + configurations = (List)field1.get( + compositeConfiguration); + + configurations.add(0, newConfiguration); + + clearCache(); + } + catch (Exception e) { + _log.error("The properties could not be added", e); + } + } + + @Override + public void clearCache() { + _values.clear(); + } + + @Override + public boolean contains(String key) { + Object value = _values.get(key); + + if (value == null) { + ComponentProperties componentProperties = getComponentProperties(); + + value = componentProperties.getProperty(key); + + if (value == null) { + value = _nullValue; + } + + _values.put(key, value); + } + + if (value == _nullValue) { + return false; + } + + return true; + } + + @Override + public String get(String key) { + Object value = _values.get(key); + + if (value == null) { + ComponentProperties componentProperties = getComponentProperties(); + + value = componentProperties.getString(key); + + if (value == null) { + value = _nullValue; + } + + _values.put(key, value); + } + else if (_PRINT_DUPLICATE_CALLS_TO_GET) { + System.out.println("Duplicate call to get " + key); + } + + if (value instanceof String) { + return (String)value; + } + + return null; + } + + @Override + public String get(String key, Filter filter) { + String filterCacheKey = buildFilterCacheKey(key, filter, false); + + Object value = null; + + if (filterCacheKey != null) { + value = _values.get(filterCacheKey); + } + + if (value == null) { + ComponentProperties componentProperties = getComponentProperties(); + + value = componentProperties.getString( + key, getEasyConfFilter(filter)); + + if (filterCacheKey != null) { + if (value == null) { + value = _nullValue; + } + + _values.put(filterCacheKey, value); + } + } + + if (value instanceof String) { + return (String)value; + } + + return null; + } + + @Override + public String[] getArray(String key) { + String cacheKey = _ARRAY_KEY_PREFIX.concat(key); + + Object value = _values.get(cacheKey); + + if (value == null) { + ComponentProperties componentProperties = getComponentProperties(); + + String[] array = componentProperties.getStringArray(key); + + value = fixArrayValue(cacheKey, array); + } + + if (value instanceof String[]) { + return (String[])value; + } + + return _emptyArray; + } + + @Override + public String[] getArray(String key, Filter filter) { + String filterCacheKey = buildFilterCacheKey(key, filter, true); + + Object value = null; + + if (filterCacheKey != null) { + value = _values.get(filterCacheKey); + } + + if (value == null) { + ComponentProperties componentProperties = getComponentProperties(); + + String[] array = componentProperties.getStringArray( + key, getEasyConfFilter(filter)); + + value = fixArrayValue(filterCacheKey, array); + } + + if (value instanceof String[]) { + return (String[])value; + } + + return _emptyArray; + } + + @Override + public Properties getProperties() { + + // For some strange reason, componentProperties.getProperties() returns + // values with spaces after commas. So a property setting of "xyz=1,2,3" + // actually returns "xyz=1, 2, 3". This can break applications that + // don't expect that extra space. However, getting the property value + // directly through componentProperties returns the correct value. This + // method fixes the weird behavior by returning properties with the + // correct values. + + Properties properties = new Properties(); + + ComponentProperties componentProperties = getComponentProperties(); + + Properties componentPropertiesProperties = + componentProperties.getProperties(); + + for (String key : componentPropertiesProperties.stringPropertyNames()) { + properties.setProperty(key, componentProperties.getString(key)); + } + + return properties; + } + + @Override + public Properties getProperties(String prefix, boolean removePrefix) { + Properties properties = getProperties(); + + return PropertiesUtil.getProperties(properties, prefix, removePrefix); + } + + @Override + public void removeProperties(Properties properties) { + try { + ComponentProperties componentProperties = + _componentConfiguration.getProperties(); + + ClassLoaderAggregateProperties classLoaderAggregateProperties = + (ClassLoaderAggregateProperties) + componentProperties.toConfiguration(); + + CompositeConfiguration compositeConfiguration = + classLoaderAggregateProperties.getBaseConfiguration(); + + Field field2 = CompositeConfiguration.class.getDeclaredField( + "configList"); + + field2.setAccessible(true); + + @SuppressWarnings("unchecked") + List configurations = + (List)field2.get(compositeConfiguration); + + Iterator itr = configurations.iterator(); + + while (itr.hasNext()) { + Configuration configuration = itr.next(); + + if (!(configuration instanceof MapConfiguration)) { + break; + } + + MapConfiguration mapConfiguration = + (MapConfiguration)configuration; + + if (mapConfiguration.getMap() == properties) { + itr.remove(); + + classLoaderAggregateProperties.removeConfiguration( + configuration); + } + } + + clearCache(); + } + catch (Exception e) { + _log.error("The properties could not be removed", e); + } + } + + @Override + public void set(String key, String value) { + ComponentProperties componentProperties = getComponentProperties(); + + componentProperties.setProperty(key, value); + + _values.put(key, value); + } + + protected String buildFilterCacheKey( + String key, Filter filter, boolean arrayValue) { + + if (filter.getVariables() != null) { + return null; + } + + String[] selectors = filter.getSelectors(); + + int length = 0; + + if (arrayValue) { + length = selectors.length + 2; + } + else { + length = selectors.length + 1; + } + + StringBundler sb = new StringBundler(length); + + if (arrayValue) { + sb.append(_ARRAY_KEY_PREFIX); + } + + sb.append(key); + sb.append(selectors); + + return sb.toString(); + } + + protected Object fixArrayValue(String cacheKey, String[] array) { + if (cacheKey == null) { + return array; + } + + Object value = _nullValue; + + if (ArrayUtil.isNotEmpty(array)) { + + // Commons Configuration parses an empty property into a String + // array with one String containing one space. It also leaves a + // trailing array member if you set a property in more than one + // line. + + if (Validator.isNull(array[array.length - 1])) { + String[] subArray = new String[array.length - 1]; + + System.arraycopy(array, 0, subArray, 0, subArray.length); + + array = subArray; + } + + if (array.length > 0) { + value = array; + } + } + + _values.put(cacheKey, value); + + return value; + } + + protected ComponentProperties getComponentProperties() { + return _componentConfiguration.getProperties(); + } + + protected com.germinus.easyconf.Filter getEasyConfFilter(Filter filter) { + com.germinus.easyconf.Filter easyConfFilter = + com.germinus.easyconf.Filter.by(filter.getSelectors()); + + if (filter.getVariables() != null) { + easyConfFilter.setVariables(filter.getVariables()); + } + + return easyConfFilter; + } + + protected void printSources(long companyId, String webId) { + ComponentProperties componentProperties = getComponentProperties(); + + List sources = componentProperties.getLoadedSources(); + + for (int i = sources.size() - 1; i >= 0; i--) { + String source = sources.get(i); + + if (_printedSources.contains(source)) { + continue; + } + + _printedSources.add(source); + + String info = "Loading " + source; + + if (companyId > CompanyConstants.SYSTEM) { + info += + " for {companyId=" + companyId + ", webId=" + webId + "}"; + } + + System.out.println(info); + } + } + + private static final String _ARRAY_KEY_PREFIX = "ARRAY_"; + + private static final boolean _PRINT_DUPLICATE_CALLS_TO_GET = false; + + private static Log _log = LogFactoryUtil.getLog(ConfigurationImpl.class); + + private static String[] _emptyArray = new String[0]; + private static Object _nullValue = new Object(); + + private ComponentConfiguration _componentConfiguration; + private Set _printedSources = new HashSet(); + private Map _values = + new ConcurrentHashMap(); + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/configuration/easyconf/ClassLoaderAggregateProperties.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/configuration/easyconf/ClassLoaderAggregateProperties.java new file mode 100644 index 00000000..b86fda2b --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/configuration/easyconf/ClassLoaderAggregateProperties.java @@ -0,0 +1,383 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.configuration.easyconf; + +import com.germinus.easyconf.AggregatedProperties; +import com.germinus.easyconf.ConfigurationException; +import com.germinus.easyconf.Conventions; +import com.germinus.easyconf.DatasourceURL; +import com.germinus.easyconf.FileConfigurationChangedReloadingStrategy; +import com.germinus.easyconf.JndiURL; + +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.ArrayUtil; + +import java.net.URL; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.configuration.AbstractFileConfiguration; +import org.apache.commons.configuration.CompositeConfiguration; +import org.apache.commons.configuration.Configuration; +import org.apache.commons.configuration.FileConfiguration; +import org.apache.commons.configuration.PropertiesConfiguration; +import org.apache.commons.configuration.SubsetConfiguration; +import org.apache.commons.configuration.SystemConfiguration; +import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy; + +/** + * @author Raymond Augé + */ +public class ClassLoaderAggregateProperties extends AggregatedProperties { + + public ClassLoaderAggregateProperties( + ClassLoader classLoader, String companyId, String componentName) { + + super(companyId, componentName); + + _classLoader = classLoader; + _companyId = companyId; + _componentName = componentName; + + _prefixedSystemConfiguration = new SubsetConfiguration( + _systemConfiguration, _getPrefix(), null); + } + + @Override + public void addBaseFileName(String fileName) { + URL url = _classLoader.getResource(fileName); + + Configuration configuration = _addPropertiesSource( + fileName, url, _baseCompositeConfiguration); + + if ((configuration != null) && !configuration.isEmpty()) { + _baseConfigurationLoaded = true; + } + } + + @Override + public void addGlobalFileName(String fileName) { + URL url = _classLoader.getResource(fileName); + + _addPropertiesSource(fileName, url, _globalCompositeConfiguration); + } + + public CompositeConfiguration getBaseConfiguration() { + return _baseCompositeConfiguration; + } + + @Override + public String getComponentName() { + return _componentName; + } + + @Override + public Object getProperty(String key) { + Object value = null; + + if (value == null) { + value = System.getProperty(_getPrefix().concat(key)); + } + + if (value == null) { + value = _globalCompositeConfiguration.getProperty( + _getPrefix().concat(key)); + } + + if (value == null) { + value = _globalCompositeConfiguration.getProperty(key); + } + + if (value == null) { + value = _baseCompositeConfiguration.getProperty(key); + } + + if (value == null) { + value = super.getProperty(key); + } + + if (value == null) { + value = System.getProperty(key); + } + + if ((value == null) && key.equals(Conventions.COMPANY_ID_PROPERTY)) { + value = _companyId; + } + + if ((value == null) && + key.equals(Conventions.COMPONENT_NAME_PROPERTY)) { + + value = _componentName; + } + + return value; + } + + @Override + public boolean hasBaseConfiguration() { + return _baseConfigurationLoaded; + } + + @Override + public List loadedSources() { + return _loadedSources; + } + + private Configuration _addDatasourceProperties(String datasourcePath) { + DatasourceURL datasourceURL = new DatasourceURL( + datasourcePath, _companyId, _componentName, + DatasourceURL.PROPERTIES_TABLE); + + return datasourceURL.getConfiguration(); + } + + private Configuration _addFileProperties( + String fileName, + CompositeConfiguration loadedCompositeConfiguration) + throws ConfigurationException { + + try { + FileConfiguration newFileConfiguration = + new PropertiesConfiguration(fileName); + + URL url = newFileConfiguration.getURL(); + + if (_log.isDebugEnabled()) { + _log.debug("Adding file " + url); + } + + Long delay = _getReloadDelay( + loadedCompositeConfiguration, newFileConfiguration); + + if (delay != null) { + FileChangedReloadingStrategy fileChangedReloadingStrategy = + new FileConfigurationChangedReloadingStrategy(); + + if (_log.isDebugEnabled()) { + _log.debug( + "File " + url + " will be reloaded every " + + delay + " seconds"); + } + + long milliseconds = delay.longValue() * 1000; + + fileChangedReloadingStrategy.setRefreshDelay(milliseconds); + + newFileConfiguration.setReloadingStrategy( + fileChangedReloadingStrategy); + } + + _addIncludedPropertiesSources( + newFileConfiguration, loadedCompositeConfiguration); + + return newFileConfiguration; + } + catch (org.apache.commons.configuration.ConfigurationException ce) { + if (_log.isDebugEnabled()) { + _log.debug("Configuration source " + fileName + " ignored"); + } + + return null; + } + } + + private void _addIncludedPropertiesSources( + Configuration newConfiguration, + CompositeConfiguration loadedCompositeConfiguration) { + + CompositeConfiguration tempCompositeConfiguration = + new CompositeConfiguration(); + + tempCompositeConfiguration.addConfiguration( + _prefixedSystemConfiguration); + tempCompositeConfiguration.addConfiguration(newConfiguration); + tempCompositeConfiguration.addConfiguration(_systemConfiguration); + tempCompositeConfiguration.addProperty( + Conventions.COMPANY_ID_PROPERTY, _companyId); + tempCompositeConfiguration.addProperty( + Conventions.COMPONENT_NAME_PROPERTY, _componentName); + + String[] fileNames = tempCompositeConfiguration.getStringArray( + Conventions.INCLUDE_PROPERTY); + + ArrayUtil.reverse(fileNames); + + for (String fileName : fileNames) { + URL url = null; + + try { + url = _classLoader.getResource(fileName); + } + catch (RuntimeException re) { + if (fileName.startsWith("file:/")) { + throw re; + } + + fileName = "file:/".concat(fileName); + + url = _classLoader.getResource(fileName); + } + + _addPropertiesSource(fileName, url, loadedCompositeConfiguration); + } + } + + private Configuration _addJNDIProperties(String sourcePath) { + JndiURL jndiURL = new JndiURL(sourcePath, _companyId, _componentName); + + return jndiURL.getConfiguration(); + } + + private Configuration _addPropertiesSource( + String sourceName, URL url, + CompositeConfiguration loadedCompositeConfiguration) { + + try { + Configuration newConfiguration = null; + + if (DatasourceURL.isDatasource(sourceName)) { + newConfiguration = _addDatasourceProperties(sourceName); + } + else if (JndiURL.isJndi(sourceName)) { + newConfiguration = _addJNDIProperties(sourceName); + } + else if (url != null) { + newConfiguration = _addURLProperties( + url, loadedCompositeConfiguration); + } + else { + newConfiguration = _addFileProperties( + sourceName, loadedCompositeConfiguration); + } + + if (newConfiguration == null) { + return newConfiguration; + } + + loadedCompositeConfiguration.addConfiguration(newConfiguration); + + super.addConfiguration(newConfiguration); + + if (newConfiguration instanceof AbstractFileConfiguration) { + AbstractFileConfiguration abstractFileConfiguration = + (AbstractFileConfiguration)newConfiguration; + + URL abstractFileConfigurationURL = + abstractFileConfiguration.getURL(); + + _loadedSources.add(abstractFileConfigurationURL.toString()); + } + else { + _loadedSources.add(sourceName); + } + + return newConfiguration; + } + catch (Exception e) { + if (_log.isDebugEnabled()) { + _log.debug( + "Configuration source " + sourceName + " ignored: " + + e.getMessage()); + } + + return null; + } + } + + private Configuration _addURLProperties( + URL url, CompositeConfiguration loadedCompositeConfiguration) + throws ConfigurationException { + + try { + FileConfiguration newFileConfiguration = + new PropertiesConfiguration(url); + + if (_log.isDebugEnabled()) { + _log.debug("Adding resource " + url); + } + + Long delay = _getReloadDelay( + loadedCompositeConfiguration, newFileConfiguration); + + if (delay != null) { + FileChangedReloadingStrategy fileChangedReloadingStrategy = + new FileConfigurationChangedReloadingStrategy(); + + if (_log.isDebugEnabled()) { + _log.debug( + "Resource " + url + " will be reloaded every " + + delay + " seconds"); + } + + long milliseconds = delay.longValue() * 1000; + + fileChangedReloadingStrategy.setRefreshDelay(milliseconds); + + newFileConfiguration.setReloadingStrategy( + fileChangedReloadingStrategy); + } + + _addIncludedPropertiesSources( + newFileConfiguration, loadedCompositeConfiguration); + + return newFileConfiguration; + } + catch (org.apache.commons.configuration.ConfigurationException ce) { + if (_log.isDebugEnabled()) { + _log.debug("Configuration source " + url + " ignored"); + } + + return null; + } + } + + private String _getPrefix() { + return _componentName.concat(Conventions.PREFIX_SEPARATOR); + } + + private Long _getReloadDelay( + CompositeConfiguration loadedCompositeConfiguration, + FileConfiguration newFileConfiguration) { + + Long delay = newFileConfiguration.getLong( + Conventions.RELOAD_DELAY_PROPERTY, null); + + if (delay == null) { + delay = loadedCompositeConfiguration.getLong( + Conventions.RELOAD_DELAY_PROPERTY, null); + } + + return delay; + } + + private static Log _log = LogFactoryUtil.getLog( + ClassLoaderAggregateProperties.class); + + private CompositeConfiguration _baseCompositeConfiguration = + new CompositeConfiguration(); + private boolean _baseConfigurationLoaded; + private ClassLoader _classLoader; + private String _companyId; + private String _componentName; + private CompositeConfiguration _globalCompositeConfiguration = + new CompositeConfiguration(); + private List _loadedSources = new ArrayList(); + private Configuration _prefixedSystemConfiguration; + private SystemConfiguration _systemConfiguration = + new SystemConfiguration(); + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/configuration/easyconf/ClassLoaderComponentConfiguration.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/configuration/easyconf/ClassLoaderComponentConfiguration.java new file mode 100644 index 00000000..7389e490 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/configuration/easyconf/ClassLoaderComponentConfiguration.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.configuration.easyconf; + +import com.germinus.easyconf.AggregatedProperties; +import com.germinus.easyconf.ComponentConfiguration; +import com.germinus.easyconf.ComponentProperties; +import com.germinus.easyconf.ConfigurationNotFoundException; +import com.germinus.easyconf.Conventions; + +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.SystemProperties; + +import java.lang.reflect.Constructor; + +/** + * @author Raymond Augé + */ +public class ClassLoaderComponentConfiguration extends ComponentConfiguration { + + public ClassLoaderComponentConfiguration( + ClassLoader classLoader, String companyId, String componentName) { + + super(companyId, componentName); + + _classLoader = classLoader; + _companyId = companyId; + _componentName = componentName; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof ComponentConfiguration)) { + return false; + } + + ComponentConfiguration componentConfiguration = + (ComponentConfiguration)obj; + + return _componentName.equals(componentConfiguration.getComponentName()); + } + + @Override + public String getComponentName() { + return _componentName; + } + + @Override + public Object getConfigurationObject() { + throw new UnsupportedOperationException(); + } + + @Override + public Object getConfigurationObject(String configurationName) { + throw new UnsupportedOperationException(); + } + + @Override + public ComponentProperties getProperties() { + ComponentProperties componentProperties = _getAvailableProperties(); + + if (!componentProperties.hasBaseConfiguration()) { + throw new ConfigurationNotFoundException( + _componentName, "The base properties file was not found"); + } + + return componentProperties; + } + + @Override + public int hashCode() { + return _componentName.hashCode(); + } + + @Override + public void saveConfigurationObject(Object configurationObject) { + throw new UnsupportedOperationException(); + } + + @Override + public void saveConfigurationObject( + String confName, Object configurationObject) { + + throw new UnsupportedOperationException(); + } + + private ComponentProperties _getAvailableProperties() { + if (_properties != null) { + return _properties; + } + + SystemProperties.set("base.path", "."); + + ClassLoaderAggregateProperties classLoaderAggregateProperties = + new ClassLoaderAggregateProperties( + _classLoader, _companyId, _componentName); + + classLoaderAggregateProperties.addGlobalFileName( + Conventions.GLOBAL_CONFIGURATION_FILE + + Conventions.PROPERTIES_EXTENSION); + + classLoaderAggregateProperties.addBaseFileName( + _componentName + Conventions.PROPERTIES_EXTENSION); + + if (_log.isInfoEnabled()) { + _log.info( + "Properties for " + _componentName + " loaded from " + + classLoaderAggregateProperties.loadedSources()); + } + + try { + _properties = _constructor.newInstance( + new Object[] {classLoaderAggregateProperties}); + } + catch (Exception e) { + _log.error(e, e); + } + + return _properties; + } + + private static Log _log = LogFactoryUtil.getLog( + ClassLoaderComponentConfiguration.class); + + private static Constructor _constructor; + + static { + try { + _constructor = ComponentProperties.class.getDeclaredConstructor( + AggregatedProperties.class); + + _constructor.setAccessible(true); + } + catch (Exception e) { + _log.error(e, e); + } + } + + private ClassLoader _classLoader; + private String _companyId; + private String _componentName; + private ComponentProperties _properties; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/image/ImageMagickImpl.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/image/ImageMagickImpl.java new file mode 100644 index 00000000..a1b30e0c --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/image/ImageMagickImpl.java @@ -0,0 +1,253 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.image; + +import com.liferay.portal.kernel.configuration.Filter; +import com.liferay.portal.kernel.image.ImageMagick; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.security.pacl.DoPrivileged; +import com.liferay.portal.kernel.util.NamedThreadFactory; +import com.liferay.portal.kernel.util.OSDetector; +import com.liferay.portal.kernel.util.PropsKeys; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.util.ClassLoaderUtil; +import com.liferay.portal.util.PrefsPropsUtil; +import com.liferay.portal.util.PropsUtil; + +import java.util.LinkedList; +import java.util.List; +import java.util.Properties; +import java.util.concurrent.Future; + +import javax.portlet.PortletPreferences; + +import org.im4java.process.ArrayListOutputConsumer; +import org.im4java.process.ProcessExecutor; +import org.im4java.process.ProcessTask; + +/** + * @author Alexander Chow + * @author Ivica Cardic + */ +@DoPrivileged +public class ImageMagickImpl implements ImageMagick { + + public static ImageMagickImpl getInstance() { + return _instance; + } + + @Override + public Future convert(List arguments) throws Exception { + if (!isEnabled()) { + throw new IllegalStateException( + "Cannot call \"convert\" when ImageMagick is disabled"); + } + + ProcessExecutor processExecutor = _getProcessExecutor(); + + LiferayConvertCmd liferayConvertCmd = new LiferayConvertCmd(); + + ProcessTask processTask = liferayConvertCmd.getProcessTask( + _globalSearchPath, getResourceLimits(), arguments); + + processExecutor.execute(processTask); + + return processTask; + } + + @Override + public void destroy() { + if (_processExecutor == null) { + return; + } + + synchronized (ProcessExecutor.class) { + _processExecutor.shutdownNow(); + } + + _processExecutor = null; + } + + @Override + public String getGlobalSearchPath() throws Exception { + PortletPreferences preferences = PrefsPropsUtil.getPreferences(true); + + String globalSearchPath = preferences.getValue( + PropsKeys.IMAGEMAGICK_GLOBAL_SEARCH_PATH, null); + + if (Validator.isNotNull(globalSearchPath)) { + return globalSearchPath; + } + + String filterName = null; + + if (OSDetector.isApple()) { + filterName = "apple"; + } + else if (OSDetector.isWindows()) { + filterName = "windows"; + } + else { + filterName = "unix"; + } + + return PropsUtil.get( + PropsKeys.IMAGEMAGICK_GLOBAL_SEARCH_PATH, new Filter(filterName)); + } + + @Override + public Properties getResourceLimitsProperties() throws Exception { + Properties resourceLimitsProperties = PrefsPropsUtil.getProperties( + PropsKeys.IMAGEMAGICK_RESOURCE_LIMIT, true); + + if (resourceLimitsProperties.isEmpty()) { + resourceLimitsProperties = PropsUtil.getProperties( + PropsKeys.IMAGEMAGICK_RESOURCE_LIMIT, true); + } + + return resourceLimitsProperties; + } + + @Override + public String[] identify(List arguments) throws Exception { + if (!isEnabled()) { + throw new IllegalStateException( + "Cannot call \"identify\" when ImageMagick is disabled"); + } + + ProcessExecutor processExecutor = _getProcessExecutor(); + + LiferayIdentifyCmd liferayIdentifyCmd = new LiferayIdentifyCmd(); + + ArrayListOutputConsumer arrayListOutputConsumer = + new ArrayListOutputConsumer(); + + liferayIdentifyCmd.setOutputConsumer(arrayListOutputConsumer); + + ProcessTask processTask = liferayIdentifyCmd.getProcessTask( + _globalSearchPath, getResourceLimits(), arguments); + + processExecutor.execute(processTask); + + processTask.get(); + + List output = arrayListOutputConsumer.getOutput(); + + if (output != null) { + return output.toArray(new String[output.size()]); + } + + return new String[0]; + } + + @Override + public boolean isEnabled() { + boolean enabled = false; + + try { + enabled = PrefsPropsUtil.getBoolean(PropsKeys.IMAGEMAGICK_ENABLED); + } + catch (Exception e) { + if (_log.isWarnEnabled()) { + _log.warn(e, e); + } + } + + if (!enabled && !_warned && _log.isWarnEnabled()) { + StringBundler sb = new StringBundler(7); + + sb.append("Liferay is not configured to use ImageMagick and "); + sb.append("Ghostscript. For better quality document and image "); + sb.append("previews, install ImageMagick and Ghostscript. Enable "); + sb.append("ImageMagick in portal-ext.properties or in the Server "); + sb.append("Administration section of the Control Panel at: "); + sb.append("http:///group/control_panel/manage/-/server/"); + sb.append("external-services"); + + _log.warn(sb.toString()); + + _warned = true; + } + + return enabled; + } + + @Override + public void reset() { + if (isEnabled()) { + try { + _globalSearchPath = getGlobalSearchPath(); + + _resourceLimitsProperties = getResourceLimitsProperties(); + } + catch (Exception e) { + _log.error(e, e); + } + } + } + + protected LinkedList getResourceLimits() { + LinkedList resourceLimits = new LinkedList(); + + if (_resourceLimitsProperties == null) { + return resourceLimits; + } + + for (Object key : _resourceLimitsProperties.keySet()) { + String value = (String)_resourceLimitsProperties.get(key); + + if (Validator.isNull(value)) { + continue; + } + + resourceLimits.add("-limit"); + resourceLimits.add((String)key); + resourceLimits.add(value); + } + + return resourceLimits; + } + + private ProcessExecutor _getProcessExecutor() { + if (_processExecutor != null) { + return _processExecutor; + } + + synchronized (ProcessExecutor.class) { + if (_processExecutor == null) { + _processExecutor = new ProcessExecutor(); + + _processExecutor.setThreadFactory( + new NamedThreadFactory( + ImageMagickImpl.class.getName(), Thread.MIN_PRIORITY, + ClassLoaderUtil.getPortalClassLoader())); + } + } + + return _processExecutor; + } + + private static Log _log = LogFactoryUtil.getLog(ImageMagickImpl.class); + + private static ImageMagickImpl _instance = new ImageMagickImpl(); + + private String _globalSearchPath; + private volatile ProcessExecutor _processExecutor; + private Properties _resourceLimitsProperties; + private boolean _warned; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/image/ImageToolImpl.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/image/ImageToolImpl.java new file mode 100644 index 00000000..cb6f775c --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/image/ImageToolImpl.java @@ -0,0 +1,710 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.image; + +import com.liferay.portal.kernel.image.ImageBag; +import com.liferay.portal.kernel.image.ImageMagick; +import com.liferay.portal.kernel.image.ImageTool; +import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayInputStream; +import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.security.pacl.DoPrivileged; +import com.liferay.portal.kernel.util.ArrayUtil; +import com.liferay.portal.kernel.util.JavaDetector; +import com.liferay.portal.kernel.util.PropsKeys; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.model.Image; +import com.liferay.portal.model.impl.ImageImpl; +import com.liferay.portal.util.FileImpl; +import com.liferay.portal.util.PropsUtil; +import com.liferay.portal.util.PropsValues; + +import com.sun.media.jai.codec.ImageCodec; +import com.sun.media.jai.codec.ImageDecoder; +import com.sun.media.jai.codec.ImageEncoder; + +import java.awt.AlphaComposite; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GraphicsConfiguration; +import java.awt.image.BufferedImage; +import java.awt.image.ColorModel; +import java.awt.image.DataBuffer; +import java.awt.image.IndexColorModel; +import java.awt.image.RenderedImage; +import java.awt.image.SampleModel; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import java.util.Arrays; +import java.util.Enumeration; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +import javax.imageio.ImageIO; + +import javax.media.jai.RenderedImageAdapter; + +import net.jmge.gif.Gif89Encoder; + +import org.im4java.core.IMOperation; + +/** + * @author Brian Wing Shun Chan + * @author Alexander Chow + * @author Shuyang Zhou + */ +@DoPrivileged +public class ImageToolImpl implements ImageTool { + + public static ImageTool getInstance() { + return _instance; + } + + public void afterPropertiesSet() { + ClassLoader classLoader = getClass().getClassLoader(); + + try { + InputStream is = classLoader.getResourceAsStream( + PropsUtil.get(PropsKeys.IMAGE_DEFAULT_SPACER)); + + if (is == null) { + _log.error("Default spacer is not available"); + } + + _defaultSpacer = getImage(is); + } + catch (Exception e) { + _log.error( + "Unable to configure the default spacer: " + e.getMessage()); + } + + try { + InputStream is = classLoader.getResourceAsStream( + PropsUtil.get(PropsKeys.IMAGE_DEFAULT_COMPANY_LOGO)); + + if (is == null) { + _log.error("Default company logo is not available"); + } + + _defaultCompanyLogo = getImage(is); + } + catch (Exception e) { + _log.error( + "Unable to configure the default company logo: " + + e.getMessage()); + } + + try { + InputStream is = classLoader.getResourceAsStream( + PropsUtil.get(PropsKeys.IMAGE_DEFAULT_ORGANIZATION_LOGO)); + + if (is == null) { + _log.error("Default organization logo is not available"); + } + + _defaultOrganizationLogo = getImage(is); + } + catch (Exception e) { + _log.error( + "Unable to configure the default organization logo: " + + e.getMessage()); + } + + try { + InputStream is = classLoader.getResourceAsStream( + PropsUtil.get(PropsKeys.IMAGE_DEFAULT_USER_FEMALE_PORTRAIT)); + + if (is == null) { + _log.error("Default user female portrait is not available"); + } + + _defaultUserFemalePortrait = getImage(is); + } + catch (Exception e) { + _log.error( + "Unable to configure the default user female portrait: " + + e.getMessage()); + } + + try { + InputStream is = classLoader.getResourceAsStream( + PropsUtil.get(PropsKeys.IMAGE_DEFAULT_USER_MALE_PORTRAIT)); + + if (is == null) { + _log.error("Default user male portrait is not available"); + } + + _defaultUserMalePortrait = getImage(is); + } + catch (Exception e) { + _log.error( + "Unable to configure the default user male portrait: " + + e.getMessage()); + } + } + + @Override + public Future convertCMYKtoRGB(byte[] bytes, String type) { + ImageMagick imageMagick = getImageMagick(); + + if (!imageMagick.isEnabled()) { + return null; + } + + File inputFile = _fileUtil.createTempFile(type); + File outputFile = _fileUtil.createTempFile(type); + + try { + _fileUtil.write(inputFile, bytes); + + IMOperation imOperation = new IMOperation(); + + imOperation.addRawArgs("-format", "%[colorspace]"); + imOperation.addImage(inputFile.getPath()); + + String[] output = imageMagick.identify(imOperation.getCmdArgs()); + + if ((output.length == 1) && + StringUtil.equalsIgnoreCase(output[0], "CMYK")) { + + if (_log.isInfoEnabled()) { + _log.info("The image is in the CMYK colorspace"); + } + + imOperation = new IMOperation(); + + imOperation.addRawArgs("-colorspace", "RGB"); + imOperation.addImage(inputFile.getPath()); + imOperation.addImage(outputFile.getPath()); + + Future future = imageMagick.convert( + imOperation.getCmdArgs()); + + return new RenderedImageFuture(future, outputFile, type); + } + } + catch (Exception e) { + if (_log.isErrorEnabled()) { + _log.error(e, e); + } + } + finally { + _fileUtil.delete(inputFile); + _fileUtil.delete(outputFile); + } + + return null; + } + + @Override + public BufferedImage convertImageType(BufferedImage sourceImage, int type) { + BufferedImage targetImage = new BufferedImage( + sourceImage.getWidth(), sourceImage.getHeight(), type); + + Graphics2D graphics = targetImage.createGraphics(); + + graphics.drawRenderedImage(sourceImage, null); + + graphics.dispose(); + + return targetImage; + } + + @Override + public void encodeGIF(RenderedImage renderedImage, OutputStream os) + throws IOException { + + if (JavaDetector.isJDK6()) { + ImageIO.write(renderedImage, TYPE_GIF, os); + } + else { + BufferedImage bufferedImage = getBufferedImage(renderedImage); + + if (!(bufferedImage.getColorModel() instanceof IndexColorModel)) { + bufferedImage = convertImageType( + bufferedImage, BufferedImage.TYPE_BYTE_INDEXED); + } + + Gif89Encoder encoder = new Gif89Encoder(bufferedImage); + + encoder.encode(os); + } + } + + @Override + public void encodeWBMP(RenderedImage renderedImage, OutputStream os) + throws IOException { + + BufferedImage bufferedImage = getBufferedImage(renderedImage); + + SampleModel sampleModel = bufferedImage.getSampleModel(); + + int type = sampleModel.getDataType(); + + if ((bufferedImage.getType() != BufferedImage.TYPE_BYTE_BINARY) || + (type < DataBuffer.TYPE_BYTE) || (type > DataBuffer.TYPE_INT) || + (sampleModel.getNumBands() != 1) || + (sampleModel.getSampleSize(0) != 1)) { + + BufferedImage binaryImage = new BufferedImage( + bufferedImage.getWidth(), bufferedImage.getHeight(), + BufferedImage.TYPE_BYTE_BINARY); + + Graphics graphics = binaryImage.getGraphics(); + + graphics.drawImage(bufferedImage, 0, 0, null); + + renderedImage = binaryImage; + } + + if (!ImageIO.write(renderedImage, "wbmp", os)) { + + // See http://www.jguru.com/faq/view.jsp?EID=127723 + + os.write(0); + os.write(0); + os.write(toMultiByte(bufferedImage.getWidth())); + os.write(toMultiByte(bufferedImage.getHeight())); + + DataBuffer dataBuffer = bufferedImage.getData().getDataBuffer(); + + int size = dataBuffer.getSize(); + + for (int i = 0; i < size; i++) { + os.write((byte)dataBuffer.getElem(i)); + } + } + } + + @Override + public BufferedImage getBufferedImage(RenderedImage renderedImage) { + if (renderedImage instanceof BufferedImage) { + return (BufferedImage)renderedImage; + } + + RenderedImageAdapter adapter = new RenderedImageAdapter(renderedImage); + + return adapter.getAsBufferedImage(); + } + + @Override + public byte[] getBytes(RenderedImage renderedImage, String contentType) + throws IOException { + + UnsyncByteArrayOutputStream baos = new UnsyncByteArrayOutputStream(); + + write(renderedImage, contentType, baos); + + return baos.toByteArray(); + } + + @Override + public Image getDefaultCompanyLogo() { + return _defaultCompanyLogo; + } + + @Override + public Image getDefaultOrganizationLogo() { + return _defaultOrganizationLogo; + } + + @Override + public Image getDefaultSpacer() { + return _defaultSpacer; + } + + @Override + public Image getDefaultUserFemalePortrait() { + return _defaultUserFemalePortrait; + } + + @Override + public Image getDefaultUserMalePortrait() { + return _defaultUserMalePortrait; + } + + @Override + public Image getImage(byte[] bytes) throws IOException { + if (bytes == null) { + return null; + } + + ImageBag imageBag = read(bytes); + + RenderedImage renderedImage = imageBag.getRenderedImage(); + + if (renderedImage == null) { + throw new IOException("Unable to decode image"); + } + + String type = imageBag.getType(); + + int height = renderedImage.getHeight(); + int width = renderedImage.getWidth(); + int size = bytes.length; + + Image image = new ImageImpl(); + + image.setTextObj(bytes); + image.setType(type); + image.setHeight(height); + image.setWidth(width); + image.setSize(size); + + return image; + } + + @Override + public Image getImage(File file) throws IOException { + byte[] bytes = _fileUtil.getBytes(file); + + return getImage(bytes); + } + + @Override + public Image getImage(InputStream is) throws IOException { + byte[] bytes = _fileUtil.getBytes(is, -1, true); + + return getImage(bytes); + } + + @Override + public Image getImage(InputStream is, boolean cleanUpStream) + throws IOException { + + byte[] bytes = _fileUtil.getBytes(is, -1, cleanUpStream); + + return getImage(bytes); + } + + @Override + public boolean isNullOrDefaultSpacer(byte[] bytes) { + if (ArrayUtil.isEmpty(bytes) || + Arrays.equals(bytes, getDefaultSpacer().getTextObj())) { + + return true; + } + else { + return false; + } + } + + @Override + public ImageBag read(byte[] bytes) { + RenderedImage renderedImage = null; + String type = TYPE_NOT_AVAILABLE; + + Enumeration enu = ImageCodec.getCodecs(); + + while (enu.hasMoreElements()) { + ImageCodec codec = enu.nextElement(); + + if (codec.isFormatRecognized(bytes)) { + type = codec.getFormatName(); + + renderedImage = read(bytes, type); + + break; + } + } + + if (type.equals("jpeg")) { + type = TYPE_JPEG; + } + + return new ImageBag(renderedImage, type); + } + + @Override + public ImageBag read(File file) throws IOException { + return read(_fileUtil.getBytes(file)); + } + + @Override + public ImageBag read(InputStream inputStream) throws IOException { + return read(_fileUtil.getBytes(inputStream)); + } + + @Override + public RenderedImage scale(RenderedImage renderedImage, int width) { + if (width <= 0) { + return renderedImage; + } + + int imageHeight = renderedImage.getHeight(); + int imageWidth = renderedImage.getWidth(); + + double factor = (double)width / imageWidth; + + int scaledHeight = (int)Math.round(factor * imageHeight); + int scaledWidth = width; + + return doScale(renderedImage, scaledHeight, scaledWidth); + } + + @Override + public RenderedImage scale( + RenderedImage renderedImage, int maxHeight, int maxWidth) { + + int imageHeight = renderedImage.getHeight(); + int imageWidth = renderedImage.getWidth(); + + if (maxHeight == 0) { + maxHeight = imageHeight; + } + + if (maxWidth == 0) { + maxWidth = imageWidth; + } + + if ((imageHeight <= maxHeight) && (imageWidth <= maxWidth)) { + return renderedImage; + } + + double factor = Math.min( + (double)maxHeight / imageHeight, (double)maxWidth / imageWidth); + + int scaledHeight = Math.max(1, (int)Math.round(factor * imageHeight)); + int scaledWidth = Math.max(1, (int)Math.round(factor * imageWidth)); + + return doScale(renderedImage, scaledHeight, scaledWidth); + } + + @Override + public void write( + RenderedImage renderedImage, String contentType, OutputStream os) + throws IOException { + + if (contentType.contains(TYPE_BMP)) { + ImageEncoder imageEncoder = ImageCodec.createImageEncoder( + TYPE_BMP, os, null); + + imageEncoder.encode(renderedImage); + } + else if (contentType.contains(TYPE_GIF)) { + encodeGIF(renderedImage, os); + } + else if (contentType.contains(TYPE_JPEG) || + contentType.contains("jpeg")) { + + ImageIO.write(renderedImage, "jpeg", os); + } + else if (contentType.contains(TYPE_PNG)) { + ImageIO.write(renderedImage, TYPE_PNG, os); + } + else if (contentType.contains(TYPE_TIFF) || + contentType.contains("tif")) { + + ImageEncoder imageEncoder = ImageCodec.createImageEncoder( + TYPE_TIFF, os, null); + + imageEncoder.encode(renderedImage); + } + } + + protected RenderedImage doScale( + RenderedImage renderedImage, int scaledHeight, int scaledWidth) { + + // See http://www.oracle.com/technetwork/java/index-137037.html + + BufferedImage originalBufferedImage = getBufferedImage(renderedImage); + + ColorModel originalColorModel = originalBufferedImage.getColorModel(); + + Graphics2D originalGraphics2D = originalBufferedImage.createGraphics(); + + if (originalColorModel.hasAlpha()) { + originalGraphics2D.setComposite(AlphaComposite.Src); + } + + GraphicsConfiguration originalGraphicsConfiguration = + originalGraphics2D.getDeviceConfiguration(); + + BufferedImage scaledBufferedImage = + originalGraphicsConfiguration.createCompatibleImage( + scaledWidth, scaledHeight, + originalBufferedImage.getTransparency()); + + Graphics scaledGraphics = scaledBufferedImage.getGraphics(); + + scaledGraphics.drawImage( + originalBufferedImage.getScaledInstance( + scaledWidth, scaledHeight, java.awt.Image.SCALE_SMOOTH), + 0, 0, null); + + originalGraphics2D.dispose(); + + return scaledBufferedImage; + } + + protected ImageMagick getImageMagick() { + if (_imageMagick == null) { + _imageMagick = ImageMagickImpl.getInstance(); + + _imageMagick.reset(); + } + + return _imageMagick; + } + + protected RenderedImage read(byte[] bytes, String type) { + RenderedImage renderedImage = null; + + try { + if (type.equals(TYPE_JPEG)) { + type = "jpeg"; + } + + ImageDecoder imageDecoder = ImageCodec.createImageDecoder( + type, new UnsyncByteArrayInputStream(bytes), null); + + renderedImage = imageDecoder.decodeAsRenderedImage(); + } + catch (IOException ioe) { + if (_log.isDebugEnabled()) { + _log.debug(type + ": " + ioe.getMessage()); + } + } + + return renderedImage; + } + + protected byte[] toMultiByte(int intValue) { + int numBits = 32; + int mask = 0x80000000; + + while ((mask != 0) && ((intValue & mask) == 0)) { + numBits--; + mask >>>= 1; + } + + int numBitsLeft = numBits; + byte[] multiBytes = new byte[(numBitsLeft + 6) / 7]; + + int maxIndex = multiBytes.length - 1; + + for (int b = 0; b <= maxIndex; b++) { + multiBytes[b] = (byte)((intValue >>> ((maxIndex - b) * 7)) & 0x7f); + + if (b != maxIndex) { + multiBytes[b] |= (byte)0x80; + } + } + + return multiBytes; + } + + private ImageToolImpl() { + ImageIO.setUseCache(PropsValues.IMAGE_IO_USE_DISK_CACHE); + } + + private static Log _log = LogFactoryUtil.getLog(ImageToolImpl.class); + + private static ImageTool _instance = new ImageToolImpl(); + + private static FileImpl _fileUtil = FileImpl.getInstance(); + private static ImageMagick _imageMagick; + + private Image _defaultCompanyLogo; + private Image _defaultOrganizationLogo; + private Image _defaultSpacer; + private Image _defaultUserFemalePortrait; + private Image _defaultUserMalePortrait; + + private class RenderedImageFuture implements Future { + + public RenderedImageFuture( + Future future, File outputFile, String type) { + + _future = future; + _outputFile = outputFile; + _type = type; + } + + @Override + public boolean cancel(boolean mayInterruptIfRunning) { + if (_future.isCancelled() || _future.isDone()) { + return false; + } + + _future.cancel(true); + + return true; + } + + @Override + public RenderedImage get() + throws ExecutionException, InterruptedException { + + _future.get(); + + byte[] bytes = new byte[0]; + + try { + bytes = _fileUtil.getBytes(_outputFile); + } + catch (IOException ioe) { + throw new ExecutionException(ioe); + } + + ImageBag imageBag = read(bytes); + + return imageBag.getRenderedImage(); + } + + @Override + public RenderedImage get(long timeout, TimeUnit timeUnit) + throws ExecutionException, InterruptedException, TimeoutException { + + _future.get(timeout, timeUnit); + + byte[] bytes = new byte[0]; + + try { + bytes = _fileUtil.getBytes(_outputFile); + } + catch (IOException ioe) { + throw new ExecutionException(ioe); + } + + ImageBag imageBag = read(bytes); + + return imageBag.getRenderedImage(); + } + + @Override + public boolean isCancelled() { + return _future.isCancelled(); + } + + @Override + public boolean isDone() { + return _future.isDone(); + } + + private final Future _future; + private final File _outputFile; + private final String _type; + + } + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/image/LiferayConvertCmd.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/image/LiferayConvertCmd.java new file mode 100644 index 00000000..b0181e7d --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/image/LiferayConvertCmd.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.image; + +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; + +import java.util.LinkedList; +import java.util.List; + +import org.im4java.core.ConvertCmd; +import org.im4java.process.ProcessTask; + +/** + * @author Alexander Chow + * @author Ivica Cardic + */ +public class LiferayConvertCmd extends ConvertCmd { + + public ProcessTask getProcessTask( + String globalSearchPath, List resourceLimits, + List commandArguments) + throws Exception { + + setGlobalSearchPath(globalSearchPath); + + LinkedList arguments = new LinkedList(); + + arguments.addAll(_instance.getCommand()); + arguments.addAll(resourceLimits); + arguments.addAll(commandArguments); + + if (_log.isInfoEnabled()) { + StringBundler sb = new StringBundler(arguments.size() * 2); + + for (String argument : arguments) { + sb.append(argument); + sb.append(StringPool.SPACE); + } + + _log.info("Excecuting command '" + sb.toString() + "'"); + } + + return getProcessTask(arguments); + } + + private static Log _log = LogFactoryUtil.getLog(LiferayConvertCmd.class); + + private static LiferayConvertCmd _instance = new LiferayConvertCmd(); + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/image/LiferayIdentifyCmd.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/image/LiferayIdentifyCmd.java new file mode 100644 index 00000000..302e5fc1 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/image/LiferayIdentifyCmd.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.image; + +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; + +import java.util.LinkedList; +import java.util.List; + +import org.im4java.core.IdentifyCmd; +import org.im4java.process.ProcessTask; + +/** + * @author Alexander Chow + * @author Ivica Cardic + */ +public class LiferayIdentifyCmd extends IdentifyCmd { + + public ProcessTask getProcessTask( + String globalSearchPath, List resourceLimits, + List commandArguments) + throws Exception { + + setGlobalSearchPath(globalSearchPath); + + LinkedList arguments = new LinkedList(); + + arguments.addAll(_instance.getCommand()); + arguments.addAll(resourceLimits); + arguments.addAll(commandArguments); + + if (_log.isInfoEnabled()) { + StringBundler sb = new StringBundler(arguments.size() * 2); + + for (String argument : arguments) { + sb.append(argument); + sb.append(StringPool.SPACE); + } + + _log.info("Excecuting command '" + sb.toString() + "'"); + } + + return getProcessTask(arguments); + } + + private static Log _log = LogFactoryUtil.getLog(LiferayIdentifyCmd.class); + + private static LiferayIdentifyCmd _instance = new LiferayIdentifyCmd(); + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/log/Log4jLogFactoryImpl.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/log/Log4jLogFactoryImpl.java new file mode 100644 index 00000000..44d36fb8 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/log/Log4jLogFactoryImpl.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.log; + +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactory; +import com.liferay.portal.kernel.security.pacl.DoPrivileged; +import com.liferay.util.log4j.Log4JUtil; + +import org.apache.log4j.LogManager; + +/** + * @author Brian Wing Shun Chan + */ +@DoPrivileged +public class Log4jLogFactoryImpl implements LogFactory { + + @Override + public Log getLog(Class c) { + return getLog(c.getName()); + } + + @Override + public Log getLog(String name) { + return new Log4jLogImpl(LogManager.getLogger(name)); + } + + @Override + public void setLevel(String name, String priority, boolean custom) { + Log4JUtil.setLevel(name, priority, custom); + } + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/log/Log4jLogImpl.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/log/Log4jLogImpl.java new file mode 100644 index 00000000..a83e47a2 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/log/Log4jLogImpl.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.log; + +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogWrapper; + +import org.apache.log4j.Level; +import org.apache.log4j.Logger; + +/** + * @author Brian Wing Shun Chan + */ +public class Log4jLogImpl implements Log { + + public Log4jLogImpl(Logger logger) { + _logger = logger; + } + + @Override + public void debug(Object msg) { + _logger.log(_logWrapperClassName, Level.DEBUG, msg, null); + } + + @Override + public void debug(Object msg, Throwable t) { + _logger.log(_logWrapperClassName, Level.DEBUG, msg, t); + } + + @Override + public void debug(Throwable t) { + _logger.log(_logWrapperClassName, Level.DEBUG, null, t); + } + + @Override + public void error(Object msg) { + _logger.log(_logWrapperClassName, Level.ERROR, msg, null); + } + + @Override + public void error(Object msg, Throwable t) { + _logger.log(_logWrapperClassName, Level.ERROR, msg, t); + } + + @Override + public void error(Throwable t) { + _logger.log(_logWrapperClassName, Level.ERROR, null, t); + } + + @Override + public void fatal(Object msg) { + _logger.log(_logWrapperClassName, Level.FATAL, msg, null); + } + + @Override + public void fatal(Object msg, Throwable t) { + _logger.log(_logWrapperClassName, Level.FATAL, msg, t); + } + + @Override + public void fatal(Throwable t) { + _logger.log(_logWrapperClassName, Level.FATAL, null, t); + } + + public Logger getWrappedLogger() { + return _logger; + } + + @Override + public void info(Object msg) { + _logger.log(_logWrapperClassName, Level.INFO, msg, null); + } + + @Override + public void info(Object msg, Throwable t) { + _logger.log(_logWrapperClassName, Level.INFO, msg, t); + } + + @Override + public void info(Throwable t) { + _logger.log(_logWrapperClassName, Level.INFO, null, t); + } + + @Override + public boolean isDebugEnabled() { + return _logger.isDebugEnabled(); + } + + @Override + public boolean isErrorEnabled() { + return _logger.isEnabledFor(Level.ERROR); + } + + @Override + public boolean isFatalEnabled() { + return _logger.isEnabledFor(Level.FATAL); + } + + @Override + public boolean isInfoEnabled() { + return _logger.isInfoEnabled(); + } + + @Override + public boolean isTraceEnabled() { + return _logger.isTraceEnabled(); + } + + @Override + public boolean isWarnEnabled() { + return _logger.isEnabledFor(Level.WARN); + } + + @Override + public void setLogWrapperClassName(String className) { + _logWrapperClassName = className; + } + + @Override + public void trace(Object msg) { + _logger.log(_logWrapperClassName, Level.TRACE, msg, null); + } + + @Override + public void trace(Object msg, Throwable t) { + _logger.log(_logWrapperClassName, Level.TRACE, msg, t); + } + + @Override + public void trace(Throwable t) { + _logger.log(_logWrapperClassName, Level.TRACE, null, t); + } + + @Override + public void warn(Object msg) { + _logger.log(_logWrapperClassName, Level.WARN, msg, null); + } + + @Override + public void warn(Object msg, Throwable t) { + _logger.log(_logWrapperClassName, Level.WARN, msg, t); + } + + @Override + public void warn(Throwable t) { + _logger.log(_logWrapperClassName, Level.WARN, null, t); + } + + private Logger _logger; + private String _logWrapperClassName = LogWrapper.class.getName(); + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/ImageBaseImpl.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/ImageBaseImpl.java new file mode 100644 index 00000000..593140c0 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/ImageBaseImpl.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.model.impl; + +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.model.Image; +import com.liferay.portal.service.ImageLocalServiceUtil; + +/** + * The extended model base implementation for the Image service. Represents a row in the "Image" database table, with each column mapped to a property of this class. + * + *

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

+ * + * @author Brian Wing Shun Chan + * @see ImageImpl + * @see com.liferay.portal.model.Image + * @generated + */ +public abstract class ImageBaseImpl extends ImageModelImpl implements Image { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a image model instance should use the {@link Image} interface instead. + */ + @Override + public void persist() throws SystemException { + if (this.isNew()) { + ImageLocalServiceUtil.addImage(this); + } + else { + ImageLocalServiceUtil.updateImage(this); + } + } +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/ImageCacheModel.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/ImageCacheModel.java new file mode 100644 index 00000000..7bbb7127 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/ImageCacheModel.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.model.impl; + +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.model.Image; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +import java.util.Date; + +/** + * The cache model class for representing Image in entity cache. + * + * @author Brian Wing Shun Chan + * @see Image + * @generated + */ +public class ImageCacheModel implements CacheModel, Externalizable { + @Override + public String toString() { + StringBundler sb = new StringBundler(13); + + sb.append("{imageId="); + sb.append(imageId); + sb.append(", modifiedDate="); + sb.append(modifiedDate); + sb.append(", type="); + sb.append(type); + sb.append(", height="); + sb.append(height); + sb.append(", width="); + sb.append(width); + sb.append(", size="); + sb.append(size); + sb.append("}"); + + return sb.toString(); + } + + @Override + public Image toEntityModel() { + ImageImpl imageImpl = new ImageImpl(); + + imageImpl.setImageId(imageId); + + if (modifiedDate == Long.MIN_VALUE) { + imageImpl.setModifiedDate(null); + } + else { + imageImpl.setModifiedDate(new Date(modifiedDate)); + } + + if (type == null) { + imageImpl.setType(StringPool.BLANK); + } + else { + imageImpl.setType(type); + } + + imageImpl.setHeight(height); + imageImpl.setWidth(width); + imageImpl.setSize(size); + + imageImpl.resetOriginalValues(); + + return imageImpl; + } + + @Override + public void readExternal(ObjectInput objectInput) throws IOException { + imageId = objectInput.readLong(); + modifiedDate = objectInput.readLong(); + type = objectInput.readUTF(); + height = objectInput.readInt(); + width = objectInput.readInt(); + size = objectInput.readInt(); + } + + @Override + public void writeExternal(ObjectOutput objectOutput) + throws IOException { + objectOutput.writeLong(imageId); + objectOutput.writeLong(modifiedDate); + + if (type == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(type); + } + + objectOutput.writeInt(height); + objectOutput.writeInt(width); + objectOutput.writeInt(size); + } + + public long imageId; + public long modifiedDate; + public String type; + public int height; + public int width; + public int size; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/ImageImpl.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/ImageImpl.java new file mode 100644 index 00000000..e6fcb81a --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/ImageImpl.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.model.impl; + +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.FileUtil; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.util.PropsValues; +import com.liferay.portlet.documentlibrary.model.DLFileEntry; +import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil; +import com.liferay.portlet.documentlibrary.store.DLStoreUtil; + +import java.io.InputStream; + +/** + * @author Brian Wing Shun Chan + */ +public class ImageImpl extends ImageBaseImpl { + + public ImageImpl() { + } + + @Override + public byte[] getTextObj() { + if (_textObj != null) { + return _textObj; + } + + long imageId = getImageId(); + + try { + DLFileEntry dlFileEntry = null; + + if (PropsValues.WEB_SERVER_SERVLET_CHECK_IMAGE_GALLERY) { + dlFileEntry = + DLFileEntryLocalServiceUtil.fetchFileEntryByAnyImageId( + imageId); + } + + InputStream is = null; + + if ((dlFileEntry != null) && + (dlFileEntry.getLargeImageId() == imageId)) { + + is = DLStoreUtil.getFileAsStream( + dlFileEntry.getCompanyId(), + dlFileEntry.getDataRepositoryId(), dlFileEntry.getName()); + } + else { + is = DLStoreUtil.getFileAsStream( + _DEFAULT_COMPANY_ID, _DEFAULT_REPOSITORY_ID, getFileName()); + } + + byte[] bytes = FileUtil.getBytes(is); + + _textObj = bytes; + } + catch (Exception e) { + _log.error("Error reading image " + imageId, e); + } + + return _textObj; + } + + @Override + public void setTextObj(byte[] textObj) { + _textObj = textObj; + } + + protected String getFileName() { + return getImageId() + StringPool.PERIOD + getType(); + } + + private static final long _DEFAULT_COMPANY_ID = 0; + + private static final long _DEFAULT_REPOSITORY_ID = 0; + + private static Log _log = LogFactoryUtil.getLog(ImageImpl.class); + + private byte[] _textObj; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/ImageModelImpl.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/ImageModelImpl.java new file mode 100644 index 00000000..53e23b0c --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/ImageModelImpl.java @@ -0,0 +1,512 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.model.impl; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.json.JSON; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.model.Image; +import com.liferay.portal.model.ImageModel; +import com.liferay.portal.model.ImageSoap; +import com.liferay.portal.service.ServiceContext; + +import com.liferay.portlet.expando.model.ExpandoBridge; +import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil; + +import java.io.Serializable; + +import java.sql.Types; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * The base model implementation for the Image service. Represents a row in the "Image" database table, with each column mapped to a property of this class. + * + *

+ * This implementation and its corresponding interface {@link com.liferay.portal.model.ImageModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link ImageImpl}. + *

+ * + * @author Brian Wing Shun Chan + * @see ImageImpl + * @see com.liferay.portal.model.Image + * @see com.liferay.portal.model.ImageModel + * @generated + */ +@JSON(strict = true) +public class ImageModelImpl extends BaseModelImpl implements ImageModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a image model instance should use the {@link com.liferay.portal.model.Image} interface instead. + */ + public static final String TABLE_NAME = "Image"; + public static final Object[][] TABLE_COLUMNS = { + { "imageId", Types.BIGINT }, + { "modifiedDate", Types.TIMESTAMP }, + { "type_", Types.VARCHAR }, + { "height", Types.INTEGER }, + { "width", Types.INTEGER }, + { "size_", Types.INTEGER } + }; + public static final String TABLE_SQL_CREATE = "create table Image (imageId LONG not null primary key,modifiedDate DATE null,type_ VARCHAR(75) null,height INTEGER,width INTEGER,size_ INTEGER)"; + public static final String TABLE_SQL_DROP = "drop table Image"; + public static final String ORDER_BY_JPQL = " ORDER BY image.imageId ASC"; + public static final String ORDER_BY_SQL = " ORDER BY Image.imageId ASC"; + public static final String DATA_SOURCE = "liferayDataSource"; + public static final String SESSION_FACTORY = "liferaySessionFactory"; + public static final String TX_MANAGER = "liferayTransactionManager"; + public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get( + "value.object.entity.cache.enabled.com.liferay.portal.model.Image"), + true); + public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get( + "value.object.finder.cache.enabled.com.liferay.portal.model.Image"), + true); + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get( + "value.object.column.bitmask.enabled.com.liferay.portal.model.Image"), + true); + public static long SIZE_COLUMN_BITMASK = 1L; + public static long IMAGEID_COLUMN_BITMASK = 2L; + + /** + * Converts the soap model instance into a normal model instance. + * + * @param soapModel the soap model instance to convert + * @return the normal model instance + */ + public static Image toModel(ImageSoap soapModel) { + if (soapModel == null) { + return null; + } + + Image model = new ImageImpl(); + + model.setImageId(soapModel.getImageId()); + model.setModifiedDate(soapModel.getModifiedDate()); + model.setType(soapModel.getType()); + model.setHeight(soapModel.getHeight()); + model.setWidth(soapModel.getWidth()); + model.setSize(soapModel.getSize()); + + return model; + } + + /** + * Converts the soap model instances into normal model instances. + * + * @param soapModels the soap model instances to convert + * @return the normal model instances + */ + public static List toModels(ImageSoap[] soapModels) { + if (soapModels == null) { + return null; + } + + List models = new ArrayList(soapModels.length); + + for (ImageSoap soapModel : soapModels) { + models.add(toModel(soapModel)); + } + + return models; + } + + public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get( + "lock.expiration.time.com.liferay.portal.model.Image")); + + public ImageModelImpl() { + } + + @Override + public long getPrimaryKey() { + return _imageId; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setImageId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _imageId; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Class getModelClass() { + return Image.class; + } + + @Override + public String getModelClassName() { + return Image.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("imageId", getImageId()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("type", getType()); + attributes.put("height", getHeight()); + attributes.put("width", getWidth()); + attributes.put("size", getSize()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + Long imageId = (Long)attributes.get("imageId"); + + if (imageId != null) { + setImageId(imageId); + } + + Date modifiedDate = (Date)attributes.get("modifiedDate"); + + if (modifiedDate != null) { + setModifiedDate(modifiedDate); + } + + String type = (String)attributes.get("type"); + + if (type != null) { + setType(type); + } + + Integer height = (Integer)attributes.get("height"); + + if (height != null) { + setHeight(height); + } + + Integer width = (Integer)attributes.get("width"); + + if (width != null) { + setWidth(width); + } + + Integer size = (Integer)attributes.get("size"); + + if (size != null) { + setSize(size); + } + } + + @JSON + @Override + public long getImageId() { + return _imageId; + } + + @Override + public void setImageId(long imageId) { + _columnBitmask = -1L; + + _imageId = imageId; + } + + @JSON + @Override + public Date getModifiedDate() { + return _modifiedDate; + } + + @Override + public void setModifiedDate(Date modifiedDate) { + _modifiedDate = modifiedDate; + } + + @JSON + @Override + public String getType() { + if (_type == null) { + return StringPool.BLANK; + } + else { + return _type; + } + } + + @Override + public void setType(String type) { + _type = type; + } + + @JSON + @Override + public int getHeight() { + return _height; + } + + @Override + public void setHeight(int height) { + _height = height; + } + + @JSON + @Override + public int getWidth() { + return _width; + } + + @Override + public void setWidth(int width) { + _width = width; + } + + @JSON + @Override + public int getSize() { + return _size; + } + + @Override + public void setSize(int size) { + _columnBitmask |= SIZE_COLUMN_BITMASK; + + if (!_setOriginalSize) { + _setOriginalSize = true; + + _originalSize = _size; + } + + _size = size; + } + + public int getOriginalSize() { + return _originalSize; + } + + public long getColumnBitmask() { + return _columnBitmask; + } + + @Override + public ExpandoBridge getExpandoBridge() { + return ExpandoBridgeFactoryUtil.getExpandoBridge(0, + Image.class.getName(), getPrimaryKey()); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + ExpandoBridge expandoBridge = getExpandoBridge(); + + expandoBridge.setAttributes(serviceContext); + } + + @Override + public Image toEscapedModel() { + if (_escapedModel == null) { + _escapedModel = (Image)ProxyUtil.newProxyInstance(_classLoader, + _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); + } + + return _escapedModel; + } + + @Override + public Object clone() { + ImageImpl imageImpl = new ImageImpl(); + + imageImpl.setImageId(getImageId()); + imageImpl.setModifiedDate(getModifiedDate()); + imageImpl.setType(getType()); + imageImpl.setHeight(getHeight()); + imageImpl.setWidth(getWidth()); + imageImpl.setSize(getSize()); + + imageImpl.resetOriginalValues(); + + return imageImpl; + } + + @Override + public int compareTo(Image image) { + int value = 0; + + if (getImageId() < image.getImageId()) { + value = -1; + } + else if (getImageId() > image.getImageId()) { + value = 1; + } + else { + value = 0; + } + + if (value != 0) { + return value; + } + + return 0; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof Image)) { + return false; + } + + Image image = (Image)obj; + + long primaryKey = image.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public void resetOriginalValues() { + ImageModelImpl imageModelImpl = this; + + imageModelImpl._originalSize = imageModelImpl._size; + + imageModelImpl._setOriginalSize = false; + + imageModelImpl._columnBitmask = 0; + } + + @Override + public CacheModel toCacheModel() { + ImageCacheModel imageCacheModel = new ImageCacheModel(); + + imageCacheModel.imageId = getImageId(); + + Date modifiedDate = getModifiedDate(); + + if (modifiedDate != null) { + imageCacheModel.modifiedDate = modifiedDate.getTime(); + } + else { + imageCacheModel.modifiedDate = Long.MIN_VALUE; + } + + imageCacheModel.type = getType(); + + String type = imageCacheModel.type; + + if ((type != null) && (type.length() == 0)) { + imageCacheModel.type = null; + } + + imageCacheModel.height = getHeight(); + + imageCacheModel.width = getWidth(); + + imageCacheModel.size = getSize(); + + return imageCacheModel; + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(13); + + sb.append("{imageId="); + sb.append(getImageId()); + sb.append(", modifiedDate="); + sb.append(getModifiedDate()); + sb.append(", type="); + sb.append(getType()); + sb.append(", height="); + sb.append(getHeight()); + sb.append(", width="); + sb.append(getWidth()); + sb.append(", size="); + sb.append(getSize()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(22); + + sb.append(""); + sb.append("com.liferay.portal.model.Image"); + sb.append(""); + + sb.append( + "imageId"); + sb.append( + "modifiedDate"); + sb.append( + "type"); + sb.append( + "height"); + sb.append( + "width"); + sb.append( + "size"); + + sb.append(""); + + return sb.toString(); + } + + private static ClassLoader _classLoader = Image.class.getClassLoader(); + private static Class[] _escapedModelInterfaces = new Class[] { Image.class }; + private long _imageId; + private Date _modifiedDate; + private String _type; + private int _height; + private int _width; + private int _size; + private int _originalSize; + private boolean _setOriginalSize; + private long _columnBitmask; + private Image _escapedModel; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/PortalPreferencesBaseImpl.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/PortalPreferencesBaseImpl.java new file mode 100644 index 00000000..571b87ea --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/PortalPreferencesBaseImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.model.impl; + +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.model.PortalPreferences; +import com.liferay.portal.service.PortalPreferencesLocalServiceUtil; + +/** + * The extended model base implementation for the PortalPreferences service. Represents a row in the "PortalPreferences" database table, with each column mapped to a property of this class. + * + *

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

+ * + * @author Brian Wing Shun Chan + * @see PortalPreferencesImpl + * @see com.liferay.portal.model.PortalPreferences + * @generated + */ +public abstract class PortalPreferencesBaseImpl + extends PortalPreferencesModelImpl implements PortalPreferences { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a portal preferences model instance should use the {@link PortalPreferences} interface instead. + */ + @Override + public void persist() throws SystemException { + if (this.isNew()) { + PortalPreferencesLocalServiceUtil.addPortalPreferences(this); + } + else { + PortalPreferencesLocalServiceUtil.updatePortalPreferences(this); + } + } +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/PortalPreferencesCacheModel.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/PortalPreferencesCacheModel.java new file mode 100644 index 00000000..e69393f2 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/PortalPreferencesCacheModel.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.model.impl; + +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.model.PortalPreferences; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +/** + * The cache model class for representing PortalPreferences in entity cache. + * + * @author Brian Wing Shun Chan + * @see PortalPreferences + * @generated + */ +public class PortalPreferencesCacheModel implements CacheModel, + Externalizable { + @Override + public String toString() { + StringBundler sb = new StringBundler(9); + + sb.append("{portalPreferencesId="); + sb.append(portalPreferencesId); + sb.append(", ownerId="); + sb.append(ownerId); + sb.append(", ownerType="); + sb.append(ownerType); + sb.append(", preferences="); + sb.append(preferences); + sb.append("}"); + + return sb.toString(); + } + + @Override + public PortalPreferences toEntityModel() { + PortalPreferencesImpl portalPreferencesImpl = new PortalPreferencesImpl(); + + portalPreferencesImpl.setPortalPreferencesId(portalPreferencesId); + portalPreferencesImpl.setOwnerId(ownerId); + portalPreferencesImpl.setOwnerType(ownerType); + + if (preferences == null) { + portalPreferencesImpl.setPreferences(StringPool.BLANK); + } + else { + portalPreferencesImpl.setPreferences(preferences); + } + + portalPreferencesImpl.resetOriginalValues(); + + return portalPreferencesImpl; + } + + @Override + public void readExternal(ObjectInput objectInput) throws IOException { + portalPreferencesId = objectInput.readLong(); + ownerId = objectInput.readLong(); + ownerType = objectInput.readInt(); + preferences = objectInput.readUTF(); + } + + @Override + public void writeExternal(ObjectOutput objectOutput) + throws IOException { + objectOutput.writeLong(portalPreferencesId); + objectOutput.writeLong(ownerId); + objectOutput.writeInt(ownerType); + + if (preferences == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(preferences); + } + } + + public long portalPreferencesId; + public long ownerId; + public int ownerType; + public String preferences; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/PortalPreferencesImpl.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/PortalPreferencesImpl.java new file mode 100644 index 00000000..950bafbb --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/PortalPreferencesImpl.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.model.impl; + +/** + * @author Alexander Chow + */ +public class PortalPreferencesImpl extends PortalPreferencesBaseImpl { + + public PortalPreferencesImpl() { + } + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/PortalPreferencesModelImpl.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/PortalPreferencesModelImpl.java new file mode 100644 index 00000000..d62f2995 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/model/impl/PortalPreferencesModelImpl.java @@ -0,0 +1,407 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.model.impl; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.model.PortalPreferences; +import com.liferay.portal.model.PortalPreferencesModel; +import com.liferay.portal.service.ServiceContext; + +import com.liferay.portlet.expando.model.ExpandoBridge; +import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil; + +import java.io.Serializable; + +import java.sql.Types; + +import java.util.HashMap; +import java.util.Map; + +/** + * The base model implementation for the PortalPreferences service. Represents a row in the "PortalPreferences" database table, with each column mapped to a property of this class. + * + *

+ * This implementation and its corresponding interface {@link com.liferay.portal.model.PortalPreferencesModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link PortalPreferencesImpl}. + *

+ * + * @author Brian Wing Shun Chan + * @see PortalPreferencesImpl + * @see com.liferay.portal.model.PortalPreferences + * @see com.liferay.portal.model.PortalPreferencesModel + * @generated + */ +public class PortalPreferencesModelImpl extends BaseModelImpl + implements PortalPreferencesModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a portal preferences model instance should use the {@link com.liferay.portal.model.PortalPreferences} interface instead. + */ + public static final String TABLE_NAME = "PortalPreferences"; + public static final Object[][] TABLE_COLUMNS = { + { "portalPreferencesId", Types.BIGINT }, + { "ownerId", Types.BIGINT }, + { "ownerType", Types.INTEGER }, + { "preferences", Types.CLOB } + }; + public static final String TABLE_SQL_CREATE = "create table PortalPreferences (portalPreferencesId LONG not null primary key,ownerId LONG,ownerType INTEGER,preferences TEXT null)"; + public static final String TABLE_SQL_DROP = "drop table PortalPreferences"; + public static final String ORDER_BY_JPQL = " ORDER BY portalPreferences.portalPreferencesId ASC"; + public static final String ORDER_BY_SQL = " ORDER BY PortalPreferences.portalPreferencesId ASC"; + public static final String DATA_SOURCE = "liferayDataSource"; + public static final String SESSION_FACTORY = "liferaySessionFactory"; + public static final String TX_MANAGER = "liferayTransactionManager"; + public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get( + "value.object.entity.cache.enabled.com.liferay.portal.model.PortalPreferences"), + true); + public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get( + "value.object.finder.cache.enabled.com.liferay.portal.model.PortalPreferences"), + true); + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get( + "value.object.column.bitmask.enabled.com.liferay.portal.model.PortalPreferences"), + true); + public static long OWNERID_COLUMN_BITMASK = 1L; + public static long OWNERTYPE_COLUMN_BITMASK = 2L; + public static long PORTALPREFERENCESID_COLUMN_BITMASK = 4L; + public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get( + "lock.expiration.time.com.liferay.portal.model.PortalPreferences")); + + public PortalPreferencesModelImpl() { + } + + @Override + public long getPrimaryKey() { + return _portalPreferencesId; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setPortalPreferencesId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _portalPreferencesId; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Class getModelClass() { + return PortalPreferences.class; + } + + @Override + public String getModelClassName() { + return PortalPreferences.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("portalPreferencesId", getPortalPreferencesId()); + attributes.put("ownerId", getOwnerId()); + attributes.put("ownerType", getOwnerType()); + attributes.put("preferences", getPreferences()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + Long portalPreferencesId = (Long)attributes.get("portalPreferencesId"); + + if (portalPreferencesId != null) { + setPortalPreferencesId(portalPreferencesId); + } + + Long ownerId = (Long)attributes.get("ownerId"); + + if (ownerId != null) { + setOwnerId(ownerId); + } + + Integer ownerType = (Integer)attributes.get("ownerType"); + + if (ownerType != null) { + setOwnerType(ownerType); + } + + String preferences = (String)attributes.get("preferences"); + + if (preferences != null) { + setPreferences(preferences); + } + } + + @Override + public long getPortalPreferencesId() { + return _portalPreferencesId; + } + + @Override + public void setPortalPreferencesId(long portalPreferencesId) { + _portalPreferencesId = portalPreferencesId; + } + + @Override + public long getOwnerId() { + return _ownerId; + } + + @Override + public void setOwnerId(long ownerId) { + _columnBitmask |= OWNERID_COLUMN_BITMASK; + + if (!_setOriginalOwnerId) { + _setOriginalOwnerId = true; + + _originalOwnerId = _ownerId; + } + + _ownerId = ownerId; + } + + public long getOriginalOwnerId() { + return _originalOwnerId; + } + + @Override + public int getOwnerType() { + return _ownerType; + } + + @Override + public void setOwnerType(int ownerType) { + _columnBitmask |= OWNERTYPE_COLUMN_BITMASK; + + if (!_setOriginalOwnerType) { + _setOriginalOwnerType = true; + + _originalOwnerType = _ownerType; + } + + _ownerType = ownerType; + } + + public int getOriginalOwnerType() { + return _originalOwnerType; + } + + @Override + public String getPreferences() { + if (_preferences == null) { + return StringPool.BLANK; + } + else { + return _preferences; + } + } + + @Override + public void setPreferences(String preferences) { + _preferences = preferences; + } + + public long getColumnBitmask() { + return _columnBitmask; + } + + @Override + public ExpandoBridge getExpandoBridge() { + return ExpandoBridgeFactoryUtil.getExpandoBridge(0, + PortalPreferences.class.getName(), getPrimaryKey()); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + ExpandoBridge expandoBridge = getExpandoBridge(); + + expandoBridge.setAttributes(serviceContext); + } + + @Override + public PortalPreferences toEscapedModel() { + if (_escapedModel == null) { + _escapedModel = (PortalPreferences)ProxyUtil.newProxyInstance(_classLoader, + _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); + } + + return _escapedModel; + } + + @Override + public Object clone() { + PortalPreferencesImpl portalPreferencesImpl = new PortalPreferencesImpl(); + + portalPreferencesImpl.setPortalPreferencesId(getPortalPreferencesId()); + portalPreferencesImpl.setOwnerId(getOwnerId()); + portalPreferencesImpl.setOwnerType(getOwnerType()); + portalPreferencesImpl.setPreferences(getPreferences()); + + portalPreferencesImpl.resetOriginalValues(); + + return portalPreferencesImpl; + } + + @Override + public int compareTo(PortalPreferences portalPreferences) { + long primaryKey = portalPreferences.getPrimaryKey(); + + if (getPrimaryKey() < primaryKey) { + return -1; + } + else if (getPrimaryKey() > primaryKey) { + return 1; + } + else { + return 0; + } + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof PortalPreferences)) { + return false; + } + + PortalPreferences portalPreferences = (PortalPreferences)obj; + + long primaryKey = portalPreferences.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public void resetOriginalValues() { + PortalPreferencesModelImpl portalPreferencesModelImpl = this; + + portalPreferencesModelImpl._originalOwnerId = portalPreferencesModelImpl._ownerId; + + portalPreferencesModelImpl._setOriginalOwnerId = false; + + portalPreferencesModelImpl._originalOwnerType = portalPreferencesModelImpl._ownerType; + + portalPreferencesModelImpl._setOriginalOwnerType = false; + + portalPreferencesModelImpl._columnBitmask = 0; + } + + @Override + public CacheModel toCacheModel() { + PortalPreferencesCacheModel portalPreferencesCacheModel = new PortalPreferencesCacheModel(); + + portalPreferencesCacheModel.portalPreferencesId = getPortalPreferencesId(); + + portalPreferencesCacheModel.ownerId = getOwnerId(); + + portalPreferencesCacheModel.ownerType = getOwnerType(); + + portalPreferencesCacheModel.preferences = getPreferences(); + + String preferences = portalPreferencesCacheModel.preferences; + + if ((preferences != null) && (preferences.length() == 0)) { + portalPreferencesCacheModel.preferences = null; + } + + return portalPreferencesCacheModel; + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(9); + + sb.append("{portalPreferencesId="); + sb.append(getPortalPreferencesId()); + sb.append(", ownerId="); + sb.append(getOwnerId()); + sb.append(", ownerType="); + sb.append(getOwnerType()); + sb.append(", preferences="); + sb.append(getPreferences()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(16); + + sb.append(""); + sb.append("com.liferay.portal.model.PortalPreferences"); + sb.append(""); + + sb.append( + "portalPreferencesId"); + sb.append( + "ownerId"); + sb.append( + "ownerType"); + sb.append( + "preferences"); + + sb.append(""); + + return sb.toString(); + } + + private static ClassLoader _classLoader = PortalPreferences.class.getClassLoader(); + private static Class[] _escapedModelInterfaces = new Class[] { + PortalPreferences.class + }; + private long _portalPreferencesId; + private long _ownerId; + private long _originalOwnerId; + private boolean _setOriginalOwnerId; + private int _ownerType; + private int _originalOwnerType; + private boolean _setOriginalOwnerType; + private String _preferences; + private long _columnBitmask; + private PortalPreferences _escapedModel; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/model/LiferayFileEntry.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/model/LiferayFileEntry.java new file mode 100644 index 00000000..5b83d3e9 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/model/LiferayFileEntry.java @@ -0,0 +1,575 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.repository.liferayrepository.model; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.lar.StagedModelType; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.repository.model.FileEntry; +import com.liferay.portal.kernel.repository.model.FileVersion; +import com.liferay.portal.kernel.repository.model.Folder; +import com.liferay.portal.kernel.util.ContentTypes; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.model.Lock; +import com.liferay.portal.security.auth.PrincipalThreadLocal; +import com.liferay.portal.security.permission.PermissionChecker; +import com.liferay.portlet.documentlibrary.model.DLFileEntry; +import com.liferay.portlet.documentlibrary.model.DLFileEntryConstants; +import com.liferay.portlet.documentlibrary.model.DLFileVersion; +import com.liferay.portlet.documentlibrary.service.DLAppHelperLocalServiceUtil; +import com.liferay.portlet.documentlibrary.service.DLFileVersionLocalServiceUtil; +import com.liferay.portlet.documentlibrary.service.permission.DLFileEntryPermission; +import com.liferay.portlet.expando.model.ExpandoBridge; + +import java.io.InputStream; +import java.io.Serializable; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * @author Alexander Chow + */ +public class LiferayFileEntry extends LiferayModel implements FileEntry { + + public LiferayFileEntry(DLFileEntry dlFileEntry) { + _dlFileEntry = dlFileEntry; + } + + public LiferayFileEntry(DLFileEntry fileEntry, boolean escapedModel) { + _dlFileEntry = fileEntry; + _escapedModel = escapedModel; + } + + @Override + public Object clone() { + LiferayFileEntry liferayFileEntry = new LiferayFileEntry( + _dlFileEntry, _escapedModel); + + FileVersion cachedFileVersion = getCachedFileVersion(); + + if (cachedFileVersion != null) { + liferayFileEntry.setCachedFileVersion(cachedFileVersion); + } + + liferayFileEntry.setCompanyId(getCompanyId()); + liferayFileEntry.setCreateDate(getCreateDate()); + liferayFileEntry.setGroupId(getGroupId()); + liferayFileEntry.setModifiedDate(getModifiedDate()); + liferayFileEntry.setPrimaryKey(getPrimaryKey()); + liferayFileEntry.setUserId(getUserId()); + liferayFileEntry.setUserName(getUserName()); + + try { + liferayFileEntry.setUserUuid(getUserUuid()); + } + catch (SystemException se) { + } + + liferayFileEntry.setUuid(getUuid()); + + return liferayFileEntry; + } + + @Override + public boolean containsPermission( + PermissionChecker permissionChecker, String actionId) + throws PortalException, SystemException { + + return DLFileEntryPermission.contains( + permissionChecker, _dlFileEntry, actionId); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof LiferayFileEntry)) { + return false; + } + + LiferayFileEntry liferayFileEntry = (LiferayFileEntry)obj; + + if (Validator.equals(_dlFileEntry, liferayFileEntry._dlFileEntry)) { + return true; + } + + return false; + } + + @Override + public Map getAttributes() { + ExpandoBridge expandoBridge = getExpandoBridge(); + + return expandoBridge.getAttributes(); + } + + public FileVersion getCachedFileVersion() { + if (_dlFileVersion == null) { + return null; + } + + return new LiferayFileVersion(_dlFileVersion); + } + + @Override + public long getCompanyId() { + return _dlFileEntry.getCompanyId(); + } + + @Override + public InputStream getContentStream() + throws PortalException, SystemException { + + InputStream inputStream = _dlFileEntry.getContentStream(); + + try { + DLAppHelperLocalServiceUtil.getFileAsStream( + PrincipalThreadLocal.getUserId(), this, true); + } + catch (Exception e) { + _log.error(e); + } + + return inputStream; + } + + @Override + public InputStream getContentStream(String version) + throws PortalException, SystemException { + + InputStream inputStream = _dlFileEntry.getContentStream(version); + + try { + DLAppHelperLocalServiceUtil.getFileAsStream( + PrincipalThreadLocal.getUserId(), this, true); + } + catch (Exception e) { + _log.error(e); + } + + return inputStream; + } + + @Override + public Date getCreateDate() { + return _dlFileEntry.getCreateDate(); + } + + @Override + public String getDescription() { + return _dlFileEntry.getDescription(); + } + + public DLFileEntry getDLFileEntry() { + return _dlFileEntry; + } + + @Override + public ExpandoBridge getExpandoBridge() { + return _dlFileEntry.getExpandoBridge(); + } + + @Override + public String getExtension() { + return _dlFileEntry.getExtension(); + } + + @Override + public long getFileEntryId() { + return _dlFileEntry.getFileEntryId(); + } + + @Override + public FileVersion getFileVersion() + throws PortalException, SystemException { + + DLFileVersion dlFileVersion = _dlFileVersion; + + if (dlFileVersion == null) { + dlFileVersion = _dlFileEntry.getFileVersion(); + } + + return new LiferayFileVersion(dlFileVersion); + } + + @Override + public FileVersion getFileVersion(String version) + throws PortalException, SystemException { + + return new LiferayFileVersion(_dlFileEntry.getFileVersion(version)); + } + + @Override + public List getFileVersions(int status) + throws SystemException { + + return toFileVersions(_dlFileEntry.getFileVersions(status)); + } + + @Override + public Folder getFolder() { + Folder folder = null; + + try { + folder = new LiferayFolder(_dlFileEntry.getFolder()); + } + catch (Exception e) { + return null; + } + + return folder; + } + + @Override + public long getFolderId() { + return _dlFileEntry.getFolderId(); + } + + @Override + public long getGroupId() { + return _dlFileEntry.getGroupId(); + } + + @Override + public String getIcon() { + return _dlFileEntry.getIcon(); + } + + @Override + public FileVersion getLatestFileVersion() + throws PortalException, SystemException { + + return new LiferayFileVersion(_dlFileEntry.getLatestFileVersion(false)); + } + + @Override + public Lock getLock() { + return _dlFileEntry.getLock(); + } + + @Override + public String getMimeType() { + return _dlFileEntry.getMimeType(); + } + + @Override + public String getMimeType(String version) { + try { + DLFileVersion dlFileVersion = + DLFileVersionLocalServiceUtil.getFileVersion( + _dlFileEntry.getFileEntryId(), version); + + return dlFileVersion.getMimeType(); + } + catch (Exception e) { + } + + return ContentTypes.APPLICATION_OCTET_STREAM; + } + + @Override + public Object getModel() { + return _dlFileEntry; + } + + @Override + public Class getModelClass() { + return LiferayFileEntry.class; + } + + @Override + public String getModelClassName() { + return LiferayFileEntry.class.getName(); + } + + @Override + public Date getModifiedDate() { + return _dlFileEntry.getModifiedDate(); + } + + @Override + public long getPrimaryKey() { + return _dlFileEntry.getPrimaryKey(); + } + + @Override + public Serializable getPrimaryKeyObj() { + return getPrimaryKey(); + } + + @Override + public int getReadCount() { + return _dlFileEntry.getReadCount(); + } + + @Override + public long getRepositoryId() { + return _dlFileEntry.getRepositoryId(); + } + + @Override + public long getSize() { + return _dlFileEntry.getSize(); + } + + @Override + public StagedModelType getStagedModelType() { + return new StagedModelType(DLFileEntryConstants.getClassName()); + } + + @Override + public String getTitle() { + return _dlFileEntry.getTitle(); + } + + @Override + public long getUserId() { + return _dlFileEntry.getUserId(); + } + + @Override + public String getUserName() { + return _dlFileEntry.getUserName(); + } + + @Override + public String getUserUuid() throws SystemException { + return _dlFileEntry.getUserUuid(); + } + + @Override + public String getUuid() { + return _dlFileEntry.getUuid(); + } + + @Override + public String getVersion() { + return _dlFileEntry.getVersion(); + } + + /** + * @deprecated As of 6.2.0, replaced by {@link DLFileVersion#getUserId()} + */ + @Override + public long getVersionUserId() { + long versionUserId = 0; + + try { + DLFileVersion dlFileVersion = _dlFileEntry.getFileVersion(); + + versionUserId = dlFileVersion.getUserId(); + } + catch (Exception e) { + _log.error(e, e); + } + + return versionUserId; + } + + /** + * @deprecated As of 6.2.0, replaced by {@link DLFileVersion#getUserName()} + */ + @Override + public String getVersionUserName() { + String versionUserName = StringPool.BLANK; + + try { + DLFileVersion dlFileVersion = _dlFileEntry.getFileVersion(); + + versionUserName = dlFileVersion.getUserName(); + } + catch (Exception e) { + _log.error(e, e); + } + + return versionUserName; + } + + /** + * @deprecated As of 6.2.0, replaced by {@link DLFileVersion#getUserUuid()} + */ + @Override + public String getVersionUserUuid() { + String versionUserUuid = StringPool.BLANK; + + try { + DLFileVersion dlFileVersion = _dlFileEntry.getFileVersion(); + + versionUserUuid = dlFileVersion.getUserUuid(); + } + catch (Exception e) { + _log.error(e, e); + } + + return versionUserUuid; + } + + @Override + public int hashCode() { + return _dlFileEntry.hashCode(); + } + + @Override + public boolean hasLock() { + return _dlFileEntry.hasLock(); + } + + @Override + public boolean isCheckedOut() { + return _dlFileEntry.isCheckedOut(); + } + + @Override + public boolean isDefaultRepository() { + if (_dlFileEntry.getGroupId() == _dlFileEntry.getRepositoryId()) { + return true; + } + else { + return false; + } + } + + @Override + public boolean isEscapedModel() { + return _escapedModel; + } + + @Override + public boolean isInTrash() { + return _dlFileEntry.isInTrash(); + } + + @Override + public boolean isInTrashContainer() { + try { + return _dlFileEntry.isInTrashContainer(); + } + catch (Exception e) { + return false; + } + } + + @Override + public boolean isManualCheckInRequired() { + return _dlFileEntry.isManualCheckInRequired(); + } + + @Override + public boolean isSupportsLocking() { + return true; + } + + @Override + public boolean isSupportsMetadata() { + return true; + } + + @Override + public boolean isSupportsSocial() { + return true; + } + + public void setCachedFileVersion(FileVersion fileVersion) { + _dlFileVersion = (DLFileVersion)fileVersion.getModel(); + } + + @Override + public void setCompanyId(long companyId) { + _dlFileEntry.setCompanyId(companyId); + } + + @Override + public void setCreateDate(Date date) { + _dlFileEntry.setCreateDate(date); + } + + @Override + public void setGroupId(long groupId) { + _dlFileEntry.setGroupId(groupId); + } + + @Override + public void setModifiedDate(Date date) { + _dlFileEntry.setModifiedDate(date); + } + + public void setPrimaryKey(long primaryKey) { + _dlFileEntry.setPrimaryKey(primaryKey); + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public void setUserId(long userId) { + _dlFileEntry.setUserId(userId); + } + + @Override + public void setUserName(String userName) { + _dlFileEntry.setUserName(userName); + } + + @Override + public void setUserUuid(String userUuid) { + _dlFileEntry.setUserUuid(userUuid); + } + + @Override + public void setUuid(String uuid) { + _dlFileEntry.setUuid(uuid); + } + + @Override + public FileEntry toEscapedModel() { + if (isEscapedModel()) { + return this; + } + else { + return new LiferayFileEntry(_dlFileEntry.toEscapedModel(), true); + } + } + + @Override + public String toString() { + return _dlFileEntry.toString(); + } + + @Override + public FileEntry toUnescapedModel() { + if (isEscapedModel()) { + return new LiferayFileEntry(_dlFileEntry.toUnescapedModel(), true); + } + else { + return this; + } + } + + private static Log _log = LogFactoryUtil.getLog(LiferayFileEntry.class); + + private DLFileEntry _dlFileEntry; + private DLFileVersion _dlFileVersion; + private boolean _escapedModel; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/model/LiferayFileVersion.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/model/LiferayFileVersion.java new file mode 100644 index 00000000..7c08a4cc --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/model/LiferayFileVersion.java @@ -0,0 +1,412 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.repository.liferayrepository.model; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.lar.StagedModelType; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.repository.model.FileEntry; +import com.liferay.portal.kernel.repository.model.FileVersion; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.security.auth.PrincipalThreadLocal; +import com.liferay.portlet.documentlibrary.model.DLFileVersion; +import com.liferay.portlet.documentlibrary.service.DLAppHelperLocalServiceUtil; +import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil; +import com.liferay.portlet.expando.model.ExpandoBridge; + +import java.io.File; +import java.io.InputStream; +import java.io.Serializable; + +import java.util.Date; +import java.util.Map; + +/** + * @author Alexander Chow + */ +public class LiferayFileVersion extends LiferayModel implements FileVersion { + + public LiferayFileVersion(DLFileVersion dlFileVersion) { + _dlFileVersion = dlFileVersion; + } + + public LiferayFileVersion( + DLFileVersion dlFileVersion, boolean escapedModel) { + + _dlFileVersion = dlFileVersion; + _escapedModel = escapedModel; + } + + @Override + public Object clone() { + LiferayFileVersion liferayFileVersion = new LiferayFileVersion( + _dlFileVersion, _escapedModel); + + liferayFileVersion.setCompanyId(getCompanyId()); + liferayFileVersion.setCreateDate(getCreateDate()); + liferayFileVersion.setGroupId(getGroupId()); + liferayFileVersion.setPrimaryKey(getPrimaryKey()); + liferayFileVersion.setUserId(getUserId()); + liferayFileVersion.setUserName(getUserName()); + + try { + liferayFileVersion.setUserUuid(getUserUuid()); + } + catch (Exception e) { + } + + liferayFileVersion.setUuid(getUuid()); + + return liferayFileVersion; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof LiferayFileVersion)) { + return false; + } + + LiferayFileVersion liferayFileVersion = (LiferayFileVersion)obj; + + if (Validator.equals( + _dlFileVersion, liferayFileVersion._dlFileVersion)) { + + return true; + } + + return false; + } + + @Override + public Map getAttributes() { + ExpandoBridge expandoBridge = _dlFileVersion.getExpandoBridge(); + + return expandoBridge.getAttributes(); + } + + @Override + public String getChangeLog() { + return _dlFileVersion.getChangeLog(); + } + + @Override + public long getCompanyId() { + return _dlFileVersion.getCompanyId(); + } + + @Override + public InputStream getContentStream(boolean incrementCounter) + throws PortalException, SystemException { + + InputStream inputStream = _dlFileVersion.getContentStream( + incrementCounter); + + try { + DLAppHelperLocalServiceUtil.getFileAsStream( + PrincipalThreadLocal.getUserId(), getFileEntry(), + incrementCounter); + } + catch (Exception e) { + _log.error(e, e); + } + + return inputStream; + } + + @Override + public Date getCreateDate() { + return _dlFileVersion.getCreateDate(); + } + + @Override + public String getDescription() { + return _dlFileVersion.getDescription(); + } + + @Override + public ExpandoBridge getExpandoBridge() { + return _dlFileVersion.getExpandoBridge(); + } + + @Override + public String getExtension() { + return _dlFileVersion.getExtension(); + } + + @Override + public String getExtraSettings() { + return _dlFileVersion.getExtraSettings(); + } + + public File getFile(boolean incrementCounter) + throws PortalException, SystemException { + + return DLFileEntryLocalServiceUtil.getFile( + PrincipalThreadLocal.getUserId(), _dlFileVersion.getFileEntryId(), + _dlFileVersion.getVersion(), incrementCounter); + } + + @Override + public FileEntry getFileEntry() throws PortalException, SystemException { + return new LiferayFileEntry(_dlFileVersion.getFileEntry()); + } + + @Override + public long getFileEntryId() { + return _dlFileVersion.getFileEntryId(); + } + + @Override + public long getFileVersionId() { + return _dlFileVersion.getFileVersionId(); + } + + @Override + public long getGroupId() { + return _dlFileVersion.getGroupId(); + } + + @Override + public String getIcon() { + return _dlFileVersion.getIcon(); + } + + @Override + public String getMimeType() { + return _dlFileVersion.getMimeType(); + } + + @Override + public Object getModel() { + return _dlFileVersion; + } + + @Override + public Class getModelClass() { + return LiferayFileVersion.class; + } + + @Override + public String getModelClassName() { + return LiferayFileVersion.class.getName(); + } + + @Override + public Date getModifiedDate() { + return _dlFileVersion.getModifiedDate(); + } + + @Override + public long getPrimaryKey() { + return _dlFileVersion.getPrimaryKey(); + } + + @Override + public Serializable getPrimaryKeyObj() { + return getPrimaryKey(); + } + + @Override + public long getRepositoryId() { + return _dlFileVersion.getRepositoryId(); + } + + @Override + public long getSize() { + return _dlFileVersion.getSize(); + } + + @Override + public StagedModelType getStagedModelType() { + return new StagedModelType(FileVersion.class); + } + + @Override + public int getStatus() { + return _dlFileVersion.getStatus(); + } + + @Override + public long getStatusByUserId() { + return _dlFileVersion.getStatusByUserId(); + } + + @Override + public String getStatusByUserName() { + return _dlFileVersion.getStatusByUserName(); + } + + @Override + public String getStatusByUserUuid() throws SystemException { + return _dlFileVersion.getStatusByUserUuid(); + } + + @Override + public Date getStatusDate() { + return _dlFileVersion.getStatusDate(); + } + + @Override + public String getTitle() { + return _dlFileVersion.getTitle(); + } + + @Override + public long getUserId() { + return _dlFileVersion.getUserId(); + } + + @Override + public String getUserName() { + return _dlFileVersion.getUserName(); + } + + @Override + public String getUserUuid() throws SystemException { + return _dlFileVersion.getUserUuid(); + } + + @Override + public String getUuid() { + return _dlFileVersion.getUuid(); + } + + @Override + public String getVersion() { + return _dlFileVersion.getVersion(); + } + + @Override + public boolean isApproved() { + return _dlFileVersion.isApproved(); + } + + @Override + public boolean isDefaultRepository() { + if (_dlFileVersion.getGroupId() == _dlFileVersion.getRepositoryId()) { + return true; + } + else { + return false; + } + } + + @Override + public boolean isDraft() { + return _dlFileVersion.isDraft(); + } + + @Override + public boolean isEscapedModel() { + return _escapedModel; + } + + @Override + public boolean isExpired() { + return _dlFileVersion.isExpired(); + } + + @Override + public boolean isPending() { + return _dlFileVersion.isPending(); + } + + @Override + public void setCompanyId(long companyId) { + _dlFileVersion.setCompanyId(companyId); + } + + @Override + public void setCreateDate(Date date) { + _dlFileVersion.setCreateDate(date); + } + + @Override + public void setGroupId(long groupId) { + _dlFileVersion.setGroupId(groupId); + } + + @Override + public void setModifiedDate(Date date) { + } + + public void setPrimaryKey(long primaryKey) { + _dlFileVersion.setPrimaryKey(primaryKey); + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public void setUserId(long userId) { + _dlFileVersion.setUserId(userId); + } + + @Override + public void setUserName(String userName) { + _dlFileVersion.setUserName(userName); + } + + @Override + public void setUserUuid(String userUuid) { + _dlFileVersion.setUserUuid(userUuid); + } + + @Override + public void setUuid(String uuid) { + _dlFileVersion.setUuid(uuid); + } + + @Override + public FileVersion toEscapedModel() { + if (isEscapedModel()) { + return this; + } + else { + return new LiferayFileVersion( + _dlFileVersion.toEscapedModel(), true); + } + } + + @Override + public String toString() { + return _dlFileVersion.toString(); + } + + @Override + public FileVersion toUnescapedModel() { + if (isEscapedModel()) { + return new LiferayFileVersion( + _dlFileVersion.toUnescapedModel(), true); + } + else { + return this; + } + } + + private static Log _log = LogFactoryUtil.getLog(LiferayFileVersion.class); + + private DLFileVersion _dlFileVersion; + private boolean _escapedModel; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/model/LiferayFolder.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/model/LiferayFolder.java new file mode 100644 index 00000000..8d58b8e9 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/model/LiferayFolder.java @@ -0,0 +1,418 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.repository.liferayrepository.model; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.lar.StagedModelType; +import com.liferay.portal.kernel.repository.model.Folder; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.security.permission.PermissionChecker; +import com.liferay.portlet.documentlibrary.model.DLFolder; +import com.liferay.portlet.documentlibrary.model.DLFolderConstants; +import com.liferay.portlet.documentlibrary.service.permission.DLFolderPermission; +import com.liferay.portlet.expando.model.ExpandoBridge; + +import java.io.Serializable; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * @author Alexander Chow + */ +public class LiferayFolder extends LiferayModel implements Folder { + + public LiferayFolder(DLFolder dlFolder) { + _dlFolder = dlFolder; + } + + public LiferayFolder(DLFolder dlFolder, boolean escapedModel) { + _dlFolder = dlFolder; + _escapedModel = escapedModel; + } + + @Override + public Object clone() { + LiferayFolder liferayFolder = new LiferayFolder( + _dlFolder, _escapedModel); + + liferayFolder.setCompanyId(getCompanyId()); + liferayFolder.setCreateDate(getCreateDate()); + liferayFolder.setGroupId(getGroupId()); + liferayFolder.setModifiedDate(getModifiedDate()); + liferayFolder.setPrimaryKey(getPrimaryKey()); + liferayFolder.setUserId(getUserId()); + liferayFolder.setUserName(getUserName()); + + try { + liferayFolder.setUserUuid(getUserUuid()); + } + catch (SystemException se) { + } + + liferayFolder.setUuid(getUuid()); + + return liferayFolder; + } + + @Override + public boolean containsPermission( + PermissionChecker permissionChecker, String actionId) + throws PortalException, SystemException { + + return DLFolderPermission.contains( + permissionChecker, _dlFolder, actionId); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof LiferayFolder)) { + return false; + } + + LiferayFolder liferayFolder = (LiferayFolder)obj; + + if (Validator.equals(_dlFolder, liferayFolder._dlFolder)) { + return true; + } + + return false; + } + + @Override + public List getAncestorFolderIds() + throws PortalException, SystemException { + + return _dlFolder.getAncestorFolderIds(); + } + + @Override + public List getAncestors() throws PortalException, SystemException { + return toFolders(_dlFolder.getAncestors()); + } + + @Override + public Map getAttributes() { + ExpandoBridge expandoBridge = getExpandoBridge(); + + return expandoBridge.getAttributes(); + } + + @Override + public long getCompanyId() { + return _dlFolder.getCompanyId(); + } + + @Override + public Date getCreateDate() { + return _dlFolder.getCreateDate(); + } + + @Override + public String getDescription() { + return _dlFolder.getDescription(); + } + + @Override + public ExpandoBridge getExpandoBridge() { + return _dlFolder.getExpandoBridge(); + } + + @Override + public long getFolderId() { + return _dlFolder.getFolderId(); + } + + @Override + public long getGroupId() { + return _dlFolder.getGroupId(); + } + + @Override + public Date getLastPostDate() { + return _dlFolder.getLastPostDate(); + } + + @Override + public Object getModel() { + return _dlFolder; + } + + @Override + public Class getModelClass() { + return LiferayFolder.class; + } + + @Override + public String getModelClassName() { + return LiferayFolder.class.getName(); + } + + @Override + public Date getModifiedDate() { + return _dlFolder.getModifiedDate(); + } + + @Override + public String getName() { + return _dlFolder.getName(); + } + + @Override + public Folder getParentFolder() throws PortalException, SystemException { + DLFolder dlParentFolder = _dlFolder.getParentFolder(); + + if (dlParentFolder == null) { + return null; + } + else { + return new LiferayFolder(dlParentFolder); + } + } + + @Override + public long getParentFolderId() { + return _dlFolder.getParentFolderId(); + } + + @Override + public long getPrimaryKey() { + return _dlFolder.getPrimaryKey(); + } + + @Override + public Serializable getPrimaryKeyObj() { + return getPrimaryKey(); + } + + @Override + public long getRepositoryId() { + return _dlFolder.getRepositoryId(); + } + + @Override + public StagedModelType getStagedModelType() { + return new StagedModelType(DLFolderConstants.getClassName()); + } + + @Override + public long getUserId() { + return _dlFolder.getUserId(); + } + + @Override + public String getUserName() { + return _dlFolder.getUserName(); + } + + @Override + public String getUserUuid() throws SystemException { + return _dlFolder.getUserUuid(); + } + + @Override + public String getUuid() { + return _dlFolder.getUuid(); + } + + @Override + public int hashCode() { + return _dlFolder.hashCode(); + } + + @Override + public boolean hasInheritableLock() { + return _dlFolder.hasInheritableLock(); + } + + @Override + public boolean hasLock() { + return _dlFolder.hasLock(); + } + + @Override + public boolean isDefaultRepository() { + if (_dlFolder.getGroupId() == _dlFolder.getRepositoryId()) { + return true; + } + else { + return false; + } + } + + @Override + public boolean isEscapedModel() { + return _escapedModel; + } + + @Override + public boolean isLocked() { + return _dlFolder.isLocked(); + } + + @Override + public boolean isMountPoint() { + return _dlFolder.isMountPoint(); + } + + @Override + public boolean isRoot() { + return _dlFolder.isRoot(); + } + + @Override + public boolean isSupportsLocking() { + if (isMountPoint()) { + return false; + } + else { + return true; + } + } + + @Override + public boolean isSupportsMetadata() { + if (isMountPoint()) { + return false; + } + else { + return true; + } + } + + @Override + public boolean isSupportsMultipleUpload() { + if (isMountPoint()) { + return false; + } + else { + return true; + } + } + + @Override + public boolean isSupportsShortcuts() { + if (isMountPoint()) { + return false; + } + else { + return true; + } + } + + @Override + public boolean isSupportsSocial() { + if (isMountPoint()) { + return false; + } + else { + return true; + } + } + + @Override + public boolean isSupportsSubscribing() { + if (isMountPoint()) { + return false; + } + else { + return true; + } + } + + @Override + public void setCompanyId(long companyId) { + _dlFolder.setCompanyId(companyId); + } + + @Override + public void setCreateDate(Date date) { + _dlFolder.setCreateDate(date); + } + + @Override + public void setGroupId(long groupId) { + _dlFolder.setGroupId(groupId); + } + + @Override + public void setModifiedDate(Date date) { + _dlFolder.setModifiedDate(date); + } + + public void setPrimaryKey(long primaryKey) { + _dlFolder.setPrimaryKey(primaryKey); + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public void setUserId(long userId) { + _dlFolder.setUserId(userId); + } + + @Override + public void setUserName(String userName) { + _dlFolder.setUserName(userName); + } + + @Override + public void setUserUuid(String userUuid) { + _dlFolder.setUserUuid(userUuid); + } + + @Override + public void setUuid(String uuid) { + _dlFolder.setUuid(uuid); + } + + @Override + public Folder toEscapedModel() { + if (isEscapedModel()) { + return this; + } + else { + return new LiferayFolder(_dlFolder.toEscapedModel(), true); + } + } + + @Override + public String toString() { + return _dlFolder.toString(); + } + + @Override + public Folder toUnescapedModel() { + if (isEscapedModel()) { + return new LiferayFolder(_dlFolder.toUnescapedModel(), true); + } + else { + return this; + } + } + + private DLFolder _dlFolder; + private boolean _escapedModel; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/model/LiferayModel.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/model/LiferayModel.java new file mode 100644 index 00000000..93891b50 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/model/LiferayModel.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.repository.liferayrepository.model; + +import com.liferay.portal.repository.liferayrepository.util.LiferayBase; +import com.liferay.portlet.expando.model.ExpandoBridge; + +/** + * @author Alexander Chow + */ +public abstract class LiferayModel extends LiferayBase { + + public abstract long getCompanyId(); + + public abstract ExpandoBridge getExpandoBridge(); + + public abstract String getModelClassName(); + + public abstract long getPrimaryKey(); + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/util/LiferayBase.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/util/LiferayBase.java new file mode 100644 index 00000000..b905bf96 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/repository/liferayrepository/util/LiferayBase.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.repository.liferayrepository.util; + +import com.liferay.portal.kernel.repository.model.FileEntry; +import com.liferay.portal.kernel.repository.model.FileVersion; +import com.liferay.portal.kernel.repository.model.Folder; +import com.liferay.portal.kernel.util.UnmodifiableList; +import com.liferay.portal.repository.liferayrepository.model.LiferayFileEntry; +import com.liferay.portal.repository.liferayrepository.model.LiferayFileVersion; +import com.liferay.portal.repository.liferayrepository.model.LiferayFolder; +import com.liferay.portlet.documentlibrary.model.DLFileEntry; +import com.liferay.portlet.documentlibrary.model.DLFileVersion; +import com.liferay.portlet.documentlibrary.model.DLFolder; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Alexander Chow + */ +public abstract class LiferayBase { + + /** + * @see com.liferay.portal.portletfilerepository.PortletFileRepositoryImpl#toFileEntries + */ + public List toFileEntries(List dlFileEntries) { + List fileEntries = new ArrayList( + dlFileEntries.size()); + + for (DLFileEntry dlFileEntry : dlFileEntries) { + FileEntry fileEntry = new LiferayFileEntry(dlFileEntry); + + fileEntries.add(fileEntry); + } + + if (dlFileEntries instanceof UnmodifiableList) { + return new UnmodifiableList(fileEntries); + } + else { + return fileEntries; + } + } + + public List toFileEntriesAndFolders( + List dlFileEntriesAndDLFolders) { + + List fileEntriesAndFolders = new ArrayList( + dlFileEntriesAndDLFolders.size()); + + for (Object object : dlFileEntriesAndDLFolders) { + if (object instanceof DLFileEntry) { + DLFileEntry dlFileEntry = (DLFileEntry)object; + + FileEntry fileEntry = new LiferayFileEntry(dlFileEntry); + + fileEntriesAndFolders.add(fileEntry); + } + else if (object instanceof DLFolder) { + DLFolder dlFolder = (DLFolder)object; + + Folder folder = new LiferayFolder(dlFolder); + + fileEntriesAndFolders.add(folder); + } + else { + fileEntriesAndFolders.add(object); + } + } + + if (dlFileEntriesAndDLFolders instanceof UnmodifiableList) { + return new UnmodifiableList(fileEntriesAndFolders); + } + else { + return fileEntriesAndFolders; + } + } + + public List toFileVersions( + List dlFileVersions) { + + List fileVersions = new ArrayList( + dlFileVersions.size()); + + for (DLFileVersion dlFileVersion : dlFileVersions) { + FileVersion fileVersion = new LiferayFileVersion(dlFileVersion); + + fileVersions.add(fileVersion); + } + + if (dlFileVersions instanceof UnmodifiableList) { + return new UnmodifiableList(fileVersions); + } + else { + return fileVersions; + } + } + + public List toFolders(List dlFolders) { + List folders = new ArrayList(dlFolders.size()); + + for (DLFolder dlFolder : dlFolders) { + Folder folder = new LiferayFolder(dlFolder); + + folders.add(folder); + } + + if (dlFolders instanceof UnmodifiableList) { + return new UnmodifiableList(folders); + } + else { + return folders; + } + } + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/ClassLoaderUtil.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/ClassLoaderUtil.java new file mode 100644 index 00000000..91c52026 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/ClassLoaderUtil.java @@ -0,0 +1,135 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.util; + +import com.liferay.portal.kernel.util.AggregateClassLoader; +import com.liferay.portal.kernel.util.ClassLoaderPool; +import com.liferay.portal.kernel.util.PortalClassLoaderUtil; + +/** + * @author Raymond Augé + * @author Shuyang Zhou + */ +public class ClassLoaderUtil { + + public static ClassLoader getAggregatePluginsClassLoader( + String[] servletContextNames, boolean addContextClassLoader) { + + return _pacl.getAggregatePluginsClassLoader( + servletContextNames, addContextClassLoader); + } + + public static ClassLoader getClassLoader(Class clazz) { + return _pacl.getClassLoader(clazz); + } + + public static ClassLoader getContextClassLoader() { + return _pacl.getContextClassLoader(); + } + + public static ClassLoader getPluginClassLoader(String servletContextName) { + return _pacl.getPluginClassLoader(servletContextName); + } + + public static ClassLoader getPortalClassLoader() { + return _pacl.getPortalClassLoader(); + } + + public static void setContextClassLoader(ClassLoader classLoader) { + _pacl.setContextClassLoader(classLoader); + } + + public static class NoPACL implements PACL { + + @Override + public ClassLoader getAggregatePluginsClassLoader( + String[] servletContextNames, boolean addContextClassLoader) { + + ClassLoader[] classLoaders = null; + + int offset = 0; + + if (addContextClassLoader) { + classLoaders = new ClassLoader[servletContextNames.length + 1]; + + Thread currentThread = Thread.currentThread(); + + classLoaders[0] = currentThread.getContextClassLoader(); + + offset = 1; + } + else { + classLoaders = new ClassLoader[servletContextNames.length]; + } + + for (int i = 0; i < servletContextNames.length; i++) { + classLoaders[offset + i] = ClassLoaderPool.getClassLoader( + servletContextNames[i]); + } + + return AggregateClassLoader.getAggregateClassLoader(classLoaders); + } + + @Override + public ClassLoader getClassLoader(Class clazz) { + return clazz.getClassLoader(); + } + + @Override + public ClassLoader getContextClassLoader() { + Thread currentThread = Thread.currentThread(); + + return currentThread.getContextClassLoader(); + } + + @Override + public ClassLoader getPluginClassLoader(String servletContextName) { + return ClassLoaderPool.getClassLoader(servletContextName); + } + + @Override + public ClassLoader getPortalClassLoader() { + return PortalClassLoaderUtil.getClassLoader(); + } + + @Override + public void setContextClassLoader(ClassLoader classLoader) { + Thread thread = Thread.currentThread(); + + thread.setContextClassLoader(classLoader); + } + + } + + public static interface PACL { + + public ClassLoader getAggregatePluginsClassLoader( + String[] servletContextNames, boolean addContextClassLoader); + + public ClassLoader getClassLoader(Class clazz); + + public ClassLoader getContextClassLoader(); + + public ClassLoader getPluginClassLoader(String servletContextName); + + public ClassLoader getPortalClassLoader(); + + public void setContextClassLoader(ClassLoader classLoader); + + } + + private static PACL _pacl = new NoPACL(); + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/FileImpl.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/FileImpl.java new file mode 100644 index 00000000..a674690a --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/FileImpl.java @@ -0,0 +1,1112 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.util; + +import com.liferay.portal.kernel.io.unsync.UnsyncBufferedReader; +import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayInputStream; +import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.nio.charset.CharsetEncoderUtil; +import com.liferay.portal.kernel.process.ClassPathUtil; +import com.liferay.portal.kernel.process.ProcessCallable; +import com.liferay.portal.kernel.process.ProcessException; +import com.liferay.portal.kernel.process.ProcessExecutor; +import com.liferay.portal.kernel.security.pacl.DoPrivileged; +import com.liferay.portal.kernel.util.ArrayUtil; +import com.liferay.portal.kernel.util.CharPool; +import com.liferay.portal.kernel.util.Digester; +import com.liferay.portal.kernel.util.DigesterUtil; +import com.liferay.portal.kernel.util.FileComparator; +import com.liferay.portal.kernel.util.ReflectionUtil; +import com.liferay.portal.kernel.util.StreamUtil; +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.SystemProperties; +import com.liferay.portal.kernel.util.Time; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.util.PwdGenerator; +import com.liferay.util.ant.ExpandTask; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStreamWriter; +import java.io.RandomAccessFile; +import java.io.Reader; +import java.io.Writer; + +import java.nio.ByteBuffer; +import java.nio.channels.FileChannel; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Properties; +import java.util.concurrent.Future; + +import org.apache.commons.compress.archivers.zip.UnsupportedZipFeatureException; +import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.exception.ExceptionUtils; +import org.apache.poi.EncryptedDocumentException; +import org.apache.tika.Tika; +import org.apache.tika.config.TikaConfig; +import org.apache.tika.exception.TikaException; +import org.apache.tools.ant.DirectoryScanner; + +import org.mozilla.intl.chardet.nsDetector; +import org.mozilla.intl.chardet.nsPSMDetector; + +/** + * @author Brian Wing Shun Chan + * @author Alexander Chow + */ +@DoPrivileged +public class FileImpl implements com.liferay.portal.kernel.util.File { + + public static FileImpl getInstance() { + return _instance; + } + + @Override + public String appendParentheticalSuffix(String fileName, String suffix) { + String fileNameWithoutExtension = stripExtension(fileName); + + String fileNameWithParentheticalSuffix = + StringUtil.appendParentheticalSuffix( + fileNameWithoutExtension, suffix); + + String extension = getExtension(fileName); + + if (Validator.isNull(extension)) { + return fileNameWithParentheticalSuffix; + } + + StringBundler sb = new StringBundler(3); + + sb.append(fileNameWithParentheticalSuffix); + sb.append(StringPool.PERIOD); + sb.append(extension); + + return sb.toString(); + } + + @Override + public void copyDirectory(File source, File destination) + throws IOException { + + if (!source.exists() || !source.isDirectory()) { + return; + } + + mkdirs(destination); + + File[] fileArray = source.listFiles(); + + for (int i = 0; i < fileArray.length; i++) { + if (fileArray[i].isDirectory()) { + copyDirectory( + fileArray[i], + new File( + destination.getPath() + File.separator + + fileArray[i].getName())); + } + else { + copyFile( + fileArray[i], + new File( + destination.getPath() + File.separator + + fileArray[i].getName())); + } + } + } + + @Override + public void copyDirectory(String sourceDirName, String destinationDirName) + throws IOException { + + copyDirectory(new File(sourceDirName), new File(destinationDirName)); + } + + @Override + public void copyFile(File source, File destination) throws IOException { + copyFile(source, destination, false); + } + + @Override + public void copyFile(File source, File destination, boolean lazy) + throws IOException { + + if (!source.exists()) { + return; + } + + if (lazy) { + String oldContent = null; + + try { + oldContent = read(source); + } + catch (Exception e) { + return; + } + + String newContent = null; + + try { + newContent = read(destination); + } + catch (Exception e) { + } + + if ((oldContent == null) || !oldContent.equals(newContent)) { + copyFile(source, destination, false); + } + } + else { + mkdirsParentFile(destination); + + StreamUtil.transfer( + new FileInputStream(source), new FileOutputStream(destination)); + } + } + + @Override + public void copyFile(String source, String destination) throws IOException { + copyFile(source, destination, false); + } + + @Override + public void copyFile(String source, String destination, boolean lazy) + throws IOException { + + copyFile(new File(source), new File(destination), lazy); + } + + @Override + public File createTempFile() { + return createTempFile(StringPool.BLANK); + } + + @Override + public File createTempFile(byte[] bytes) throws IOException { + File file = createTempFile(StringPool.BLANK); + + write(file, bytes, false); + + return file; + } + + @Override + public File createTempFile(InputStream is) throws IOException { + File file = createTempFile(StringPool.BLANK); + + write(file, is); + + return file; + } + + @Override + public File createTempFile(String extension) { + return new File(createTempFileName(extension)); + } + + @Override + public File createTempFile(String prefix, String extension) { + return new File(createTempFileName(prefix, extension)); + } + + @Override + public String createTempFileName() { + return createTempFileName(null, null); + } + + @Override + public String createTempFileName(String extension) { + return createTempFileName(null, extension); + } + + @Override + public String createTempFileName(String prefix, String extension) { + StringBundler sb = new StringBundler(); + + sb.append(SystemProperties.get(SystemProperties.TMP_DIR)); + sb.append(StringPool.SLASH); + + if (Validator.isNotNull(prefix)) { + sb.append(prefix); + } + + sb.append(Time.getTimestamp()); + sb.append(PwdGenerator.getPassword(8, PwdGenerator.KEY2)); + + if (Validator.isFileExtension(extension)) { + sb.append(StringPool.PERIOD); + sb.append(extension); + } + + return sb.toString(); + } + + @Override + public File createTempFolder() throws IOException { + File file = new File(createTempFileName()); + + mkdirs(file); + + return file; + } + + @Override + public String decodeSafeFileName(String fileName) { + return StringUtil.replace( + fileName, _SAFE_FILE_NAME_2, _SAFE_FILE_NAME_1); + } + + @Override + public boolean delete(File file) { + if (file != null) { + boolean exists = true; + + try { + exists = file.exists(); + } + catch (SecurityException se) { + + // We may have the permission to delete a specific file without + // having the permission to check if the file exists + + } + + if (exists) { + return file.delete(); + } + } + + return false; + } + + @Override + public boolean delete(String file) { + return delete(new File(file)); + } + + @Override + public void deltree(File directory) { + if (directory.exists() && directory.isDirectory()) { + File[] fileArray = directory.listFiles(); + + for (int i = 0; i < fileArray.length; i++) { + if (fileArray[i].isDirectory()) { + deltree(fileArray[i]); + } + else { + fileArray[i].delete(); + } + } + + directory.delete(); + } + } + + @Override + public void deltree(String directory) { + deltree(new File(directory)); + } + + @Override + public String encodeSafeFileName(String fileName) { + if (fileName == null) { + return StringPool.BLANK; + } + + return StringUtil.replace( + fileName, _SAFE_FILE_NAME_1, _SAFE_FILE_NAME_2); + } + + @Override + public boolean exists(File file) { + return file.exists(); + } + + @Override + public boolean exists(String fileName) { + return exists(new File(fileName)); + } + + @Override + public String extractText(InputStream is, String fileName) { + return extractText(is, fileName, -1); + } + + @Override + public String extractText( + InputStream is, String fileName, int maxStringLength) { + + String text = null; + + try { + Tika tika = new Tika(TikaConfigHolder._tikaConfig); + + tika.setMaxStringLength(maxStringLength); + + boolean forkProcess = false; + + if (PropsValues.TEXT_EXTRACTION_FORK_PROCESS_ENABLED) { + String mimeType = tika.detect(is); + + if (ArrayUtil.contains( + PropsValues.TEXT_EXTRACTION_FORK_PROCESS_MIME_TYPES, + mimeType)) { + + forkProcess = true; + } + } + + if (forkProcess) { + Future future = ProcessExecutor.execute( + ClassPathUtil.getPortalClassPath(), + new ExtractTextProcessCallable(getBytes(is))); + + text = future.get(); + } + else { + text = tika.parseToString(is); + } + } + catch (Exception e) { + Throwable throwable = ExceptionUtils.getRootCause(e); + + if ((throwable instanceof EncryptedDocumentException) || + (throwable instanceof UnsupportedZipFeatureException)) { + + if (_log.isWarnEnabled()) { + _log.warn( + "Unable to extract text from an encrypted file " + + fileName); + } + } + else if (e instanceof TikaException) { + if (_log.isWarnEnabled()) { + _log.warn("Unable to extract text from " + fileName); + } + } + else { + _log.error(e, e); + } + } + + if (_log.isInfoEnabled()) { + if (text == null) { + _log.info("Text extraction failed for " + fileName); + } + else { + _log.info("Text was extracted for " + fileName); + } + } + + if (_log.isDebugEnabled()) { + _log.debug("Extractor returned text:\n\n" + text); + } + + if (text == null) { + text = StringPool.BLANK; + } + + return text; + } + + @Override + public String[] find(String directory, String includes, String excludes) { + if (directory.length() > 0) { + directory = replaceSeparator(directory); + + if (directory.charAt(directory.length() - 1) == CharPool.SLASH) { + directory = directory.substring(0, directory.length() - 1); + } + } + + if (!exists(directory)) { + if (_log.isWarnEnabled()) { + _log.warn("Directory " + directory + " does not exist"); + } + + return new String[0]; + } + + DirectoryScanner directoryScanner = new DirectoryScanner(); + + directoryScanner.setBasedir(directory); + directoryScanner.setExcludes(StringUtil.split(excludes)); + directoryScanner.setIncludes(StringUtil.split(includes)); + + directoryScanner.scan(); + + String[] includedFiles = directoryScanner.getIncludedFiles(); + + for (int i = 0; i < includedFiles.length; i++) { + includedFiles[i] = directory.concat( + StringPool.SLASH).concat(replaceSeparator(includedFiles[i])); + } + + return includedFiles; + } + + @Override + public String getAbsolutePath(File file) { + return StringUtil.replace( + file.getAbsolutePath(), CharPool.BACK_SLASH, CharPool.SLASH); + } + + @Override + public byte[] getBytes(File file) throws IOException { + if ((file == null) || !file.exists()) { + return null; + } + + RandomAccessFile randomAccessFile = new RandomAccessFile(file, "r"); + + byte[] bytes = new byte[(int)randomAccessFile.length()]; + + randomAccessFile.readFully(bytes); + + randomAccessFile.close(); + + return bytes; + } + + @Override + public byte[] getBytes(InputStream is) throws IOException { + return getBytes(is, -1); + } + + @Override + public byte[] getBytes(InputStream inputStream, int bufferSize) + throws IOException { + + return getBytes(inputStream, bufferSize, true); + } + + @Override + public byte[] getBytes( + InputStream inputStream, int bufferSize, boolean cleanUpStream) + throws IOException { + + if (inputStream == null) { + return null; + } + + UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = + new UnsyncByteArrayOutputStream(); + + StreamUtil.transfer( + inputStream, unsyncByteArrayOutputStream, bufferSize, + cleanUpStream); + + return unsyncByteArrayOutputStream.toByteArray(); + } + + @Override + public String getExtension(String fileName) { + if (fileName == null) { + return null; + } + + int pos = fileName.lastIndexOf(CharPool.PERIOD); + + if (pos > 0) { + return StringUtil.toLowerCase( + fileName.substring(pos + 1, fileName.length())); + } + else { + return StringPool.BLANK; + } + } + + @Override + public String getMD5Checksum(File file) throws IOException { + FileInputStream fileInputStream = null; + + try { + fileInputStream = new FileInputStream(file); + + return DigesterUtil.digestHex(Digester.MD5, fileInputStream); + } + finally { + StreamUtil.cleanUp(fileInputStream); + } + } + + @Override + public String getPath(String fullFileName) { + int x = fullFileName.lastIndexOf(CharPool.SLASH); + int y = fullFileName.lastIndexOf(CharPool.BACK_SLASH); + + if ((x == -1) && (y == -1)) { + return StringPool.SLASH; + } + + String shortFileName = fullFileName.substring(0, Math.max(x, y)); + + return shortFileName; + } + + @Override + public String getShortFileName(String fullFileName) { + int x = fullFileName.lastIndexOf(CharPool.SLASH); + int y = fullFileName.lastIndexOf(CharPool.BACK_SLASH); + + String shortFileName = fullFileName.substring(Math.max(x, y) + 1); + + return shortFileName; + } + + @Override + public boolean isAscii(File file) throws IOException { + boolean ascii = true; + + nsDetector detector = new nsDetector(nsPSMDetector.ALL); + + InputStream inputStream = new FileInputStream(file); + + byte[] buffer = new byte[1024]; + + int len = 0; + + while ((len = inputStream.read(buffer, 0, buffer.length)) != -1) { + if (ascii) { + ascii = detector.isAscii(buffer, len); + + if (!ascii) { + break; + } + } + } + + detector.DataEnd(); + + inputStream.close(); + + return ascii; + } + + @Override + public boolean isSameContent(File file, byte[] bytes, int length) { + FileChannel fileChannel = null; + + try { + FileInputStream fileInputStream = new FileInputStream(file); + + fileChannel = fileInputStream.getChannel(); + + if (fileChannel.size() != length) { + return false; + } + + byte[] buffer = new byte[1024]; + + ByteBuffer byteBuffer = ByteBuffer.wrap(buffer); + + int bufferIndex = 0; + int bufferLength = -1; + + while (((bufferLength = fileChannel.read(byteBuffer)) > 0) && + (bufferIndex < length)) { + + for (int i = 0; i < bufferLength; i++) { + if (buffer[i] != bytes[bufferIndex++]) { + return false; + } + } + + byteBuffer.clear(); + } + + if ((bufferIndex != length) || (bufferLength != -1)) { + return false; + } + else { + return true; + } + } + catch (Exception e) { + return false; + } + finally { + if (fileChannel != null) { + try { + fileChannel.close(); + } + catch (IOException ioe) { + } + } + } + } + + @Override + public boolean isSameContent(File file, String s) { + ByteBuffer byteBuffer = CharsetEncoderUtil.encode(StringPool.UTF8, s); + + return isSameContent(file, byteBuffer.array(), byteBuffer.limit()); + } + + @Override + public String[] listDirs(File file) { + List dirs = new ArrayList(); + + File[] fileArray = file.listFiles(); + + for (int i = 0; (fileArray != null) && (i < fileArray.length); i++) { + if (fileArray[i].isDirectory()) { + dirs.add(fileArray[i].getName()); + } + } + + return dirs.toArray(new String[dirs.size()]); + } + + @Override + public String[] listDirs(String fileName) { + return listDirs(new File(fileName)); + } + + @Override + public String[] listFiles(File file) { + List files = new ArrayList(); + + File[] fileArray = file.listFiles(); + + for (int i = 0; (fileArray != null) && (i < fileArray.length); i++) { + if (fileArray[i].isFile()) { + files.add(fileArray[i].getName()); + } + } + + return files.toArray(new String[files.size()]); + } + + @Override + public String[] listFiles(String fileName) { + if (Validator.isNull(fileName)) { + return new String[0]; + } + + return listFiles(new File(fileName)); + } + + @Override + public void mkdirs(File file) throws IOException { + FileUtils.forceMkdir(file); + } + + @Override + public void mkdirs(String pathName) { + File file = new File(pathName); + + if (file.exists() && file.isDirectory()) { + if (_log.isDebugEnabled()) { + _log.debug("Directory " + pathName + " already exists"); + } + + return; + } + + try { + mkdirs(file); + } + catch (IOException ioe) { + ReflectionUtil.throwException(ioe); + } + } + + @Override + public boolean move(File source, File destination) { + if (!source.exists()) { + return false; + } + + destination.delete(); + + try { + if (source.isDirectory()) { + FileUtils.moveDirectory(source, destination); + } + else { + FileUtils.moveFile(source, destination); + } + } + catch (IOException ioe) { + return false; + } + + return true; + } + + @Override + public boolean move(String sourceFileName, String destinationFileName) { + return move(new File(sourceFileName), new File(destinationFileName)); + } + + @Override + public String read(File file) throws IOException { + return read(file, false); + } + + @Override + public String read(File file, boolean raw) throws IOException { + byte[] bytes = getBytes(file); + + if (bytes == null) { + return null; + } + + String s = new String(bytes, StringPool.UTF8); + + if (raw) { + return s; + } + else { + return StringUtil.replace( + s, StringPool.RETURN_NEW_LINE, StringPool.NEW_LINE); + } + } + + @Override + public String read(String fileName) throws IOException { + return read(new File(fileName)); + } + + @Override + public String replaceSeparator(String fileName) { + return StringUtil.replace( + fileName, CharPool.BACK_SLASH, CharPool.SLASH); + } + + @Override + public File[] sortFiles(File[] files) { + if (files == null) { + return null; + } + + Arrays.sort(files, new FileComparator()); + + List directoryList = new ArrayList(); + List fileList = new ArrayList(); + + for (int i = 0; i < files.length; i++) { + if (files[i].isDirectory()) { + directoryList.add(files[i]); + } + else { + fileList.add(files[i]); + } + } + + directoryList.addAll(fileList); + + return directoryList.toArray(new File[directoryList.size()]); + } + + @Override + public String stripExtension(String fileName) { + if (fileName == null) { + return null; + } + + String ext = getExtension(fileName); + + if (ext.length() > 0) { + return fileName.substring(0, fileName.length() - ext.length() - 1); + } + else { + return fileName; + } + } + + @Override + public List toList(Reader reader) { + List list = new ArrayList(); + + try { + UnsyncBufferedReader unsyncBufferedReader = + new UnsyncBufferedReader(reader); + + String line = null; + + while ((line = unsyncBufferedReader.readLine()) != null) { + list.add(line); + } + + unsyncBufferedReader.close(); + } + catch (IOException ioe) { + } + + return list; + } + + @Override + public List toList(String fileName) { + try { + return toList(new FileReader(fileName)); + } + catch (IOException ioe) { + return new ArrayList(); + } + } + + @Override + public Properties toProperties(FileInputStream fis) { + Properties properties = new Properties(); + + try { + properties.load(fis); + } + catch (IOException ioe) { + } + + return properties; + } + + @Override + public Properties toProperties(String fileName) { + try { + return toProperties(new FileInputStream(fileName)); + } + catch (IOException ioe) { + return new Properties(); + } + } + + @Override + public void touch(File file) throws IOException { + FileUtils.touch(file); + } + + @Override + public void touch(String fileName) throws IOException { + touch(new File(fileName)); + } + + @Override + public void unzip(File source, File destination) { + ExpandTask.expand(source, destination); + } + + @Override + public void write(File file, byte[] bytes) throws IOException { + write(file, bytes, 0, bytes.length, false); + } + + @Override + public void write(File file, byte[] bytes, boolean append) + throws IOException { + + write(file, bytes, 0, bytes.length, append); + } + + @Override + public void write(File file, byte[] bytes, int offset, int length) + throws IOException { + + write(file, bytes, offset, bytes.length, false); + } + + @Override + public void write( + File file, byte[] bytes, int offset, int length, boolean append) + throws IOException { + + mkdirsParentFile(file); + + FileOutputStream fileOutputStream = new FileOutputStream(file, append); + + fileOutputStream.write(bytes, offset, length); + + fileOutputStream.close(); + } + + @Override + public void write(File file, InputStream is) throws IOException { + mkdirsParentFile(file); + + StreamUtil.transfer(is, new FileOutputStream(file)); + } + + @Override + public void write(File file, String s) throws IOException { + write(file, s, false); + } + + @Override + public void write(File file, String s, boolean lazy) throws IOException { + write(file, s, lazy, false); + } + + @Override + public void write(File file, String s, boolean lazy, boolean append) + throws IOException { + + if (s == null) { + return; + } + + mkdirsParentFile(file); + + if (lazy && file.exists()) { + String content = read(file); + + if (content.equals(s)) { + return; + } + } + + Writer writer = new OutputStreamWriter( + new FileOutputStream(file, append), StringPool.UTF8); + + writer.write(s); + + writer.close(); + } + + @Override + public void write(String fileName, byte[] bytes) throws IOException { + write(new File(fileName), bytes); + } + + @Override + public void write(String fileName, InputStream is) throws IOException { + write(new File(fileName), is); + } + + @Override + public void write(String fileName, String s) throws IOException { + write(new File(fileName), s); + } + + @Override + public void write(String fileName, String s, boolean lazy) + throws IOException { + + write(new File(fileName), s, lazy); + } + + @Override + public void write(String fileName, String s, boolean lazy, boolean append) + throws IOException { + + write(new File(fileName), s, lazy, append); + } + + @Override + public void write(String pathName, String fileName, String s) + throws IOException { + + write(new File(pathName, fileName), s); + } + + @Override + public void write(String pathName, String fileName, String s, boolean lazy) + throws IOException { + + write(new File(pathName, fileName), s, lazy); + } + + @Override + public void write( + String pathName, String fileName, String s, boolean lazy, + boolean append) + throws IOException { + + write(new File(pathName, fileName), s, lazy, append); + } + + protected void mkdirsParentFile(File file) throws IOException { + File parentFile = file.getParentFile(); + + if (parentFile == null) { + return; + } + + try { + mkdirs(parentFile); + } + catch (SecurityException se) { + + // We may have the permission to write a specific file without + // having the permission to check if the parent file exists + + } + } + + private static final String[] _SAFE_FILE_NAME_1 = { + StringPool.AMPERSAND, StringPool.CLOSE_PARENTHESIS, + StringPool.OPEN_PARENTHESIS, StringPool.SEMICOLON + }; + + private static final String[] _SAFE_FILE_NAME_2 = { + "_AMP_", "_CP_", "_OP_", "_SEM_" + }; + + private static Log _log = LogFactoryUtil.getLog(FileImpl.class); + + private static FileImpl _instance = new FileImpl(); + + private static class ExtractTextProcessCallable + implements ProcessCallable { + + public ExtractTextProcessCallable(byte[] data) { + _data = data; + } + + @Override + public String call() throws ProcessException { + Tika tika = new Tika(TikaConfigHolder._tikaConfig); + + try { + return tika.parseToString( + new UnsyncByteArrayInputStream(_data)); + } + catch (Exception e) { + throw new ProcessException(e); + } + } + + private static final long serialVersionUID = 1L; + + private byte[] _data; + + } + + private static class TikaConfigHolder { + + private static final TikaConfig _tikaConfig; + + static { + try { + _tikaConfig = new TikaConfig(); + } + catch (Exception e) { + throw new ExceptionInInitializerError(e); + } + } + + } + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/PrefsPropsUtil.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/PrefsPropsUtil.java new file mode 100644 index 00000000..2cbac032 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/PrefsPropsUtil.java @@ -0,0 +1,572 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.util; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.service.PortalPreferencesLocalService; +import com.liferay.portlet.PortalPreferencesWrapper; +import com.liferay.portlet.PortalPreferencesWrapperCacheUtil; +import com.liferay.util.ContentUtil; + +import java.util.Enumeration; +import java.util.Properties; + +import javax.portlet.PortletPreferences; + +/** + * @author Brian Wing Shun Chan + */ +public class PrefsPropsUtil { + + public static boolean getBoolean(long companyId, String name) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getBoolean(preferences, companyId, name); + } + + public static boolean getBoolean( + long companyId, String name, boolean defaultValue) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getBoolean(preferences, companyId, name, defaultValue); + } + + public static boolean getBoolean( + PortletPreferences preferences, long companyId, String name) { + + return GetterUtil.getBoolean(getString(preferences, companyId, name)); + } + + public static boolean getBoolean( + PortletPreferences preferences, long companyId, String name, + boolean defaultValue) { + + return GetterUtil.getBoolean( + getString(preferences, companyId, name, defaultValue)); + } + + public static boolean getBoolean(String name) throws SystemException { + PortletPreferences preferences = getPreferences(true); + + return getBoolean(preferences, 0, name); + } + + public static boolean getBoolean(String name, boolean defaultValue) + throws SystemException { + + PortletPreferences preferences = getPreferences(true); + + return getBoolean(preferences, 0, name, defaultValue); + } + + public static String getContent(long companyId, String name) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getContent(preferences, companyId, name); + } + + public static String getContent( + PortletPreferences preferences, long companyId, String name) { + + String value = preferences.getValue(name, StringPool.BLANK); + + if (Validator.isNotNull(value)) { + return value; + } + + return ContentUtil.get(PropsUtil.get(name)); + } + + public static String getContent(String name) throws SystemException { + PortletPreferences preferences = getPreferences(true); + + return getContent(preferences, 0, name); + } + + public static double getDouble(long companyId, String name) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getDouble(preferences, companyId, name); + } + + public static double getDouble( + long companyId, String name, double defaultValue) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getDouble(preferences, companyId, name, defaultValue); + } + + public static double getDouble( + PortletPreferences preferences, long companyId, String name) { + + return GetterUtil.getDouble(getString(preferences, companyId, name)); + } + + public static double getDouble( + PortletPreferences preferences, long companyId, String name, + double defaultValue) { + + return GetterUtil.getDouble( + getString(preferences, companyId, name, defaultValue)); + } + + public static double getDouble(String name) throws SystemException { + PortletPreferences preferences = getPreferences(true); + + return getDouble(preferences, 0, name); + } + + public static double getDouble(String name, double defaultValue) + throws SystemException { + + PortletPreferences preferences = getPreferences(true); + + return getDouble(preferences, 0, name, defaultValue); + } + + public static int getInteger(long companyId, String name) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getInteger(preferences, companyId, name); + } + + public static int getInteger(long companyId, String name, int defaultValue) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getInteger(preferences, companyId, name, defaultValue); + } + + public static int getInteger( + PortletPreferences preferences, long companyId, String name) { + + return GetterUtil.getInteger(getString(preferences, companyId, name)); + } + + public static int getInteger( + PortletPreferences preferences, long companyId, String name, + int defaultValue) { + + return GetterUtil.getInteger( + getString(preferences, companyId, name, defaultValue)); + } + + public static int getInteger(String name) throws SystemException { + PortletPreferences preferences = getPreferences(true); + + return getInteger(preferences, 0, name); + } + + public static int getInteger(String name, int defaultValue) + throws SystemException { + + PortletPreferences preferences = getPreferences(true); + + return getInteger(preferences, 0, name, defaultValue); + } + + public static long getLong(long companyId, String name) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getLong(preferences, companyId, name); + } + + public static long getLong(long companyId, String name, long defaultValue) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getLong(preferences, companyId, name, defaultValue); + } + + public static long getLong( + PortletPreferences preferences, long companyId, String name) { + + return GetterUtil.getLong(getString(preferences, companyId, name)); + } + + public static long getLong( + PortletPreferences preferences, long companyId, String name, + long defaultValue) { + + return GetterUtil.getLong( + getString(preferences, companyId, name, defaultValue)); + } + + public static long getLong(String name) throws SystemException { + PortletPreferences preferences = getPreferences(true); + + return getLong(preferences, 0, name); + } + + public static long getLong(String name, long defaultValue) + throws SystemException { + + PortletPreferences preferences = getPreferences(true); + + return getLong(preferences, 0, name, defaultValue); + } + + public static PortletPreferences getPreferences() throws SystemException { + return getPreferences(false); + } + + public static PortletPreferences getPreferences(boolean readOnly) + throws SystemException { + + PortalPreferencesWrapper portalPreferencesWrapper = + PortalPreferencesWrapperCacheUtil.get( + PortletKeys.PREFS_OWNER_ID_DEFAULT, + PortletKeys.PREFS_OWNER_TYPE_COMPANY); + + if (portalPreferencesWrapper != null) { + if (!readOnly) { + portalPreferencesWrapper = portalPreferencesWrapper.clone(); + } + + return portalPreferencesWrapper; + } + + return _portalPreferencesLocalService.getPreferences( + PortletKeys.PREFS_OWNER_ID_DEFAULT, + PortletKeys.PREFS_OWNER_TYPE_COMPANY); + } + + public static PortletPreferences getPreferences(long companyId) + throws SystemException { + + return getPreferences(companyId, false); + } + + public static PortletPreferences getPreferences( + long companyId, boolean readOnly) + throws SystemException { + + long ownerId = companyId; + int ownerType = PortletKeys.PREFS_OWNER_TYPE_COMPANY; + + PortalPreferencesWrapper portalPreferencesWrapper = + PortalPreferencesWrapperCacheUtil.get(ownerId, ownerType); + + if (portalPreferencesWrapper != null) { + if (!readOnly) { + portalPreferencesWrapper = portalPreferencesWrapper.clone(); + } + + return portalPreferencesWrapper; + } + + return _portalPreferencesLocalService.getPreferences( + ownerId, ownerType); + } + + public static Properties getProperties( + PortletPreferences preferences, long companyId, String prefix, + boolean removePrefix) { + + Properties newProperties = new Properties(); + + Enumeration enu = preferences.getNames(); + + while (enu.hasMoreElements()) { + String key = enu.nextElement(); + + if (key.startsWith(prefix)) { + String value = preferences.getValue(key, StringPool.BLANK); + + if (removePrefix) { + key = key.substring(prefix.length()); + } + + newProperties.setProperty(key, value); + } + } + + return newProperties; + } + + public static Properties getProperties(String prefix, boolean removePrefix) + throws SystemException { + + PortletPreferences preferences = getPreferences(true); + + return getProperties(preferences, 0, prefix, removePrefix); + } + + public static short getShort(long companyId, String name) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getShort(preferences, companyId, name); + } + + public static short getShort( + long companyId, String name, short defaultValue) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getShort(preferences, companyId, name, defaultValue); + } + + public static short getShort( + PortletPreferences preferences, long companyId, String name) { + + return GetterUtil.getShort(getString(preferences, companyId, name)); + } + + public static short getShort( + PortletPreferences preferences, long companyId, String name, + short defaultValue) { + + return GetterUtil.getShort( + getString(preferences, companyId, name, defaultValue)); + } + + public static short getShort(String name) throws SystemException { + PortletPreferences preferences = getPreferences(true); + + return getShort(preferences, 0, name); + } + + public static short getShort(String name, short defaultValue) + throws SystemException { + + PortletPreferences preferences = getPreferences(true); + + return getShort(preferences, 0, name, defaultValue); + } + + public static String getString(long companyId, String name) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getString(preferences, companyId, name); + } + + public static String getString( + long companyId, String name, String defaultValue) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getString(preferences, companyId, name, defaultValue); + } + + public static String getString( + PortletPreferences preferences, long companyId, String name) { + + String value = PropsUtil.get(name); + + return preferences.getValue(name, value); + } + + public static String getString( + PortletPreferences preferences, long companyId, String name, + boolean defaultValue) { + + String value = getString(preferences, companyId, name); + + if (value != null) { + return value; + } + + if (defaultValue) { + return preferences.getValue(name, StringPool.TRUE); + } + + return preferences.getValue(name, StringPool.FALSE); + } + + public static String getString( + PortletPreferences preferences, long companyId, String name, + double defaultValue) { + + String value = getString(preferences, companyId, name); + + if (value != null) { + return value; + } + + return String.valueOf(defaultValue); + } + + public static String getString( + PortletPreferences preferences, long companyId, String name, + int defaultValue) { + + String value = getString(preferences, companyId, name); + + if (value != null) { + return value; + } + + return String.valueOf(defaultValue); + } + + public static String getString( + PortletPreferences preferences, long companyId, String name, + long defaultValue) { + + String value = getString(preferences, companyId, name); + + if (value != null) { + return value; + } + + return String.valueOf(defaultValue); + } + + public static String getString( + PortletPreferences preferences, long companyId, String name, + short defaultValue) { + + String value = getString(preferences, companyId, name); + + if (value != null) { + return value; + } + + return String.valueOf(defaultValue); + } + + public static String getString( + PortletPreferences preferences, long companyId, String name, + String defaultValue) { + + String value = getString(preferences, companyId, name); + + if (value != null) { + return value; + } + + return defaultValue; + } + + public static String getString(String name) throws SystemException { + PortletPreferences preferences = getPreferences(true); + + return getString(preferences, 0, name); + } + + public static String getString(String name, String defaultValue) + throws SystemException { + + PortletPreferences preferences = getPreferences(true); + + return getString(preferences, 0, name, defaultValue); + } + + public static String[] getStringArray( + long companyId, String name, String delimiter) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getStringArray(preferences, companyId, name, delimiter); + } + + public static String[] getStringArray( + long companyId, String name, String delimiter, + String[] defaultValue) + throws SystemException { + + PortletPreferences preferences = getPreferences(companyId, true); + + return getStringArray( + preferences, companyId, name, delimiter, defaultValue); + } + + public static String[] getStringArray( + PortletPreferences preferences, long companyId, String name, + String delimiter) { + + String value = PropsUtil.get(name); + + value = preferences.getValue(name, value); + + return StringUtil.split(value, delimiter); + } + + public static String[] getStringArray( + PortletPreferences preferences, long companyId, String name, + String delimiter, String[] defaultValue) { + + String value = preferences.getValue(name, null); + + if (value == null) { + return defaultValue; + } + + return StringUtil.split(value, delimiter); + } + + public static String[] getStringArray(String name, String delimiter) + throws SystemException { + + PortletPreferences preferences = getPreferences(true); + + return getStringArray(preferences, 0, name, delimiter); + } + + public static String[] getStringArray( + String name, String delimiter, String[] defaultValue) + throws SystemException { + + PortletPreferences preferences = getPreferences(true); + + return getStringArray(preferences, 0, name, delimiter, defaultValue); + } + + public static String getStringFromNames(long companyId, String... names) + throws SystemException { + + for (String name : names) { + String value = getString(companyId, name); + + if (Validator.isNotNull(value)) { + return value; + } + } + + return null; + } + + @BeanReference(type = PortalPreferencesLocalService.class) + private static PortalPreferencesLocalService _portalPreferencesLocalService; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/PropsFiles.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/PropsFiles.java new file mode 100644 index 00000000..ec3b8983 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/PropsFiles.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.util; + +/** + * @author Brian Wing Shun Chan + */ +public class PropsFiles { + + public static final String CAPTCHA = "captcha"; + + public static final String CONTENT_TYPES = "content-types"; + + public static final String PORTAL = "portal"; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/PropsUtil.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/PropsUtil.java new file mode 100644 index 00000000..0361761b --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/PropsUtil.java @@ -0,0 +1,348 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.util; + +import com.liferay.portal.configuration.ConfigurationImpl; +import com.liferay.portal.kernel.configuration.Configuration; +import com.liferay.portal.kernel.configuration.Filter; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.servlet.WebDirDetector; +import com.liferay.portal.kernel.util.CharPool; +import com.liferay.portal.kernel.util.ClassUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.PropsKeys; +import com.liferay.portal.kernel.util.ReleaseInfo; +import com.liferay.portal.kernel.util.ServerDetector; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.kernel.util.SystemProperties; +import com.liferay.portal.kernel.util.UnicodeProperties; +import com.liferay.portal.model.CompanyConstants; +import com.liferay.portal.security.auth.CompanyThreadLocal; + +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import javax.servlet.Servlet; + +/** + * @author Brian Wing Shun Chan + */ +public class PropsUtil { + + public static void addProperties(Properties properties) { + _instance._addProperties(properties); + } + + public static void addProperties(UnicodeProperties unicodeProperties) { + _instance._addProperties(unicodeProperties); + } + + public static boolean contains(String key) { + return _instance._contains(key); + } + + public static String get(String key) { + return _instance._get(key); + } + + public static String get(String key, Filter filter) { + return _instance._get(key, filter); + } + + public static String[] getArray(String key) { + return _instance._getArray(key); + } + + public static String[] getArray(String key, Filter filter) { + return _instance._getArray(key, filter); + } + + public static Properties getProperties() { + return _instance._getProperties(); + } + + public static Properties getProperties( + String prefix, boolean removePrefix) { + + return _instance._getProperties(prefix, removePrefix); + } + + public static void reload() { + _instance = new PropsUtil(); + } + + public static void removeProperties(Properties properties) { + _instance._removeProperties(properties); + } + + public static void set(String key, String value) { + _instance._set(key, value); + } + + private PropsUtil() { + try { + + // Default liferay home directory + + SystemProperties.set( + PropsKeys.DEFAULT_LIFERAY_HOME, _getDefaultLiferayHome()); + + // Global shared lib directory + + String globalSharedLibDir = _getLibDir(Servlet.class); + + if (_log.isInfoEnabled()) { + _log.info("Global shared lib directory " + globalSharedLibDir); + } + + SystemProperties.set( + PropsKeys.LIFERAY_LIB_GLOBAL_SHARED_DIR, globalSharedLibDir); + + // Global lib directory + + String globalLibDir = _getLibDir(ReleaseInfo.class); + + if (_log.isInfoEnabled()) { + _log.info("Global lib directory " + globalLibDir); + } + + SystemProperties.set( + PropsKeys.LIFERAY_LIB_GLOBAL_DIR, globalLibDir); + + // Portal lib directory + + Class clazz = getClass(); + + ClassLoader classLoader = clazz.getClassLoader(); + + String portalLibDir = WebDirDetector.getLibDir(classLoader); + + String portalLibDirProperty = System.getProperty( + PropsKeys.LIFERAY_LIB_PORTAL_DIR); + + if (portalLibDirProperty != null) { + if (!portalLibDirProperty.endsWith(StringPool.SLASH)) { + portalLibDirProperty += StringPool.SLASH; + } + + portalLibDir = portalLibDirProperty; + } + + if (_log.isInfoEnabled()) { + _log.info("Portal lib directory " + portalLibDir); + } + + SystemProperties.set( + PropsKeys.LIFERAY_LIB_PORTAL_DIR, portalLibDir); + + // Portal web directory + + String portalWebDir = WebDirDetector.getRootDir(portalLibDir); + + if (_log.isDebugEnabled()) { + _log.debug("Portal web directory " + portalWebDir); + } + + SystemProperties.set( + PropsKeys.LIFERAY_WEB_PORTAL_DIR, portalWebDir); + + // Liferay home directory + + _configuration = new ConfigurationImpl( + PropsUtil.class.getClassLoader(), PropsFiles.PORTAL); + + String liferayHome = _get(PropsKeys.LIFERAY_HOME); + + if (_log.isDebugEnabled()) { + _log.debug("Configured Liferay home " + liferayHome); + } + + SystemProperties.set(PropsKeys.LIFERAY_HOME, liferayHome); + + // Ehcache disk directory + + SystemProperties.set( + "ehcache.disk.store.dir", liferayHome + "/data/ehcache"); + + if (GetterUtil.getBoolean( + SystemProperties.get("company-id-properties"))) { + + _configurations = new HashMap(); + } + } + catch (Exception e) { + if (_log.isErrorEnabled()) { + _log.error("Unable to initialize PropsUtil", e); + } + } + } + + private void _addProperties(Properties properties) { + _getConfiguration().addProperties(properties); + } + + private void _addProperties(UnicodeProperties unicodeProperties) { + Properties properties = new Properties(); + + properties.putAll(unicodeProperties); + + _addProperties(properties); + } + + private boolean _contains(String key) { + return _getConfiguration().contains(key); + } + + private String _get(String key) { + return _getConfiguration().get(key); + } + + private String _get(String key, Filter filter) { + return _getConfiguration().get(key, filter); + } + + private String[] _getArray(String key) { + return _getConfiguration().getArray(key); + } + + private String[] _getArray(String key, Filter filter) { + return _getConfiguration().getArray(key, filter); + } + + private Configuration _getConfiguration() { + if (_configurations == null) { + return _configuration; + } + + Long companyId = CompanyThreadLocal.getCompanyId(); + + if (companyId > CompanyConstants.SYSTEM) { + Configuration configuration = _configurations.get(companyId); + + if (configuration == null) { + configuration = new ConfigurationImpl( + PropsUtil.class.getClassLoader(), PropsFiles.PORTAL, + companyId); + + _configurations.put(companyId, configuration); + } + + return configuration; + } + else { + return _configuration; + } + } + + private String _getDefaultLiferayHome() { + String defaultLiferayHome = null; + + if (ServerDetector.isGeronimo()) { + defaultLiferayHome = + SystemProperties.get("org.apache.geronimo.home.dir") + "/.."; + } + else if (ServerDetector.isGlassfish()) { + defaultLiferayHome = + SystemProperties.get("com.sun.aas.installRoot") + "/.."; + } + else if (ServerDetector.isJBoss()) { + defaultLiferayHome = SystemProperties.get("jboss.home.dir") + "/.."; + } + else if (ServerDetector.isJOnAS()) { + defaultLiferayHome = SystemProperties.get("jonas.base") + "/.."; + } + else if (ServerDetector.isWebLogic()) { + defaultLiferayHome = + SystemProperties.get("env.DOMAIN_HOME") + "/.."; + } + else if (ServerDetector.isJetty()) { + defaultLiferayHome = SystemProperties.get("jetty.home") + "/.."; + } + else if (ServerDetector.isResin()) { + defaultLiferayHome = SystemProperties.get("resin.home") + "/.."; + } + else if (ServerDetector.isTomcat()) { + defaultLiferayHome = SystemProperties.get("catalina.base") + "/.."; + } + else { + defaultLiferayHome = SystemProperties.get("user.dir") + "/liferay"; + } + + defaultLiferayHome = StringUtil.replace( + defaultLiferayHome, CharPool.BACK_SLASH, CharPool.SLASH); + + defaultLiferayHome = StringUtil.replace( + defaultLiferayHome, StringPool.DOUBLE_SLASH, StringPool.SLASH); + + if (defaultLiferayHome.endsWith("/..")) { + int pos = defaultLiferayHome.lastIndexOf( + CharPool.SLASH, defaultLiferayHome.length() - 4); + + if (pos != -1) { + defaultLiferayHome = defaultLiferayHome.substring(0, pos); + } + } + + if (_log.isDebugEnabled()) { + _log.debug("Default Liferay home " + defaultLiferayHome); + } + + return defaultLiferayHome; + } + + private String _getLibDir(Class clazz) { + String path = ClassUtil.getParentPath( + clazz.getClassLoader(), clazz.getName()); + + int pos = path.lastIndexOf(".jar!"); + + if (pos == -1) { + pos = path.lastIndexOf(".jar/"); + } + + pos = path.lastIndexOf(CharPool.SLASH, pos); + + path = path.substring(0, pos + 1); + + return path; + } + + private Properties _getProperties() { + return _getConfiguration().getProperties(); + } + + private Properties _getProperties(String prefix, boolean removePrefix) { + return _getConfiguration().getProperties(prefix, removePrefix); + } + + private void _removeProperties(Properties properties) { + _getConfiguration().removeProperties(properties); + } + + private void _set(String key, String value) { + _getConfiguration().set(key, value); + } + + private static Log _log = LogFactoryUtil.getLog(PropsUtil.class); + + private static PropsUtil _instance = new PropsUtil(); + + private Configuration _configuration; + private Map _configurations; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/PropsValues.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/PropsValues.java new file mode 100644 index 00000000..696e8f4d --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portal/util/PropsValues.java @@ -0,0 +1,2156 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portal.util; + +import com.liferay.portal.kernel.configuration.Filter; +import com.liferay.portal.kernel.util.CookieKeys; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.PropsKeys; +import com.liferay.portal.kernel.util.PropsUtil; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.kernel.util.Time; + +/** + * @author Brian Wing Shun Chan + */ +public class PropsValues { + + public static String[] ADMIN_ANALYTICS_TYPES = StringUtil.splitLines(PropsUtil.get(PropsKeys.ADMIN_ANALYTICS_TYPES)); + + public static String[] ADMIN_DEFAULT_GROUP_NAMES = StringUtil.splitLines(PropsUtil.get(PropsKeys.ADMIN_DEFAULT_GROUP_NAMES)); + + public static String[] ADMIN_DEFAULT_ORGANIZATION_GROUP_NAMES = StringUtil.splitLines(PropsUtil.get(PropsKeys.ADMIN_DEFAULT_ORGANIZATION_GROUP_NAMES)); + + public static String[] ADMIN_DEFAULT_ROLE_NAMES = StringUtil.splitLines(PropsUtil.get(PropsKeys.ADMIN_DEFAULT_ROLE_NAMES)); + + public static String[] ADMIN_DEFAULT_USER_GROUP_NAMES = StringUtil.splitLines(PropsUtil.get(PropsKeys.ADMIN_DEFAULT_USER_GROUP_NAMES)); + + public static String ADMIN_EMAIL_FROM_ADDRESS = PropsUtil.get(PropsKeys.ADMIN_EMAIL_FROM_ADDRESS); + + public static String ADMIN_EMAIL_FROM_NAME = PropsUtil.get(PropsKeys.ADMIN_EMAIL_FROM_NAME); + + public static final String ADMIN_EMAIL_PASSWORD_RESET_BODY = PropsUtil.get(PropsKeys.ADMIN_EMAIL_PASSWORD_RESET_BODY); + + public static final String ADMIN_EMAIL_PASSWORD_RESET_SUBJECT = PropsUtil.get(PropsKeys.ADMIN_EMAIL_PASSWORD_RESET_SUBJECT); + + public static final String ADMIN_EMAIL_PASSWORD_SENT_BODY = PropsUtil.get(PropsKeys.ADMIN_EMAIL_PASSWORD_SENT_BODY); + + public static final String ADMIN_EMAIL_PASSWORD_SENT_SUBJECT = PropsUtil.get(PropsKeys.ADMIN_EMAIL_PASSWORD_SENT_SUBJECT); + + public static final String[] ADMIN_MAIL_HOST_NAMES = StringUtil.splitLines(PropsUtil.get(PropsKeys.ADMIN_MAIL_HOST_NAMES)); + + public static final String[] ADMIN_OBFUSCATED_PROPERTIES = PropsUtil.getArray(PropsKeys.ADMIN_OBFUSCATED_PROPERTIES); + + public static final String[] ADMIN_RESERVED_EMAIL_ADDRESSES = StringUtil.splitLines(PropsUtil.get(PropsKeys.ADMIN_RESERVED_EMAIL_ADDRESSES)); + + public static final String[] ADMIN_RESERVED_SCREEN_NAMES = StringUtil.splitLines(PropsUtil.get(PropsKeys.ADMIN_RESERVED_SCREEN_NAMES)); + + public static final boolean ADMIN_SYNC_DEFAULT_ASSOCIATIONS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ADMIN_SYNC_DEFAULT_ASSOCIATIONS)); + + public static final String AMAZON_ACCESS_KEY_ID = PropsUtil.get(PropsKeys.AMAZON_ACCESS_KEY_ID); + + public static final String AMAZON_ASSOCIATE_TAG = PropsUtil.get(PropsKeys.AMAZON_ASSOCIATE_TAG); + + public static final String AMAZON_SECRET_ACCESS_KEY = PropsUtil.get(PropsKeys.AMAZON_SECRET_ACCESS_KEY); + + public static final String ANNOUNCEMENTS_EMAIL_BODY = PropsUtil.get(PropsKeys.ANNOUNCEMENTS_EMAIL_BODY); + + public static final String ANNOUNCEMENTS_EMAIL_FROM_ADDRESS = PropsUtil.get(PropsKeys.ANNOUNCEMENTS_EMAIL_FROM_ADDRESS); + + public static final String ANNOUNCEMENTS_EMAIL_FROM_NAME = PropsUtil.get(PropsKeys.ANNOUNCEMENTS_EMAIL_FROM_NAME); + + public static final String ANNOUNCEMENTS_EMAIL_SUBJECT = PropsUtil.get(PropsKeys.ANNOUNCEMENTS_EMAIL_SUBJECT); + + public static final String ANNOUNCEMENTS_EMAIL_TO_ADDRESS = PropsUtil.get(PropsKeys.ANNOUNCEMENTS_EMAIL_TO_ADDRESS); + + public static final String ANNOUNCEMENTS_EMAIL_TO_NAME = PropsUtil.get(PropsKeys.ANNOUNCEMENTS_EMAIL_TO_NAME); + + public static final int ANNOUNCEMENTS_ENTRY_CHECK_INTERVAL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.ANNOUNCEMENTS_ENTRY_CHECK_INTERVAL)); + + public static final int[] ANNOUNCEMENTS_ENTRY_PAGE_DELTA_VALUES = GetterUtil.getIntegerValues(PropsUtil.getArray(PropsKeys.ANNOUNCEMENTS_ENTRY_PAGE_DELTA_VALUES)); + + public static final String[] APPLICATION_SHUTDOWN_EVENTS = PropsUtil.getArray(PropsKeys.APPLICATION_SHUTDOWN_EVENTS); + + public static final String[] APPLICATION_STARTUP_EVENTS = PropsUtil.getArray(PropsKeys.APPLICATION_STARTUP_EVENTS); + + public static final String ASSET_CATEGORIES_NAVIGATION_DISPLAY_TEMPLATES_CONFIG = PropsUtil.get(PropsKeys.ASSET_CATEGORIES_NAVIGATION_DISPLAY_TEMPLATES_CONFIG); + + public static final String[] ASSET_CATEGORIES_PROPERTIES_DEFAULT = PropsUtil.getArray(PropsKeys.ASSET_CATEGORIES_PROPERTIES_DEFAULT); + + public static final boolean ASSET_CATEGORIES_SEARCH_HIERARCHICAL = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ASSET_CATEGORIES_SEARCH_HIERARCHICAL)); + + public static final int ASSET_CATEGORIES_SELECTOR_MAX_ENTRIES = GetterUtil.getInteger(PropsUtil.get(PropsKeys.ASSET_CATEGORIES_SELECTOR_MAX_ENTRIES)); + + public static final boolean ASSET_ENTRY_BUFFERED_INCREMENT_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BUFFERED_INCREMENT_ENABLED, new Filter("AssetEntry"))); + + public static final String ASSET_ENTRY_VALIDATOR = PropsUtil.get(PropsKeys.ASSET_ENTRY_VALIDATOR); + + public static final int ASSET_FILTER_SEARCH_LIMIT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.ASSET_FILTER_SEARCH_LIMIT)); + + public static final String[] ASSET_PUBLISHER_ASSET_ENTRY_QUERY_PROCESSORS = PropsUtil.getArray(PropsKeys.ASSET_PUBLISHER_ASSET_ENTRY_QUERY_PROCESSORS); + + public static final String ASSET_PUBLISHER_DISPLAY_STYLE_DEFAULT = PropsUtil.get(PropsKeys.ASSET_PUBLISHER_DISPLAY_STYLE_DEFAULT); + + public static String[] ASSET_PUBLISHER_DISPLAY_STYLES = PropsUtil.getArray(PropsKeys.ASSET_PUBLISHER_DISPLAY_STYLES); + + public static final String ASSET_PUBLISHER_DISPLAY_TEMPLATES_CONFIG = PropsUtil.get(PropsKeys.ASSET_PUBLISHER_DISPLAY_TEMPLATES_CONFIG); + + public static final int ASSET_PUBLISHER_DYNAMIC_SUBSCRIPTION_LIMIT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.ASSET_PUBLISHER_DYNAMIC_SUBSCRIPTION_LIMIT)); + + public static final String ASSET_PUBLISHER_EMAIL_ASSET_ENTRY_ADDED_BODY = PropsUtil.get(PropsKeys.ASSET_PUBLISHER_EMAIL_ASSET_ENTRY_ADDED_BODY); + + public static final boolean ASSET_PUBLISHER_EMAIL_ASSET_ENTRY_ADDED_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ASSET_PUBLISHER_EMAIL_ASSET_ENTRY_ADDED_ENABLED)); + + public static final String ASSET_PUBLISHER_EMAIL_ASSET_ENTRY_ADDED_SUBJECT = PropsUtil.get(PropsKeys.ASSET_PUBLISHER_EMAIL_ASSET_ENTRY_ADDED_SUBJECT); + + public static final String ASSET_PUBLISHER_EMAIL_FROM_ADDRESS = PropsUtil.get(PropsKeys.ASSET_PUBLISHER_EMAIL_FROM_ADDRESS); + + public static final String ASSET_PUBLISHER_EMAIL_FROM_NAME = PropsUtil.get(PropsKeys.ASSET_PUBLISHER_EMAIL_FROM_NAME); + + public static final boolean ASSET_PUBLISHER_FILTER_UNLISTABLE_ENTRIES= GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ASSET_PUBLISHER_FILTER_UNLISTABLE_ENTRIES)); + + public static final boolean ASSET_PUBLISHER_PERMISSION_CHECKING_CONFIGURABLE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ASSET_PUBLISHER_PERMISSION_CHECKING_CONFIGURABLE)); + + public static String[] ASSET_PUBLISHER_QUERY_FORM_CONFIGURATION = PropsUtil.getArray(PropsKeys.ASSET_PUBLISHER_QUERY_FORM_CONFIGURATION); + + public static final boolean ASSET_PUBLISHER_SEARCH_WITH_INDEX = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ASSET_PUBLISHER_SEARCH_WITH_INDEX)); + + public static final boolean ASSET_TAG_PERMISSIONS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ASSET_TAG_PERMISSIONS_ENABLED)); + + public static final String[] ASSET_TAG_PROPERTIES_DEFAULT = PropsUtil.getArray(PropsKeys.ASSET_TAG_PROPERTIES_DEFAULT); + + public static final boolean ASSET_TAG_PROPERTIES_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ASSET_TAG_PROPERTIES_ENABLED)); + + public static final boolean ASSET_TAG_SUGGESTIONS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ASSET_TAG_SUGGESTIONS_ENABLED)); + + public static final String ASSET_TAGS_NAVIGATION_DISPLAY_TEMPLATES_CONFIG = PropsUtil.get(PropsKeys.ASSET_TAGS_NAVIGATION_DISPLAY_TEMPLATES_CONFIG); + + public static final String ASSET_VOCABULARY_DEFAULT = PropsUtil.get(PropsKeys.ASSET_VOCABULARY_DEFAULT); + + public static final boolean AUDIT_MESSAGE_COM_LIFERAY_PORTAL_MODEL_LAYOUT_VIEW = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.AUDIT_MESSAGE_COM_LIFERAY_PORTAL_MODEL_LAYOUT_VIEW)); + + public static final boolean AUDIT_MESSAGE_SCHEDULER_JOB = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.AUDIT_MESSAGE_SCHEDULER_JOB)); + + public static final String[] AUTH_FAILURE = PropsUtil.getArray(PropsKeys.AUTH_FAILURE); + + public static boolean AUTH_FORWARD_BY_LAST_PATH = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.AUTH_FORWARD_BY_LAST_PATH)); + + public static final boolean AUTH_FORWARD_BY_REDIRECT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.AUTH_FORWARD_BY_REDIRECT)); + + public static final boolean AUTH_LOGIN_DISABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.AUTH_LOGIN_DISABLED)); + + public static final String AUTH_LOGIN_DISABLED_PATH = PropsUtil.get(PropsKeys.AUTH_LOGIN_DISABLED_PATH); + + public static final String AUTH_LOGIN_PORTLET_NAME = PropsUtil.get(PropsKeys.AUTH_LOGIN_PORTLET_NAME); + + public static final boolean AUTH_LOGIN_PROMPT_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.AUTH_LOGIN_PROMPT_ENABLED)); + + public static final String AUTH_LOGIN_SITE_URL = PropsUtil.get(PropsKeys.AUTH_LOGIN_SITE_URL); + + public static final String AUTH_LOGIN_URL = PropsUtil.get(PropsKeys.AUTH_LOGIN_URL); + + public static final String[] AUTH_MAX_FAILURES = PropsUtil.getArray(PropsKeys.AUTH_MAX_FAILURES); + + public static final boolean AUTH_PIPELINE_ENABLE_LIFERAY_CHECK = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.AUTH_PIPELINE_ENABLE_LIFERAY_CHECK)); + + public static final String[] AUTH_PIPELINE_POST = PropsUtil.getArray(PropsKeys.AUTH_PIPELINE_POST); + + public static final String[] AUTH_PIPELINE_PRE = PropsUtil.getArray(PropsKeys.AUTH_PIPELINE_PRE); + + public static final String[] AUTH_PUBLIC_PATHS = PropsUtil.getArray(PropsKeys.AUTH_PUBLIC_PATHS); + + public static final boolean AUTH_SIMULTANEOUS_LOGINS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.AUTH_SIMULTANEOUS_LOGINS)); + + public static final boolean AUTH_TOKEN_CHECK_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.AUTH_TOKEN_CHECK_ENABLED)); + + public static String[] AUTH_TOKEN_IGNORE_ACTIONS = PropsUtil.getArray(PropsKeys.AUTH_TOKEN_IGNORE_ACTIONS); + + public static String[] AUTH_TOKEN_IGNORE_ORIGINS = PropsUtil.getArray(PropsKeys.AUTH_TOKEN_IGNORE_ORIGINS); + + public static String[] AUTH_TOKEN_IGNORE_PORTLETS = PropsUtil.getArray(PropsKeys.AUTH_TOKEN_IGNORE_PORTLETS); + + public static final String AUTH_TOKEN_IMPL = PropsUtil.get(PropsKeys.AUTH_TOKEN_IMPL); + + public static final int AUTH_TOKEN_LENGTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.AUTH_TOKEN_LENGTH)); + + public static final String AUTH_TOKEN_SHARED_SECRET = PropsUtil.get(PropsKeys.AUTH_TOKEN_SHARED_SECRET); + + public static final String[] AUTH_VERIFIER_PIPELINE = PropsUtil.getArray(PropsKeys.AUTH_VERIFIER_PIPELINE); + + public static final boolean AUTO_DEPLOY_COPY_COMMONS_LOGGING = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.AUTO_DEPLOY_COPY_COMMONS_LOGGING)); + + public static final boolean AUTO_DEPLOY_COPY_LOG4J = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.AUTO_DEPLOY_COPY_LOG4J)); + + public static final boolean AUTO_DEPLOY_CUSTOM_PORTLET_XML = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.AUTO_DEPLOY_CUSTOM_PORTLET_XML)); + + public static final String AUTO_DEPLOY_DEFAULT_DEST_DIR = PropsUtil.get(PropsKeys.AUTO_DEPLOY_DEFAULT_DEST_DIR); + + public static final String AUTO_DEPLOY_DEPLOY_DIR = PropsUtil.get(PropsKeys.AUTO_DEPLOY_DEPLOY_DIR); + + public static final String AUTO_DEPLOY_DEST_DIR = PropsUtil.get(PropsKeys.AUTO_DEPLOY_DEST_DIR); + + public static final boolean AUTO_DEPLOY_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.AUTO_DEPLOY_ENABLED)); + + public static final int AUTO_DEPLOY_INTERVAL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.AUTO_DEPLOY_INTERVAL)); + + public static final String AUTO_DEPLOY_JBOSS_PREFIX = PropsUtil.get(PropsKeys.AUTO_DEPLOY_JBOSS_PREFIX); + + public static final String AUTO_DEPLOY_TOMCAT_CONF_DIR = PropsUtil.get(PropsKeys.AUTO_DEPLOY_TOMCAT_CONF_DIR); + + public static final String AUTO_DEPLOY_TOMCAT_DEST_DIR = PropsUtil.get(PropsKeys.AUTO_DEPLOY_TOMCAT_DEST_DIR); + + public static final String AUTO_DEPLOY_TOMCAT_LIB_DIR = PropsUtil.get(PropsKeys.AUTO_DEPLOY_TOMCAT_LIB_DIR); + + public static final boolean AUTO_DEPLOY_UNPACK_WAR = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.AUTO_DEPLOY_UNPACK_WAR)); + + public static final String AUTO_DEPLOY_WEBSPHERE_WSADMIN_APP_MANAGER_INSTALL_OPTIONS = PropsUtil.get(PropsKeys.AUTO_DEPLOY_WEBSPHERE_WSADMIN_APP_MANAGER_INSTALL_OPTIONS); + + public static final String AUTO_DEPLOY_WEBSPHERE_WSADMIN_APP_MANAGER_LIST_OPTIONS = PropsUtil.get(PropsKeys.AUTO_DEPLOY_WEBSPHERE_WSADMIN_APP_MANAGER_LIST_OPTIONS); + + public static final String AUTO_DEPLOY_WEBSPHERE_WSADMIN_APP_MANAGER_QUERY = PropsUtil.get(PropsKeys.AUTO_DEPLOY_WEBSPHERE_WSADMIN_APP_MANAGER_QUERY); + + public static final String AUTO_DEPLOY_WEBSPHERE_WSADMIN_APP_MANAGER_UPDATE_OPTIONS = PropsUtil.get(PropsKeys.AUTO_DEPLOY_WEBSPHERE_WSADMIN_APP_MANAGER_UPDATE_OPTIONS); + + public static final String AUTO_DEPLOY_WEBSPHERE_WSADMIN_APP_NAME_SUFFIX = PropsUtil.get(PropsKeys.AUTO_DEPLOY_WEBSPHERE_WSADMIN_APP_NAME_SUFFIX); + + public static final String AUTO_DEPLOY_WEBSPHERE_WSADMIN_PROPERTIES_FILE = PropsUtil.get(PropsKeys.AUTO_DEPLOY_WEBSPHERE_WSADMIN_PROPERTIES_FILE); + + public static final String[] AUTO_LOGIN_HOOKS = PropsUtil.getArray(PropsKeys.AUTO_LOGIN_HOOKS); + + public static final boolean BASIC_AUTH_PASSWORD_REQUIRED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BASIC_AUTH_PASSWORD_REQUIRED)); + + public static final String BLOGS_DISPLAY_TEMPLATES_CONFIG = PropsUtil.get(PropsKeys.BLOGS_DISPLAY_TEMPLATES_CONFIG); + + public static final String BLOGS_EMAIL_ENTRY_ADDED_BODY = PropsUtil.get(PropsKeys.BLOGS_EMAIL_ENTRY_ADDED_BODY); + + public static final String BLOGS_EMAIL_ENTRY_ADDED_SUBJECT = PropsUtil.get(PropsKeys.BLOGS_EMAIL_ENTRY_ADDED_SUBJECT); + + public static final String BLOGS_EMAIL_ENTRY_UPDATED_BODY = PropsUtil.get(PropsKeys.BLOGS_EMAIL_ENTRY_UPDATED_BODY); + + public static final String BLOGS_EMAIL_ENTRY_UPDATED_SUBJECT = PropsUtil.get(PropsKeys.BLOGS_EMAIL_ENTRY_UPDATED_SUBJECT); + + public static final String BLOGS_EMAIL_FROM_ADDRESS = PropsUtil.get(PropsKeys.BLOGS_EMAIL_FROM_ADDRESS); + + public static final String BLOGS_EMAIL_FROM_NAME = PropsUtil.get(PropsKeys.BLOGS_EMAIL_FROM_NAME); + + public static final boolean BLOGS_ENTRY_COMMENTS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BLOGS_ENTRY_COMMENTS_ENABLED)); + + public static final int[] BLOGS_ENTRY_PAGE_DELTA_VALUES = GetterUtil.getIntegerValues(PropsUtil.getArray(PropsKeys.BLOGS_ENTRY_PAGE_DELTA_VALUES)); + + public static final boolean BLOGS_ENTRY_PREVIOUS_AND_NEXT_NAVIGATION_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BLOGS_ENTRY_PREVIOUS_AND_NEXT_NAVIGATION_ENABLED)); + + public static final int BLOGS_LINKBACK_EXCERPT_LENGTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.BLOGS_LINKBACK_EXCERPT_LENGTH)); + + public static final int BLOGS_PAGE_ABSTRACT_LENGTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.BLOGS_PAGE_ABSTRACT_LENGTH)); + + public static final boolean BLOGS_PING_GOOGLE_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BLOGS_PING_GOOGLE_ENABLED)); + + public static final boolean BLOGS_PINGBACK_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BLOGS_PINGBACK_ENABLED)); + + public static final boolean BLOGS_PUBLISH_TO_LIVE_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BLOGS_PUBLISH_TO_LIVE_BY_DEFAULT)); + + public static final int BLOGS_RSS_ABSTRACT_LENGTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.BLOGS_RSS_ABSTRACT_LENGTH)); + + public static final boolean BLOGS_TRACKBACK_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BLOGS_TRACKBACK_ENABLED)); + + public static final String BOOKMARKS_EMAIL_ENTRY_ADDED_BODY = PropsUtil.get(PropsKeys.BOOKMARKS_EMAIL_ENTRY_ADDED_BODY); + + public static final String BOOKMARKS_EMAIL_ENTRY_ADDED_SUBJECT = PropsUtil.get(PropsKeys.BOOKMARKS_EMAIL_ENTRY_ADDED_SUBJECT); + + public static final String BOOKMARKS_EMAIL_ENTRY_UPDATED_BODY = PropsUtil.get(PropsKeys.BOOKMARKS_EMAIL_ENTRY_UPDATED_BODY); + + public static final String BOOKMARKS_EMAIL_ENTRY_UPDATED_SUBJECT = PropsUtil.get(PropsKeys.BOOKMARKS_EMAIL_ENTRY_UPDATED_SUBJECT); + + public static final String BOOKMARKS_EMAIL_FROM_ADDRESS = PropsUtil.get(PropsKeys.BOOKMARKS_EMAIL_FROM_ADDRESS); + + public static final String BOOKMARKS_EMAIL_FROM_NAME = PropsUtil.get(PropsKeys.BOOKMARKS_EMAIL_FROM_NAME); + + public static final boolean BOOKMARKS_PUBLISH_TO_LIVE_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BOOKMARKS_PUBLISH_TO_LIVE_BY_DEFAULT)); + + public static final String BREADCRUMB_DISPLAY_STYLE_DEFAULT = PropsUtil.get(PropsKeys.BREADCRUMB_DISPLAY_STYLE_DEFAULT); + + public static final String[] BREADCRUMB_DISPLAY_STYLE_OPTIONS = PropsUtil.getArray(PropsKeys.BREADCRUMB_DISPLAY_STYLE_OPTIONS); + + public static final boolean BREADCRUMB_SHOW_GUEST_GROUP = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BREADCRUMB_SHOW_GUEST_GROUP)); + + public static final boolean BREADCRUMB_SHOW_PARENT_GROUPS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BREADCRUMB_SHOW_PARENT_GROUPS)); + + public static final boolean BROWSER_CACHE_DISABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BROWSER_CACHE_DISABLED)); + + public static final boolean BROWSER_CACHE_SIGNED_IN_DISABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BROWSER_CACHE_SIGNED_IN_DISABLED)); + + public static final String BROWSER_COMPATIBILITY_IE_VERSIONS = PropsUtil.get(PropsKeys.BROWSER_COMPATIBILITY_IE_VERSIONS); + + public static final String BROWSER_LAUNCHER_URL = PropsUtil.get(PropsKeys.BROWSER_LAUNCHER_URL); + + public static final boolean BUFFERED_INCREMENT_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BUFFERED_INCREMENT_ENABLED)); + + public static final int BUFFERED_INCREMENT_STANDBY_QUEUE_THRESHOLD = GetterUtil.getInteger(PropsUtil.get(PropsKeys.BUFFERED_INCREMENT_STANDBY_QUEUE_THRESHOLD)); + + public static final long BUFFERED_INCREMENT_STANDBY_TIME_UPPER_LIMIT = GetterUtil.getLong(PropsUtil.get(PropsKeys.BUFFERED_INCREMENT_STANDBY_TIME_UPPER_LIMIT)); + + public static final int CACHE_CONTENT_THRESHOLD_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.CACHE_CONTENT_THRESHOLD_SIZE)); + + public static final String CALENDAR_EMAIL_FROM_ADDRESS = PropsUtil.get(PropsKeys.CALENDAR_EMAIL_FROM_ADDRESS); + + public static final String CALENDAR_EMAIL_FROM_NAME = PropsUtil.get(PropsKeys.CALENDAR_EMAIL_FROM_NAME); + + public static final int CALENDAR_EVENT_CHECK_INTERVAL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.CALENDAR_EVENT_CHECK_INTERVAL)); + + public static final boolean CALENDAR_EVENT_COMMENTS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.CALENDAR_EVENT_COMMENTS_ENABLED)); + + public static final boolean CALENDAR_EVENT_RATINGS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.CALENDAR_EVENT_RATINGS_ENABLED)); + + public static final boolean CALENDAR_PUBLISH_TO_LIVE_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.CALENDAR_PUBLISH_TO_LIVE_BY_DEFAULT)); + + public static boolean CAPTCHA_CHECK_PORTAL_CREATE_ACCOUNT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.CAPTCHA_CHECK_PORTAL_CREATE_ACCOUNT)); + + public static final boolean CAPTCHA_CHECK_PORTAL_SEND_PASSWORD = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.CAPTCHA_CHECK_PORTAL_SEND_PASSWORD)); + + public static final boolean CAPTCHA_CHECK_PORTLET_MESSAGE_BOARDS_EDIT_CATEGORY = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.CAPTCHA_CHECK_PORTLET_MESSAGE_BOARDS_EDIT_CATEGORY)); + + public static final boolean CAPTCHA_CHECK_PORTLET_MESSAGE_BOARDS_EDIT_MESSAGE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.CAPTCHA_CHECK_PORTLET_MESSAGE_BOARDS_EDIT_MESSAGE)); + + public static final String CAPTCHA_ENGINE_IMPL = PropsUtil.get(PropsKeys.CAPTCHA_ENGINE_IMPL); + + public static final String CAPTCHA_ENGINE_RECAPTCHA_KEY_PRIVATE = PropsUtil.get(PropsKeys.CAPTCHA_ENGINE_RECAPTCHA_KEY_PRIVATE); + + public static final String CAPTCHA_ENGINE_RECAPTCHA_KEY_PUBLIC = PropsUtil.get(PropsKeys.CAPTCHA_ENGINE_RECAPTCHA_KEY_PUBLIC); + + public static final String CAPTCHA_ENGINE_RECAPTCHA_URL_NOSCRIPT = PropsUtil.get(PropsKeys.CAPTCHA_ENGINE_RECAPTCHA_URL_NOSCRIPT); + + public static final String CAPTCHA_ENGINE_RECAPTCHA_URL_SCRIPT = PropsUtil.get(PropsKeys.CAPTCHA_ENGINE_RECAPTCHA_URL_SCRIPT); + + public static final String CAPTCHA_ENGINE_RECAPTCHA_URL_VERIFY = PropsUtil.get(PropsKeys.CAPTCHA_ENGINE_RECAPTCHA_URL_VERIFY); + + public static final String[] CAPTCHA_ENGINE_SIMPLECAPTCHA_BACKGROUND_PRODUCERS = PropsUtil.getArray(PropsKeys.CAPTCHA_ENGINE_SIMPLECAPTCHA_BACKGROUND_PRODUCERS); + + public static final String[] CAPTCHA_ENGINE_SIMPLECAPTCHA_GIMPY_RENDERERS = PropsUtil.getArray(PropsKeys.CAPTCHA_ENGINE_SIMPLECAPTCHA_GIMPY_RENDERERS); + + public static final int CAPTCHA_ENGINE_SIMPLECAPTCHA_HEIGHT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.CAPTCHA_ENGINE_SIMPLECAPTCHA_HEIGHT)); + + public static final String[] CAPTCHA_ENGINE_SIMPLECAPTCHA_NOISE_PRODUCERS = PropsUtil.getArray(PropsKeys.CAPTCHA_ENGINE_SIMPLECAPTCHA_NOISE_PRODUCERS); + + public static final String[] CAPTCHA_ENGINE_SIMPLECAPTCHA_TEXT_PRODUCERS = PropsUtil.getArray(PropsKeys.CAPTCHA_ENGINE_SIMPLECAPTCHA_TEXT_PRODUCERS); + + public static final int CAPTCHA_ENGINE_SIMPLECAPTCHA_WIDTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.CAPTCHA_ENGINE_SIMPLECAPTCHA_WIDTH)); + + public static final String[] CAPTCHA_ENGINE_SIMPLECAPTCHA_WORD_RENDERERS = PropsUtil.getArray(PropsKeys.CAPTCHA_ENGINE_SIMPLECAPTCHA_WORD_RENDERERS); + + public static final int CAPTCHA_MAX_CHALLENGES = GetterUtil.getInteger(PropsUtil.get(PropsKeys.CAPTCHA_MAX_CHALLENGES)); + + public static final boolean CAS_AUTH_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.CAS_AUTH_ENABLED)); + + public static final boolean CAS_IMPORT_FROM_LDAP = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.CAS_IMPORT_FROM_LDAP)); + + public static final String CAS_LOGIN_URL = PropsUtil.get(PropsKeys.CAS_LOGIN_URL); + + public static final boolean CAS_LOGOUT_ON_SESSION_EXPIRATION = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.CAS_LOGOUT_ON_SESSION_EXPIRATION)); + + public static final String CAS_LOGOUT_URL = PropsUtil.get(PropsKeys.CAS_LOGOUT_URL); + + public static final String CAS_NO_SUCH_USER_REDIRECT_URL = PropsUtil.get(PropsKeys.CAS_NO_SUCH_USER_REDIRECT_URL); + + public static final String CAS_SERVER_NAME = PropsUtil.get(PropsKeys.CAS_SERVER_NAME); + + public static final String CAS_SERVER_URL = PropsUtil.get(PropsKeys.CAS_SERVER_URL); + + public static final String CAS_SERVICE_URL = PropsUtil.get(PropsKeys.CAS_SERVICE_URL); + + public static final boolean CDN_DYNAMIC_RESOURCES_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.CDN_DYNAMIC_RESOURCES_ENABLED)); + + public static final String CDN_HOST_HTTP = PropsUtil.get(PropsKeys.CDN_HOST_HTTP); + + public static final String CDN_HOST_HTTPS = PropsUtil.get(PropsKeys.CDN_HOST_HTTPS); + + public static final boolean CLUSTER_EXECUTOR_DEBUG_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.CLUSTER_EXECUTOR_DEBUG_ENABLED)); + + public static final String CLUSTER_LINK_AUTODETECT_ADDRESS = PropsUtil.get(PropsKeys.CLUSTER_LINK_AUTODETECT_ADDRESS); + + public static final String[] CLUSTER_LINK_CHANNEL_SYSTEM_PROPERTIES = PropsUtil.getArray(PropsKeys.CLUSTER_LINK_CHANNEL_SYSTEM_PROPERTIES); + + public static final boolean CLUSTER_LINK_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.CLUSTER_LINK_ENABLED)); + + public static final long CLUSTER_LINK_NODE_BOOTUP_RESPONSE_TIMEOUT = GetterUtil.getLong(PropsUtil.get(PropsKeys.CLUSTER_LINK_NODE_BOOTUP_RESPONSE_TIMEOUT)); + + public static final long CLUSTERABLE_ADVICE_CALL_MASTER_TIMEOUT = GetterUtil.getLong(PropsUtil.get(PropsKeys.CLUSTERABLE_ADVICE_CALL_MASTER_TIMEOUT)); + + public static final String[] COMBO_ALLOWED_FILE_EXTENSIONS = PropsUtil.getArray(PropsKeys.COMBO_ALLOWED_FILE_EXTENSIONS); + + public static final boolean COMBO_CHECK_TIMESTAMP = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.COMBO_CHECK_TIMESTAMP)); + + public static final long COMBO_CHECK_TIMESTAMP_INTERVAL = GetterUtil.getLong(PropsUtil.get(PropsKeys.COMBO_CHECK_TIMESTAMP_INTERVAL)); + + public static final String COMPANY_DEFAULT_HOME_URL = PropsUtil.get(PropsKeys.COMPANY_DEFAULT_HOME_URL); + + public static String COMPANY_DEFAULT_LOCALE = PropsUtil.get(PropsKeys.COMPANY_DEFAULT_LOCALE); + + public static String COMPANY_DEFAULT_NAME = PropsUtil.get(PropsKeys.COMPANY_DEFAULT_NAME); + + public static String COMPANY_DEFAULT_TIME_ZONE = PropsUtil.get(PropsKeys.COMPANY_DEFAULT_TIME_ZONE); + + public static String COMPANY_DEFAULT_WEB_ID = PropsUtil.get(PropsKeys.COMPANY_DEFAULT_WEB_ID); + + public static final boolean COMPANY_LOGIN_PREPOPULATE_DOMAIN = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.COMPANY_LOGIN_PREPOPULATE_DOMAIN)); + + public static final boolean COMPANY_SECURITY_AUTH_REQUIRES_HTTPS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.COMPANY_SECURITY_AUTH_REQUIRES_HTTPS)); + + public static final String COMPANY_SECURITY_AUTH_TYPE = PropsUtil.get(PropsKeys.COMPANY_SECURITY_AUTH_TYPE); + + public static final boolean COMPANY_SECURITY_AUTO_LOGIN = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.COMPANY_SECURITY_AUTO_LOGIN)); + + public static final int COMPANY_SECURITY_AUTO_LOGIN_MAX_AGE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.COMPANY_SECURITY_AUTO_LOGIN_MAX_AGE), CookieKeys.MAX_AGE); + + public static final boolean COMPANY_SECURITY_LOGIN_FORM_AUTOCOMPLETE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.COMPANY_SECURITY_LOGIN_FORM_AUTOCOMPLETE)); + + public static final boolean COMPANY_SECURITY_PASSWORD_REMINDER_QUERY_FORM_AUTOCOMPLETE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.COMPANY_SECURITY_PASSWORD_REMINDER_QUERY_FORM_AUTOCOMPLETE)); + + public static final boolean COMPANY_SECURITY_SEND_PASSWORD = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.COMPANY_SECURITY_SEND_PASSWORD)); + + public static final boolean COMPANY_SECURITY_SEND_PASSWORD_RESET_LINK = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.COMPANY_SECURITY_SEND_PASSWORD_RESET_LINK)); + + public static final boolean COMPANY_SECURITY_SITE_LOGO = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.COMPANY_SECURITY_SITE_LOGO)); + + public static final boolean COMPANY_SECURITY_STRANGERS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.COMPANY_SECURITY_STRANGERS)); + + public static final String COMPANY_SECURITY_STRANGERS_URL = PropsUtil.get(PropsKeys.COMPANY_SECURITY_STRANGERS_URL); + + public static final boolean COMPANY_SECURITY_STRANGERS_VERIFY = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.COMPANY_SECURITY_STRANGERS_VERIFY)); + + public static final boolean COMPANY_SECURITY_STRANGERS_WITH_MX = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.COMPANY_SECURITY_STRANGERS_WITH_MX)); + + public static String[] COMPANY_SETTINGS_FORM_AUTHENTICATION = PropsUtil.getArray(PropsKeys.COMPANY_SETTINGS_FORM_AUTHENTICATION); + + public static String[] COMPANY_SETTINGS_FORM_CONFIGURATION = PropsUtil.getArray(PropsKeys.COMPANY_SETTINGS_FORM_CONFIGURATION); + + public static String[] COMPANY_SETTINGS_FORM_IDENTIFICATION = PropsUtil.getArray(PropsKeys.COMPANY_SETTINGS_FORM_IDENTIFICATION); + + public static String[] COMPANY_SETTINGS_FORM_MISCELLANEOUS = PropsUtil.getArray(PropsKeys.COMPANY_SETTINGS_FORM_MISCELLANEOUS); + + public static final String CONTROL_PANEL_DEFAULT_ENTRY_CLASS = PropsUtil.get(PropsKeys.CONTROL_PANEL_DEFAULT_ENTRY_CLASS); + + public static final String CONTROL_PANEL_HOME_PORTLET_ID = PropsUtil.get(PropsKeys.CONTROL_PANEL_HOME_PORTLET_ID); + + public static final String CONTROL_PANEL_LAYOUT_FRIENDLY_URL = PropsUtil.get(PropsKeys.CONTROL_PANEL_LAYOUT_FRIENDLY_URL); + + public static final String CONTROL_PANEL_LAYOUT_NAME = PropsUtil.get(PropsKeys.CONTROL_PANEL_LAYOUT_NAME); + + public static final String CONTROL_PANEL_LAYOUT_REGULAR_THEME_ID = PropsUtil.get(PropsKeys.CONTROL_PANEL_LAYOUT_REGULAR_THEME_ID); + + public static final int CONTROL_PANEL_NAVIGATION_MAX_SITES = GetterUtil.getInteger(PropsUtil.get(PropsKeys.CONTROL_PANEL_NAVIGATION_MAX_SITES)); + + public static String[] CONVERT_PROCESSES = PropsUtil.getArray(PropsKeys.CONVERT_PROCESSES); + + public static final int COUNTER_INCREMENT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.COUNTER_INCREMENT)); + + public static final String CUSTOM_SQL_FUNCTION_ISNOTNULL = PropsUtil.get(PropsKeys.CUSTOM_SQL_FUNCTION_ISNOTNULL); + + public static final String CUSTOM_SQL_FUNCTION_ISNULL = PropsUtil.get(PropsKeys.CUSTOM_SQL_FUNCTION_ISNULL); + + public static final boolean DATABASE_INDEXES_UPDATE_ON_STARTUP = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DATABASE_INDEXES_UPDATE_ON_STARTUP)); + + public static final String DATABASE_MYSQL_ENGINE = PropsUtil.get(PropsKeys.DATABASE_MYSQL_ENGINE); + + public static final String DEFAULT_ADMIN_EMAIL_ADDRESS_PREFIX = PropsUtil.get(PropsKeys.DEFAULT_ADMIN_EMAIL_ADDRESS_PREFIX); + + public static String DEFAULT_ADMIN_FIRST_NAME = PropsUtil.get(PropsKeys.DEFAULT_ADMIN_FIRST_NAME); + + public static String DEFAULT_ADMIN_LAST_NAME = PropsUtil.get(PropsKeys.DEFAULT_ADMIN_LAST_NAME); + + public static final String DEFAULT_ADMIN_MIDDLE_NAME = PropsUtil.get(PropsKeys.DEFAULT_ADMIN_MIDDLE_NAME); + + public static final String DEFAULT_ADMIN_PASSWORD = PropsUtil.get(PropsKeys.DEFAULT_ADMIN_PASSWORD); + + public static String DEFAULT_ADMIN_SCREEN_NAME = PropsUtil.get(PropsKeys.DEFAULT_ADMIN_SCREEN_NAME); + + public static final String DEFAULT_GUEST_PUBLIC_LAYOUT_FRIENDLY_URL = PropsUtil.get(PropsKeys.DEFAULT_GUEST_PUBLIC_LAYOUT_FRIENDLY_URL); + + public static final String DEFAULT_GUEST_PUBLIC_LAYOUT_NAME = PropsUtil.get(PropsKeys.DEFAULT_GUEST_PUBLIC_LAYOUT_NAME); + + public static final String DEFAULT_GUEST_PUBLIC_LAYOUT_REGULAR_COLOR_SCHEME_ID = PropsUtil.get(PropsKeys.DEFAULT_GUEST_PUBLIC_LAYOUT_REGULAR_COLOR_SCHEME_ID); + + public static final String DEFAULT_GUEST_PUBLIC_LAYOUT_REGULAR_THEME_ID = PropsUtil.get(PropsKeys.DEFAULT_GUEST_PUBLIC_LAYOUT_REGULAR_THEME_ID); + + public static final String DEFAULT_GUEST_PUBLIC_LAYOUT_TEMPLATE_ID = PropsUtil.get(PropsKeys.DEFAULT_GUEST_PUBLIC_LAYOUT_TEMPLATE_ID); + + public static final String DEFAULT_GUEST_PUBLIC_LAYOUT_WAP_COLOR_SCHEME_ID = PropsUtil.get(PropsKeys.DEFAULT_GUEST_PUBLIC_LAYOUT_WAP_COLOR_SCHEME_ID); + + public static final String DEFAULT_GUEST_PUBLIC_LAYOUT_WAP_THEME_ID = PropsUtil.get(PropsKeys.DEFAULT_GUEST_PUBLIC_LAYOUT_WAP_THEME_ID); + + public static final String DEFAULT_GUEST_PUBLIC_LAYOUTS_LAR = PropsUtil.get(PropsKeys.DEFAULT_GUEST_PUBLIC_LAYOUTS_LAR); + + public static String DEFAULT_LANDING_PAGE_PATH = PropsUtil.get(PropsKeys.DEFAULT_LANDING_PAGE_PATH); + + public static final String DEFAULT_LAYOUT_TEMPLATE_ID = PropsUtil.get(PropsKeys.DEFAULT_LAYOUT_TEMPLATE_ID); + + public static final String DEFAULT_LOGOUT_PAGE_PATH = PropsUtil.get(PropsKeys.DEFAULT_LOGOUT_PAGE_PATH); + + public static final String DEFAULT_REGULAR_COLOR_SCHEME_ID = PropsUtil.get(PropsKeys.DEFAULT_REGULAR_COLOR_SCHEME_ID); + + public static final String DEFAULT_REGULAR_THEME_ID = PropsUtil.get(PropsKeys.DEFAULT_REGULAR_THEME_ID); + + public static final String DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL = PropsUtil.get(PropsKeys.DEFAULT_USER_PRIVATE_LAYOUT_FRIENDLY_URL); + + public static final String DEFAULT_USER_PRIVATE_LAYOUT_NAME = PropsUtil.get(PropsKeys.DEFAULT_USER_PRIVATE_LAYOUT_NAME); + + public static final String DEFAULT_USER_PRIVATE_LAYOUT_REGULAR_COLOR_SCHEME_ID = PropsUtil.get(PropsKeys.DEFAULT_USER_PRIVATE_LAYOUT_REGULAR_COLOR_SCHEME_ID); + + public static final String DEFAULT_USER_PRIVATE_LAYOUT_REGULAR_THEME_ID = PropsUtil.get(PropsKeys.DEFAULT_USER_PRIVATE_LAYOUT_REGULAR_THEME_ID); + + public static final String DEFAULT_USER_PRIVATE_LAYOUT_TEMPLATE_ID = PropsUtil.get(PropsKeys.DEFAULT_USER_PRIVATE_LAYOUT_TEMPLATE_ID); + + public static final String DEFAULT_USER_PRIVATE_LAYOUT_WAP_COLOR_SCHEME_ID = PropsUtil.get(PropsKeys.DEFAULT_USER_PRIVATE_LAYOUT_WAP_COLOR_SCHEME_ID); + + public static final String DEFAULT_USER_PRIVATE_LAYOUT_WAP_THEME_ID = PropsUtil.get(PropsKeys.DEFAULT_USER_PRIVATE_LAYOUT_WAP_THEME_ID); + + public static final String DEFAULT_USER_PRIVATE_LAYOUTS_LAR = PropsUtil.get(PropsKeys.DEFAULT_USER_PRIVATE_LAYOUTS_LAR); + + public static final String DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL = PropsUtil.get(PropsKeys.DEFAULT_USER_PUBLIC_LAYOUT_FRIENDLY_URL); + + public static final String DEFAULT_USER_PUBLIC_LAYOUT_NAME = PropsUtil.get(PropsKeys.DEFAULT_USER_PUBLIC_LAYOUT_NAME); + + public static final String DEFAULT_USER_PUBLIC_LAYOUT_REGULAR_COLOR_SCHEME_ID = PropsUtil.get(PropsKeys.DEFAULT_USER_PUBLIC_LAYOUT_REGULAR_COLOR_SCHEME_ID); + + public static final String DEFAULT_USER_PUBLIC_LAYOUT_REGULAR_THEME_ID = PropsUtil.get(PropsKeys.DEFAULT_USER_PUBLIC_LAYOUT_REGULAR_THEME_ID); + + public static final String DEFAULT_USER_PUBLIC_LAYOUT_TEMPLATE_ID = PropsUtil.get(PropsKeys.DEFAULT_USER_PUBLIC_LAYOUT_TEMPLATE_ID); + + public static final String DEFAULT_USER_PUBLIC_LAYOUT_WAP_COLOR_SCHEME_ID = PropsUtil.get(PropsKeys.DEFAULT_USER_PUBLIC_LAYOUT_WAP_COLOR_SCHEME_ID); + + public static final String DEFAULT_USER_PUBLIC_LAYOUT_WAP_THEME_ID = PropsUtil.get(PropsKeys.DEFAULT_USER_PUBLIC_LAYOUT_WAP_THEME_ID); + + public static final String DEFAULT_USER_PUBLIC_LAYOUTS_LAR = PropsUtil.get(PropsKeys.DEFAULT_USER_PUBLIC_LAYOUTS_LAR); + + public static String DEFAULT_WAP_COLOR_SCHEME_ID = PropsUtil.get(PropsKeys.DEFAULT_WAP_COLOR_SCHEME_ID); + + public static String DEFAULT_WAP_THEME_ID = PropsUtil.get(PropsKeys.DEFAULT_WAP_THEME_ID); + + public static final boolean DIRECT_SERVLET_CONTEXT_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DIRECT_SERVLET_CONTEXT_ENABLED)); + + public static final boolean DIRECT_SERVLET_CONTEXT_RELOAD = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DIRECT_SERVLET_CONTEXT_RELOAD)); + + public static final boolean DISCUSSION_COMMENTS_ALWAYS_EDITABLE_BY_OWNER = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DISCUSSION_COMMENTS_ALWAYS_EDITABLE_BY_OWNER)); + + public static final boolean DISCUSSION_SUBSCRIBE_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DISCUSSION_SUBSCRIBE_BY_DEFAULT)); + + public static final String DISCUSSION_THREAD_VIEW = PropsUtil.get(PropsKeys.DISCUSSION_THREAD_VIEW); + + public static final String[] DL_COMPARABLE_FILE_EXTENSIONS = PropsUtil.getArray(PropsKeys.DL_COMPARABLE_FILE_EXTENSIONS); + + public static final String DL_DEFAULT_DISPLAY_VIEW = PropsUtil.get(PropsKeys.DL_DEFAULT_DISPLAY_VIEW); + + public static final String DL_DISPLAY_TEMPLATES_CONFIG = PropsUtil.get(PropsKeys.DL_DISPLAY_TEMPLATES_CONFIG); + + public static final String[] DL_DISPLAY_VIEWS = PropsUtil.getArray(PropsKeys.DL_DISPLAY_VIEWS); + + public static final String DL_EMAIL_FILE_ENTRY_ADDED_BODY = PropsUtil.get(PropsKeys.DL_EMAIL_FILE_ENTRY_ADDED_BODY); + + public static final boolean DL_EMAIL_FILE_ENTRY_ADDED_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_EMAIL_FILE_ENTRY_ADDED_ENABLED)); + + public static final String DL_EMAIL_FILE_ENTRY_ADDED_SUBJECT = PropsUtil.get(PropsKeys.DL_EMAIL_FILE_ENTRY_ADDED_SUBJECT); + + public static final String DL_EMAIL_FILE_ENTRY_UPDATED_BODY = PropsUtil.get(PropsKeys.DL_EMAIL_FILE_ENTRY_UPDATED_BODY); + + public static final boolean DL_EMAIL_FILE_ENTRY_UPDATED_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_EMAIL_FILE_ENTRY_UPDATED_ENABLED)); + + public static final String DL_EMAIL_FILE_ENTRY_UPDATED_SUBJECT = PropsUtil.get(PropsKeys.DL_EMAIL_FILE_ENTRY_UPDATED_SUBJECT); + + public static final String DL_EMAIL_FROM_ADDRESS = PropsUtil.get(PropsKeys.DL_EMAIL_FROM_ADDRESS); + + public static final String DL_EMAIL_FROM_NAME = PropsUtil.get(PropsKeys.DL_EMAIL_FROM_NAME); + + public static final boolean DL_FILE_ENTRY_BUFFERED_INCREMENT_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.BUFFERED_INCREMENT_ENABLED, new Filter("DLFileEntry"))); + + public static final boolean DL_FILE_ENTRY_COMMENTS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_COMMENTS_ENABLED)); + + public static final boolean DL_FILE_ENTRY_CONVERSIONS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_CONVERSIONS_ENABLED)); + + public static boolean DL_FILE_ENTRY_DRAFTS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_DRAFTS_ENABLED)); + + public static final int DL_FILE_ENTRY_LOCK_POLICY = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_LOCK_POLICY)); + + public static boolean DL_FILE_ENTRY_OPEN_IN_MS_OFFICE_MANUAL_CHECK_IN_REQUIRED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_OPEN_IN_MS_OFFICE_MANUAL_CHECK_IN_REQUIRED)); + + public static final String[] DL_FILE_ENTRY_PREVIEW_AUDIO_CONTAINERS = PropsUtil.getArray(PropsKeys.DL_FILE_ENTRY_PREVIEW_AUDIO_CONTAINERS); + + public static final String[] DL_FILE_ENTRY_PREVIEW_AUDIO_MIME_TYPES = PropsUtil.getArray(PropsKeys.DL_FILE_ENTRY_PREVIEW_AUDIO_MIME_TYPES); + + public static final boolean DL_FILE_ENTRY_PREVIEW_AUTO_CREATE_ON_UPGRADE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_PREVIEW_AUTO_CREATE_ON_UPGRADE)); + + public static final int DL_FILE_ENTRY_PREVIEW_DOCUMENT_DEPTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_PREVIEW_DOCUMENT_DEPTH)); + + public static final int DL_FILE_ENTRY_PREVIEW_DOCUMENT_DPI = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_PREVIEW_DOCUMENT_DPI)); + + public static final int DL_FILE_ENTRY_PREVIEW_DOCUMENT_MAX_HEIGHT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_PREVIEW_DOCUMENT_MAX_HEIGHT)); + + public static final int DL_FILE_ENTRY_PREVIEW_DOCUMENT_MAX_WIDTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_PREVIEW_DOCUMENT_MAX_WIDTH)); + + public static final boolean DL_FILE_ENTRY_PREVIEW_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_PREVIEW_ENABLED)); + + public static final boolean DL_FILE_ENTRY_PREVIEW_FORK_PROCESS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_PREVIEW_FORK_PROCESS_ENABLED)); + + public static final String[] DL_FILE_ENTRY_PREVIEW_IMAGE_MIME_TYPES = PropsUtil.getArray(PropsKeys.DL_FILE_ENTRY_PREVIEW_IMAGE_MIME_TYPES); + + public static final String[] DL_FILE_ENTRY_PREVIEW_VIDEO_CONTAINERS = PropsUtil.getArray(PropsKeys.DL_FILE_ENTRY_PREVIEW_VIDEO_CONTAINERS); + + public static final int DL_FILE_ENTRY_PREVIEW_VIDEO_HEIGHT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_PREVIEW_VIDEO_HEIGHT)); + + public static final String[] DL_FILE_ENTRY_PREVIEW_VIDEO_MIME_TYPES = PropsUtil.getArray(PropsKeys.DL_FILE_ENTRY_PREVIEW_VIDEO_MIME_TYPES); + + public static final int DL_FILE_ENTRY_PREVIEW_VIDEO_WIDTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_PREVIEW_VIDEO_WIDTH)); + + public static final long DL_FILE_ENTRY_PREVIEWABLE_PROCESSOR_MAX_SIZE = GetterUtil.getLong(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_PREVIEWABLE_PROCESSOR_MAX_SIZE)); + + public static final String[] DL_FILE_ENTRY_RAW_METADATA_PROCESSOR_EXCLUDED_MIME_TYPES = PropsUtil.getArray(PropsKeys.DL_FILE_ENTRY_RAW_METADATA_PROCESSOR_EXCLUDED_MIME_TYPES); + + public static final int DL_FILE_ENTRY_THUMBNAIL_CUSTOM_1_MAX_HEIGHT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_CUSTOM_1_MAX_HEIGHT)); + + public static final int DL_FILE_ENTRY_THUMBNAIL_CUSTOM_1_MAX_WIDTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_CUSTOM_1_MAX_WIDTH)); + + public static final int DL_FILE_ENTRY_THUMBNAIL_CUSTOM_2_MAX_HEIGHT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_CUSTOM_2_MAX_HEIGHT)); + + public static final int DL_FILE_ENTRY_THUMBNAIL_CUSTOM_2_MAX_WIDTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_CUSTOM_2_MAX_WIDTH)); + + public static final boolean DL_FILE_ENTRY_THUMBNAIL_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_ENABLED)); + + public static final int DL_FILE_ENTRY_THUMBNAIL_MAX_HEIGHT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_MAX_HEIGHT)); + + public static final int DL_FILE_ENTRY_THUMBNAIL_MAX_WIDTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_MAX_WIDTH)); + + public static final int DL_FILE_ENTRY_THUMBNAIL_VIDEO_FRAME_PERCENTAGE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_THUMBNAIL_VIDEO_FRAME_PERCENTAGE)); + + public static boolean DL_FILE_ENTRY_TYPE_IG_IMAGE_AUTO_CREATE_ON_UPGRADE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_TYPE_IG_IMAGE_AUTO_CREATE_ON_UPGRADE)); + + public static final int DL_FILE_ENTRY_VERSION_POLICY = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_ENTRY_VERSION_POLICY)); + + public static final String[] DL_FILE_EXTENSIONS = PropsUtil.getArray(PropsKeys.DL_FILE_EXTENSIONS); + + public static final boolean DL_FILE_EXTENSIONS_STRICT_CHECK = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_FILE_EXTENSIONS_STRICT_CHECK)); + + public static final long DL_FILE_INDEXING_MAX_SIZE = GetterUtil.getLong(PropsUtil.get(PropsKeys.DL_FILE_INDEXING_MAX_SIZE)); + + public static final long DL_FILE_MAX_SIZE = GetterUtil.getLong(PropsUtil.get(PropsKeys.DL_FILE_MAX_SIZE)); + + public static final boolean DL_FILE_RANK_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_FILE_RANK_ENABLED)); + + public static final int DL_FILE_RANK_MAX_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_FILE_RANK_MAX_SIZE)); + + public static final String[] DL_CHAR_BLACKLIST = PropsUtil.getArray(PropsKeys.DL_CHAR_BLACKLIST); + + public static final String[] DL_CHAR_LAST_BLACKLIST = PropsUtil.getArray(PropsKeys.DL_CHAR_LAST_BLACKLIST); + + public static final String[] DL_NAME_BLACKLIST = PropsUtil.getArray(PropsKeys.DL_NAME_BLACKLIST); + + public static final boolean DL_PUBLISH_TO_LIVE_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_PUBLISH_TO_LIVE_BY_DEFAULT)); + + public static final int DL_REPOSITORY_CMIS_DELETE_DEPTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_REPOSITORY_CMIS_DELETE_DEPTH)); + + public static final String[] DL_REPOSITORY_IMPL = PropsUtil.getArray(PropsKeys.DL_REPOSITORY_IMPL); + + public static final boolean DL_SHOW_LIFERAY_SYNC_MESSAGE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_SHOW_LIFERAY_SYNC_MESSAGE)); + + public static boolean DL_STORE_ANTIVIRUS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_STORE_ANTIVIRUS_ENABLED), false); + + public static final String DL_STORE_ANTIVIRUS_IMPL = PropsUtil.get(PropsKeys.DL_STORE_ANTIVIRUS_IMPL); + + public static final String DL_STORE_CMIS_CREDENTIALS_PASSWORD = PropsUtil.get(PropsKeys.DL_STORE_CMIS_CREDENTIALS_PASSWORD); + + public static final String DL_STORE_CMIS_CREDENTIALS_USERNAME = PropsUtil.get(PropsKeys.DL_STORE_CMIS_CREDENTIALS_USERNAME); + + public static final String DL_STORE_CMIS_REPOSITORY_URL = PropsUtil.get(PropsKeys.DL_STORE_CMIS_REPOSITORY_URL); + + public static final String DL_STORE_CMIS_SYSTEM_ROOT_DIR = PropsUtil.get(PropsKeys.DL_STORE_CMIS_SYSTEM_ROOT_DIR); + + public static final String DL_STORE_FILE_SYSTEM_ROOT_DIR = PropsUtil.get(PropsKeys.DL_STORE_FILE_SYSTEM_ROOT_DIR); + + public static String DL_STORE_IMPL = PropsUtil.get(PropsKeys.DL_STORE_IMPL); + + public static final int DL_STORE_JCR_FETCH_DELAY = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_STORE_JCR_FETCH_DELAY)); + + public static final int DL_STORE_JCR_FETCH_MAX_FAILURES = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_STORE_JCR_FETCH_MAX_FAILURES)); + + public static final boolean DL_STORE_JCR_MOVE_VERSION_LABELS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DL_STORE_JCR_MOVE_VERSION_LABELS)); + + public static final int DL_STORE_S3_TEMP_DIR_CLEAN_UP_EXPUNGE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_STORE_S3_TEMP_DIR_CLEAN_UP_EXPUNGE)); + + public static final int DL_STORE_S3_TEMP_DIR_CLEAN_UP_FREQUENCY = GetterUtil.getInteger(PropsUtil.get(PropsKeys.DL_STORE_S3_TEMP_DIR_CLEAN_UP_FREQUENCY)); + + public static String[] DOCKBAR_ADD_PORTLETS = PropsUtil.getArray(PropsKeys.DOCKBAR_ADD_PORTLETS); + + public static final boolean DOCKBAR_ADMINISTRATIVE_LINKS_SHOW_IN_POP_UP = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DOCKBAR_ADMINISTRATIVE_LINKS_SHOW_IN_POP_UP)); + + public static final boolean DYNAMIC_DATA_LISTS_RECORD_SET_FORCE_AUTOGENERATE_KEY = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DYNAMIC_DATA_LISTS_RECORD_SET_FORCE_AUTOGENERATE_KEY)); + + public static final String DYNAMIC_DATA_LISTS_STORAGE_TYPE = PropsUtil.get(PropsKeys.DYNAMIC_DATA_LISTS_STORAGE_TYPE); + + public static final boolean DYNAMIC_DATA_MAPPING_STRUCTURE_FORCE_AUTOGENERATE_KEY = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DYNAMIC_DATA_MAPPING_STRUCTURE_FORCE_AUTOGENERATE_KEY)); + + public static final String[] DYNAMIC_DATA_MAPPING_STRUCTURE_PRIVATE_FIELD_NAMES = PropsUtil.getArray(PropsKeys.DYNAMIC_DATA_MAPPING_STRUCTURE_PRIVATE_FIELD_NAMES); + + public static final boolean DYNAMIC_DATA_MAPPING_TEMPLATE_FORCE_AUTOGENERATE_KEY = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.DYNAMIC_DATA_MAPPING_TEMPLATE_FORCE_AUTOGENERATE_KEY)); + + public static final String DYNAMIC_DATA_MAPPING_TEMPLATE_LANGUAGE_DEFAULT = PropsUtil.get(PropsKeys.DYNAMIC_DATA_MAPPING_TEMPLATE_LANGUAGE_DEFAULT); + + public static final String[] DYNAMIC_RESOURCE_SERVLET_ALLOWED_PATHS = PropsUtil.getArray(PropsKeys.DYNAMIC_RESOURCE_SERVLET_ALLOWED_PATHS); + + public static String EDITOR_CKEDITOR_VERSION = PropsUtil.get(PropsKeys.EDITOR_CKEDITOR_VERSION); + + public static final boolean EDITOR_INLINE_EDITING_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.EDITOR_INLINE_EDITING_ENABLED)); + + public static final String EDITOR_WYSIWYG_DEFAULT = PropsUtil.get(PropsKeys.EDITOR_WYSIWYG_DEFAULT); + + public static final boolean EHCACHE_BLOCKING_CACHE_ALLOWED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.EHCACHE_BLOCKING_CACHE_ALLOWED)); + + public static final String EHCACHE_BOOTSTRAP_CACHE_LOADER_FACTORY = PropsUtil.get(PropsKeys.EHCACHE_BOOTSTRAP_CACHE_LOADER_FACTORY); + + public static final String EHCACHE_CACHE_EVENT_LISTENER_FACTORY = PropsUtil.get(PropsKeys.EHCACHE_CACHE_EVENT_LISTENER_FACTORY); + + public static final String EHCACHE_CACHE_MANAGER_PEER_PROVIDER_FACTORY = PropsUtil.get(PropsKeys.EHCACHE_CACHE_MANAGER_PEER_PROVIDER_FACTORY); + + public static final int EHCACHE_CACHE_MANAGER_STATISTICS_THREAD_POOL_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.EHCACHE_CACHE_MANAGER_STATISTICS_THREAD_POOL_SIZE)); + + public static final boolean EHCACHE_CLUSTER_LINK_REPLICATION_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.EHCACHE_CLUSTER_LINK_REPLICATION_ENABLED)); + + public static final boolean EHCACHE_PORTAL_CACHE_MANAGER_JMX_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.EHCACHE_PORTAL_CACHE_MANAGER_JMX_ENABLED)); + + public static final int EHCACHE_SOCKET_SO_TIMEOUT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.EHCACHE_SOCKET_SO_TIMEOUT)); + + public static final int EHCACHE_SOCKET_START_PORT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.EHCACHE_SOCKET_START_PORT)); + + public static final int ETAG_RESPONSE_SIZE_MAX = GetterUtil.getInteger(PropsUtil.get(PropsKeys.ETAG_RESPONSE_SIZE_MAX)); + + public static final String FACEBOOK_CONNECT_APP_ID = PropsUtil.get(PropsKeys.FACEBOOK_CONNECT_APP_ID); + + public static final String FACEBOOK_CONNECT_APP_SECRET = PropsUtil.get(PropsKeys.FACEBOOK_CONNECT_APP_SECRET); + + public static final boolean FACEBOOK_CONNECT_AUTH_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.FACEBOOK_CONNECT_AUTH_ENABLED)); + + public static final String FACEBOOK_CONNECT_GRAPH_URL = PropsUtil.get(PropsKeys.FACEBOOK_CONNECT_GRAPH_URL); + + public static final String FACEBOOK_CONNECT_OAUTH_AUTH_URL = PropsUtil.get(PropsKeys.FACEBOOK_CONNECT_OAUTH_AUTH_URL); + + public static final String FACEBOOK_CONNECT_OAUTH_REDIRECT_URL = PropsUtil.get(PropsKeys.FACEBOOK_CONNECT_OAUTH_REDIRECT_URL); + + public static final String FACEBOOK_CONNECT_OAUTH_TOKEN_URL = PropsUtil.get(PropsKeys.FACEBOOK_CONNECT_OAUTH_TOKEN_URL); + + public static final boolean FACEBOOK_CONNECT_VERIFIED_ACCOUNT_REQUIRED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.FACEBOOK_CONNECT_VERIFIED_ACCOUNT_REQUIRED)); + + public static final String[] FIELD_EDITABLE_DOMAINS = PropsUtil.getArray(PropsKeys.FIELD_EDITABLE_DOMAINS); + + public static final String[] FIELD_EDITABLE_ROLES = PropsUtil.getArray(PropsKeys.FIELD_EDITABLE_ROLES); + + public static final String[] FIELD_EDITABLE_USER_TYPES = PropsUtil.getArray(PropsKeys.FIELD_EDITABLE_USER_TYPES); + + public static boolean FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_BIRTHDAY = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_BIRTHDAY)); + + public static boolean FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_MALE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_CONTACT_MALE)); + + public static boolean FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_ORGANIZATION_STATUS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.FIELD_ENABLE_COM_LIFERAY_PORTAL_MODEL_ORGANIZATION_STATUS)); + + public static final boolean FLAGS_GUEST_USERS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.FLAGS_GUEST_USERS_ENABLED)); + + public static final String[] FLAGS_REASONS = PropsUtil.getArray(PropsKeys.FLAGS_REASONS); + + public static final String[] FREEMARKER_ENGINE_ALLOWED_CLASSES = PropsUtil.getArray(PropsKeys.FREEMARKER_ENGINE_ALLOWED_CLASSES); + + public static final boolean FREEMARKER_ENGINE_LOCALIZED_LOOKUP = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.FREEMARKER_ENGINE_LOCALIZED_LOOKUP)); + + public static final String FREEMARKER_ENGINE_MACRO_LIBRARY = PropsUtil.get(PropsKeys.FREEMARKER_ENGINE_MACRO_LIBRARY); + + public static final int FREEMARKER_ENGINE_RESOURCE_MODIFICATION_CHECK_INTERVAL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.FREEMARKER_ENGINE_RESOURCE_MODIFICATION_CHECK_INTERVAL)); + + public static final String[] FREEMARKER_ENGINE_RESTRICTED_CLASSES = PropsUtil.getArray(PropsKeys.FREEMARKER_ENGINE_RESTRICTED_CLASSES); + + public static final String[] FREEMARKER_ENGINE_RESTRICTED_PACKAGES = PropsUtil.getArray(PropsKeys.FREEMARKER_ENGINE_RESTRICTED_PACKAGES); + + public static final String[] FREEMARKER_ENGINE_RESTRICTED_VARIABLES = PropsUtil.getArray(PropsKeys.FREEMARKER_ENGINE_RESTRICTED_VARIABLES); + + public static final String FREEMARKER_ENGINE_TEMPLATE_EXCEPTION_HANDLER = PropsUtil.get(PropsKeys.FREEMARKER_ENGINE_TEMPLATE_EXCEPTION_HANDLER); + + public static final String[] FREEMARKER_ENGINE_TEMPLATE_PARSERS = PropsUtil.getArray(PropsKeys.FREEMARKER_ENGINE_TEMPLATE_PARSERS); + + public static final String[] GLOBAL_SHUTDOWN_EVENTS = PropsUtil.getArray(PropsKeys.GLOBAL_SHUTDOWN_EVENTS); + + public static final String[] GLOBAL_STARTUP_EVENTS = PropsUtil.getArray(PropsKeys.GLOBAL_STARTUP_EVENTS); + + public static final String GOOGLE_GADGET_SERVLET_MAPPING = PropsUtil.get(PropsKeys.GOOGLE_GADGET_SERVLET_MAPPING); + + public static final String[] GROUPS_COMPLEX_SQL_CLASS_NAMES = PropsUtil.getArray(PropsKeys.GROUPS_COMPLEX_SQL_CLASS_NAMES); + + public static final int GZIP_COMPRESSION_LEVEL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.GZIP_COMPRESSION_LEVEL)); + + public static final boolean HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE)); + + public static final String HIBERNATE_DIALECT = PropsUtil.get(PropsKeys.HIBERNATE_DIALECT); + + public static final boolean HIBERNATE_GENERATE_STATISTICS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.HIBERNATE_GENERATE_STATISTICS)); + + public static final int HIBERNATE_JDBC_BATCH_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.HIBERNATE_JDBC_BATCH_SIZE)); + + public static final boolean HOT_DEPLOY_HOOK_CUSTOM_JSP_VERIFICATION_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.HOT_DEPLOY_HOOK_CUSTOM_JSP_VERIFICATION_ENABLED)); + + public static final boolean HOT_UNDEPLOY_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.HOT_UNDEPLOY_ENABLED)); + + public static final int HOT_UNDEPLOY_INTERVAL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.HOT_UNDEPLOY_INTERVAL)); + + public static final boolean HOT_UNDEPLOY_ON_REDEPLOY = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.HOT_UNDEPLOY_ON_REDEPLOY)); + + public static final String HTTP_HEADER_VERSION_VERBOSITY = PropsUtil.get(PropsKeys.HTTP_HEADER_VERSION_VERBOSITY); + + public static final boolean IFRAME_DYNAMIC_URL_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.IFRAME_DYNAMIC_URL_ENABLED)); + + public static final String IFRAME_PASSWORD_PASSWORD_TOKEN_ROLE = PropsUtil.get(PropsKeys.IFRAME_PASSWORD_PASSWORD_TOKEN_ROLE); + + public static final boolean IMAGE_AUTO_SCALE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.IMAGE_AUTO_SCALE)); + + public static final String IMAGE_HOOK_FILE_SYSTEM_ROOT_DIR = PropsUtil.get(PropsKeys.IMAGE_HOOK_FILE_SYSTEM_ROOT_DIR); + + public static String IMAGE_HOOK_IMPL = GetterUtil.getString(PropsUtil.get(PropsKeys.IMAGE_HOOK_IMPL)); + + public static final boolean IMAGE_IO_USE_DISK_CACHE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.IMAGE_IO_USE_DISK_CACHE)); + + public static final boolean IMAGEMAGICK_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.IMAGEMAGICK_ENABLED)); + + public static final String INDEX_DATE_FORMAT_PATTERN = PropsUtil.get(PropsKeys.INDEX_DATE_FORMAT_PATTERN); + + public static final boolean INDEX_DUMP_COMPRESSION_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.INDEX_DUMP_COMPRESSION_ENABLED)); + + public static final boolean INDEX_DUMP_PROCESS_DOCUMENTS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.INDEX_DUMP_PROCESS_DOCUMENTS_ENABLED)); + + public static boolean INDEX_ON_STARTUP = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.INDEX_ON_STARTUP)); + + public static final int INDEX_ON_STARTUP_DELAY = GetterUtil.getInteger(PropsUtil.get(PropsKeys.INDEX_ON_STARTUP_DELAY)); + + public static final boolean INDEX_ON_UPGRADE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.INDEX_ON_UPGRADE)); + + public static boolean INDEX_READ_ONLY = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.INDEX_READ_ONLY)); + + public static final boolean INDEX_SEARCH_COLLATED_SPELL_CHECK_RESULT_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.INDEX_SEARCH_COLLATED_SPELL_CHECK_RESULT_ENABLED)); + + public static final int INDEX_SEARCH_COLLATED_SPELL_CHECK_RESULT_SCORES_THRESHOLD = GetterUtil.getInteger(PropsUtil.get(PropsKeys.INDEX_SEARCH_COLLATED_SPELL_CHECK_RESULT_SCORES_THRESHOLD)); + + public static final int INDEX_SEARCH_LIMIT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.INDEX_SEARCH_LIMIT)); + + public static final boolean INDEX_SEARCH_QUERY_INDEXING_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.INDEX_SEARCH_QUERY_INDEXING_ENABLED)); + + public static final int INDEX_SEARCH_QUERY_INDEXING_THRESHOLD = GetterUtil.getInteger(PropsUtil.get(PropsKeys.INDEX_SEARCH_QUERY_INDEXING_THRESHOLD)); + + public static final boolean INDEX_SEARCH_QUERY_SUGGESTION_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.INDEX_SEARCH_QUERY_SUGGESTION_ENABLED)); + + public static final int INDEX_SEARCH_QUERY_SUGGESTION_MAX = GetterUtil.getInteger(PropsUtil.get(PropsKeys.INDEX_SEARCH_QUERY_SUGGESTION_MAX)); + + public static final int INDEX_SEARCH_QUERY_SUGGESTION_SCORES_THRESHOLD = GetterUtil.getInteger(PropsUtil.get(PropsKeys.INDEX_SEARCH_QUERY_SUGGESTION_SCORES_THRESHOLD)); + + public static final boolean INDEX_WITH_THREAD = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.INDEX_WITH_THREAD)); + + public static final boolean JAVADOC_MANAGER_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JAVADOC_MANAGER_ENABLED)); + + public static final boolean JAVASCRIPT_BAREBONE_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JAVASCRIPT_BAREBONE_ENABLED)); + + public static final String[] JAVASCRIPT_BUNDLE_IDS = PropsUtil.getArray(PropsKeys.JAVASCRIPT_BUNDLE_IDS); + + public static boolean JAVASCRIPT_FAST_LOAD = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JAVASCRIPT_FAST_LOAD)); + + public static final boolean JAVASCRIPT_LOG_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JAVASCRIPT_LOG_ENABLED)); + + public static final boolean JCR_WRAP_SESSION = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JCR_WRAP_SESSION)); + + public static final String JDBC_DEFAULT_DRIVER_CLASS_NAME = PropsUtil.get(PropsKeys.JDBC_DEFAULT_DRIVER_CLASS_NAME); + + public static final String JDBC_DEFAULT_JNDI_NAME = PropsUtil.get(PropsKeys.JDBC_DEFAULT_JNDI_NAME); + + public static final String JDBC_DEFAULT_LIFERAY_POOL_PROVIDER = PropsUtil.get(PropsKeys.JDBC_DEFAULT_LIFERAY_POOL_PROVIDER); + + public static final String JDBC_DEFAULT_PASSWORD = PropsUtil.get(PropsKeys.JDBC_DEFAULT_PASSWORD); + + public static final String JDBC_DEFAULT_URL = PropsUtil.get(PropsKeys.JDBC_DEFAULT_URL); + + public static final String JDBC_DEFAULT_USERNAME = PropsUtil.get(PropsKeys.JDBC_DEFAULT_USERNAME); + + public static final int JOURNAL_ARTICLE_CHECK_INTERVAL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.JOURNAL_ARTICLE_CHECK_INTERVAL)); + + public static final boolean JOURNAL_ARTICLE_COMMENTS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JOURNAL_ARTICLE_COMMENTS_ENABLED)); + + public static final String[] JOURNAL_ARTICLE_CUSTOM_TOKENS = PropsUtil.getArray(PropsKeys.JOURNAL_ARTICLE_CUSTOM_TOKENS); + + public static boolean JOURNAL_ARTICLE_DATABASE_KEYWORD_SEARCH_CONTENT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JOURNAL_ARTICLE_DATABASE_KEYWORD_SEARCH_CONTENT)); + + public static final boolean JOURNAL_ARTICLE_EXPIRE_ALL_VERSIONS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JOURNAL_ARTICLE_EXPIRE_ALL_VERSIONS)); + + public static final boolean JOURNAL_ARTICLE_FORCE_AUTOGENERATE_ID = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JOURNAL_ARTICLE_FORCE_AUTOGENERATE_ID)); + + public static String[] JOURNAL_ARTICLE_FORM_ADD = PropsUtil.getArray(PropsKeys.JOURNAL_ARTICLE_FORM_ADD); + + public static String[] JOURNAL_ARTICLE_FORM_DEFAULT_VALUES = PropsUtil.getArray(PropsKeys.JOURNAL_ARTICLE_FORM_DEFAULT_VALUES); + + public static String[] JOURNAL_ARTICLE_FORM_TRANSLATE = PropsUtil.getArray(PropsKeys.JOURNAL_ARTICLE_FORM_TRANSLATE); + + public static String[] JOURNAL_ARTICLE_FORM_UPDATE = PropsUtil.getArray(PropsKeys.JOURNAL_ARTICLE_FORM_UPDATE); + + public static final String JOURNAL_ARTICLE_STORAGE_TYPE = PropsUtil.get(PropsKeys.JOURNAL_ARTICLE_STORAGE_TYPE); + + public static final String JOURNAL_ARTICLE_TOKEN_PAGE_BREAK = PropsUtil.get(PropsKeys.JOURNAL_ARTICLE_TOKEN_PAGE_BREAK); + + public static final boolean JOURNAL_ARTICLE_VIEW_PERMISSION_CHECK_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JOURNAL_ARTICLE_VIEW_PERMISSION_CHECK_ENABLED)); + + public static final int[] JOURNAL_ARTICLES_PAGE_DELTA_VALUES = GetterUtil.getIntegerValues(PropsUtil.getArray(PropsKeys.JOURNAL_ARTICLES_PAGE_DELTA_VALUES)); + + public static final boolean JOURNAL_ARTICLES_SEARCH_WITH_INDEX = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JOURNAL_ARTICLES_SEARCH_WITH_INDEX)); + + public static final boolean JOURNAL_CONTENT_PUBLISH_TO_LIVE_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JOURNAL_CONTENT_PUBLISH_TO_LIVE_BY_DEFAULT)); + + public static final boolean JOURNAL_CONTENT_SEARCH_SHOW_LISTED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JOURNAL_CONTENT_SEARCH_SHOW_LISTED)); + + public static final String JOURNAL_DEFAULT_DISPLAY_VIEW = PropsUtil.get(PropsKeys.JOURNAL_DEFAULT_DISPLAY_VIEW); + + public static final String[] JOURNAL_DISPLAY_VIEWS = PropsUtil.getArray(PropsKeys.JOURNAL_DISPLAY_VIEWS); + + public static final String JOURNAL_EMAIL_ARTICLE_ADDED_BODY = PropsUtil.get(PropsKeys.JOURNAL_EMAIL_ARTICLE_ADDED_BODY); + + public static final String JOURNAL_EMAIL_ARTICLE_ADDED_SUBJECT = PropsUtil.get(PropsKeys.JOURNAL_EMAIL_ARTICLE_ADDED_SUBJECT); + + public static final String JOURNAL_EMAIL_ARTICLE_APPROVAL_DENIED_BODY = PropsUtil.get(PropsKeys.JOURNAL_EMAIL_ARTICLE_APPROVAL_DENIED_BODY); + + public static final String JOURNAL_EMAIL_ARTICLE_APPROVAL_DENIED_SUBJECT = PropsUtil.get(PropsKeys.JOURNAL_EMAIL_ARTICLE_APPROVAL_DENIED_SUBJECT); + + public static final String JOURNAL_EMAIL_ARTICLE_APPROVAL_GRANTED_BODY = PropsUtil.get(PropsKeys.JOURNAL_EMAIL_ARTICLE_APPROVAL_GRANTED_BODY); + + public static final String JOURNAL_EMAIL_ARTICLE_APPROVAL_GRANTED_SUBJECT = PropsUtil.get(PropsKeys.JOURNAL_EMAIL_ARTICLE_APPROVAL_GRANTED_SUBJECT); + + public static final String JOURNAL_EMAIL_ARTICLE_APPROVAL_REQUESTED_BODY = PropsUtil.get(PropsKeys.JOURNAL_EMAIL_ARTICLE_APPROVAL_REQUESTED_BODY); + + public static final String JOURNAL_EMAIL_ARTICLE_APPROVAL_REQUESTED_SUBJECT = PropsUtil.get(PropsKeys.JOURNAL_EMAIL_ARTICLE_APPROVAL_REQUESTED_SUBJECT); + + public static final String JOURNAL_EMAIL_ARTICLE_REVIEW_BODY = PropsUtil.get(PropsKeys.JOURNAL_EMAIL_ARTICLE_REVIEW_BODY); + + public static final String JOURNAL_EMAIL_ARTICLE_REVIEW_SUBJECT = PropsUtil.get(PropsKeys.JOURNAL_EMAIL_ARTICLE_REVIEW_SUBJECT); + + public static final String JOURNAL_EMAIL_ARTICLE_UPDATED_BODY = PropsUtil.get(PropsKeys.JOURNAL_EMAIL_ARTICLE_UPDATED_BODY); + + public static final String JOURNAL_EMAIL_ARTICLE_UPDATED_SUBJECT = PropsUtil.get(PropsKeys.JOURNAL_EMAIL_ARTICLE_UPDATED_SUBJECT); + + public static final String JOURNAL_EMAIL_FROM_ADDRESS = PropsUtil.get(PropsKeys.JOURNAL_EMAIL_FROM_ADDRESS); + + public static final String JOURNAL_EMAIL_FROM_NAME = PropsUtil.get(PropsKeys.JOURNAL_EMAIL_FROM_NAME); + + public static final boolean JOURNAL_FEED_FORCE_AUTOGENERATE_ID = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JOURNAL_FEED_FORCE_AUTOGENERATE_ID)); + + public static boolean JOURNAL_ARTICLE_INDEX_ALL_VERSIONS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JOURNAL_ARTICLE_INDEX_ALL_VERSIONS)); + + public static final String JOURNAL_LAR_CREATION_STRATEGY = PropsUtil.get(PropsKeys.JOURNAL_LAR_CREATION_STRATEGY); + + public static final boolean JOURNAL_PUBLISH_TO_LIVE_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JOURNAL_PUBLISH_TO_LIVE_BY_DEFAULT)); + + public static final boolean JOURNAL_PUBLISH_VERSION_HISTORY_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JOURNAL_PUBLISH_VERSION_HISTORY_BY_DEFAULT)); + + public static final String[] JPA_CONFIGS = PropsUtil.getArray(PropsKeys.JPA_CONFIGS); + + public static final String JPA_DATABASE_PLATFORM = PropsUtil.get(PropsKeys.JPA_DATABASE_PLATFORM); + + public static final String JPA_DATABASE_TYPE = PropsUtil.get(PropsKeys.JPA_DATABASE_TYPE); + + public static final String JPA_LOAD_TIME_WEAVER = PropsUtil.get(PropsKeys.JPA_LOAD_TIME_WEAVER); + + public static final String JPA_PROVIDER = PropsUtil.get(PropsKeys.JPA_PROVIDER); + + public static final boolean JSON_DESERIALIZER_STRICT_MODE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JSON_DESERIALIZER_STRICT_MODE)); + + public static final boolean JSON_SERVICE_AUTH_TOKEN_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JSON_SERVICE_AUTH_TOKEN_ENABLED)); + + public static final String[] JSON_SERVICE_AUTH_TOKEN_HOSTS_ALLOWED = PropsUtil.getArray(PropsKeys.JSON_SERVICE_AUTH_TOKEN_HOSTS_ALLOWED); + + public static final String[] JSON_SERVICE_INVALID_CLASS_NAMES = PropsUtil.getArray(PropsKeys.JSON_SERVICE_INVALID_CLASS_NAMES); + + public static final String[] JSON_SERVICE_INVALID_METHOD_NAMES = PropsUtil.getArray(PropsKeys.JSON_SERVICE_INVALID_METHOD_NAMES); + + public static final boolean JSON_WEB_SERVICE_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JSON_WEB_SERVICE_ENABLED)); + + public static final String[] JSONWS_WEB_SERVICE_INVALID_HTTP_METHODS = PropsUtil.getArray(PropsKeys.JSONWS_WEB_SERVICE_INVALID_HTTP_METHODS); + + public static final boolean JSONWS_WEB_SERVICE_STRICT_HTTP_METHOD = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.JSONWS_WEB_SERVICE_STRICT_HTTP_METHOD)); + + public static final boolean LAYOUT_AJAX_RENDER_ENABLE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_AJAX_RENDER_ENABLE)) && !GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SESSION_DISABLED)); + + public static final String LAYOUT_CLONE_IMPL = PropsUtil.get(PropsKeys.LAYOUT_CLONE_IMPL); + + public static final boolean LAYOUT_COMMENTS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_COMMENTS_ENABLED)); + + public static final boolean LAYOUT_DEFAULT_P_L_RESET = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_DEFAULT_P_L_RESET)); + + public static final String LAYOUT_DEFAULT_TEMPLATE_ID = PropsUtil.get(PropsKeys.LAYOUT_DEFAULT_TEMPLATE_ID); + + public static String[] LAYOUT_FORM_ADD = PropsUtil.getArray(PropsKeys.LAYOUT_FORM_ADD); + + public static String[] LAYOUT_FORM_UPDATE = PropsUtil.getArray(PropsKeys.LAYOUT_FORM_UPDATE); + + public static final String[] LAYOUT_FRIENDLY_URL_KEYWORDS = PropsUtil.getArray(PropsKeys.LAYOUT_FRIENDLY_URL_KEYWORDS); + + public static final String LAYOUT_FRIENDLY_URL_PAGE_NOT_FOUND = PropsUtil.get(PropsKeys.LAYOUT_FRIENDLY_URL_PAGE_NOT_FOUND); + + public static final String LAYOUT_FRIENDLY_URL_PRIVATE_GROUP_SERVLET_MAPPING = PropsUtil.get(PropsKeys.LAYOUT_FRIENDLY_URL_PRIVATE_GROUP_SERVLET_MAPPING); + + public static final String LAYOUT_FRIENDLY_URL_PRIVATE_USER_SERVLET_MAPPING = PropsUtil.get(PropsKeys.LAYOUT_FRIENDLY_URL_PRIVATE_USER_SERVLET_MAPPING); + + public static final String LAYOUT_FRIENDLY_URL_PUBLIC_SERVLET_MAPPING = PropsUtil.get(PropsKeys.LAYOUT_FRIENDLY_URL_PUBLIC_SERVLET_MAPPING); + + public static final boolean LAYOUT_GUEST_SHOW_MAX_ICON = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_GUEST_SHOW_MAX_ICON)); + + public static final boolean LAYOUT_GUEST_SHOW_MIN_ICON = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_GUEST_SHOW_MIN_ICON)); + + public static final int LAYOUT_MANAGE_PAGES_INITIAL_CHILDREN = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LAYOUT_MANAGE_PAGES_INITIAL_CHILDREN)); + + public static final boolean LAYOUT_PARALLEL_RENDER_ENABLE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_PARALLEL_RENDER_ENABLE)); + + public static final boolean LAYOUT_PARALLEL_RENDER_THREAD_POOL_ALLOW_CORE_THREAD_TIMEOUT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_PARALLEL_RENDER_THREAD_POOL_ALLOW_CORE_THREAD_TIMEOUT)); + + public static final int LAYOUT_PARALLEL_RENDER_THREAD_POOL_CORE_THREAD_COUNT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LAYOUT_PARALLEL_RENDER_THREAD_POOL_CORE_THREAD_COUNT)); + + public static final long LAYOUT_PARALLEL_RENDER_THREAD_POOL_KEEP_ALIVE_TIME = GetterUtil.getLong(PropsUtil.get(PropsKeys.LAYOUT_PARALLEL_RENDER_THREAD_POOL_KEEP_ALIVE_TIME)); + + public static final int LAYOUT_PARALLEL_RENDER_THREAD_POOL_MAX_QUEUE_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LAYOUT_PARALLEL_RENDER_THREAD_POOL_MAX_QUEUE_SIZE)); + + public static final int LAYOUT_PARALLEL_RENDER_THREAD_POOL_MAX_THREAD_COUNT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LAYOUT_PARALLEL_RENDER_THREAD_POOL_MAX_THREAD_COUNT)); + + public static final int LAYOUT_PARALLEL_RENDER_TIMEOUT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LAYOUT_PARALLEL_RENDER_TIMEOUT)); + + public static boolean LAYOUT_PROTOTYPE_LINK_ENABLED_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_PROTOTYPE_LINK_ENABLED_DEFAULT)); + + public static final int LAYOUT_PROTOTYPE_MERGE_FAIL_THRESHOLD = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LAYOUT_PROTOTYPE_MERGE_FAIL_THRESHOLD)); + + public static final long LAYOUT_PROTOTYPE_MERGE_LOCK_MAX_TIME = GetterUtil.getLong(PropsUtil.get(PropsKeys.LAYOUT_PROTOTYPE_MERGE_LOCK_MAX_TIME)) * Time.SECOND; + + public static final boolean LAYOUT_REMEMBER_MAXIMIZED_WINDOW_STATE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_REMEMBER_MAXIMIZED_WINDOW_STATE)); + + public static String[] LAYOUT_SET_FORM_UPDATE = PropsUtil.getArray(PropsKeys.LAYOUT_SET_FORM_UPDATE); + + public static final int LAYOUT_SET_PROTOTYPE_MERGE_FAIL_THRESHOLD = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LAYOUT_SET_PROTOTYPE_MERGE_FAIL_THRESHOLD)); + + public static final long LAYOUT_SET_PROTOTYPE_MERGE_LOCK_MAX_TIME = GetterUtil.getLong(PropsUtil.get(PropsKeys.LAYOUT_SET_PROTOTYPE_MERGE_LOCK_MAX_TIME)) * Time.SECOND; + + public static final boolean LAYOUT_SHOW_HTTP_STATUS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_SHOW_HTTP_STATUS)); + + public static final boolean LAYOUT_SHOW_PORTLET_ACCESS_DENIED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_SHOW_PORTLET_ACCESS_DENIED)); + + public static final boolean LAYOUT_SHOW_PORTLET_INACTIVE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_SHOW_PORTLET_INACTIVE)); + + public static String[] LAYOUT_STATIC_PORTLETS_ALL = PropsUtil.getArray(PropsKeys.LAYOUT_STATIC_PORTLETS_ALL); + + public static boolean LAYOUT_TEMPLATE_CACHE_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_TEMPLATE_CACHE_ENABLED)); + + public static String[] LAYOUT_TYPES = PropsUtil.getArray(PropsKeys.LAYOUT_TYPES); + + public static boolean LAYOUT_USER_PRIVATE_LAYOUTS_AUTO_CREATE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_USER_PRIVATE_LAYOUTS_AUTO_CREATE)); + + public static boolean LAYOUT_USER_PRIVATE_LAYOUTS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_USER_PRIVATE_LAYOUTS_ENABLED)); + + public static boolean LAYOUT_USER_PRIVATE_LAYOUTS_POWER_USER_REQUIRED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_USER_PRIVATE_LAYOUTS_POWER_USER_REQUIRED)); + + public static boolean LAYOUT_USER_PUBLIC_LAYOUTS_AUTO_CREATE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_USER_PUBLIC_LAYOUTS_AUTO_CREATE)); + + public static boolean LAYOUT_USER_PUBLIC_LAYOUTS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_USER_PUBLIC_LAYOUTS_ENABLED)); + + public static boolean LAYOUT_USER_PUBLIC_LAYOUTS_POWER_USER_REQUIRED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LAYOUT_USER_PUBLIC_LAYOUTS_POWER_USER_REQUIRED)); + + public static final String LDAP_ATTRS_TRANSFORMER_IMPL = PropsUtil.get(PropsKeys.LDAP_ATTRS_TRANSFORMER_IMPL); + + public static final boolean LDAP_AUTH_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LDAP_AUTH_ENABLED)); + + public static final boolean LDAP_EXPORT_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LDAP_EXPORT_ENABLED)); + + public static final boolean LDAP_EXPORT_GROUP_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LDAP_EXPORT_GROUP_ENABLED)); + + public static final boolean LDAP_IMPORT_CREATE_ROLE_PER_GROUP = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LDAP_IMPORT_CREATE_ROLE_PER_GROUP)); + + public static final boolean LDAP_IMPORT_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LDAP_IMPORT_ENABLED)); + + public static final boolean LDAP_IMPORT_GROUP_CACHE_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LDAP_IMPORT_GROUP_CACHE_ENABLED)); + + public static final long LDAP_IMPORT_INTERVAL = GetterUtil.getLong(PropsUtil.get(PropsKeys.LDAP_IMPORT_INTERVAL)); + + public static final long LDAP_IMPORT_LOCK_EXPIRATION_TIME = GetterUtil.getLong(PropsUtil.get(PropsKeys.LDAP_IMPORT_LOCK_EXPIRATION_TIME)); + + public static final boolean LDAP_IMPORT_USER_PASSWORD_AUTOGENERATED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LDAP_IMPORT_USER_PASSWORD_AUTOGENERATED)); + + public static final String LDAP_IMPORT_USER_PASSWORD_DEFAULT = GetterUtil.getString(PropsUtil.get(PropsKeys.LDAP_IMPORT_USER_PASSWORD_DEFAULT)); + + public static final boolean LDAP_IMPORT_USER_PASSWORD_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LDAP_IMPORT_USER_PASSWORD_ENABLED)); + + public static final int LDAP_PAGE_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LDAP_PAGE_SIZE)); + + public static final boolean LDAP_PASSWORD_POLICY_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LDAP_PASSWORD_POLICY_ENABLED)); + + public static final int LDAP_RANGE_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LDAP_RANGE_SIZE)); + + public static final String[] LDAP_USER_IGNORE_ATTRIBUTES = PropsUtil.getArray(PropsKeys.LDAP_USER_IGNORE_ATTRIBUTES); + + public static final String LDAP_USER_IMPL = PropsUtil.get(PropsKeys.LDAP_USER_IMPL); + + public static final String LIFERAY_HOME = PropsUtil.get(PropsKeys.LIFERAY_HOME); + + public static final String LIFERAY_LIB_GLOBAL_DIR = PropsUtil.get(PropsKeys.LIFERAY_LIB_GLOBAL_DIR); + + public static final String LIFERAY_LIB_GLOBAL_SHARED_DIR = PropsUtil.get(PropsKeys.LIFERAY_LIB_GLOBAL_SHARED_DIR); + + public static final String LIFERAY_LIB_PORTAL_DIR = PropsUtil.get(PropsKeys.LIFERAY_LIB_PORTAL_DIR); + + public static String LIFERAY_WEB_PORTAL_CONTEXT_TEMPDIR; + + public static final String LIFERAY_WEB_PORTAL_DIR = PropsUtil.get(PropsKeys.LIFERAY_WEB_PORTAL_DIR); + + public static final boolean LIVE_USERS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LIVE_USERS_ENABLED)); + + public static final boolean LOCALE_DEFAULT_REQUEST = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LOCALE_DEFAULT_REQUEST)); + + public static final int LOCALE_PREPEND_FRIENDLY_URL_STYLE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LOCALE_PREPEND_FRIENDLY_URL_STYLE)); + + public static boolean LOCALE_USE_DEFAULT_IF_NOT_AVAILABLE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LOCALE_USE_DEFAULT_IF_NOT_AVAILABLE)); + + public static String[] LOCALES = PropsUtil.getArray(PropsKeys.LOCALES); + + public static String[] LOCALES_BETA = PropsUtil.getArray(PropsKeys.LOCALES_BETA); + + public static String[] LOCALES_ENABLED = PropsUtil.getArray(PropsKeys.LOCALES_ENABLED); + + public static boolean LOGIN_CREATE_ACCOUNT_ALLOW_CUSTOM_PASSWORD = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LOGIN_CREATE_ACCOUNT_ALLOW_CUSTOM_PASSWORD)); + + public static boolean LOGIN_DIALOG_DISABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LOGIN_DIALOG_DISABLED)); + + public static final String LOGIN_EMAIL_FROM_ADDRESS = PropsUtil.get(PropsKeys.LOGIN_EMAIL_FROM_ADDRESS); + + public static final String LOGIN_EMAIL_FROM_NAME = PropsUtil.get(PropsKeys.LOGIN_EMAIL_FROM_NAME); + + public static final String[] LOGIN_EVENTS_POST = PropsUtil.getArray(PropsKeys.LOGIN_EVENTS_POST); + + public static final String[] LOGIN_EVENTS_PRE = PropsUtil.getArray(PropsKeys.LOGIN_EVENTS_PRE); + + public static String[] LOGIN_FORM_NAVIGATION_POST = PropsUtil.getArray(PropsKeys.LOGIN_FORM_NAVIGATION_POST); + + public static String[] LOGIN_FORM_NAVIGATION_PRE = PropsUtil.getArray(PropsKeys.LOGIN_FORM_NAVIGATION_PRE); + + public static final boolean LOGIN_SECURE_FORGOT_PASSWORD = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LOGIN_SECURE_FORGOT_PASSWORD)); + + public static final String[] LOGOUT_EVENTS_POST = PropsUtil.getArray(PropsKeys.LOGOUT_EVENTS_POST); + + public static final String[] LOGOUT_EVENTS_PRE = PropsUtil.getArray(PropsKeys.LOGOUT_EVENTS_PRE); + + public static final boolean LOOK_AND_FEEL_MODIFIABLE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LOOK_AND_FEEL_MODIFIABLE)); + + public static final int LUCENE_ANALYZER_MAX_TOKENS = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LUCENE_ANALYZER_MAX_TOKENS)); + + public static final int LUCENE_BUFFER_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LUCENE_BUFFER_SIZE)); + + public static final long LUCENE_CLUSTER_INDEX_LOADING_SYNC_TIMEOUT = GetterUtil.getLong(PropsUtil.get(PropsKeys.LUCENE_CLUSTER_INDEX_LOADING_SYNC_TIMEOUT)); + + public static final boolean LUCENE_CLUSTER_INDEX_USE_CANONICAL_HOST_NAME = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LUCENE_CLUSTER_INDEX_LOADING_USE_CANONICAL_HOST_NAME)); + + public static final int LUCENE_COMMIT_BATCH_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LUCENE_COMMIT_BATCH_SIZE)); + + public static final int LUCENE_COMMIT_TIME_INTERVAL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LUCENE_COMMIT_TIME_INTERVAL)); + + public static final String LUCENE_DIR = PropsUtil.get(PropsKeys.LUCENE_DIR); + + public static final String LUCENE_FILE_EXTRACTOR = PropsUtil.get(PropsKeys.LUCENE_FILE_EXTRACTOR); + + public static final String LUCENE_FILE_EXTRACTOR_REGEXP_STRIP = PropsUtil.get(PropsKeys.LUCENE_FILE_EXTRACTOR_REGEXP_STRIP); + + public static final int LUCENE_MERGE_FACTOR = GetterUtil.getInteger(PropsUtil.get(PropsKeys.LUCENE_MERGE_FACTOR)); + + public static String LUCENE_MERGE_POLICY = PropsUtil.get(PropsKeys.LUCENE_MERGE_POLICY); + + public static String LUCENE_MERGE_SCHEDULER = PropsUtil.get(PropsKeys.LUCENE_MERGE_SCHEDULER); + + public static final boolean LUCENE_REPLICATE_WRITE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LUCENE_REPLICATE_WRITE)); + + public static final String LUCENE_STORE_TYPE = PropsUtil.get(PropsKeys.LUCENE_STORE_TYPE); + + public static final boolean LUCENE_STORE_TYPE_FILE_FORCE_MMAP = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LUCENE_STORE_TYPE_FILE_FORCE_MMAP)); + + public static final String MAIL_AUDIT_TRAIL = PropsUtil.get(PropsKeys.MAIL_AUDIT_TRAIL); + + public static final String MAIL_HOOK_IMPL = PropsUtil.get(PropsKeys.MAIL_HOOK_IMPL); + + public static final boolean MAIL_MX_UPDATE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MAIL_MX_UPDATE)); + + public static final String MAIL_SESSION_MAIL_ADVANCED_PROPERTIES = PropsUtil.get(PropsKeys.MAIL_SESSION_MAIL_ADVANCED_PROPERTIES); + + public static final String MAIL_SESSION_MAIL_POP3_HOST = PropsUtil.get(PropsKeys.MAIL_SESSION_MAIL_POP3_HOST); + + public static final String MAIL_SESSION_MAIL_POP3_PASSWORD = PropsUtil.get(PropsKeys.MAIL_SESSION_MAIL_POP3_PASSWORD); + + public static final int MAIL_SESSION_MAIL_POP3_PORT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.MAIL_SESSION_MAIL_POP3_PORT)); + + public static final String MAIL_SESSION_MAIL_POP3_USER = PropsUtil.get(PropsKeys.MAIL_SESSION_MAIL_POP3_USER); + + public static final String MAIL_SESSION_MAIL_SMTP_HOST = PropsUtil.get(PropsKeys.MAIL_SESSION_MAIL_SMTP_HOST); + + public static final String MAIL_SESSION_MAIL_SMTP_PASSWORD = PropsUtil.get(PropsKeys.MAIL_SESSION_MAIL_SMTP_PASSWORD); + + public static final int MAIL_SESSION_MAIL_SMTP_PORT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.MAIL_SESSION_MAIL_SMTP_PORT)); + + public static final String MAIL_SESSION_MAIL_SMTP_USER = PropsUtil.get(PropsKeys.MAIL_SESSION_MAIL_SMTP_USER); + + public static final String MAIL_SESSION_MAIL_STORE_PROTOCOL = PropsUtil.get(PropsKeys.MAIL_SESSION_MAIL_STORE_PROTOCOL); + + public static final String MAIL_SESSION_MAIL_TRANSPORT_PROTOCOL = PropsUtil.get(PropsKeys.MAIL_SESSION_MAIL_TRANSPORT_PROTOCOL); + + public static final boolean MEMBERSHIP_POLICY_AUTO_VERIFY = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MEMBERSHIP_POLICY_AUTO_VERIFY)); + + public static final String MEMBERSHIP_POLICY_ORGANIZATIONS = PropsUtil.get(PropsKeys.MEMBERSHIP_POLICY_ORGANIZATIONS); + + public static final String MEMBERSHIP_POLICY_ROLES = PropsUtil.get(PropsKeys.MEMBERSHIP_POLICY_ROLES); + + public static final String MEMBERSHIP_POLICY_SITES = PropsUtil.get(PropsKeys.MEMBERSHIP_POLICY_SITES); + + public static final String MEMBERSHIP_POLICY_USER_GROUPS = PropsUtil.get(PropsKeys.MEMBERSHIP_POLICY_USER_GROUPS); + + public static final boolean MESSAGE_BOARDS_ANONYMOUS_POSTING_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MESSAGE_BOARDS_ANONYMOUS_POSTING_ENABLED)); + + public static final boolean MESSAGE_BOARDS_EMAIL_BULK = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MESSAGE_BOARDS_EMAIL_BULK)); + + public static final String MESSAGE_BOARDS_EMAIL_FROM_ADDRESS = PropsUtil.get(PropsKeys.MESSAGE_BOARDS_EMAIL_FROM_ADDRESS); + + public static final String MESSAGE_BOARDS_EMAIL_FROM_NAME = PropsUtil.get(PropsKeys.MESSAGE_BOARDS_EMAIL_FROM_NAME); + + public static final boolean MESSAGE_BOARDS_EMAIL_HTML_FORMAT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MESSAGE_BOARDS_EMAIL_HTML_FORMAT)); + + public static final String MESSAGE_BOARDS_EMAIL_MESSAGE_ADDED_BODY = PropsUtil.get(PropsKeys.MESSAGE_BOARDS_EMAIL_MESSAGE_ADDED_BODY); + + public static final boolean MESSAGE_BOARDS_EMAIL_MESSAGE_ADDED_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MESSAGE_BOARDS_EMAIL_MESSAGE_ADDED_ENABLED)); + + public static final String MESSAGE_BOARDS_EMAIL_MESSAGE_ADDED_SIGNATURE = PropsUtil.get(PropsKeys.MESSAGE_BOARDS_EMAIL_MESSAGE_ADDED_SIGNATURE); + + public static final String MESSAGE_BOARDS_EMAIL_MESSAGE_ADDED_SUBJECT = PropsUtil.get(PropsKeys.MESSAGE_BOARDS_EMAIL_MESSAGE_ADDED_SUBJECT); + + public static final String MESSAGE_BOARDS_EMAIL_MESSAGE_UPDATED_BODY = PropsUtil.get(PropsKeys.MESSAGE_BOARDS_EMAIL_MESSAGE_UPDATED_BODY); + + public static final boolean MESSAGE_BOARDS_EMAIL_MESSAGE_UPDATED_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MESSAGE_BOARDS_EMAIL_MESSAGE_UPDATED_ENABLED)); + + public static final String MESSAGE_BOARDS_EMAIL_MESSAGE_UPDATED_SIGNATURE = PropsUtil.get(PropsKeys.MESSAGE_BOARDS_EMAIL_MESSAGE_UPDATED_SIGNATURE); + + public static final String MESSAGE_BOARDS_EMAIL_MESSAGE_UPDATED_SUBJECT = PropsUtil.get(PropsKeys.MESSAGE_BOARDS_EMAIL_MESSAGE_UPDATED_SUBJECT); + + public static final int MESSAGE_BOARDS_EXPIRE_BAN_INTERVAL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.MESSAGE_BOARDS_EXPIRE_BAN_INTERVAL)); + + public static final long MESSAGE_BOARDS_EXPIRE_BAN_JOB_INTERVAL = GetterUtil.getLong(PropsUtil.get(PropsKeys.MESSAGE_BOARDS_EXPIRE_BAN_JOB_INTERVAL)); + + public static final boolean MESSAGE_BOARDS_PINGBACK_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MESSAGE_BOARDS_PINGBACK_ENABLED)); + + public static final boolean MESSAGE_BOARDS_PUBLISH_TO_LIVE_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MESSAGE_BOARDS_PUBLISH_TO_LIVE_BY_DEFAULT)); + + public static final int MESSAGE_BOARDS_RSS_ABSTRACT_LENGTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.MESSAGE_BOARDS_RSS_ABSTRACT_LENGTH)); + + public static final boolean MESSAGE_BOARDS_SUBSCRIBE_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MESSAGE_BOARDS_SUBSCRIBE_BY_DEFAULT)); + + public static final boolean MESSAGE_BOARDS_THREAD_PREVIOUS_AND_NEXT_NAVIGATION_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MESSAGE_BOARDS_THREAD_PREVIOUS_AND_NEXT_NAVIGATION_ENABLED)); + + public static final String[] MESSAGE_BOARDS_THREAD_VIEWS = PropsUtil.getArray(PropsKeys.MESSAGE_BOARDS_THREAD_VIEWS); + + public static final String MESSAGE_BOARDS_THREAD_VIEWS_DEFAULT = PropsUtil.get(PropsKeys.MESSAGE_BOARDS_THREAD_VIEWS_DEFAULT); + + /** + * @deprecated As of 7.0.0, with no direct replacement + */ + @Deprecated + public static final String MICROSOFT_TRANSLATOR_CLIENT_ID = PropsUtil.get(PropsKeys.MICROSOFT_TRANSLATOR_CLIENT_ID); + + public static final String MICROSOFT_TRANSLATOR_CLIENT_SECRET = PropsUtil.get(PropsKeys.MICROSOFT_TRANSLATOR_CLIENT_SECRET); + + public static final String[] MIME_TYPES_CONTENT_DISPOSITION_INLINE = PropsUtil.getArray(PropsKeys.MIME_TYPES_CONTENT_DISPOSITION_INLINE); + + public static String[] MIME_TYPES_WEB_IMAGES = PropsUtil.getArray(PropsKeys.MIME_TYPES_WEB_IMAGES); + + public static final boolean MINIFIER_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MINIFIER_ENABLED)); + + public static final int MINIFIER_INLINE_CONTENT_CACHE_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.MINIFIER_INLINE_CONTENT_CACHE_SIZE)); + + public static final String[] MINIFIER_INLINE_CONTENT_CACHE_SKIP_CSS = PropsUtil.getArray(PropsKeys.MINIFIER_INLINE_CONTENT_CACHE_SKIP_CSS); + + public static final String[] MINIFIER_INLINE_CONTENT_CACHE_SKIP_JAVASCRIPT = PropsUtil.getArray(PropsKeys.MINIFIER_INLINE_CONTENT_CACHE_SKIP_JAVASCRIPT); + + public static final boolean MOBILE_DEVICE_RULES_PUBLISH_TO_LIVE_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MOBILE_DEVICE_RULES_PUBLISH_TO_LIVE_BY_DEFAULT)); + + public static final String MOBILE_DEVICE_RULES_RULE_GROUP_COPY_POSTFIX = PropsUtil.get(PropsKeys.MOBILE_DEVICE_RULES_RULE_GROUP_COPY_POSTFIX); + + public static final boolean MOBILE_DEVICE_SESSION_CACHE_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MOBILE_DEVICE_SESSION_CACHE_ENABLED)); + + public static final boolean MOBILE_DEVICE_STYLING_WAP_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MOBILE_DEVICE_STYLING_WAP_ENABLED)); + + public static final int MODEL_TREE_REBUILD_QUERY_RESULTS_BATCH_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.MODEL_TREE_REBUILD_QUERY_RESULTS_BATCH_SIZE)); + + public static final String[] MODULE_FRAMEWORK_AUTO_DEPLOY_DIRS = PropsUtil.getArray(PropsKeys.MODULE_FRAMEWORK_AUTO_DEPLOY_DIRS); + + public static final long MODULE_FRAMEWORK_AUTO_DEPLOY_INTERVAL = GetterUtil.getLong(PropsUtil.get(PropsKeys.MODULE_FRAMEWORK_AUTO_DEPLOY_INTERVAL)); + + public static final String MODULE_FRAMEWORK_BASE_DIR = PropsUtil.get(PropsKeys.MODULE_FRAMEWORK_BASE_DIR); + + public static final int MODULE_FRAMEWORK_BEGINNING_START_LEVEL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.MODULE_FRAMEWORK_BEGINNING_START_LEVEL)); + + public static final boolean MODULE_FRAMEWORK_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MODULE_FRAMEWORK_ENABLED)); + + public static final String[] MODULE_FRAMEWORK_INITIAL_BUNDLES = PropsUtil.getArray(PropsKeys.MODULE_FRAMEWORK_INITIAL_BUNDLES); + + public static final String MODULE_FRAMEWORK_PORTAL_DIR = PropsUtil.get(PropsKeys.MODULE_FRAMEWORK_PORTAL_DIR); + + public static final boolean MODULE_FRAMEWORK_REGISTER_LIFERAY_SERVICES = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MODULE_FRAMEWORK_REGISTER_LIFERAY_SERVICES)); + + public static final int MODULE_FRAMEWORK_RUNTIME_START_LEVEL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.MODULE_FRAMEWORK_RUNTIME_START_LEVEL)); + + public static final String[] MODULE_FRAMEWORK_SERVICES_IGNORED_INTERFACES = PropsUtil.getArray(PropsKeys.MODULE_FRAMEWORK_SERVICES_IGNORED_INTERFACES); + + public static final String MODULE_FRAMEWORK_STATE_DIR = PropsUtil.get(PropsKeys.MODULE_FRAMEWORK_STATE_DIR); + + public static final String[] MODULE_FRAMEWORK_SYSTEM_BUNDLE_IGNORED_FRAGMENTS = PropsUtil.getArray(PropsKeys.MODULE_FRAMEWORK_SYSTEM_BUNDLE_IGNORED_FRAGMENTS); + + public static final String[] MODULE_FRAMEWORK_SYSTEM_PACKAGES_EXTRA = PropsUtil.getArray(PropsKeys.MODULE_FRAMEWORK_SYSTEM_PACKAGES_EXTRA); + + public static boolean MONITORING_PORTAL_REQUEST = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MONITORING_PORTAL_REQUEST)); + + public static boolean MONITORING_PORTLET_ACTION_REQUEST = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MONITORING_PORTLET_ACTION_REQUEST)); + + public static boolean MONITORING_PORTLET_EVENT_REQUEST = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MONITORING_PORTLET_EVENT_REQUEST)); + + public static boolean MONITORING_PORTLET_RENDER_REQUEST = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MONITORING_PORTLET_RENDER_REQUEST)); + + public static boolean MONITORING_PORTLET_RESOURCE_REQUEST = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MONITORING_PORTLET_RESOURCE_REQUEST)); + + public static final boolean MONITORING_SHOW_PER_REQUEST_DATA_SAMPLE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MONITORING_SHOW_PER_REQUEST_DATA_SAMPLE)); + + public static final String[] MY_SITES_DIRECTORY_SITE_EXCLUDES = PropsUtil.getArray(PropsKeys.MY_SITES_DIRECTORY_SITE_EXCLUDES); + + public static final String MY_SITES_DISPLAY_STYLE = PropsUtil.get(PropsKeys.MY_SITES_DISPLAY_STYLE); + + public static final int MY_SITES_MAX_ELEMENTS = GetterUtil.getInteger(PropsUtil.get(PropsKeys.MY_SITES_MAX_ELEMENTS)); + + public static boolean MY_SITES_SHOW_PRIVATE_SITES_WITH_NO_LAYOUTS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MY_SITES_SHOW_PRIVATE_SITES_WITH_NO_LAYOUTS)); + + public static boolean MY_SITES_SHOW_PUBLIC_SITES_WITH_NO_LAYOUTS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MY_SITES_SHOW_PUBLIC_SITES_WITH_NO_LAYOUTS)); + + public static boolean MY_SITES_SHOW_USER_PRIVATE_SITES_WITH_NO_LAYOUTS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MY_SITES_SHOW_USER_PRIVATE_SITES_WITH_NO_LAYOUTS)); + + public static boolean MY_SITES_SHOW_USER_PUBLIC_SITES_WITH_NO_LAYOUTS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.MY_SITES_SHOW_USER_PUBLIC_SITES_WITH_NO_LAYOUTS)); + + public static final String NAVIGATION_DISPLAY_STYLE_DEFAULT = PropsUtil.get(PropsKeys.NAVIGATION_DISPLAY_STYLE_DEFAULT); + + public static final String[] NAVIGATION_DISPLAY_STYLE_OPTIONS = PropsUtil.getArray(PropsKeys.NAVIGATION_DISPLAY_STYLE_OPTIONS); + + public static final String NESTED_PORTLETS_LAYOUT_TEMPLATE_DEFAULT = PropsUtil.get(PropsKeys.NESTED_PORTLETS_LAYOUT_TEMPLATE_DEFAULT); + + public static final String NET_SF_EHCACHE_CONFIGURATION_RESOURCE_NAME = PropsUtil.get(PropsKeys.NET_SF_EHCACHE_CONFIGURATION_RESOURCE_NAME); + + public static final String NETVIBES_SERVLET_MAPPING = PropsUtil.get(PropsKeys.NETVIBES_SERVLET_MAPPING); + + public static final int NOTIFICATIONS_MAX_EVENTS = GetterUtil.getInteger(PropsUtil.get(PropsKeys.NOTIFICATIONS_MAX_EVENTS)); + + public static final boolean NTLM_AUTH_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.NTLM_AUTH_ENABLED)); + + public static final String NTLM_AUTH_NEGOTIATE_FLAGS = GetterUtil.getString(PropsUtil.get(PropsKeys.NTLM_AUTH_NEGOTIATE_FLAGS)); + + public static final String NTLM_DOMAIN = PropsUtil.get(PropsKeys.NTLM_DOMAIN); + + public static final String NTLM_DOMAIN_CONTROLLER = PropsUtil.get(PropsKeys.NTLM_DOMAIN_CONTROLLER); + + public static final String NTLM_DOMAIN_CONTROLLER_NAME = PropsUtil.get(PropsKeys.NTLM_DOMAIN_CONTROLLER_NAME); + + public static final String NTLM_SERVICE_ACCOUNT = PropsUtil.get(PropsKeys.NTLM_SERVICE_ACCOUNT); + + public static final String NTLM_SERVICE_PASSWORD = PropsUtil.get(PropsKeys.NTLM_SERVICE_PASSWORD); + + public static final long[] OMNIADMIN_USERS = StringUtil.split(PropsUtil.get(PropsKeys.OMNIADMIN_USERS), 0L); + + public static final boolean OPEN_ID_AUTH_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.OPEN_ID_AUTH_ENABLED)); + + public static final String[] OPEN_ID_PROVIDERS = PropsUtil.getArray(PropsKeys.OPEN_ID_PROVIDERS); + + public static final boolean OPEN_SSO_AUTH_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.OPEN_SSO_AUTH_ENABLED)); + + public static final String OPEN_SSO_EMAIL_ADDRESS_ATTR = PropsUtil.get(PropsKeys.OPEN_SSO_EMAIL_ADDRESS_ATTR); + + public static final String OPEN_SSO_FIRST_NAME_ATTR = PropsUtil.get(PropsKeys.OPEN_SSO_FIRST_NAME_ATTR); + + public static final String OPEN_SSO_LAST_NAME_ATTR = PropsUtil.get(PropsKeys.OPEN_SSO_LAST_NAME_ATTR); + + public static final boolean OPEN_SSO_LDAP_IMPORT_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.OPEN_SSO_LDAP_IMPORT_ENABLED)); + + public static final String OPEN_SSO_LOGIN_URL = PropsUtil.get(PropsKeys.OPEN_SSO_LOGIN_URL); + + public static final boolean OPEN_SSO_LOGOUT_ON_SESSION_EXPIRATION = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.OPEN_SSO_LOGOUT_ON_SESSION_EXPIRATION)); + + public static final String OPEN_SSO_LOGOUT_URL = PropsUtil.get(PropsKeys.OPEN_SSO_LOGOUT_URL); + + public static final String OPEN_SSO_SCREEN_NAME_ATTR = PropsUtil.get(PropsKeys.OPEN_SSO_SCREEN_NAME_ATTR); + + public static final String OPEN_SSO_SERVICE_URL = PropsUtil.get(PropsKeys.OPEN_SSO_SERVICE_URL); + + public static final boolean OPENOFFICE_CACHE_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.OPENOFFICE_CACHE_ENABLED)); + + public static final boolean OPENOFFICE_SERVER_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.OPENOFFICE_SERVER_ENABLED)); + + public static final String OPENOFFICE_SERVER_HOST = PropsUtil.get(PropsKeys.OPENOFFICE_SERVER_HOST); + + public static final int OPENOFFICE_SERVER_PORT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.OPENOFFICE_SERVER_PORT)); + + public static final boolean ORGANIZATIONS_ASSIGNMENT_STRICT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ORGANIZATIONS_ASSIGNMENT_STRICT)); + + public static String[] ORGANIZATIONS_FORM_ADD_IDENTIFICATION = PropsUtil.getArray(PropsKeys.ORGANIZATIONS_FORM_ADD_IDENTIFICATION); + + public static String[] ORGANIZATIONS_FORM_ADD_MAIN = PropsUtil.getArray(PropsKeys.ORGANIZATIONS_FORM_ADD_MAIN); + + public static String[] ORGANIZATIONS_FORM_ADD_MISCELLANEOUS = PropsUtil.getArray(PropsKeys.ORGANIZATIONS_FORM_ADD_MISCELLANEOUS); + + public static final boolean ORGANIZATIONS_INDEXER_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ORGANIZATIONS_INDEXER_ENABLED)); + + public static final boolean ORGANIZATIONS_MEMBERSHIP_STRICT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ORGANIZATIONS_MEMBERSHIP_STRICT)); + + public static final boolean ORGANIZATIONS_SEARCH_WITH_INDEX = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ORGANIZATIONS_SEARCH_WITH_INDEX)); + + public static String[] ORGANIZATIONS_TYPES = PropsUtil.getArray(PropsKeys.ORGANIZATIONS_TYPES); + + public static final boolean PASSWORDS_DEFAULT_POLICY_ALLOW_DICTIONARY_WORDS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_ALLOW_DICTIONARY_WORDS)); + + public static final boolean PASSWORDS_DEFAULT_POLICY_CHANGE_REQUIRED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_CHANGE_REQUIRED)); + + public static final boolean PASSWORDS_DEFAULT_POLICY_CHANGEABLE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_CHANGEABLE)); + + public static final boolean PASSWORDS_DEFAULT_POLICY_CHECK_SYNTAX = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_CHECK_SYNTAX)); + + public static final boolean PASSWORDS_DEFAULT_POLICY_EXPIREABLE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_EXPIREABLE)); + + public static final int PASSWORDS_DEFAULT_POLICY_GRACE_LIMIT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_GRACE_LIMIT)); + + public static final boolean PASSWORDS_DEFAULT_POLICY_HISTORY = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_HISTORY)); + + public static final int PASSWORDS_DEFAULT_POLICY_HISTORY_COUNT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_HISTORY_COUNT)); + + public static final boolean PASSWORDS_DEFAULT_POLICY_LOCKOUT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_LOCKOUT)); + + public static final long PASSWORDS_DEFAULT_POLICY_LOCKOUT_DURATION = GetterUtil.getLong(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_LOCKOUT_DURATION)); + + public static final long PASSWORDS_DEFAULT_POLICY_MAX_AGE = GetterUtil.getLong(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_MAX_AGE)); + + public static final int PASSWORDS_DEFAULT_POLICY_MAX_FAILURE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_MAX_FAILURE)); + + public static final long PASSWORDS_DEFAULT_POLICY_MIN_AGE = GetterUtil.getLong(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_MIN_AGE)); + + public static final int PASSWORDS_DEFAULT_POLICY_MIN_ALPHANUMERIC = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_MIN_ALPHANUMERIC)); + + public static final int PASSWORDS_DEFAULT_POLICY_MIN_LENGTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_MIN_LENGTH)); + + public static final int PASSWORDS_DEFAULT_POLICY_MIN_LOWERCASE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_MIN_LOWERCASE)); + + public static final int PASSWORDS_DEFAULT_POLICY_MIN_NUMBERS = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_MIN_NUMBERS)); + + public static final int PASSWORDS_DEFAULT_POLICY_MIN_SYMBOLS = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_MIN_SYMBOLS)); + + public static final int PASSWORDS_DEFAULT_POLICY_MIN_UPPERCASE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_MIN_UPPERCASE)); + + public static final String PASSWORDS_DEFAULT_POLICY_NAME = PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_NAME); + + public static final String PASSWORDS_DEFAULT_POLICY_REGEX = PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_REGEX); + + public static final long PASSWORDS_DEFAULT_POLICY_RESET_FAILURE_COUNT = GetterUtil.getLong(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_RESET_FAILURE_COUNT)); + + public static final long PASSWORDS_DEFAULT_POLICY_RESET_TICKET_MAX_AGE = GetterUtil.getLong(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_RESET_TICKET_MAX_AGE)); + + public static final long PASSWORDS_DEFAULT_POLICY_WARNING_TIME = GetterUtil.getLong(PropsUtil.get(PropsKeys.PASSWORDS_DEFAULT_POLICY_WARNING_TIME)); + + public static final String PASSWORDS_DIGEST_ENCODING = PropsUtil.get(PropsKeys.PASSWORDS_DIGEST_ENCODING); + + public static String PASSWORDS_ENCRYPTION_ALGORITHM_LEGACY = GetterUtil.getString(PropsUtil.get(PropsKeys.PASSWORDS_ENCRYPTION_ALGORITHM_LEGACY)); + + public static final String PASSWORDS_PASSWORDPOLICYTOOLKIT_CHARSET_LOWERCASE = PropsUtil.get(PropsKeys.PASSWORDS_PASSWORDPOLICYTOOLKIT_CHARSET_LOWERCASE); + + public static final String PASSWORDS_PASSWORDPOLICYTOOLKIT_CHARSET_NUMBERS = PropsUtil.get(PropsKeys.PASSWORDS_PASSWORDPOLICYTOOLKIT_CHARSET_NUMBERS); + + public static final String PASSWORDS_PASSWORDPOLICYTOOLKIT_CHARSET_SYMBOLS = PropsUtil.get(PropsKeys.PASSWORDS_PASSWORDPOLICYTOOLKIT_CHARSET_SYMBOLS); + + public static final String PASSWORDS_PASSWORDPOLICYTOOLKIT_CHARSET_UPPERCASE = PropsUtil.get(PropsKeys.PASSWORDS_PASSWORDPOLICYTOOLKIT_CHARSET_UPPERCASE); + + public static String PASSWORDS_PASSWORDPOLICYTOOLKIT_GENERATOR = PropsUtil.get(PropsKeys.PASSWORDS_PASSWORDPOLICYTOOLKIT_GENERATOR); + + public static String PASSWORDS_PASSWORDPOLICYTOOLKIT_STATIC = PropsUtil.get(PropsKeys.PASSWORDS_PASSWORDPOLICYTOOLKIT_STATIC); + + public static final String PASSWORDS_TOOLKIT = PropsUtil.get(PropsKeys.PASSWORDS_TOOLKIT); + + public static final boolean PERMISSIONS_CHECK_GUEST_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PERMISSIONS_CHECK_GUEST_ENABLED)); + + public static final String PERMISSIONS_CHECKER = PropsUtil.get(PropsKeys.PERMISSIONS_CHECKER); + + public static boolean PERMISSIONS_CUSTOM_ATTRIBUTE_READ_CHECK_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PERMISSIONS_CUSTOM_ATTRIBUTE_READ_CHECK_BY_DEFAULT)); + + public static boolean PERMISSIONS_CUSTOM_ATTRIBUTE_WRITE_CHECK_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PERMISSIONS_CUSTOM_ATTRIBUTE_WRITE_CHECK_BY_DEFAULT)); + + public static final boolean PERMISSIONS_INLINE_SQL_CHECK_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PERMISSIONS_INLINE_SQL_CHECK_ENABLED)); + + public static final int PERMISSIONS_INLINE_SQL_RESOURCE_BLOCK_QUERY_THRESHHOLD = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PERMISSIONS_INLINE_SQL_RESOURCE_BLOCK_QUERY_THRESHHOLD)); + + public static final String PERMISSIONS_LIST_FILTER = PropsUtil.get(PropsKeys.PERMISSIONS_LIST_FILTER); + + public static final boolean PERMISSIONS_OBJECT_BLOCKING_CACHE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PERMISSIONS_OBJECT_BLOCKING_CACHE)); + + public static final boolean PERMISSIONS_PROPAGATION_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PERMISSIONS_PROPAGATION_ENABLED)); + + public static final int PERMISSIONS_ROLE_RESOURCE_PERMISSION_QUERY_THRESHOLD = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PERMISSIONS_ROLE_RESOURCE_PERMISSION_QUERY_THRESHOLD)); + + public static final int PERMISSIONS_THREAD_LOCAL_CACHE_MAX_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PERMISSIONS_THREAD_LOCAL_CACHE_MAX_SIZE)); + + public static boolean PERMISSIONS_VIEW_DYNAMIC_INHERITANCE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PERMISSIONS_VIEW_DYNAMIC_INHERITANCE)); + + public static final String PERSISTENCE_PROVIDER = GetterUtil.getString(PropsUtil.get(PropsKeys.PERSISTENCE_PROVIDER)); + + public static final String PHONE_NUMBER_FORMAT_IMPL = GetterUtil.getString(PropsUtil.get(PropsKeys.PHONE_NUMBER_FORMAT_IMPL)); + + public static String PHONE_NUMBER_FORMAT_INTERNATIONAL_REGEXP = GetterUtil.getString(PropsUtil.get(PropsKeys.PHONE_NUMBER_FORMAT_INTERNATIONAL_REGEXP)); + + public static String PHONE_NUMBER_FORMAT_USA_REGEXP = GetterUtil.getString(PropsUtil.get(PropsKeys.PHONE_NUMBER_FORMAT_USA_REGEXP)); + + public static final boolean PLUGIN_NOTIFICATIONS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PLUGIN_NOTIFICATIONS_ENABLED)); + + public static final String[] PLUGIN_NOTIFICATIONS_PACKAGES_IGNORED = StringUtil.splitLines(PropsUtil.get(PropsKeys.PLUGIN_NOTIFICATIONS_PACKAGES_IGNORED)); + + public static final String[] PLUGIN_REPOSITORIES_TRUSTED = StringUtil.splitLines(PropsUtil.get(PropsKeys.PLUGIN_REPOSITORIES_TRUSTED)); + + public static final String[] PLUGIN_REPOSITORIES_UNTRUSTED = StringUtil.splitLines(PropsUtil.get(PropsKeys.PLUGIN_REPOSITORIES_UNTRUSTED)); + + public static final String[] PLUGIN_TYPES = PropsUtil.getArray(PropsKeys.PLUGIN_TYPES); + + public static final long POLLER_NOTIFICATIONS_TIMEOUT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.POLLER_NOTIFICATIONS_TIMEOUT)); + + public static final long POLLER_REQUEST_TIMEOUT = GetterUtil.getLong(PropsUtil.get(PropsKeys.POLLER_REQUEST_TIMEOUT)); + + public static final boolean POLLS_PUBLISH_TO_LIVE_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.POLLS_PUBLISH_TO_LIVE_BY_DEFAULT)); + + public static final boolean POP_SERVER_NOTIFICATIONS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.POP_SERVER_NOTIFICATIONS_ENABLED)); + + public static final int POP_SERVER_NOTIFICATIONS_INTERVAL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.POP_SERVER_NOTIFICATIONS_INTERVAL)); + + public static final String POP_SERVER_SUBDOMAIN = PropsUtil.get(PropsKeys.POP_SERVER_SUBDOMAIN); + + public static final boolean PORTAL_IMPERSONATION_ENABLE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTAL_IMPERSONATION_ENABLE)); + + public static final int PORTAL_INSTANCE_HTTP_PORT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PORTAL_INSTANCE_HTTP_PORT)); + + public static final int PORTAL_INSTANCE_HTTPS_PORT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PORTAL_INSTANCE_HTTPS_PORT)); + + public static final String PORTAL_INSTANCE_PROTOCOL = PropsUtil.get(PropsKeys.PORTAL_INSTANCE_PROTOCOL); + + public static final String PORTAL_JAAS_AUTH_TYPE = GetterUtil.getString(PropsUtil.get(PropsKeys.PORTAL_JAAS_AUTH_TYPE)); + + public static final boolean PORTAL_JAAS_ENABLE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTAL_JAAS_ENABLE)); + + public static final String PORTAL_JAAS_IMPL = PropsUtil.get(PropsKeys.PORTAL_JAAS_IMPL); + + public static final boolean PORTAL_JAAS_PLAIN_PASSWORD = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTAL_JAAS_PLAIN_PASSWORD)); + + public static final boolean PORTAL_JAAS_STRICT_PASSWORD = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTAL_JAAS_STRICT_PASSWORD)); + + public static final String PORTAL_PROXY_PATH = PropsUtil.get(PropsKeys.PORTAL_PROXY_PATH); + + public static final boolean PORTAL_RESILIENCY_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTAL_RESILIENCY_ENABLED)); + + public static final boolean PORTAL_RESILIENCY_PORTLET_SHOW_FOOTER = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTAL_RESILIENCY_PORTLET_SHOW_FOOTER)); + + public static final int PORTAL_RESILIENCY_SPI_AGENT_CLIENT_POOL_MAX_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PORTAL_RESILIENCY_SPI_AGENT_CLIENT_POOL_MAX_SIZE)); + + public static final String[] PORTAL_SECURITY_MANAGER_PRELOAD_CLASSLOADER_CLASSES = PropsUtil.getArray(PropsKeys.PORTAL_SECURITY_MANAGER_PRELOAD_CLASSLOADER_CLASSES); + + public static final String PORTAL_SECURITY_MANAGER_STRATEGY = PropsUtil.get(PropsKeys.PORTAL_SECURITY_MANAGER_STRATEGY); + + public static boolean PORTLET_ADD_DEFAULT_RESOURCE_CHECK_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTLET_ADD_DEFAULT_RESOURCE_CHECK_ENABLED)); + + public static String[] PORTLET_ADD_DEFAULT_RESOURCE_CHECK_WHITELIST = PropsUtil.getArray(PropsKeys.PORTLET_ADD_DEFAULT_RESOURCE_CHECK_WHITELIST); + + public static String[] PORTLET_ADD_DEFAULT_RESOURCE_CHECK_WHITELIST_ACTIONS = PropsUtil.getArray(PropsKeys.PORTLET_ADD_DEFAULT_RESOURCE_CHECK_WHITELIST_ACTIONS); + + public static final boolean PORTLET_CONTAINER_RESTRICT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTLET_CONTAINER_RESTRICT)); + + public static final String PORTLET_CROSS_LAYOUT_INVOCATION_MODE = PropsUtil.get(PropsKeys.PORTLET_CROSS_LAYOUT_INVOCATION_MODE); + + public static final boolean PORTLET_CSS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTLET_CSS_ENABLED)); + + public static final String PORTLET_EVENT_DISTRIBUTION = PropsUtil.get(PropsKeys.PORTLET_EVENT_DISTRIBUTION); + + public static final boolean PORTLET_EVENT_DISTRIBUTION_LAYOUT = StringUtil.equalsIgnoreCase(PORTLET_EVENT_DISTRIBUTION, "layout"); + + public static final boolean PORTLET_EVENT_DISTRIBUTION_LAYOUT_SET = !PORTLET_EVENT_DISTRIBUTION_LAYOUT; + + public static final String[] PORTLET_FILTERS_SYSTEM = PropsUtil.getArray(PropsKeys.PORTLET_FILTERS_SYSTEM); + + public static String[] PORTLET_INTERRUPTED_REQUEST_WHITELIST = PropsUtil.getArray(PropsKeys.PORTLET_INTERRUPTED_REQUEST_WHITELIST); + + public static String[] PORTLET_INTERRUPTED_REQUEST_WHITELIST_ACTIONS = PropsUtil.getArray(PropsKeys.PORTLET_INTERRUPTED_REQUEST_WHITELIST_ACTIONS); + + public static final int PORTLET_PREFERENCES_CACHE_KEY_THRESHOLD_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.PORTLET_PREFERENCES_CACHE_KEY_THRESHOLD_SIZE)); + + public static final boolean PORTLET_PREFERENCES_STRICT_STORE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTLET_PREFERENCES_STRICT_STORE)); + + public static final String PORTLET_PUBLIC_RENDER_PARAMETER_DISTRIBUTION = PropsUtil.get(PropsKeys.PORTLET_PUBLIC_RENDER_PARAMETER_DISTRIBUTION); + + public static final boolean PORTLET_PUBLIC_RENDER_PARAMETER_DISTRIBUTION_LAYOUT = StringUtil.equalsIgnoreCase(PORTLET_PUBLIC_RENDER_PARAMETER_DISTRIBUTION, "layout"); + + public static final boolean PORTLET_PUBLIC_RENDER_PARAMETER_DISTRIBUTION_LAYOUT_SET = !PORTLET_PUBLIC_RENDER_PARAMETER_DISTRIBUTION_LAYOUT; + + public static final String PORTLET_RESOURCE_ID_BANNED_PATHS_REGEXP = PropsUtil.get(PropsKeys.PORTLET_RESOURCE_ID_BANNED_PATHS_REGEXP); + + public static final boolean PORTLET_URL_ANCHOR_ENABLE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTLET_URL_ANCHOR_ENABLE)); + + public static final boolean PORTLET_URL_APPEND_PARAMETERS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTLET_URL_APPEND_PARAMETERS)); + + public static final boolean PORTLET_URL_ESCAPE_XML = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTLET_URL_ESCAPE_XML)); + + public static final boolean PORTLET_URL_GENERATE_BY_PATH_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTLET_URL_GENERATE_BY_PATH_ENABLED)); + + public static final String PORTLET_VIRTUAL_PATH = PropsUtil.get(PropsKeys.PORTLET_VIRTUAL_PATH); + + public static final boolean PORTLET_XML_VALIDATE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PORTLET_XML_VALIDATE)); + + public static final boolean PREFERENCE_VALIDATE_ON_STARTUP = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.PREFERENCE_VALIDATE_ON_STARTUP)); + + public static final int RATINGS_DEFAULT_NUMBER_OF_STARS = GetterUtil.getInteger(PropsUtil.get(PropsKeys.RATINGS_DEFAULT_NUMBER_OF_STARS)); + + public static final int RATINGS_MAX_SCORE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.RATINGS_MAX_SCORE)); + + public static final int RATINGS_MIN_SCORE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.RATINGS_MIN_SCORE)); + + public static final int RECENT_CONTENT_MAX_DISPLAY_ITEMS = GetterUtil.getInteger(PropsUtil.get(PropsKeys.RECENT_CONTENT_MAX_DISPLAY_ITEMS)); + + public static final String[] REDIRECT_URL_DOMAINS_ALLOWED = PropsUtil.getArray(PropsKeys.REDIRECT_URL_DOMAINS_ALLOWED); + + public static final String[] REDIRECT_URL_IPS_ALLOWED = PropsUtil.getArray(PropsKeys.REDIRECT_URL_IPS_ALLOWED); + + public static final String REDIRECT_URL_SECURITY_MODE = PropsUtil.get(PropsKeys.REDIRECT_URL_SECURITY_MODE); + + public static final boolean REQUEST_HEADER_AUTH_IMPORT_FROM_LDAP = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.REQUEST_HEADER_AUTH_IMPORT_FROM_LDAP)); + + public static final String[] REQUEST_HEADER_IGNORE_INIT_PARAMS = PropsUtil.getArray(PropsKeys.REQUEST_HEADER_IGNORE_INIT_PARAMS); + + public static final String[] REQUEST_SHARED_ATTRIBUTES = PropsUtil.getArray(PropsKeys.REQUEST_SHARED_ATTRIBUTES); + + public static String[] RESOURCE_ACTIONS_CONFIGS = PropsUtil.getArray(PropsKeys.RESOURCE_ACTIONS_CONFIGS); + + public static final boolean RESOURCE_ACTIONS_READ_PORTLET_RESOURCES = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.RESOURCE_ACTIONS_READ_PORTLET_RESOURCES)); + + public static final String RESOURCE_REPOSITORIES_ROOT = PropsUtil.get(PropsKeys.RESOURCE_REPOSITORIES_ROOT); + + public static final String[] REST_PROXY_URL_PREFIXES_ALLOWED = PropsUtil.getArray(PropsKeys.REST_PROXY_URL_PREFIXES_ALLOWED); + + public static final String ROBOTS_TXT_WITH_SITEMAP = PropsUtil.get(PropsKeys.ROBOTS_TXT_WITH_SITEMAP); + + public static final String ROBOTS_TXT_WITHOUT_SITEMAP = PropsUtil.get(PropsKeys.ROBOTS_TXT_WITHOUT_SITEMAP); + + public static boolean ROLES_NAME_ALLOW_NUMERIC = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.ROLES_NAME_ALLOW_NUMERIC)); + + public static final String[] ROLES_ORGANIZATION_SUBTYPES = PropsUtil.getArray(PropsKeys.ROLES_ORGANIZATION_SUBTYPES); + + public static final String[] ROLES_REGULAR_SUBTYPES = PropsUtil.getArray(PropsKeys.ROLES_REGULAR_SUBTYPES); + + public static final String[] ROLES_SITE_SUBTYPES = PropsUtil.getArray(PropsKeys.ROLES_SITE_SUBTYPES); + + public static final int RSS_CONNECTION_TIMEOUT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.RSS_CONNECTION_TIMEOUT)); + + public static String RSS_FEED_DISPLAY_STYLE_DEFAULT = PropsUtil.get(PropsKeys.RSS_FEED_DISPLAY_STYLE_DEFAULT); + + public static long RSS_FEED_REFRESH_TIME = GetterUtil.getLong(PropsUtil.get(PropsKeys.RSS_FEED_REFRESH_TIME)); + + public static String RSS_FEED_TYPE_DEFAULT = PropsUtil.get(PropsKeys.RSS_FEED_TYPE_DEFAULT); + + public static String[] RSS_FEED_TYPES = PropsUtil.getArray(PropsKeys.RSS_FEED_TYPES); + + public static boolean RSS_FEEDS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.RSS_FEEDS_ENABLED)); + + public static final boolean RSS_PUBLISH_TO_LIVE_BY_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.RSS_PUBLISH_TO_LIVE_BY_DEFAULT)); + + public static String[] RTL_CSS_EXCLUDED_PATHS_REGEXP = PropsUtil.getArray(PropsKeys.RTL_CSS_EXCLUDED_PATHS_REGEXP); + + public static final String SANDBOX_DEPLOY_DIR = PropsUtil.get(PropsKeys.SANDBOX_DEPLOY_DIR); + + public static final boolean SANDBOX_DEPLOY_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SANDBOX_DEPLOY_ENABLED)); + + public static final long SANDBOX_DEPLOY_INTERVAL = GetterUtil.getLong(PropsUtil.get(PropsKeys.SANDBOX_DEPLOY_INTERVAL)); + + public static String[] SANITIZER_IMPL = PropsUtil.getArray(PropsKeys.SANITIZER_IMPL); + + public static final boolean SC_PRODUCT_COMMENTS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SC_PRODUCT_COMMENTS_ENABLED)); + + public static final boolean SCHEDULER_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SCHEDULER_ENABLED)); + + public static final String[] SCRIPTING_FORBIDDEN_CLASSES = PropsUtil.getArray(PropsKeys.SCRIPTING_FORBIDDEN_CLASSES); + + public static final String SCRIPTING_JRUBY_COMPILE_MODE = PropsUtil.get(PropsKeys.SCRIPTING_JRUBY_COMPILE_MODE); + + public static final int SCRIPTING_JRUBY_COMPILE_THRESHOLD = GetterUtil.getInteger(PropsUtil.get(PropsKeys.SCRIPTING_JRUBY_COMPILE_THRESHOLD), 50); + + public static final String[] SCRIPTING_JRUBY_LOAD_PATHS = PropsUtil.getArray(PropsKeys.SCRIPTING_JRUBY_LOAD_PATHS); + + public static final int SEARCH_CONTAINER_PAGE_DEFAULT_DELTA = GetterUtil.getInteger(PropsUtil.get(PropsKeys.SEARCH_CONTAINER_PAGE_DEFAULT_DELTA), 20); + + public static final int[] SEARCH_CONTAINER_PAGE_DELTA_VALUES = GetterUtil.getIntegerValues(PropsUtil.getArray(PropsKeys.SEARCH_CONTAINER_PAGE_DELTA_VALUES)); + + public static final int SEARCH_CONTAINER_PAGE_ITERATOR_MAX_PAGES = GetterUtil.getInteger(PropsUtil.get(PropsKeys.SEARCH_CONTAINER_PAGE_ITERATOR_MAX_PAGES), 25); + + public static final int[] SEARCH_CONTAINER_PAGE_ITERATOR_PAGE_VALUES = GetterUtil.getIntegerValues(PropsUtil.getArray(PropsKeys.SEARCH_CONTAINER_PAGE_ITERATOR_PAGE_VALUES)); + + public static final boolean SEARCH_CONTAINER_SHOW_PAGINATION_BOTTOM = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SEARCH_CONTAINER_SHOW_PAGINATION_BOTTOM)); + + public static final boolean SEARCH_CONTAINER_SHOW_PAGINATION_TOP = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SEARCH_CONTAINER_SHOW_PAGINATION_TOP)); + + public static final String SEARCH_FACET_CONFIGURATION = PropsUtil.get(PropsKeys.SEARCH_FACET_CONFIGURATION); + + public static final String[] SERVICE_BUILDER_SERVICE_READ_ONLY_PREFIXES = PropsUtil.getArray(PropsKeys.SERVICE_BUILDER_SERVICE_READ_ONLY_PREFIXES); + + public static final String[] SERVLET_SERVICE_EVENTS_POST = PropsUtil.getArray(PropsKeys.SERVLET_SERVICE_EVENTS_POST); + + public static final String[] SERVLET_SERVICE_EVENTS_PRE = PropsUtil.getArray(PropsKeys.SERVLET_SERVICE_EVENTS_PRE); + + public static final String SERVLET_SERVICE_EVENTS_PRE_ERROR_PAGE = PropsUtil.get(PropsKeys.SERVLET_SERVICE_EVENTS_PRE_ERROR_PAGE); + + public static final String[] SERVLET_SESSION_CREATE_EVENTS = PropsUtil.getArray(PropsKeys.SERVLET_SESSION_CREATE_EVENTS); + + public static final String[] SERVLET_SESSION_DESTROY_EVENTS = PropsUtil.getArray(PropsKeys.SERVLET_SESSION_DESTROY_EVENTS); + + public static final String SESSION_COOKIE_DOMAIN = PropsUtil.get(PropsKeys.SESSION_COOKIE_DOMAIN); + + public static final boolean SESSION_COOKIE_USE_FULL_HOSTNAME = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SESSION_COOKIE_USE_FULL_HOSTNAME)); + + public static final boolean SESSION_DISABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SESSION_DISABLED)); + + public static final boolean SESSION_ENABLE_PERSISTENT_COOKIES = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SESSION_ENABLE_PERSISTENT_COOKIES)); + + public static final boolean SESSION_ENABLE_PHISHING_PROTECTION = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SESSION_ENABLE_PHISHING_PROTECTION)); + + public static final boolean SESSION_ENABLE_URL_WITH_SESSION_ID = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SESSION_ENABLE_URL_WITH_SESSION_ID)); + + public static final int SESSION_MAX_ALLOWED = GetterUtil.getInteger(PropsUtil.get(PropsKeys.SESSION_MAX_ALLOWED)); + + public static String[] SESSION_PHISHING_PROTECTED_ATTRIBUTES = PropsUtil.getArray(PropsKeys.SESSION_PHISHING_PROTECTED_ATTRIBUTES); + + public static final String[] SESSION_SHARED_ATTRIBUTES = PropsUtil.getArray(PropsKeys.SESSION_SHARED_ATTRIBUTES); + + public static final String[] SESSION_SHARED_ATTRIBUTES_EXCLUDES = PropsUtil.getArray(PropsKeys.SESSION_SHARED_ATTRIBUTES_EXCLUDES); + + public static boolean SESSION_STORE_PASSWORD = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SESSION_STORE_PASSWORD)); + + public static final boolean SESSION_TEST_COOKIE_SUPPORT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SESSION_TEST_COOKIE_SUPPORT)); + + public static int SESSION_TIMEOUT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.SESSION_TIMEOUT)); + + public static final boolean SESSION_TIMEOUT_AUTO_EXTEND = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SESSION_TIMEOUT_AUTO_EXTEND)); + + public static final boolean SESSION_TIMEOUT_REDIRECT_ON_EXPIRE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SESSION_TIMEOUT_REDIRECT_ON_EXPIRE)); + + public static final int SESSION_TIMEOUT_WARNING = GetterUtil.getInteger(PropsUtil.get(PropsKeys.SESSION_TIMEOUT_WARNING)); + + public static final boolean SESSION_TRACKER_FRIENDLY_PATHS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SESSION_TRACKER_FRIENDLY_PATHS_ENABLED)); + + public static final boolean SESSION_TRACKER_MEMORY_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SESSION_TRACKER_MEMORY_ENABLED)); + + public static final boolean SESSION_TRACKER_PERSISTENCE_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SESSION_TRACKER_PERSISTENCE_ENABLED)); + + public static final String[] SETUP_DATABASE_TYPES = PropsUtil.getArray(PropsKeys.SETUP_DATABASE_TYPES); + + public static final boolean SETUP_WIZARD_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SETUP_WIZARD_ENABLED)); + + public static final String SHARD_DEFAULT_NAME = PropsUtil.get(PropsKeys.SHARD_DEFAULT_NAME); + + public static final String SHARD_SELECTOR = PropsUtil.get(PropsKeys.SHARD_SELECTOR); + + public static final String SHOPPING_EMAIL_FROM_ADDRESS = PropsUtil.get(PropsKeys.SHOPPING_EMAIL_FROM_ADDRESS); + + public static final String SHOPPING_EMAIL_FROM_NAME = PropsUtil.get(PropsKeys.SHOPPING_EMAIL_FROM_NAME); + + public static final boolean SHOPPING_ORDER_COMMENTS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SHOPPING_ORDER_COMMENTS_ENABLED)); + + public static final String SITEMAP_DISPLAY_TEMPLATES_CONFIG = PropsUtil.get(PropsKeys.SITEMAP_DISPLAY_TEMPLATES_CONFIG); + + public static final boolean SITEMINDER_AUTH_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SITEMINDER_AUTH_ENABLED)); + + public static final boolean SITEMINDER_IMPORT_FROM_LDAP = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SITEMINDER_IMPORT_FROM_LDAP)); + + public static final String SITEMINDER_USER_HEADER = PropsUtil.get(PropsKeys.SITEMINDER_USER_HEADER); + + public static final boolean SITES_CONTROL_PANEL_MEMBERS_VISIBLE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SITES_CONTROL_PANEL_MEMBERS_VISIBLE)); + + public static String[] SITES_FORM_ADD_ADVANCED = PropsUtil.getArray(PropsKeys.SITES_FORM_ADD_ADVANCED); + + public static String[] SITES_FORM_ADD_MAIN = PropsUtil.getArray(PropsKeys.SITES_FORM_ADD_MAIN); + + public static String[] SITES_FORM_ADD_MISCELLANEOUS = PropsUtil.getArray(PropsKeys.SITES_FORM_ADD_MISCELLANEOUS); + + public static String[] SITES_FORM_ADD_SEO = PropsUtil.getArray(PropsKeys.SITES_FORM_ADD_SEO); + + public static String[] SITES_FORM_UPDATE_ADVANCED = PropsUtil.getArray(PropsKeys.SITES_FORM_UPDATE_ADVANCED); + + public static String[] SITES_FORM_UPDATE_MAIN = PropsUtil.getArray(PropsKeys.SITES_FORM_UPDATE_MAIN); + + public static String[] SITES_FORM_UPDATE_MISCELLANEOUS = PropsUtil.getArray(PropsKeys.SITES_FORM_UPDATE_MISCELLANEOUS); + + public static String[] SITES_FORM_UPDATE_SEO = PropsUtil.getArray(PropsKeys.SITES_FORM_UPDATE_SEO); + + public static final String SITES_FRIENDLY_URL_PAGE_NOT_FOUND = PropsUtil.get(PropsKeys.SITES_FRIENDLY_URL_PAGE_NOT_FOUND); + + public static String SITES_SITEMAP_DEFAULT_CHANGE_FREQUENCY = PropsUtil.get(PropsKeys.SITES_SITEMAP_DEFAULT_CHANGE_FREQUENCY); + + public static String SITES_SITEMAP_DEFAULT_PRIORITY = PropsUtil.get(PropsKeys.SITES_SITEMAP_DEFAULT_PRIORITY); + + public static final int[] SOCIAL_ACTIVITY_CONTRIBUTION_INCREMENTS = GetterUtil.getIntegerValues(PropsUtil.getArray(PropsKeys.SOCIAL_ACTIVITY_CONTRIBUTION_INCREMENTS)); + + public static final int[] SOCIAL_ACTIVITY_CONTRIBUTION_LIMIT_VALUES = GetterUtil.getIntegerValues(PropsUtil.getArray(PropsKeys.SOCIAL_ACTIVITY_CONTRIBUTION_LIMIT_VALUES)); + + public static final String SOCIAL_ACTIVITY_COUNTER_PERIOD_LENGTH = PropsUtil.get(PropsKeys.SOCIAL_ACTIVITY_COUNTER_PERIOD_LENGTH); + + public static final int SOCIAL_ACTIVITY_FILTER_SEARCH_LIMIT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.SOCIAL_ACTIVITY_FILTER_SEARCH_LIMIT)); + + public static final long SOCIAL_ACTIVITY_LOCK_RETRY_DELAY = GetterUtil.getLong(PropsUtil.get(PropsKeys.SOCIAL_ACTIVITY_LOCK_RETRY_DELAY)); + + public static final long SOCIAL_ACTIVITY_LOCK_TIMEOUT = GetterUtil.getLong(PropsUtil.get(PropsKeys.SOCIAL_ACTIVITY_LOCK_TIMEOUT)); + + public static final int[] SOCIAL_ACTIVITY_PARTICIPATION_INCREMENTS = GetterUtil.getIntegerValues(PropsUtil.getArray(PropsKeys.SOCIAL_ACTIVITY_PARTICIPATION_INCREMENTS)); + + public static final int[] SOCIAL_ACTIVITY_PARTICIPATION_LIMIT_VALUES = GetterUtil.getIntegerValues(PropsUtil.getArray(PropsKeys.SOCIAL_ACTIVITY_PARTICIPATION_LIMIT_VALUES)); + + public static boolean SOCIAL_ACTIVITY_SETS_BUNDLING_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SOCIAL_ACTIVITY_SETS_BUNDLING_ENABLED)); + + public static boolean SOCIAL_ACTIVITY_SETS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SOCIAL_ACTIVITY_SETS_ENABLED)); + + public static String SOCIAL_ACTIVITY_SETS_SELECTOR = GetterUtil.getString(PropsUtil.get(PropsKeys.SOCIAL_ACTIVITY_SETS_SELECTOR)); + + public static final String[] SPRING_CONFIGS = PropsUtil.getArray(PropsKeys.SPRING_CONFIGS); + + public static final String[] SPRING_HIBERNATE_CONFIGURATION_PROXY_FACTORY_PRELOAD_CLASSLOADER_CLASSES = PropsUtil.getArray(PropsKeys.SPRING_HIBERNATE_CONFIGURATION_PROXY_FACTORY_PRELOAD_CLASSLOADER_CLASSES); + + public static boolean SPRING_HIBERNATE_SESSION_DELEGATED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.SPRING_HIBERNATE_SESSION_DELEGATED)); + + public static final String[] SPRING_HIBERNATE_SESSION_FACTORY_PRELOAD_CLASSLOADER_CLASSES = PropsUtil.getArray(PropsKeys.SPRING_HIBERNATE_SESSION_FACTORY_PRELOAD_CLASSLOADER_CLASSES); + + public static final String SPRITE_FILE_NAME = PropsUtil.get(PropsKeys.SPRITE_FILE_NAME); + + public static final String SPRITE_PROPERTIES_FILE_NAME = PropsUtil.get(PropsKeys.SPRITE_PROPERTIES_FILE_NAME); + + public static final String SPRITE_ROOT_DIR = PropsUtil.get(PropsKeys.SPRITE_ROOT_DIR); + + public static final int SQL_DATA_MAX_PARAMETERS = GetterUtil.getInteger(PropsUtil.get(PropsKeys.SQL_DATA_MAX_PARAMETERS)); + + public static boolean STAGING_DELETE_TEMP_LAR_ON_FAILURE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.STAGING_DELETE_TEMP_LAR_ON_FAILURE)); + + public static boolean STAGING_DELETE_TEMP_LAR_ON_SUCCESS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.STAGING_DELETE_TEMP_LAR_ON_SUCCESS)); + + public static final int STAGING_HIBERNATE_CACHE_FLUSH_FREQUENCY = GetterUtil.getInteger(PropsUtil.get(PropsKeys.STAGING_HIBERNATE_CACHE_FLUSH_FREQUENCY)); + + public static boolean STAGING_LOCK_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.STAGING_LOCK_ENABLED)); + + public static final int STAGING_REMOTE_TRANSFER_BUFFER_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.STAGING_REMOTE_TRANSFER_BUFFER_SIZE)); + + public static String[] STAGING_XSTREAM_CLASS_WHITELIST = PropsUtil.getArray(PropsKeys.STAGING_XSTREAM_CLASS_WHITELIST); + + public static final boolean STAGING_XSTREAM_SECURITY_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.STAGING_XSTREAM_SECURITY_ENABLED)); + + public static boolean STRIP_CSS_SASS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.STRIP_CSS_SASS_ENABLED)); + + public static final String[] STRIP_IGNORE_PATHS = PropsUtil.getArray(PropsKeys.STRIP_IGNORE_PATHS); + + public static boolean STRIP_JS_LANGUAGE_ATTRIBUTE_SUPPORT_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.STRIP_JS_LANGUAGE_ATTRIBUTE_SUPPORT_ENABLED)); + + public static String[] STRIP_MIME_TYPES = PropsUtil.getArray(PropsKeys.STRIP_MIME_TYPES); + + public static final String STRUTS_PORTLET_IGNORED_PARAMETERS_REGEXP = PropsUtil.get(PropsKeys.STRUTS_PORTLET_IGNORED_PARAMETERS_REGEXP); + + public static final String STRUTS_PORTLET_REQUEST_PROCESSOR = PropsUtil.get(PropsKeys.STRUTS_PORTLET_REQUEST_PROCESSOR); + + public static final boolean TAGS_COMPILER_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.TAGS_COMPILER_ENABLED)); + + public static final boolean TCK_URL = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.TCK_URL)); + + public static final long TERMS_OF_USE_JOURNAL_ARTICLE_GROUP_ID = GetterUtil.getLong(PropsUtil.get(PropsKeys.TERMS_OF_USE_JOURNAL_ARTICLE_GROUP_ID)); + + public static final String TERMS_OF_USE_JOURNAL_ARTICLE_ID = PropsUtil.get(PropsKeys.TERMS_OF_USE_JOURNAL_ARTICLE_ID); + + public static boolean TERMS_OF_USE_REQUIRED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.TERMS_OF_USE_REQUIRED)); + + public static final boolean TEXT_EXTRACTION_FORK_PROCESS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.TEXT_EXTRACTION_FORK_PROCESS_ENABLED)); + + public static final String[] TEXT_EXTRACTION_FORK_PROCESS_MIME_TYPES = PropsUtil.getArray(PropsKeys.TEXT_EXTRACTION_FORK_PROCESS_MIME_TYPES); + + public static boolean THEME_CSS_FAST_LOAD = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.THEME_CSS_FAST_LOAD)); + + public static boolean THEME_IMAGES_FAST_LOAD = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.THEME_IMAGES_FAST_LOAD)); + + public static boolean THEME_JSP_OVERRIDE_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.THEME_JSP_OVERRIDE_ENABLED)); + + public static boolean THEME_LOADER_NEW_THEME_ID_ON_IMPORT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.THEME_LOADER_NEW_THEME_ID_ON_IMPORT)); + + public static final String THEME_LOADER_STORAGE_PATH = PropsUtil.get(PropsKeys.THEME_LOADER_STORAGE_PATH); + + public static boolean THEME_PORTLET_DECORATE_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.THEME_PORTLET_DECORATE_DEFAULT)); + + public static boolean THEME_PORTLET_SHARING_DEFAULT = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.THEME_PORTLET_SHARING_DEFAULT)); + + public static String THEME_SHORTCUT_ICON = PropsUtil.get(PropsKeys.THEME_SHORTCUT_ICON); + + public static final boolean THEME_SYNC_ON_GROUP = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.THEME_SYNC_ON_GROUP)); + + public static final String THEME_VIRTUAL_PATH = PropsUtil.get(PropsKeys.THEME_VIRTUAL_PATH); + + public static int THREAD_DUMP_SPEED_THRESHOLD = GetterUtil.getInteger(PropsUtil.get(PropsKeys.THREAD_DUMP_SPEED_THRESHOLD)); + + public static int TRANSACTION_ISOLATION_COUNTER = GetterUtil.getInteger(PropsUtil.get(PropsKeys.TRANSACTION_ISOLATION_COUNTER)); + + public static int TRANSACTION_ISOLATION_PORTAL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.TRANSACTION_ISOLATION_PORTAL)); + + public static final String TRANSACTION_MANAGER_IMPL = PropsUtil.get(PropsKeys.TRANSACTION_MANAGER_IMPL); + + public static boolean TRANSACTIONAL_CACHE_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.TRANSACTIONAL_CACHE_ENABLED)); + + public static final String[] TRANSACTIONAL_CACHE_NAMES = PropsUtil.getArray(PropsKeys.TRANSACTIONAL_CACHE_NAMES); + + public static final boolean TRANSLATIONS_DISABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.TRANSLATIONS_DISABLED)); + + public static final boolean TRASH_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.TRASH_ENABLED)); + + public static final int TRASH_ENTRIES_MAX_AGE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.TRASH_ENTRIES_MAX_AGE)); + + public static final int TRASH_ENTRY_CHECK_INTERVAL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.TRASH_ENTRY_CHECK_INTERVAL)); + + public static final int TRASH_SEARCH_LIMIT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.TRASH_SEARCH_LIMIT)); + + public static final String TUNNELING_SERVLET_ENCRYPTION_ALGORITHM = PropsUtil.get(PropsKeys.TUNNELING_SERVLET_ENCRYPTION_ALGORITHM); + + public static final String TUNNELING_SERVLET_SHARED_SECRET = PropsUtil.get(PropsKeys.TUNNELING_SERVLET_SHARED_SECRET); + + public static final boolean TUNNELING_SERVLET_SHARED_SECRET_HEX = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.TUNNELING_SERVLET_SHARED_SECRET_HEX)); + + public static final boolean UPGRADE_DATABASE_TRANSACTIONS_DISABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.UPGRADE_DATABASE_TRANSACTIONS_DISABLED)); + + public static boolean USER_GROUPS_COPY_LAYOUTS_TO_USER_PERSONAL_SITE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USER_GROUPS_COPY_LAYOUTS_TO_USER_PERSONAL_SITE)); + + public static final boolean USER_GROUPS_INDEXER_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USER_GROUPS_INDEXER_ENABLED)); + + public static boolean USER_GROUPS_NAME_ALLOW_NUMERIC = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USER_GROUPS_NAME_ALLOW_NUMERIC)); + + public static final boolean USER_GROUPS_SEARCH_WITH_INDEX = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USER_GROUPS_SEARCH_WITH_INDEX)); + + public static boolean USER_NOTIFICATION_EVENT_CONFIRMATION_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USER_NOTIFICATION_EVENT_CONFIRMATION_ENABLED)); + + public static final boolean USERS_DELETE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USERS_DELETE)); + + public static final String USERS_EMAIL_ADDRESS_AUTO_SUFFIX = PropsUtil.get(PropsKeys.USERS_EMAIL_ADDRESS_AUTO_SUFFIX); + + public static final String USERS_EMAIL_ADDRESS_GENERATOR = PropsUtil.get(PropsKeys.USERS_EMAIL_ADDRESS_GENERATOR); + + public static boolean USERS_EMAIL_ADDRESS_REQUIRED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USERS_EMAIL_ADDRESS_REQUIRED)); + + public static final String USERS_EMAIL_ADDRESS_VALIDATOR = PropsUtil.get(PropsKeys.USERS_EMAIL_ADDRESS_VALIDATOR); + + public static final String[] USERS_EXPORT_CSV_FIELDS = PropsUtil.getArray(PropsKeys.USERS_EXPORT_CSV_FIELDS); + + public static String[] USERS_FORM_ADD_IDENTIFICATION = PropsUtil.getArray(PropsKeys.USERS_FORM_ADD_IDENTIFICATION); + + public static String[] USERS_FORM_ADD_MAIN = PropsUtil.getArray(PropsKeys.USERS_FORM_ADD_MAIN); + + public static String[] USERS_FORM_ADD_MISCELLANEOUS = PropsUtil.getArray(PropsKeys.USERS_FORM_ADD_MISCELLANEOUS); + + public static String[] USERS_FORM_MY_ACCOUNT_IDENTIFICATION = PropsUtil.getArray(PropsKeys.USERS_FORM_MY_ACCOUNT_IDENTIFICATION); + + public static String[] USERS_FORM_MY_ACCOUNT_MAIN = PropsUtil.getArray(PropsKeys.USERS_FORM_MY_ACCOUNT_MAIN); + + public static String[] USERS_FORM_MY_ACCOUNT_MISCELLANEOUS = PropsUtil.getArray(PropsKeys.USERS_FORM_MY_ACCOUNT_MISCELLANEOUS); + + public static String[] USERS_FORM_UPDATE_IDENTIFICATION = PropsUtil.getArray(PropsKeys.USERS_FORM_UPDATE_IDENTIFICATION); + + public static String[] USERS_FORM_UPDATE_MAIN = PropsUtil.getArray(PropsKeys.USERS_FORM_UPDATE_MAIN); + + public static String[] USERS_FORM_UPDATE_MISCELLANEOUS = PropsUtil.getArray(PropsKeys.USERS_FORM_UPDATE_MISCELLANEOUS); + + public static final String USERS_FULL_NAME_GENERATOR = PropsUtil.get(PropsKeys.USERS_FULL_NAME_GENERATOR); + + public static final String USERS_FULL_NAME_VALIDATOR = PropsUtil.get(PropsKeys.USERS_FULL_NAME_VALIDATOR); + + public static final boolean USERS_IMAGE_CHECK_TOKEN = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USERS_IMAGE_CHECK_TOKEN)); + + public static int USERS_IMAGE_MAX_HEIGHT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.USERS_IMAGE_MAX_HEIGHT)); + + public static int USERS_IMAGE_MAX_WIDTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.USERS_IMAGE_MAX_WIDTH)); + + public static final boolean USERS_INDEXER_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USERS_INDEXER_ENABLED)); + + public static boolean USERS_LAST_NAME_REQUIRED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USERS_LAST_NAME_REQUIRED)); + + public static final String[] USERS_LIST_VIEWS = PropsUtil.getArray(PropsKeys.USERS_LIST_VIEWS); + + public static final String USERS_PROFILE_FRIENDLY_URL = PropsUtil.get(PropsKeys.USERS_PROFILE_FRIENDLY_URL); + + public static final boolean USERS_REMINDER_QUERIES_CUSTOM_QUESTION_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USERS_REMINDER_QUERIES_CUSTOM_QUESTION_ENABLED)); + + public static final boolean USERS_REMINDER_QUERIES_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USERS_REMINDER_QUERIES_ENABLED)); + + public static final String[] USERS_REMINDER_QUERIES_QUESTIONS = PropsUtil.getArray(PropsKeys.USERS_REMINDER_QUERIES_QUESTIONS); + + public static final boolean USERS_REMINDER_QUERIES_REQUIRED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USERS_REMINDER_QUERIES_REQUIRED)); + + public static boolean USERS_SCREEN_NAME_ALLOW_NUMERIC = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USERS_SCREEN_NAME_ALLOW_NUMERIC)); + + public static boolean USERS_SCREEN_NAME_ALWAYS_AUTOGENERATE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USERS_SCREEN_NAME_ALWAYS_AUTOGENERATE)); + + public static final String USERS_SCREEN_NAME_GENERATOR = PropsUtil.get(PropsKeys.USERS_SCREEN_NAME_GENERATOR); + + public static final String USERS_SCREEN_NAME_VALIDATOR = PropsUtil.get(PropsKeys.USERS_SCREEN_NAME_VALIDATOR); + + public static final boolean USERS_SEARCH_WITH_INDEX = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USERS_SEARCH_WITH_INDEX)); + + public static final boolean USERS_UPDATE_LAST_LOGIN = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.USERS_UPDATE_LAST_LOGIN)); + + public static final boolean VALUE_OBJECT_ENTITY_BLOCKING_CACHE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.VALUE_OBJECT_ENTITY_BLOCKING_CACHE)); + + public static final boolean VALUE_OBJECT_ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.VALUE_OBJECT_ENTITY_CACHE_ENABLED)); + + public static final int VALUE_OBJECT_ENTITY_THREAD_LOCAL_CACHE_MAX_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.VALUE_OBJECT_ENTITY_THREAD_LOCAL_CACHE_MAX_SIZE)); + + public static final boolean VALUE_OBJECT_FINDER_BLOCKING_CACHE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.VALUE_OBJECT_FINDER_BLOCKING_CACHE)); + + public static final boolean VALUE_OBJECT_FINDER_CACHE_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.VALUE_OBJECT_FINDER_CACHE_ENABLED)); + + public static final int VALUE_OBJECT_FINDER_THREAD_LOCAL_CACHE_MAX_SIZE = GetterUtil.getInteger(PropsUtil.get(PropsKeys.VALUE_OBJECT_FINDER_THREAD_LOCAL_CACHE_MAX_SIZE)); + + public static final boolean VELOCITY_ENGINE_DIRECTIVE_IF_TO_STRING_NULL_CHECK = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.VELOCITY_ENGINE_DIRECTIVE_IF_TO_STRING_NULL_CHECK)); + + public static final int VELOCITY_ENGINE_RESOURCE_MODIFICATION_CHECK_INTERVAL = GetterUtil.getInteger(PropsUtil.get(PropsKeys.VELOCITY_ENGINE_RESOURCE_MODIFICATION_CHECK_INTERVAL)); + + public static final String[] VELOCITY_ENGINE_RESOURCE_PARSERS = PropsUtil.getArray(PropsKeys.VELOCITY_ENGINE_RESOURCE_PARSERS); + + public static final String[] VELOCITY_ENGINE_RESTRICTED_CLASSES = PropsUtil.getArray(PropsKeys.VELOCITY_ENGINE_RESTRICTED_CLASSES); + + public static final String[] VELOCITY_ENGINE_RESTRICTED_PACKAGES = PropsUtil.getArray(PropsKeys.VELOCITY_ENGINE_RESTRICTED_PACKAGES); + + public static final String[] VELOCITY_ENGINE_RESTRICTED_VARIABLES = PropsUtil.getArray(PropsKeys.VELOCITY_ENGINE_RESTRICTED_VARIABLES); + + public static final boolean VERIFY_DATABASE_TRANSACTIONS_DISABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.VERIFY_DATABASE_TRANSACTIONS_DISABLED)); + + public static final boolean VERIFY_PATCH_LEVELS_DISABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.VERIFY_PATCH_LEVELS_DISABLED)); + + public static final int VERIFY_PROCESS_CONCURRENCY_THRESHOLD = GetterUtil.getInteger(PropsUtil.get(PropsKeys.VERIFY_PROCESS_CONCURRENCY_THRESHOLD)); + + public static final String VIRTUAL_HOSTS_DEFAULT_SITE_NAME = PropsUtil.get(PropsKeys.VIRTUAL_HOSTS_DEFAULT_SITE_NAME); + + public static final String[] VIRTUAL_HOSTS_IGNORE_EXTENSIONS = PropsUtil.getArray(PropsKeys.VIRTUAL_HOSTS_IGNORE_EXTENSIONS); + + public static final String[] VIRTUAL_HOSTS_VALID_HOSTS = PropsUtil.getArray(PropsKeys.VIRTUAL_HOSTS_VALID_HOSTS); + + public static final boolean WEB_SERVER_DISPLAY_NODE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.WEB_SERVER_DISPLAY_NODE)); + + public static final String WEB_SERVER_HOST = PropsUtil.get(PropsKeys.WEB_SERVER_HOST); + + public static final int WEB_SERVER_HTTP_PORT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.WEB_SERVER_HTTP_PORT), -1); + + public static final int WEB_SERVER_HTTPS_PORT = GetterUtil.getInteger(PropsUtil.get(PropsKeys.WEB_SERVER_HTTPS_PORT), -1); + + public static final String WEB_SERVER_PROTOCOL = PropsUtil.get(PropsKeys.WEB_SERVER_PROTOCOL); + + public static final boolean WEB_SERVER_PROXY_LEGACY_MODE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.WEB_SERVER_PROXY_LEGACY_MODE)); + + public static final String[] WEB_SERVER_SERVLET_ACCEPT_RANGES_MIME_TYPES = PropsUtil.getArray(PropsKeys.WEB_SERVER_SERVLET_ACCEPT_RANGES_MIME_TYPES); + + public static final boolean WEB_SERVER_SERVLET_CHECK_IMAGE_GALLERY = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.WEB_SERVER_SERVLET_CHECK_IMAGE_GALLERY)); + + public static final boolean WEB_SERVER_SERVLET_DIRECTORY_INDEXING_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.WEB_SERVER_SERVLET_DIRECTORY_INDEXING_ENABLED)); + + public static final String WEB_SERVER_SERVLET_VERSION_VERBOSITY = GetterUtil.getString(PropsUtil.get(PropsKeys.WEB_SERVER_SERVLET_VERSION_VERBOSITY)); + + public static final String[] WEBDAV_IGNORE = PropsUtil.getArray(PropsKeys.WEBDAV_IGNORE); + + public static final int WEBDAV_NONCE_EXPIRATION = GetterUtil.getInteger(PropsUtil.get(PropsKeys.WEBDAV_NONCE_EXPIRATION)); + + public static final boolean WEBDAV_SERVLET_HTTPS_REQUIRED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.WEBDAV_SERVLET_HTTPS_REQUIRED)); + + public static final String WIDGET_SERVLET_MAPPING = PropsUtil.get(PropsKeys.WIDGET_SERVLET_MAPPING); + + public static final String WIKI_DISPLAY_TEMPLATES_CONFIG = PropsUtil.get(PropsKeys.WIKI_DISPLAY_TEMPLATES_CONFIG); + + public static final String WIKI_EMAIL_FROM_ADDRESS = PropsUtil.get(PropsKeys.WIKI_EMAIL_FROM_ADDRESS); + + public static final String WIKI_EMAIL_FROM_NAME = PropsUtil.get(PropsKeys.WIKI_EMAIL_FROM_NAME); + + public static final String WIKI_EMAIL_PAGE_ADDED_BODY = PropsUtil.get(PropsKeys.WIKI_EMAIL_PAGE_ADDED_BODY); + + public static final String WIKI_EMAIL_PAGE_ADDED_SIGNATURE = PropsUtil.get(PropsKeys.WIKI_EMAIL_PAGE_ADDED_SIGNATURE); + + public static final String WIKI_EMAIL_PAGE_ADDED_SUBJECT = PropsUtil.get(PropsKeys.WIKI_EMAIL_PAGE_ADDED_SUBJECT); + + public static final String WIKI_EMAIL_PAGE_UPDATED_BODY = PropsUtil.get(PropsKeys.WIKI_EMAIL_PAGE_UPDATED_BODY); + + public static final String WIKI_EMAIL_PAGE_UPDATED_SIGNATURE = PropsUtil.get(PropsKeys.WIKI_EMAIL_PAGE_UPDATED_SIGNATURE); + + public static final String WIKI_EMAIL_PAGE_UPDATED_SUBJECT = PropsUtil.get(PropsKeys.WIKI_EMAIL_PAGE_UPDATED_SUBJECT); + + public static final String[] WIKI_IMPORTERS = PropsUtil.getArray(PropsKeys.WIKI_IMPORTERS); + + public static final String WIKI_INITIAL_NODE_NAME = PropsUtil.get(PropsKeys.WIKI_INITIAL_NODE_NAME); + + public static final boolean WIKI_PAGE_COMMENTS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.WIKI_PAGE_COMMENTS_ENABLED)); + + public static final boolean WIKI_PAGE_MINOR_EDIT_ADD_SOCIAL_ACTIVITY = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.WIKI_PAGE_MINOR_EDIT_ADD_SOCIAL_ACTIVITY)); + + public static final boolean WIKI_PAGE_MINOR_EDIT_SEND_EMAIL = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.WIKI_PAGE_MINOR_EDIT_SEND_EMAIL)); + + public static final boolean WIKI_PAGE_RATINGS_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.WIKI_PAGE_RATINGS_ENABLED)); + + public static final String WIKI_PAGE_TITLES_REGEXP = PropsUtil.get(PropsKeys.WIKI_PAGE_TITLES_REGEXP); + + public static final String WIKI_PAGE_TITLES_REMOVE_REGEXP = PropsUtil.get(PropsKeys.WIKI_PAGE_TITLES_REMOVE_REGEXP); + + public static final int WIKI_RSS_ABSTRACT_LENGTH = GetterUtil.getInteger(PropsUtil.get(PropsKeys.WIKI_RSS_ABSTRACT_LENGTH)); + + public static final boolean WORKFLOW_COMPANY_ADMINISTRATOR_CAN_PUBLISH = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.WORKFLOW_COMPANY_ADMINISTRATOR_CAN_PUBLISH)); + + public static final boolean XML_SECURITY_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.XML_SECURITY_ENABLED)); + + public static final boolean XML_VALIDATION_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.XML_VALIDATION_ENABLED)); + + public static final String[] XSL_CONTENT_VALID_URL_PREFIXES = PropsUtil.getArray(PropsKeys.XSL_CONTENT_VALID_URL_PREFIXES); + + public static final boolean XSL_CONTENT_XML_DOCTYPE_DECLARATION_ALLOWED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.XSL_CONTENT_XML_DOCTYPE_DECLARATION_ALLOWED)); + + public static final boolean XSL_CONTENT_XML_EXTERNAL_GENERAL_ENTITIES_ALLOWED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.XSL_CONTENT_XML_EXTERNAL_GENERAL_ENTITIES_ALLOWED)); + + public static final boolean XSL_CONTENT_XML_EXTERNAL_PARAMETER_ENTITIES_ALLOWED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.XSL_CONTENT_XML_EXTERNAL_PARAMETER_ENTITIES_ALLOWED)); + + public static final boolean XSL_CONTENT_XSL_SECURE_PROCESSING_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.XSL_CONTENT_XSL_SECURE_PROCESSING_ENABLED)); + + public static final boolean XSL_TEMPLATE_SECURE_PROCESSING_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.XSL_TEMPLATE_SECURE_PROCESSING_ENABLED)); + + public static final boolean XUGGLER_ENABLED = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.XUGGLER_ENABLED)); + + public static final String XUGGLER_JAR_URL = PropsUtil.get(PropsKeys.XUGGLER_JAR_URL); + + public static final int YUI_COMPRESSOR_CSS_LINE_BREAK = GetterUtil.getInteger(PropsUtil.get(PropsKeys.YUI_COMPRESSOR_CSS_LINE_BREAK)); + + public static final boolean YUI_COMPRESSOR_JS_DISABLE_OPTIMIZATIONS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.YUI_COMPRESSOR_JS_DISABLE_OPTIMIZATIONS)); + + public static final int YUI_COMPRESSOR_JS_LINE_BREAK = GetterUtil.getInteger(PropsUtil.get(PropsKeys.YUI_COMPRESSOR_JS_LINE_BREAK)); + + public static final boolean YUI_COMPRESSOR_JS_MUNGE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.YUI_COMPRESSOR_JS_MUNGE)); + + public static final boolean YUI_COMPRESSOR_JS_PRESERVE_ALL_SEMICOLONS = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.YUI_COMPRESSOR_JS_PRESERVE_ALL_SEMICOLONS)); + + public static final boolean YUI_COMPRESSOR_JS_VERBOSE = GetterUtil.getBoolean(PropsUtil.get(PropsKeys.YUI_COMPRESSOR_JS_VERBOSE)); + + static { + if (!LAYOUT_USER_PRIVATE_LAYOUTS_ENABLED) { + LAYOUT_USER_PRIVATE_LAYOUTS_AUTO_CREATE = false; + } + + if (!LAYOUT_USER_PUBLIC_LAYOUTS_ENABLED) { + LAYOUT_USER_PUBLIC_LAYOUTS_AUTO_CREATE = false; + } + } + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/BasePreferencesImpl.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/BasePreferencesImpl.java new file mode 100644 index 00000000..855f0066 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/BasePreferencesImpl.java @@ -0,0 +1,357 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portlet; + +import com.liferay.portal.kernel.util.ArrayUtil; +import com.liferay.portal.kernel.xml.simple.Element; +import com.liferay.util.xml.XMLFormatter; + +import java.io.IOException; +import java.io.Serializable; + +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +import javax.portlet.ReadOnlyException; +import javax.portlet.ValidatorException; + +/** + * @author Alexander Chow + * @author Shuyang Zhou + */ +public abstract class BasePreferencesImpl implements Serializable { + + public BasePreferencesImpl( + long ownerId, int ownerType, String xml, + Map preferences) { + + _ownerId = ownerId; + _ownerType = ownerType; + _originalXML = xml; + _originalPreferences = preferences; + } + + public Map getMap() { + Map map = new HashMap(); + + Map preferences = getPreferences(); + + for (Map.Entry entry : preferences.entrySet()) { + String key = entry.getKey(); + Preference preference = entry.getValue(); + + String[] actualValues = getActualValues(preference.getValues()); + + map.put(key, actualValues); + } + + return Collections.unmodifiableMap(map); + } + + public Enumeration getNames() { + Map preferences = getPreferences(); + + return Collections.enumeration(preferences.keySet()); + } + + public long getOwnerId() { + return _ownerId; + } + + public int getOwnerType() { + return _ownerType; + } + + public String getValue(String key, String def) { + if (key == null) { + throw new IllegalArgumentException(); + } + + Map preferences = getPreferences(); + + Preference preference = preferences.get(key); + + String[] values = null; + + if (preference != null) { + values = preference.getValues(); + } + + if (!isNull(values)) { + return getActualValue(values[0]); + } + else { + return getActualValue(def); + } + } + + public String[] getValues(String key, String[] def) { + if (key == null) { + throw new IllegalArgumentException(); + } + + Map preferences = getPreferences(); + + Preference preference = preferences.get(key); + + String[] values = null; + + if (preference != null) { + values = preference.getValues(); + } + + if (!isNull(values)) { + return getActualValues(values); + } + else { + return getActualValues(def); + } + } + + public boolean isReadOnly(String key) { + if (key == null) { + throw new IllegalArgumentException(); + } + + Map preferences = getPreferences(); + + Preference preference = preferences.get(key); + + if ((preference != null) && preference.isReadOnly()) { + return true; + } + else { + return false; + } + } + + public void reset() { + _modifiedPreferences = null; + } + + public abstract void reset(String key) throws ReadOnlyException; + + public void setValue(String key, String value) throws ReadOnlyException { + if (key == null) { + throw new IllegalArgumentException(); + } + + value = getXMLSafeValue(value); + + Map modifiedPreferences = getModifiedPreferences(); + + Preference preference = modifiedPreferences.get(key); + + if (preference == null) { + preference = new Preference(key, value); + + modifiedPreferences.put(key, preference); + } + + if (preference.isReadOnly()) { + throw new ReadOnlyException(key); + } + else { + preference = (Preference)preference.clone(); + + modifiedPreferences.put(key, preference); + + preference.setValues(new String[] {value}); + } + } + + public void setValues(String key, String[] values) + throws ReadOnlyException { + + if (key == null) { + throw new IllegalArgumentException(); + } + + values = getXMLSafeValues(values); + + Map modifiedPreferences = getModifiedPreferences(); + + Preference preference = modifiedPreferences.get(key); + + if (preference == null) { + preference = new Preference(key, values); + + modifiedPreferences.put(key, preference); + } + + if (preference.isReadOnly()) { + throw new ReadOnlyException(key); + } + else { + preference = (Preference)preference.clone(); + + modifiedPreferences.put(key, preference); + + preference.setValues(values); + } + } + + public int size() { + Map preferences = getPreferences(); + + return preferences.size(); + } + + public abstract void store() throws IOException, ValidatorException; + + protected String getActualValue(String value) { + if ((value == null) || value.equals(_NULL_VALUE)) { + return null; + } + else { + return XMLFormatter.fromCompactSafe(value); + } + } + + protected String[] getActualValues(String[] values) { + if (values == null) { + return null; + } + + if (values.length == 1) { + String actualValue = getActualValue(values[0]); + + if (actualValue == null) { + return null; + } + else { + return new String[] {actualValue}; + } + } + + String[] actualValues = new String[values.length]; + + for (int i = 0; i < actualValues.length; i++) { + actualValues[i] = getActualValue(values[i]); + } + + return actualValues; + } + + protected Map getModifiedPreferences() { + if (_modifiedPreferences == null) { + _modifiedPreferences = new ConcurrentHashMap( + _originalPreferences); + } + + return _modifiedPreferences; + } + + protected Map getOriginalPreferences() { + return _originalPreferences; + } + + protected String getOriginalXML() { + return _originalXML; + } + + protected Map getPreferences() { + if (_modifiedPreferences != null) { + return _modifiedPreferences; + } + + return _originalPreferences; + } + + protected String getXMLSafeValue(String value) { + if (value == null) { + return _NULL_VALUE; + } + else { + return XMLFormatter.toCompactSafe(value); + } + } + + protected String[] getXMLSafeValues(String[] values) { + if (values == null) { + return new String[] {_NULL_VALUE}; + } + + String[] xmlSafeValues = new String[values.length]; + + for (int i = 0; i < xmlSafeValues.length; i++) { + xmlSafeValues[i] = getXMLSafeValue(values[i]); + } + + return xmlSafeValues; + } + + protected boolean isNull(String[] values) { + if (ArrayUtil.isEmpty(values) || + ((values.length == 1) && (getActualValue(values[0]) == null))) { + + return true; + } + + return false; + } + + protected void setOriginalPreferences( + Map originalPreferences) { + + _originalPreferences = originalPreferences; + } + + protected void setOriginalXML(String originalXML) { + _originalXML = originalXML; + } + + protected String toXML() { + if ((_modifiedPreferences == null) && (_originalXML != null)) { + return _originalXML; + } + + Map preferences = getPreferences(); + + Element portletPreferencesElement = new Element( + "portlet-preferences", false); + + for (Map.Entry entry : preferences.entrySet()) { + Preference preference = entry.getValue(); + + Element preferenceElement = portletPreferencesElement.addElement( + "preference"); + + preferenceElement.addElement("name", preference.getName()); + + for (String value : preference.getValues()) { + preferenceElement.addElement("value", value); + } + + if (preference.isReadOnly()) { + preferenceElement.addElement("read-only", Boolean.TRUE); + } + } + + return portletPreferencesElement.toXMLString(); + } + + private static final String _NULL_VALUE = "NULL_VALUE"; + + private Map _modifiedPreferences; + private Map _originalPreferences; + private String _originalXML; + private long _ownerId; + private int _ownerType; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/PortalPreferencesImpl.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/PortalPreferencesImpl.java new file mode 100644 index 00000000..d173e4cb --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/PortalPreferencesImpl.java @@ -0,0 +1,414 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portlet; + +import com.liferay.portal.kernel.dao.orm.LockMode; +import com.liferay.portal.kernel.dao.orm.Session; +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.transaction.TransactionAttribute; +import com.liferay.portal.kernel.transaction.TransactionInvokerUtil; +import com.liferay.portal.kernel.util.HashUtil; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.service.PortalPreferencesLocalServiceUtil; +import com.liferay.portal.service.persistence.PortalPreferencesPersistence; +import com.liferay.portal.service.persistence.PortalPreferencesUtil; + +import java.io.IOException; +import java.io.Serializable; + +import java.util.Arrays; +import java.util.Collections; +import java.util.ConcurrentModificationException; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Callable; + +import javax.portlet.ReadOnlyException; + +/** + * @author Brian Wing Shun Chan + * @author Alexander Chow + */ +public class PortalPreferencesImpl + extends BasePreferencesImpl + implements Cloneable, PortalPreferences, Serializable { + + public static final TransactionAttribute TRANSACTION_ATTRIBUTE; + + static { + TransactionAttribute.Builder builder = + new TransactionAttribute.Builder(); + + builder.setRollbackForClasses( + PortalException.class, SystemException.class); + + TRANSACTION_ATTRIBUTE = builder.build(); + } + + public PortalPreferencesImpl() { + this(0, 0, null, Collections.emptyMap(), false); + } + + public PortalPreferencesImpl( + long ownerId, int ownerType, String xml, + Map preferences, boolean signedIn) { + + super(ownerId, ownerType, xml, preferences); + + _signedIn = signedIn; + } + + @Override + public PortalPreferencesImpl clone() { + return new PortalPreferencesImpl( + getOwnerId(), getOwnerType(), getOriginalXML(), + new HashMap( + getOriginalPreferences()), isSignedIn()); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof PortalPreferencesImpl)) { + return false; + } + + PortalPreferencesImpl portalPreferences = (PortalPreferencesImpl)obj; + + if ((getOwnerId() == portalPreferences.getOwnerId()) && + (getOwnerType() == portalPreferences.getOwnerType()) && + getPreferences().equals(portalPreferences.getPreferences())) { + + return true; + } + else { + return false; + } + } + + @Override + public long getUserId() { + return _userId; + } + + @Override + public String getValue(String namespace, String key) { + return getValue(namespace, key, null); + } + + @Override + public String getValue(String namespace, String key, String defaultValue) { + key = _encodeKey(namespace, key); + + return super.getValue(key, defaultValue); + } + + @Override + public String[] getValues(String namespace, String key) { + return getValues(namespace, key, null); + } + + @Override + public String[] getValues( + String namespace, String key, String[] defaultValue) { + + key = _encodeKey(namespace, key); + + return super.getValues(key, defaultValue); + } + + @Override + public int hashCode() { + int hashCode = HashUtil.hash(0, getOwnerId()); + + hashCode = HashUtil.hash(hashCode, getOwnerType()); + hashCode = HashUtil.hash(hashCode, getPreferences()); + + return hashCode; + } + + @Override + public boolean isSignedIn() { + return _signedIn; + } + + @Override + public void reset(final String key) throws ReadOnlyException { + if (isReadOnly(key)) { + throw new ReadOnlyException(key); + } + + try { + validateStore( + new Callable() { + + @Override + public Void call() { + Map modifiedPreferences = + getModifiedPreferences(); + + modifiedPreferences.remove(key); + + return null; + } + + }, key); + } + catch (ConcurrentModificationException cme) { + throw cme; + } + catch (Throwable t) { + _log.error(t, t); + } + } + + @Override + public void resetValues(String namespace) { + Map preferences = getPreferences(); + + try { + for (Map.Entry entry : preferences.entrySet()) { + String key = entry.getKey(); + + if (key.startsWith(namespace) && !isReadOnly(key)) { + reset(key); + } + } + } + catch (ConcurrentModificationException cme) { + throw cme; + } + catch (Exception e) { + _log.error(e, e); + } + } + + @Override + public void setSignedIn(boolean signedIn) { + _signedIn = signedIn; + } + + @Override + public void setUserId(long userId) { + _userId = userId; + } + + @Override + public void setValue( + final String namespace, final String key, final String value) { + + if (Validator.isNull(key) || key.equals(_RANDOM_KEY)) { + return; + } + + try { + Callable callable = new Callable() { + + @Override + public Void call() throws ReadOnlyException { + String encodedKey = _encodeKey(namespace, key); + + if (value == null) { + reset(encodedKey); + } + else { + PortalPreferencesImpl.super.setValue(encodedKey, value); + } + + return null; + } + + }; + + if (_signedIn) { + validateStore(callable, _encodeKey(namespace, key)); + } + else { + callable.call(); + } + } + catch (ConcurrentModificationException cme) { + throw cme; + } + catch (Throwable t) { + _log.error(t, t); + } + } + + @Override + public void setValues( + final String namespace, final String key, final String[] values) { + + if (Validator.isNull(key) || key.equals(_RANDOM_KEY)) { + return; + } + + try { + Callable callable = new Callable() { + + @Override + public Void call() throws ReadOnlyException { + String encodedKey = _encodeKey(namespace, key); + + if (values == null) { + reset(encodedKey); + } + else { + PortalPreferencesImpl.super.setValues( + encodedKey, values); + } + + return null; + } + + }; + + if (_signedIn) { + validateStore(callable, _encodeKey(namespace, key)); + } + else { + callable.call(); + } + } + catch (ConcurrentModificationException cme) { + throw cme; + } + catch (Throwable t) { + _log.error(t, t); + } + } + + private Callable _createValidateCallable( + final String[] originalValues, final String key) { + + return new Callable() { + + @Override + public Boolean call() throws Exception { + com.liferay.portal.model.PortalPreferences + preferences = PortalPreferencesUtil.fetchByO_O( + getOwnerId(), getOwnerType(), false); + + PortalPreferencesPersistence portalPreferencesPersistence = + PortalPreferencesUtil.getPersistence(); + + Session session = + portalPreferencesPersistence.getCurrentSession(); + + session.evict(preferences); + + preferences = (com.liferay.portal.model.PortalPreferences) + session.get( + com.liferay.portal.model.impl. + PortalPreferencesImpl.class, + preferences.getPrimaryKey(), LockMode.UPGRADE); + + PortalPreferencesImpl portalPreferencesImpl = + (PortalPreferencesImpl) + PortletPreferencesFactoryUtil.fromXML( + getOwnerId(), getOwnerType(), + preferences.getPreferences()); + + String originalXML = getOriginalXML(); + + if (originalXML.equals(preferences.getPreferences())) { + store(); + + return true; + } + + if (!Arrays.equals( + originalValues, + portalPreferencesImpl.getValues(key, (String[])null))) { + + return false; + } + + reset(); + + setOriginalPreferences( + portalPreferencesImpl.getOriginalPreferences()); + + setOriginalXML(preferences.getPreferences()); + + return null; + } + + }; + } + + protected void validateStore(final Callable callable, final String key) + throws Throwable { + + while (true) { + String[] originalValues = super.getValues(key, null); + + callable.call(); + + Boolean result = TransactionInvokerUtil.invoke( + TRANSACTION_ATTRIBUTE, + _createValidateCallable(originalValues, key)); + + if (result == null) { + continue; + } + + if (!result) { + PortalPreferencesWrapperCacheUtil.remove( + getOwnerId(), getOwnerType()); + + throw new ConcurrentModificationException(); + } + + break; + } + } + + @Override + public void store() throws IOException { + try { + PortalPreferencesLocalServiceUtil.updatePreferences( + getOwnerId(), getOwnerType(), this); + } + catch (SystemException se) { + throw new IOException(se.getMessage()); + } + } + + private String _encodeKey(String namespace, String key) { + if (Validator.isNull(namespace)) { + return key; + } + else { + return namespace.concat(StringPool.POUND).concat(key); + } + } + + private static final String _RANDOM_KEY = "r"; + + private static Log _log = LogFactoryUtil.getLog( + PortalPreferencesImpl.class); + + private boolean _signedIn; + private long _userId; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/PortalPreferencesWrapper.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/PortalPreferencesWrapper.java new file mode 100644 index 00000000..1fe37332 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/PortalPreferencesWrapper.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portlet; + +import java.io.IOException; +import java.io.Serializable; + +import java.util.Enumeration; +import java.util.Map; + +import javax.portlet.PortletPreferences; +import javax.portlet.ReadOnlyException; + +/** + * @author Alexander Chow + */ +public class PortalPreferencesWrapper + implements Cloneable, PortletPreferences, Serializable { + + public PortalPreferencesWrapper( + PortalPreferencesImpl portalPreferencesImpl) { + + _portalPreferencesImpl = portalPreferencesImpl; + } + + @Override + public PortalPreferencesWrapper clone() { + return new PortalPreferencesWrapper(_portalPreferencesImpl.clone()); + } + + @Override + public Map getMap() { + return _portalPreferencesImpl.getMap(); + } + + @Override + public Enumeration getNames() { + return _portalPreferencesImpl.getNames(); + } + + public PortalPreferencesImpl getPortalPreferencesImpl() { + return _portalPreferencesImpl; + } + + @Override + public String getValue(String key, String def) { + return _portalPreferencesImpl.getValue(null, key, def); + } + + @Override + public String[] getValues(String key, String[] def) { + return _portalPreferencesImpl.getValues(null, key, def); + } + + @Override + public boolean isReadOnly(String key) { + return _portalPreferencesImpl.isReadOnly(key); + } + + @Override + public void reset(String key) throws ReadOnlyException { + _portalPreferencesImpl.reset(key); + } + + @Override + public void setValue(String key, String value) throws ReadOnlyException { + _portalPreferencesImpl.setValue(key, value); + } + + @Override + public void setValues(String key, String[] values) + throws ReadOnlyException { + + _portalPreferencesImpl.setValues(key, values); + } + + @Override + public void store() throws IOException { + _portalPreferencesImpl.store(); + } + + private PortalPreferencesImpl _portalPreferencesImpl; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/PortalPreferencesWrapperCacheUtil.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/PortalPreferencesWrapperCacheUtil.java new file mode 100644 index 00000000..f4e082ac --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/PortalPreferencesWrapperCacheUtil.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portlet; + +import com.liferay.portal.kernel.cache.MultiVMPoolUtil; +import com.liferay.portal.kernel.cache.PortalCache; +import com.liferay.portal.kernel.util.StringUtil; + +/** + * @author Shuyang Zhou + */ +public class PortalPreferencesWrapperCacheUtil { + + public static final String CACHE_NAME = + PortalPreferencesWrapperCacheUtil.class.getName(); + + public static PortalPreferencesWrapper get(long ownerId, int ownerType) { + String cacheKey = StringUtil.toHexString(ownerId).concat( + StringUtil.toHexString(ownerType)); + + return _portalPreferencesWrapperPortalCache.get(cacheKey); + } + + public static void put( + long ownerId, int ownerType, + PortalPreferencesWrapper portalPreferencesWrapper) { + + String cacheKey = StringUtil.toHexString(ownerId).concat( + StringUtil.toHexString(ownerType)); + + _portalPreferencesWrapperPortalCache.put( + cacheKey, portalPreferencesWrapper); + } + + public static void remove(long ownerId, int ownerType) { + String cacheKey = StringUtil.toHexString(ownerId).concat( + StringUtil.toHexString(ownerType)); + + _portalPreferencesWrapperPortalCache.remove(cacheKey); + } + + private static PortalCache + _portalPreferencesWrapperPortalCache = MultiVMPoolUtil.getCache( + CACHE_NAME); + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/Preference.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/Preference.java new file mode 100644 index 00000000..443cbf48 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/Preference.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portlet; + +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; + +import java.io.Serializable; + +/** + * @author Brian Wing Shun Chan + */ +public class Preference implements Cloneable, Serializable { + + public Preference(String name, String value) { + this(name, new String[] {value}); + } + + public Preference(String name, String value, boolean readOnly) { + this(name, new String[] {value}, readOnly); + } + + public Preference(String name, String[] values) { + this(name, values, false); + } + + public Preference(String name, String[] values, boolean readOnly) { + _name = name; + _values = values; + _readOnly = readOnly; + } + + @Override + public Object clone() { + return new Preference(_name, _values, _readOnly); + } + + public String getName() { + return _name; + } + + public boolean getReadOnly() { + return _readOnly; + } + + public String[] getValues() { + return _values; + } + + public boolean isReadOnly() { + return _readOnly; + } + + public void setValues(String[] values) { + _values = values; + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(6 + (_values.length * 2 - 1)); + + sb.append("{name="); + sb.append(getName()); + sb.append(", readOnly="); + sb.append(_readOnly); + sb.append(", values=["); + + for (int i = 0; i < _values.length; i++) { + sb.append(_values[i]); + + if (i < (_values.length - 1)) { + sb.append(StringPool.COMMA); + } + } + + sb.append("]}"); + + return sb.toString(); + } + + private String _name; + private boolean _readOnly; + private String[] _values; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/service/permission/DLFileEntryPermission.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/service/permission/DLFileEntryPermission.java new file mode 100644 index 00000000..6aa80685 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/service/permission/DLFileEntryPermission.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portlet.documentlibrary.service.permission; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.repository.model.FileEntry; +import com.liferay.portal.kernel.staging.permission.StagingPermissionUtil; +import com.liferay.portal.kernel.workflow.permission.WorkflowPermissionUtil; +import com.liferay.portal.security.auth.PrincipalException; +import com.liferay.portal.security.permission.ActionKeys; +import com.liferay.portal.security.permission.PermissionChecker; +import com.liferay.portal.util.PortletKeys; +import com.liferay.portal.util.PropsValues; +import com.liferay.portlet.documentlibrary.NoSuchFolderException; +import com.liferay.portlet.documentlibrary.model.DLFileEntry; +import com.liferay.portlet.documentlibrary.model.DLFileVersion; +import com.liferay.portlet.documentlibrary.model.DLFolder; +import com.liferay.portlet.documentlibrary.model.DLFolderConstants; +import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil; +import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil; + +/** + * @author Brian Wing Shun Chan + * @author Charles May + */ +public class DLFileEntryPermission { + + public static void check( + PermissionChecker permissionChecker, DLFileEntry dlFileEntry, + String actionId) + throws PortalException, SystemException { + + if (!contains(permissionChecker, dlFileEntry, actionId)) { + throw new PrincipalException(); + } + } + + public static void check( + PermissionChecker permissionChecker, FileEntry fileEntry, + String actionId) + throws PortalException, SystemException { + + if (!fileEntry.containsPermission(permissionChecker, actionId)) { + throw new PrincipalException(); + } + } + + public static void check( + PermissionChecker permissionChecker, long fileEntryId, + String actionId) + throws PortalException, SystemException { + + if (!contains(permissionChecker, fileEntryId, actionId)) { + throw new PrincipalException(); + } + } + + public static boolean contains( + PermissionChecker permissionChecker, DLFileEntry dlFileEntry, + String actionId) + throws PortalException, SystemException { + + Boolean hasPermission = StagingPermissionUtil.hasPermission( + permissionChecker, dlFileEntry.getGroupId(), + DLFileEntry.class.getName(), dlFileEntry.getFileEntryId(), + PortletKeys.DOCUMENT_LIBRARY, actionId); + + if (hasPermission != null) { + return hasPermission.booleanValue(); + } + + DLFileVersion latestDLFileVersion = dlFileEntry.getLatestFileVersion( + true); + + if (latestDLFileVersion.isPending()) { + hasPermission = WorkflowPermissionUtil.hasPermission( + permissionChecker, dlFileEntry.getGroupId(), + DLFileEntry.class.getName(), dlFileEntry.getFileEntryId(), + actionId); + + if (hasPermission != null) { + return hasPermission.booleanValue(); + } + } + + if (actionId.equals(ActionKeys.VIEW) && + PropsValues.PERMISSIONS_VIEW_DYNAMIC_INHERITANCE) { + + long dlFolderId = dlFileEntry.getFolderId(); + + if (dlFolderId == DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) { + if (!DLPermission.contains( + permissionChecker, dlFileEntry.getGroupId(), + actionId)) { + + return false; + } + } + else { + try { + DLFolder dlFolder = DLFolderLocalServiceUtil.getFolder( + dlFolderId); + + if (!DLFolderPermission.contains( + permissionChecker, dlFolder, ActionKeys.ACCESS) && + !DLFolderPermission.contains( + permissionChecker, dlFolder, ActionKeys.VIEW)) { + + return false; + } + } + catch (NoSuchFolderException nsfe) { + if (!dlFileEntry.isInTrash()) { + throw nsfe; + } + } + } + } + + if (permissionChecker.hasOwnerPermission( + dlFileEntry.getCompanyId(), DLFileEntry.class.getName(), + dlFileEntry.getFileEntryId(), dlFileEntry.getUserId(), + actionId)) { + + return true; + } + + return permissionChecker.hasPermission( + dlFileEntry.getGroupId(), DLFileEntry.class.getName(), + dlFileEntry.getFileEntryId(), actionId); + } + + public static boolean contains( + PermissionChecker permissionChecker, FileEntry fileEntry, + String actionId) + throws PortalException, SystemException { + + return fileEntry.containsPermission(permissionChecker, actionId); + } + + public static boolean contains( + PermissionChecker permissionChecker, long fileEntryId, + String actionId) + throws PortalException, SystemException { + + FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(fileEntryId); + + return fileEntry.containsPermission(permissionChecker, actionId); + } + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/service/permission/DLFolderPermission.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/service/permission/DLFolderPermission.java new file mode 100644 index 00000000..1f02dd0f --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/service/permission/DLFolderPermission.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portlet.documentlibrary.service.permission; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.repository.model.Folder; +import com.liferay.portal.kernel.staging.permission.StagingPermissionUtil; +import com.liferay.portal.security.auth.PrincipalException; +import com.liferay.portal.security.permission.ActionKeys; +import com.liferay.portal.security.permission.PermissionChecker; +import com.liferay.portal.util.PortletKeys; +import com.liferay.portal.util.PropsValues; +import com.liferay.portlet.documentlibrary.NoSuchFolderException; +import com.liferay.portlet.documentlibrary.model.DLFolder; +import com.liferay.portlet.documentlibrary.model.DLFolderConstants; +import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil; +import com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil; + +/** + * @author Brian Wing Shun Chan + */ +public class DLFolderPermission { + + public static void check( + PermissionChecker permissionChecker, DLFolder dlFolder, + String actionId) + throws PortalException, SystemException { + + if (!contains(permissionChecker, dlFolder, actionId)) { + throw new PrincipalException(); + } + } + + public static void check( + PermissionChecker permissionChecker, Folder folder, String actionId) + throws PortalException, SystemException { + + if (!folder.containsPermission(permissionChecker, actionId)) { + throw new PrincipalException(); + } + } + + public static void check( + PermissionChecker permissionChecker, long groupId, long folderId, + String actionId) + throws PortalException, SystemException { + + if (!contains(permissionChecker, groupId, folderId, actionId)) { + throw new PrincipalException(); + } + } + + public static boolean contains( + PermissionChecker permissionChecker, DLFolder dlFolder, + String actionId) + throws PortalException, SystemException { + + if (actionId.equals(ActionKeys.ADD_FOLDER)) { + actionId = ActionKeys.ADD_SUBFOLDER; + } + + Boolean hasPermission = StagingPermissionUtil.hasPermission( + permissionChecker, dlFolder.getGroupId(), DLFolder.class.getName(), + dlFolder.getFolderId(), PortletKeys.DOCUMENT_LIBRARY, actionId); + + if (hasPermission != null) { + return hasPermission.booleanValue(); + } + + if (actionId.equals(ActionKeys.VIEW) && + PropsValues.PERMISSIONS_VIEW_DYNAMIC_INHERITANCE) { + + try { + long dlFolderId = dlFolder.getFolderId(); + + while (dlFolderId != + DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) { + + dlFolder = DLFolderLocalServiceUtil.getFolder(dlFolderId); + + if (!_hasPermission( + permissionChecker, dlFolder, actionId)) { + + return false; + } + + dlFolderId = dlFolder.getParentFolderId(); + } + } + catch (NoSuchFolderException nsfe) { + if (!dlFolder.isInTrash()) { + throw nsfe; + } + } + + return DLPermission.contains( + permissionChecker, dlFolder.getGroupId(), actionId); + } + + return _hasPermission(permissionChecker, dlFolder, actionId); + } + + public static boolean contains( + PermissionChecker permissionChecker, Folder folder, String actionId) + throws PortalException, SystemException { + + return folder.containsPermission(permissionChecker, actionId); + } + + public static boolean contains( + PermissionChecker permissionChecker, long groupId, long folderId, + String actionId) + throws PortalException, SystemException { + + if (folderId == DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) { + + // Prevent the propagation of checks for actions that are not + // supported at the application resource level. See LPS-24245. + + if (actionId.equals(ActionKeys.ACCESS) || + actionId.equals(ActionKeys.ADD_SUBFOLDER) || + actionId.equals(ActionKeys.DELETE)) { + + return false; + } + + return DLPermission.contains(permissionChecker, groupId, actionId); + } + + Folder folder = DLAppLocalServiceUtil.getFolder(folderId); + + return folder.containsPermission(permissionChecker, actionId); + } + + private static boolean _hasPermission( + PermissionChecker permissionChecker, DLFolder dlFolder, + String actionId) { + + if (permissionChecker.hasOwnerPermission( + dlFolder.getCompanyId(), DLFolder.class.getName(), + dlFolder.getFolderId(), dlFolder.getUserId(), actionId) || + permissionChecker.hasPermission( + dlFolder.getGroupId(), DLFolder.class.getName(), + dlFolder.getFolderId(), actionId)) { + + return true; + } + + return false; + } + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/service/permission/DLPermission.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/service/permission/DLPermission.java new file mode 100644 index 00000000..32fa6568 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/service/permission/DLPermission.java @@ -0,0 +1,81 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portlet.documentlibrary.service.permission; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.staging.permission.StagingPermissionUtil; +import com.liferay.portal.model.ResourceConstants; +import com.liferay.portal.security.auth.PrincipalException; +import com.liferay.portal.security.permission.PermissionChecker; +import com.liferay.portal.service.ResourceLocalServiceUtil; +import com.liferay.portal.service.ResourcePermissionLocalServiceUtil; +import com.liferay.portal.util.PortletKeys; + +/** + * @author Jorge Ferrer + */ +public class DLPermission { + + public static final String RESOURCE_NAME = + "com.liferay.portlet.documentlibrary"; + + public static void check( + PermissionChecker permissionChecker, long groupId, String actionId) + throws PortalException { + + if (!contains(permissionChecker, groupId, actionId)) { + throw new PrincipalException(); + } + } + + public static boolean contains( + PermissionChecker permissionChecker, long groupId, String actionId) { + + Boolean hasPermission = StagingPermissionUtil.hasPermission( + permissionChecker, groupId, RESOURCE_NAME, groupId, + PortletKeys.DOCUMENT_LIBRARY, actionId); + + if (hasPermission != null) { + return hasPermission.booleanValue(); + } + + try { + int count = + ResourcePermissionLocalServiceUtil.getResourcePermissionsCount( + permissionChecker.getCompanyId(), RESOURCE_NAME, + ResourceConstants.SCOPE_INDIVIDUAL, + String.valueOf(groupId)); + + if (count == 0) { + ResourceLocalServiceUtil.addResources( + permissionChecker.getCompanyId(), groupId, 0, RESOURCE_NAME, + groupId, false, true, true); + } + } + catch (Exception e) { + if (_log.isWarnEnabled()) { + _log.warn(e, e); + } + } + + return permissionChecker.hasPermission( + groupId, RESOURCE_NAME, groupId, actionId); + } + + private static Log _log = LogFactoryUtil.getLog(DLPermission.class); + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/util/DocumentConversionUtil.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/util/DocumentConversionUtil.java new file mode 100644 index 00000000..196084ad --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/util/DocumentConversionUtil.java @@ -0,0 +1,406 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portlet.documentlibrary.util; + +import com.artofsolving.jodconverter.DefaultDocumentFormatRegistry; +import com.artofsolving.jodconverter.DocumentConverter; +import com.artofsolving.jodconverter.DocumentFormat; +import com.artofsolving.jodconverter.DocumentFormatRegistry; +import com.artofsolving.jodconverter.openoffice.connection.OpenOfficeConnection; +import com.artofsolving.jodconverter.openoffice.connection.SocketOpenOfficeConnection; +import com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter; +import com.artofsolving.jodconverter.openoffice.converter.StreamOpenOfficeDocumentConverter; + +import com.liferay.portal.kernel.configuration.Filter; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.io.unsync.UnsyncByteArrayOutputStream; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.ArrayUtil; +import com.liferay.portal.kernel.util.FileUtil; +import com.liferay.portal.kernel.util.PropsKeys; +import com.liferay.portal.kernel.util.SortedArrayList; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.SystemProperties; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.util.PrefsPropsUtil; +import com.liferay.portal.util.PropsUtil; +import com.liferay.portal.util.PropsValues; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Bruno Farache + * @author Alexander Chow + */ +public class DocumentConversionUtil { + + public static File convert( + String id, InputStream inputStream, String sourceExtension, + String targetExtension) + throws IOException, SystemException { + + return _instance._convert( + id, inputStream, sourceExtension, targetExtension); + } + + public static void disconnect() { + _instance._disconnect(); + } + + public static String[] getConversions(String extension) { + return _instance._getConversions(extension); + } + + public static String getFilePath(String id, String targetExtension) { + StringBundler sb = new StringBundler(5); + + sb.append(SystemProperties.get(SystemProperties.TMP_DIR)); + sb.append("/liferay/document_conversion/"); + sb.append(id); + sb.append(StringPool.PERIOD); + sb.append(targetExtension); + + return sb.toString(); + } + + public static boolean isComparableVersion(String extension) { + boolean enabled = false; + + String periodAndExtension = StringPool.PERIOD.concat(extension); + + for (int i = 0; i < _COMPARABLE_FILE_EXTENSIONS.length; i++) { + if (StringPool.STAR.equals(_COMPARABLE_FILE_EXTENSIONS[i]) || + periodAndExtension.equals(_COMPARABLE_FILE_EXTENSIONS[i])) { + + enabled = true; + + break; + } + } + + if (!enabled) { + return false; + } + + if (extension.equals("css") || extension.equals("htm") || + extension.equals("html") || extension.equals("js") || + extension.equals("txt") || extension.equals("xml")) { + + return true; + } + + try { + if (isEnabled() && isConvertBeforeCompare(extension)) { + return true; + } + } + catch (Exception e) { + if (_log.isErrorEnabled()) { + _log.error(e, e); + } + } + + return false; + } + + public static boolean isConvertBeforeCompare(String extension) { + if (extension.equals("txt")) { + return false; + } + + String[] conversions = getConversions(extension); + + for (int i = 0; i < conversions.length; i++) { + if (conversions[i].equals("txt")) { + return true; + } + } + + return false; + } + + public static boolean isEnabled() { + try { + return PrefsPropsUtil.getBoolean( + PropsKeys.OPENOFFICE_SERVER_ENABLED, + PropsValues.OPENOFFICE_SERVER_ENABLED); + } + catch (Exception e) { + } + + return false; + } + + private DocumentConversionUtil() { + _populateConversionsMap("drawing"); + _populateConversionsMap("presentation"); + _populateConversionsMap("spreadsheet"); + _populateConversionsMap("text"); + } + + private File _convert( + String id, InputStream inputStream, String sourceExtension, + String targetExtension) + throws IOException, SystemException { + + if (!isEnabled()) { + return null; + } + + sourceExtension = _fixExtension(sourceExtension); + targetExtension = _fixExtension(targetExtension); + + _validate(targetExtension, id); + + String fileName = getFilePath(id, targetExtension); + + File file = new File(fileName); + + if (PropsValues.OPENOFFICE_CACHE_ENABLED && file.exists()) { + return file; + } + + DocumentFormatRegistry documentFormatRegistry = + new DefaultDocumentFormatRegistry(); + + DocumentFormat inputDocumentFormat = + documentFormatRegistry.getFormatByFileExtension(sourceExtension); + DocumentFormat outputDocumentFormat = + documentFormatRegistry.getFormatByFileExtension(targetExtension); + + if (inputDocumentFormat == null) { + throw new SystemException( + "Conversion is not supported from ." + sourceExtension); + } + else if (!inputDocumentFormat.isImportable()) { + throw new SystemException( + "Conversion is not supported from " + + inputDocumentFormat.getName()); + } + else if (outputDocumentFormat == null) { + throw new SystemException( + "Conversion is not supported from " + + inputDocumentFormat.getName() + " to ." + + targetExtension); + } + else if (!inputDocumentFormat.isExportableTo(outputDocumentFormat)) { + throw new SystemException( + "Conversion is not supported from " + + inputDocumentFormat.getName() + " to " + + outputDocumentFormat.getName()); + } + + UnsyncByteArrayOutputStream unsyncByteArrayOutputStream = + new UnsyncByteArrayOutputStream(); + + DocumentConverter documentConverter = _getDocumentConverter(); + + documentConverter.convert( + inputStream, inputDocumentFormat, unsyncByteArrayOutputStream, + outputDocumentFormat); + + FileUtil.write( + file, unsyncByteArrayOutputStream.unsafeGetByteArray(), 0, + unsyncByteArrayOutputStream.size()); + + return file; + } + + private void _disconnect() { + if (_openOfficeConnection != null) { + _openOfficeConnection.disconnect(); + } + } + + private String _fixExtension(String extension) { + if (extension.equals("htm")) { + extension = "html"; + } + + return extension; + } + + private String[] _getConversions(String extension) { + extension = _fixExtension(extension); + + String[] conversions = _conversionsMap.get(extension); + + if (conversions == null) { + conversions = _DEFAULT_CONVERSIONS; + } + else { + if (ArrayUtil.contains(conversions, extension)) { + List conversionsList = new ArrayList(); + + for (int i = 0; i < conversions.length; i++) { + String conversion = conversions[i]; + + if (!conversion.equals(extension)) { + conversionsList.add(conversion); + } + } + + conversions = conversionsList.toArray( + new String[conversionsList.size()]); + } + } + + return conversions; + } + + private DocumentConverter _getDocumentConverter() throws SystemException { + if ((_openOfficeConnection != null) && (_documentConverter != null)) { + return _documentConverter; + } + + String host = PrefsPropsUtil.getString( + PropsKeys.OPENOFFICE_SERVER_HOST); + int port = PrefsPropsUtil.getInteger( + PropsKeys.OPENOFFICE_SERVER_PORT, + PropsValues.OPENOFFICE_SERVER_PORT); + + if (_isRemoteOpenOfficeHost(host)) { + _openOfficeConnection = new SocketOpenOfficeConnection(host, port); + _documentConverter = new StreamOpenOfficeDocumentConverter( + _openOfficeConnection); + } + else { + _openOfficeConnection = new SocketOpenOfficeConnection(port); + _documentConverter = new OpenOfficeDocumentConverter( + _openOfficeConnection); + } + + return _documentConverter; + } + + private boolean _isRemoteOpenOfficeHost(String host) { + if (Validator.isNotNull(host) && !host.equals(_LOCALHOST_IP) && + !host.startsWith(_LOCALHOST)) { + + return true; + } + else { + return false; + } + } + + private void _populateConversionsMap(String documentFamily) { + Filter filter = new Filter(documentFamily); + + DocumentFormatRegistry documentFormatRegistry = + new DefaultDocumentFormatRegistry(); + + String[] sourceExtensions = PropsUtil.getArray( + PropsKeys.OPENOFFICE_CONVERSION_SOURCE_EXTENSIONS, filter); + String[] targetExtensions = PropsUtil.getArray( + PropsKeys.OPENOFFICE_CONVERSION_TARGET_EXTENSIONS, filter); + + for (String sourceExtension : sourceExtensions) { + List conversions = new SortedArrayList(); + + DocumentFormat sourceDocumentFormat = + documentFormatRegistry.getFormatByFileExtension( + sourceExtension); + + if (sourceDocumentFormat == null) { + if (_log.isWarnEnabled()) { + _log.warn("Invalid source extension " + sourceExtension); + } + + continue; + } + + for (String targetExtension : targetExtensions) { + DocumentFormat targetDocumentFormat = + documentFormatRegistry.getFormatByFileExtension( + targetExtension); + + if (targetDocumentFormat == null) { + if (_log.isWarnEnabled()) { + _log.warn( + "Invalid target extension " + targetDocumentFormat); + } + + continue; + } + + if (sourceDocumentFormat.isExportableTo(targetDocumentFormat)) { + conversions.add(targetExtension); + } + } + + if (conversions.isEmpty()) { + if (_log.isInfoEnabled()) { + _log.info( + "There are no conversions supported from " + + sourceExtension); + } + } + else { + if (_log.isInfoEnabled()) { + _log.info( + "Conversions supported from " + sourceExtension + + " to " + conversions); + } + + _conversionsMap.put( + sourceExtension, + conversions.toArray(new String[conversions.size()])); + } + } + } + + private void _validate(String targetExtension, String id) + throws SystemException { + + if (!Validator.isFileExtension(targetExtension)) { + throw new SystemException("Invalid extension: " + targetExtension); + } + + if (!Validator.isFileName(id)) { + throw new SystemException("Invalid file name: " + id); + } + } + + private static final String[] _COMPARABLE_FILE_EXTENSIONS = + PropsValues.DL_COMPARABLE_FILE_EXTENSIONS; + + private static final String[] _DEFAULT_CONVERSIONS = new String[0]; + + private static final String _LOCALHOST = "localhost"; + + private static final String _LOCALHOST_IP = "127.0.0.1"; + + private static Log _log = LogFactoryUtil.getLog( + DocumentConversionUtil.class); + + private static DocumentConversionUtil _instance = + new DocumentConversionUtil(); + + private Map _conversionsMap = + new HashMap(); + private DocumentConverter _documentConverter; + private OpenOfficeConnection _openOfficeConnection; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/util/LiferayPDFBoxConverter.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/util/LiferayPDFBoxConverter.java new file mode 100644 index 00000000..e3091d3c --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/com/liferay/portlet/documentlibrary/util/LiferayPDFBoxConverter.java @@ -0,0 +1,118 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package com.liferay.portlet.documentlibrary.util; + +import com.liferay.portal.image.ImageToolImpl; +import com.liferay.portal.kernel.image.ImageTool; + +import java.awt.image.RenderedImage; + +import java.io.File; + +import javax.imageio.ImageIO; + +import org.apache.pdfbox.pdmodel.PDDocument; +import org.apache.pdfbox.pdmodel.PDPageTree; +import org.apache.pdfbox.rendering.ImageType; +import org.apache.pdfbox.rendering.PDFRenderer; + +/** + * @author Juan Gonzalez + */ +public class LiferayPDFBoxConverter { + + public LiferayPDFBoxConverter( + File inputFile, File thumbnailFile, File[] previewFiles, + String extension, String thumbnailExtension, int dpi, int height, + int width, boolean generatePreview, boolean generateThumbnail) { + + _inputFile = inputFile; + _thumbnailFile = thumbnailFile; + _previewFiles = previewFiles; + _extension = extension; + _thumbnailExtension = thumbnailExtension; + _dpi = dpi; + _height = height; + _width = width; + _generatePreview = generatePreview; + _generateThumbnail = generateThumbnail; + } + + public void generateImagesPB() throws Exception { + PDDocument pdDocument = null; + + try { + pdDocument = PDDocument.load(_inputFile); + + PDFRenderer pdfRenderer = new PDFRenderer(pdDocument); + + PDPageTree pdPageTree = pdDocument.getPages(); + + int count = pdPageTree.getCount(); + + for (int i = 0; i < count; i++) { + if (_generateThumbnail && (i == 0)) { + _generateImagesPB( + pdfRenderer, i, _thumbnailFile, _thumbnailExtension); + } + + if (!_generatePreview) { + break; + } + + _generateImagesPB(pdfRenderer, i, _previewFiles[i], _extension); + } + } + finally { + if (pdDocument != null) { + pdDocument.close(); + } + } + } + + private void _generateImagesPB( + PDFRenderer pdfRenderer, int pageIndex, File outputFile, + String extension) + throws Exception { + + RenderedImage renderedImage = pdfRenderer.renderImageWithDPI( + pageIndex, _dpi, ImageType.RGB); + + ImageTool imageTool = ImageToolImpl.getInstance(); + + if (_height != 0) { + renderedImage = imageTool.scale(renderedImage, _width, _height); + } + else { + renderedImage = imageTool.scale(renderedImage, _width); + } + + outputFile.createNewFile(); + + ImageIO.write(renderedImage, extension, outputFile); + } + + private int _dpi; + private String _extension; + private boolean _generatePreview; + private boolean _generateThumbnail; + private int _height; + private File _inputFile; + private File[] _previewFiles; + private String _thumbnailExtension; + private File _thumbnailFile; + private int _width; + +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/it/mwg/sicilia/preview/SiciliaP7MProcessor.java b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/it/mwg/sicilia/preview/SiciliaP7MProcessor.java new file mode 100644 index 00000000..9bb30da0 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/it/mwg/sicilia/preview/SiciliaP7MProcessor.java @@ -0,0 +1,636 @@ +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. This library is free software; you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in + * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + */ + +package it.mwg.sicilia.preview; + +import java.io.File; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.Vector; +import java.util.concurrent.Future; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.time.StopWatch; +import org.apache.pdfbox.pdmodel.PDDocument; + +import com.liferay.portal.kernel.image.GhostscriptUtil; +import com.liferay.portal.kernel.lar.PortletDataContext; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.messaging.DestinationNames; +import com.liferay.portal.kernel.process.ClassPathUtil; +import com.liferay.portal.kernel.process.ProcessCallable; +import com.liferay.portal.kernel.process.ProcessException; +import com.liferay.portal.kernel.process.ProcessExecutor; +import com.liferay.portal.kernel.process.ProcessUtil; +import com.liferay.portal.kernel.repository.model.FileEntry; +import com.liferay.portal.kernel.repository.model.FileVersion; +import com.liferay.portal.kernel.util.ContentTypes; +import com.liferay.portal.kernel.util.FileUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.MimeTypesUtil; +import com.liferay.portal.kernel.util.PropsKeys; +import com.liferay.portal.kernel.util.ServerDetector; +import com.liferay.portal.kernel.util.StreamUtil; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.SystemEnv; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.kernel.xml.Element; +import com.liferay.portal.log.Log4jLogFactoryImpl; +import com.liferay.portal.repository.liferayrepository.model.LiferayFileVersion; +import com.liferay.portal.util.PropsUtil; +import com.liferay.portal.util.PropsValues; +import com.liferay.portlet.documentlibrary.NoSuchFileEntryException; +import com.liferay.portlet.documentlibrary.store.DLStoreUtil; +import com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor; +import com.liferay.portlet.documentlibrary.util.DLUtil; +import com.liferay.portlet.documentlibrary.util.DocumentConversionUtil; +import com.liferay.portlet.documentlibrary.util.LiferayPDFBoxConverter; +import com.liferay.portlet.documentlibrary.util.PDFProcessor; +import com.liferay.util.log4j.Log4JUtil; + +/** + * @author Alexander Chow + * @author Mika Koivisto + * @author Juan González + * @author Sergio González + * @author Ivica Cardic + * @author Manifattura Web Group Srl + */ +public class SiciliaP7MProcessor extends DLPreviewableProcessor implements PDFProcessor { + + @Override + public void afterPropertiesSet() throws Exception { + + FileUtil.mkdirs(PREVIEW_TMP_PATH); + FileUtil.mkdirs(THUMBNAIL_TMP_PATH); + } + + @Override + public void generateImages(FileVersion sourceFileVersion, FileVersion destinationFileVersion) throws Exception { + + _generateImages(sourceFileVersion, destinationFileVersion); + } + + @Override + public InputStream getPreviewAsStream(FileVersion fileVersion, int index) throws Exception { + + return doGetPreviewAsStream(fileVersion, index, PREVIEW_TYPE); + } + + @Override + public int getPreviewFileCount(FileVersion fileVersion) { + + try { + return doGetPreviewFileCount(fileVersion); + } catch (Exception e) { + _log.error(e, e); + } + return 0; + } + + @Override + public long getPreviewFileSize(FileVersion fileVersion, int index) throws Exception { + + return doGetPreviewFileSize(fileVersion, index); + } + + @Override + public InputStream getThumbnailAsStream(FileVersion fileVersion, int index) throws Exception { + + return doGetThumbnailAsStream(fileVersion, index); + } + + @Override + public long getThumbnailFileSize(FileVersion fileVersion, int index) throws Exception { + + return doGetThumbnailFileSize(fileVersion, index); + } + + @Override + public boolean hasImages(FileVersion fileVersion) { + + boolean hasImages = false; + try { + hasImages = _hasImages(fileVersion); + if (!hasImages && isSupported(fileVersion)) { + _queueGeneration(null, fileVersion); + } + } catch (Exception e) { + _log.error(e, e); + } + return hasImages; + } + + @Override + public boolean isDocumentSupported(FileVersion fileVersion) { + + return isSupported(fileVersion); + } + + @Override + public boolean isDocumentSupported(String mimeType) { + + return isSupported(mimeType); + } + + @Override + public boolean isSupported(String mimeType) { + + if (Validator.isNull(mimeType)) { + return false; + } + if (mimeType.equals(ContentTypes.APPLICATION_PDF) || mimeType.equals(ContentTypes.APPLICATION_X_PDF) + || mimeType.equals("application/pkcs7-mime")) { + return true; + } + if (DocumentConversionUtil.isEnabled()) { + Set extensions = MimeTypesUtil.getExtensions(mimeType); + for (String extension : extensions) { + extension = extension.substring(1); + String[] targetExtensions = DocumentConversionUtil.getConversions(extension); + if (Arrays.binarySearch(targetExtensions, "pdf") >= 0) { + return true; + } + } + } + return false; + } + + @Override + public void trigger(FileVersion sourceFileVersion, FileVersion destinationFileVersion) { + + super.trigger(sourceFileVersion, destinationFileVersion); + _queueGeneration(sourceFileVersion, destinationFileVersion); + } + + @Override + protected void copyPreviews(FileVersion sourceFileVersion, FileVersion destinationFileVersion) { + + if (!PropsValues.DL_FILE_ENTRY_PREVIEW_ENABLED) { + return; + } + try { + if (hasPreview(sourceFileVersion) && !hasPreview(destinationFileVersion)) { + int count = getPreviewFileCount(sourceFileVersion); + for (int i = 0; i < count; i++) { + String previewFilePath = getPreviewFilePath(destinationFileVersion, i + 1); + InputStream is = doGetPreviewAsStream(sourceFileVersion, i + 1, PREVIEW_TYPE); + addFileToStore(destinationFileVersion.getCompanyId(), PREVIEW_PATH, previewFilePath, is); + } + } + } catch (Exception e) { + _log.error(e, e); + } + } + + @Override + protected void doExportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry, + Element fileEntryElement) throws Exception { + + exportThumbnails(portletDataContext, fileEntry, fileEntryElement, "pdf"); + exportPreviews(portletDataContext, fileEntry, fileEntryElement); + } + + @Override + protected void doImportGeneratedFiles(PortletDataContext portletDataContext, FileEntry fileEntry, + FileEntry importedFileEntry, Element fileEntryElement) throws Exception { + + importThumbnails(portletDataContext, fileEntry, importedFileEntry, fileEntryElement, "pdf"); + importPreviews(portletDataContext, fileEntry, importedFileEntry, fileEntryElement); + } + + protected void exportPreviews(PortletDataContext portletDataContext, FileEntry fileEntry, Element fileEntryElement) + throws Exception { + + FileVersion fileVersion = fileEntry.getFileVersion(); + if (!isSupported(fileVersion) || !_hasImages(fileVersion)) { + return; + } + if (!portletDataContext.isPerformDirectBinaryImport()) { + int previewFileCount = getPreviewFileCount(fileVersion); + fileEntryElement.addAttribute("bin-path-pdf-preview-count", String.valueOf(previewFileCount)); + for (int i = 0; i < previewFileCount; i++) { + exportPreview(portletDataContext, fileEntry, fileEntryElement, "pdf", PREVIEW_TYPE, i); + } + } + } + + @Override + protected List getFileVersionIds() { + + return _fileVersionIds; + } + + @Override + protected String getPreviewType(FileVersion fileVersion) { + + return PREVIEW_TYPE; + } + + @Override + protected String getThumbnailType(FileVersion fileVersion) { + + return THUMBNAIL_TYPE; + } + + protected boolean hasPreview(FileVersion fileVersion) throws Exception { + + return hasPreview(fileVersion, null); + } + + @Override + protected boolean hasPreview(FileVersion fileVersion, String type) throws Exception { + + String previewFilePath = getPreviewFilePath(fileVersion, 1); + return DLStoreUtil.hasFile(fileVersion.getCompanyId(), REPOSITORY_ID, previewFilePath); + } + + protected void importPreviews(PortletDataContext portletDataContext, FileEntry fileEntry, + FileEntry importedFileEntry, Element fileEntryElement) throws Exception { + + int previewFileCount = GetterUtil.getInteger(fileEntryElement.attributeValue("bin-path-pdf-preview-count")); + for (int i = 0; i < previewFileCount; i++) { + importPreview(portletDataContext, fileEntry, importedFileEntry, fileEntryElement, "pdf", PREVIEW_TYPE, i); + } + } + + private void _generateImages(FileVersion fileVersion, File file) throws Exception { + + if (GhostscriptUtil.isEnabled()) { + if (!_ghostscriptInitialized) { + GhostscriptUtil.reset(); + _ghostscriptInitialized = true; + } + _generateImagesGS(fileVersion, file); + } else { + _generateImagesPB(fileVersion, file); + } + } + + private void _generateImages(FileVersion sourceFileVersion, FileVersion destinationFileVersion) throws Exception { + + InputStream inputStream = null; + try { + if (sourceFileVersion != null) { + copy(sourceFileVersion, destinationFileVersion); + return; + } + if (_hasImages(destinationFileVersion)) { + return; + } + String extension = destinationFileVersion.getExtension(); + if (extension.equalsIgnoreCase("p7m")) { + inputStream = destinationFileVersion.getContentStream(false); + File p7m = File.createTempFile("p7m-input", ".p7m"); + FileUtils.copyInputStreamToFile(inputStream, p7m); + File pdf = _extractPdfFromP7m(p7m); + _generateImages(destinationFileVersion, pdf); + pdf.delete(); + p7m.delete(); + } else if (extension.equalsIgnoreCase("pdf")) { + if (destinationFileVersion instanceof LiferayFileVersion) { + try { + LiferayFileVersion liferayFileVersion = (LiferayFileVersion) destinationFileVersion; + File file = liferayFileVersion.getFile(false); + _generateImages(destinationFileVersion, file); + return; + } catch (UnsupportedOperationException uoe) {} + } + inputStream = destinationFileVersion.getContentStream(false); + _generateImages(destinationFileVersion, inputStream); + } else if (DocumentConversionUtil.isEnabled()) { + inputStream = destinationFileVersion.getContentStream(false); + String tempFileId = DLUtil.getTempFileId(destinationFileVersion.getFileEntryId(), + destinationFileVersion.getVersion()); + File file = DocumentConversionUtil.convert(tempFileId, inputStream, extension, "pdf"); + _generateImages(destinationFileVersion, file); + } + } catch (NoSuchFileEntryException nsfee) {} finally { + StreamUtil.cleanUp(inputStream); + _fileVersionIds.remove(destinationFileVersion.getFileVersionId()); + } + } + + private File _extractPdfFromP7m(File p7m) throws Exception { + + // openssl smime -verify -noverify -in document.pdf.p7m -inform DER -out document.pdf + File pdf = File.createTempFile("p7m-output", ".pdf"); + List arguments = new LinkedList<>(); + arguments.add("openssl"); + arguments.add("smime"); + arguments.add("-verify"); + arguments.add("-noverify"); + arguments.add("-in"); + arguments.add(p7m.getAbsolutePath()); + arguments.add("-inform"); + arguments.add("DER"); + arguments.add("-out"); + arguments.add(pdf.getAbsolutePath()); + Future future = ProcessUtil.execute(ProcessUtil.LOGGING_OUTPUT_PROCESSOR, arguments); + while (!future.isCancelled()) { + if (future.isDone()) { + futures.put(pdf.getAbsolutePath(), future); + break; + } + Thread.sleep(1000); + } + future.get(); + return pdf; + } + + private void _generateImages(FileVersion fileVersion, InputStream inputStream) throws Exception { + + if (GhostscriptUtil.isEnabled()) { + _generateImagesGS(fileVersion, inputStream); + } else { + _generateImagesPB(fileVersion, inputStream); + } + } + + private void _generateImagesGS(FileVersion fileVersion, File file) throws Exception { + + if (_isGeneratePreview(fileVersion)) { + StopWatch stopWatch = new StopWatch(); + stopWatch.start(); + _generateImagesGS(fileVersion, file, false); + if (_log.isDebugEnabled()) { + int previewFileCount = getPreviewFileCount(fileVersion); + _log.debug("Ghostscript generated " + previewFileCount + " preview pages for " + fileVersion.getTitle() + + " in " + stopWatch.getTime() + " ms"); + } + } + if (_isGenerateThumbnail(fileVersion)) { + StopWatch stopWatch = new StopWatch(); + stopWatch.start(); + _generateImagesGS(fileVersion, file, true); + if (_log.isDebugEnabled()) { + _log.debug("Ghostscript generated a thumbnail for " + fileVersion.getTitle() + " in " + + stopWatch.getTime() + " ms"); + } + } + } + + private void _generateImagesGS(FileVersion fileVersion, File file, boolean thumbnail) throws Exception { + + // Generate images + String tempFileId = DLUtil.getTempFileId(fileVersion.getFileEntryId(), fileVersion.getVersion()); + List arguments = new ArrayList(); + arguments.add("-sDEVICE=png16m"); + if (thumbnail) { + arguments.add("-sOutputFile=" + getThumbnailTempFilePath(tempFileId)); + arguments.add("-dFirstPage=1"); + arguments.add("-dLastPage=1"); + } else { + arguments.add("-sOutputFile=" + getPreviewTempFilePath(tempFileId, -1)); + } + arguments.add("-dPDFFitPage"); + arguments.add("-dTextAlphaBits=4"); + arguments.add("-dGraphicsAlphaBits=4"); + arguments.add("-r" + PropsValues.DL_FILE_ENTRY_PREVIEW_DOCUMENT_DPI); + if (PropsValues.DL_FILE_ENTRY_PREVIEW_DOCUMENT_MAX_WIDTH != 0) { + arguments.add("-dDEVICEWIDTH=" + PropsValues.DL_FILE_ENTRY_PREVIEW_DOCUMENT_MAX_WIDTH); + } + if (PropsValues.DL_FILE_ENTRY_PREVIEW_DOCUMENT_MAX_HEIGHT != 0) { + arguments.add("-dDEVICEHEIGHT=" + PropsValues.DL_FILE_ENTRY_PREVIEW_DOCUMENT_MAX_HEIGHT); + } + arguments.add(file.getPath()); + Future future = GhostscriptUtil.execute(arguments); + String processIdentity = String.valueOf(fileVersion.getFileVersionId()); + while (!future.isCancelled()) { + if (future.isDone()) { + futures.put(processIdentity, future); + break; + } + Thread.sleep(1000); + } + future.get(); + // Store images + if (thumbnail) { + File thumbnailTempFile = getThumbnailTempFile(tempFileId); + try { + storeThumbnailImages(fileVersion, thumbnailTempFile); + } finally { + FileUtil.delete(thumbnailTempFile); + } + } else { + int total = getPreviewTempFileCount(fileVersion); + for (int i = 0; i < total; i++) { + File previewTempFile = getPreviewTempFile(tempFileId, i + 2); + try { + addFileToStore(fileVersion.getCompanyId(), PREVIEW_PATH, getPreviewFilePath(fileVersion, i + 1), + previewTempFile); + } finally { + FileUtil.delete(previewTempFile); + } + } + } + } + + private void _generateImagesGS(FileVersion fileVersion, InputStream inputStream) throws Exception { + + File file = null; + try { + file = FileUtil.createTempFile(inputStream); + _generateImagesGS(fileVersion, file); + } finally { + FileUtil.delete(file); + } + } + + private void _generateImagesPB(FileVersion fileVersion, File file) throws Exception { + + String tempFileId = DLUtil.getTempFileId(fileVersion.getFileEntryId(), fileVersion.getVersion()); + File thumbnailFile = getThumbnailTempFile(tempFileId); + int previewFilesCount = 0; + PDDocument pdDocument = null; + try { + pdDocument = PDDocument.load(file); + previewFilesCount = pdDocument.getNumberOfPages(); + } finally { + if (pdDocument != null) { + pdDocument.close(); + } + } + File[] previewFiles = new File[previewFilesCount]; + for (int i = 0; i < previewFilesCount; i++) { + previewFiles[i] = getPreviewTempFile(tempFileId, i); + } + boolean generatePreview = _isGeneratePreview(fileVersion); + boolean generateThumbnail = _isGenerateThumbnail(fileVersion); + if (PropsValues.DL_FILE_ENTRY_PREVIEW_FORK_PROCESS_ENABLED) { + ProcessCallable processCallable = new LiferayPDFBoxProcessCallable(ServerDetector.getServerId(), + PropsUtil.get(PropsKeys.LIFERAY_HOME), Log4JUtil.getCustomLogSettings(), file, thumbnailFile, + previewFiles, getThumbnailType(fileVersion), getPreviewType(fileVersion), + PropsValues.DL_FILE_ENTRY_PREVIEW_DOCUMENT_DPI, + PropsValues.DL_FILE_ENTRY_PREVIEW_DOCUMENT_MAX_HEIGHT, + PropsValues.DL_FILE_ENTRY_PREVIEW_DOCUMENT_MAX_WIDTH, generatePreview, generateThumbnail); + Future future = ProcessExecutor.execute(ClassPathUtil.getPortalClassPath(), processCallable); + String processIdentity = String.valueOf(fileVersion.getFileVersionId()); + futures.put(processIdentity, future); + future.get(); + } else { + LiferayPDFBoxConverter liferayConverter = new LiferayPDFBoxConverter(file, thumbnailFile, previewFiles, + getPreviewType(fileVersion), getThumbnailType(fileVersion), + PropsValues.DL_FILE_ENTRY_PREVIEW_DOCUMENT_DPI, + PropsValues.DL_FILE_ENTRY_PREVIEW_DOCUMENT_MAX_HEIGHT, + PropsValues.DL_FILE_ENTRY_PREVIEW_DOCUMENT_MAX_WIDTH, generatePreview, generateThumbnail); + liferayConverter.generateImagesPB(); + } + if (generateThumbnail) { + try { + storeThumbnailImages(fileVersion, thumbnailFile); + } finally { + FileUtil.delete(thumbnailFile); + } + if (_log.isDebugEnabled()) { + _log.debug("PDFBox generated a thumbnail for " + fileVersion.getFileVersionId()); + } + } + if (generatePreview) { + int index = 0; + for (File previewFile : previewFiles) { + try { + addFileToStore(fileVersion.getCompanyId(), PREVIEW_PATH, + getPreviewFilePath(fileVersion, index + 1), previewFile); + } finally { + FileUtil.delete(previewFile); + } + index++; + } + if (_log.isDebugEnabled()) { + _log.debug("PDFBox generated " + getPreviewFileCount(fileVersion) + " preview pages for " + + fileVersion.getFileVersionId()); + } + } + } + + private void _generateImagesPB(FileVersion fileVersion, InputStream inputStream) throws Exception { + + File file = null; + try { + file = FileUtil.createTempFile(inputStream); + _generateImagesPB(fileVersion, file); + } finally { + FileUtil.delete(file); + } + } + + private boolean _hasImages(FileVersion fileVersion) throws Exception { + + if (PropsValues.DL_FILE_ENTRY_PREVIEW_ENABLED) { + if (!hasPreview(fileVersion)) { + return false; + } + } + return hasThumbnails(fileVersion); + } + + private boolean _isGeneratePreview(FileVersion fileVersion) throws Exception { + + return PropsValues.DL_FILE_ENTRY_PREVIEW_ENABLED && !hasPreview(fileVersion); + } + + private boolean _isGenerateThumbnail(FileVersion fileVersion) throws Exception { + + return PropsValues.DL_FILE_ENTRY_THUMBNAIL_ENABLED && !hasThumbnail(fileVersion, THUMBNAIL_INDEX_DEFAULT); + } + + private void _queueGeneration(FileVersion sourceFileVersion, FileVersion destinationFileVersion) { + + if (_fileVersionIds.contains(destinationFileVersion.getFileVersionId())) { + return; + } + boolean generateImages = false; + String extension = destinationFileVersion.getExtension(); + if (extension.equalsIgnoreCase("pdf") || extension.equalsIgnoreCase("p7m")) { + generateImages = true; + } else if (DocumentConversionUtil.isEnabled()) { + String[] conversions = DocumentConversionUtil.getConversions(extension); + for (String conversion : conversions) { + if (conversion.equals("pdf")) { + generateImages = true; + break; + } + } + } + if (generateImages) { + _fileVersionIds.add(destinationFileVersion.getFileVersionId()); + sendGenerationMessage(DestinationNames.DOCUMENT_LIBRARY_PDF_PROCESSOR, sourceFileVersion, + destinationFileVersion); + } + } + + private static Log _log = LogFactoryUtil.getLog(SiciliaP7MProcessor.class); + + private List _fileVersionIds = new Vector(); + private boolean _ghostscriptInitialized = false; + + private static class LiferayPDFBoxProcessCallable implements ProcessCallable { + + public LiferayPDFBoxProcessCallable(String serverId, String liferayHome, Map customLogSettings, + File inputFile, File thumbnailFile, File[] previewFiles, String extension, String thumbnailExtension, + int dpi, int height, int width, boolean generatePreview, boolean generateThumbnail) { + + _serverId = serverId; + _liferayHome = liferayHome; + _customLogSettings = customLogSettings; + _inputFile = inputFile; + _thumbnailFile = thumbnailFile; + _previewFiles = previewFiles; + _extension = extension; + _thumbnailExtension = thumbnailExtension; + _dpi = dpi; + _height = height; + _width = width; + _generatePreview = generatePreview; + _generateThumbnail = generateThumbnail; + } + + @Override + public String call() throws ProcessException { + + Properties systemProperties = System.getProperties(); + SystemEnv.setProperties(systemProperties); + Class clazz = getClass(); + ClassLoader classLoader = clazz.getClassLoader(); + Log4JUtil.initLog4J(_serverId, _liferayHome, classLoader, new Log4jLogFactoryImpl(), _customLogSettings); + try { + LiferayPDFBoxConverter liferayConverter = new LiferayPDFBoxConverter(_inputFile, _thumbnailFile, + _previewFiles, _extension, _thumbnailExtension, _dpi, _height, _width, _generatePreview, + _generateThumbnail); + liferayConverter.generateImagesPB(); + } catch (Exception e) { + throw new ProcessException(e); + } + return StringPool.BLANK; + } + + private static final long serialVersionUID = 1L; + + private Map _customLogSettings; + private int _dpi; + private String _extension; + private boolean _generatePreview; + private boolean _generateThumbnail; + private int _height; + private File _inputFile; + private String _liferayHome; + private File[] _previewFiles; + private String _serverId; + private String _thumbnailExtension; + private File _thumbnailFile; + private int _width; + } +} diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/portal-ext.properties b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/portal-ext.properties new file mode 100644 index 00000000..b72804df --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/portal-ext.properties @@ -0,0 +1,7 @@ +dl.file.entry.processors= \ + it.mwg.sicilia.preview.SiciliaP7MProcessor +dl.file.entry.processors2= \ + com.liferay.portlet.documentlibrary.util.ImageProcessorImpl, \ + it.mwg.sicilia.preview.SiciliaP7MProcessor, \ + com.liferay.portlet.documentlibrary.util.RawMetadataProcessorImpl + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/portal.properties b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/portal.properties new file mode 100644 index 00000000..4f1f3f40 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/src/portal.properties @@ -0,0 +1 @@ +dummy=off diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/web.xml b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/web.xml new file mode 100644 index 00000000..1aa8cdb8 --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/docroot/WEB-INF/web.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/ivy.xml b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/ivy.xml new file mode 100644 index 00000000..9711527a --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/ivy.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/ivy.xml.MD5 b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/ivy.xml.MD5 new file mode 100644 index 00000000..bfd03c3b --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/ivy.xml.MD5 @@ -0,0 +1 @@ +9127728e0d6e6ef2db51aa670a9da3b8 diff --git a/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/test/integration/arquillian.xml b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/test/integration/arquillian.xml new file mode 100644 index 00000000..9413609b --- /dev/null +++ b/liferay-plugins-sdk-6.2/hooks/sicilia-p7m-preview-hook/test/integration/arquillian.xml @@ -0,0 +1,15 @@ + + + + + + 8099 + tomcat + tomcat + + + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/bcprov-ext-jdk15to18.jar b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/bcprov-ext-jdk15to18.jar new file mode 100644 index 00000000..5796e2a7 Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/bcprov-ext-jdk15to18.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/bcprov-jdk15to18.jar b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/bcprov-jdk15to18.jar new file mode 100644 index 00000000..1d025525 Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/lib/bcprov-jdk15to18.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AsseverazioniUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AsseverazioniUtil.java index 0f77525d..716a8eaf 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AsseverazioniUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/AsseverazioniUtil.java @@ -326,7 +326,7 @@ public class AsseverazioniUtil { soggetti = true; } } - + return titolareDigitale && soggetti && delegati; } else if (TipoIntegrazioneUtil.VARIANTE.equalsIgnoreCase(dettPratica.getTipoIntegrazione())) { boolean soggettiPrincipali = false; @@ -362,12 +362,7 @@ public class AsseverazioniUtil { return soggettiPrincipali && soggetti && delegati; } } else { - for (String tipoSoggetto : REQUIRED.get(ASSEVERAZIONI_DOMANDA)) { - // Se committente e c'è delega => true - if (TipoSoggettoUtil.COMMITTENTE.equalsIgnoreCase(tipoSoggetto) - && ValidazionePraticaUtil.isA98Required(dettPratica)) { - continue; - } + for (String tipoSoggetto : dettPratica.getTipiSoggettiAsseveranti()) { if (isAsseverazioneDomandaRequiredByTipoSoggetto(dettPraticaId, tipoSoggetto)) { List asseverazioniEseguite = AsseverazioneLocalServiceUtil .findByDettPratica_Tipologia_InEsito(dettPraticaId, tipoSoggetto, @@ -445,8 +440,8 @@ public class AsseverazioniUtil { case DIRETTORE_LAVORI: params = new Object[] { soggetto.getDescrizioneCompleta(), - (SoggettiUtil.isSoggettoPrincipale(soggetto.getSoggettoId(), dettPratica.getDettPraticaId()) ? "Principale" - : StringPool.BLANK) + (SoggettiUtil.isSoggettoPrincipale(soggetto.getSoggettoId(), dettPratica.getDettPraticaId()) + ? "Principale" : StringPool.BLANK) + (Validator.isNull(soggetto.getAmbitoProfessione()) ? StringPool.BLANK : (soggetto .getAmbitoProfessione().equalsIgnoreCase("ambitoProf-altro") ? soggetto .getAmbitoAttivita() : LanguageUtil.get(Locale.ITALIAN, "label-ambito-" @@ -474,8 +469,8 @@ public class AsseverazioniUtil { Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); params = new Object[] { soggetto.getDescrizioneCompleta(), - (SoggettiUtil.isSoggettoPrincipale(soggetto.getSoggettoId(), dettPratica.getDettPraticaId()) ? "Principale" - : StringPool.BLANK) + (SoggettiUtil.isSoggettoPrincipale(soggetto.getSoggettoId(), dettPratica.getDettPraticaId()) + ? "Principale" : StringPool.BLANK) + (Validator.isNull(soggetto.getAmbitoProfessione()) ? StringPool.BLANK : (soggetto .getAmbitoProfessione().equalsIgnoreCase("ambitoProf-altro") ? soggetto .getAmbitoAttivita() : LanguageUtil.get(Locale.ITALIAN, "label-ambito-" diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java index ea85dc6f..acb0d6dd 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java @@ -343,7 +343,7 @@ public class ValidazionePraticaUtil { DettPratica dettPratica = DettPraticaServiceUtil.getDettPratica(dettPraticaId); IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(dettPratica.getIntPraticaId()); - + return praticaIsCompleta(dettPraticaId) && !DelegheUtil.hasDelegheCompilazioneAttive(dettPraticaId) && AsseverazioniUtil.allAsseverazioniCompleted(dettPraticaId) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SorteggioPraticaUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SorteggioPraticaUtil.java index d742e60b..71d47903 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SorteggioPraticaUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/mwg/sismica/bo/util/SorteggioPraticaUtil.java @@ -41,6 +41,8 @@ import org.apache.commons.lang.time.DateUtils; 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.repository.model.FileEntry; import com.liferay.portal.kernel.repository.model.Folder; import com.liferay.portal.kernel.util.StringPool; @@ -68,6 +70,8 @@ public class SorteggioPraticaUtil { private static final String FILE_ENTRY_TEMPLATE_SORTEGGIO = "Sorteggio"; + private static final Log _log = LogFactoryUtil.getLog(SorteggioPraticaUtil.class); + /** * Implementazione della procedura di sorteggio secondo i requisiti della Regione Siciliana. * @@ -116,6 +120,8 @@ public class SorteggioPraticaUtil { IntPratica pratica = m.getValue(); long intPraticaId = pratica.getIntPraticaId(); DettPratica dettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPraticaId); + _log.info("Pratica " + pratica.getNumeroProgetto() + " id " + pratica.getIntPraticaId() + + " dettPratica " + (dettPratica == null ? 0 : dettPratica.getDettPraticaId())); ServiceContext serviceContext = new ServiceContext(); serviceContext.setCompanyId(dettPratica.getCompanyId()); serviceContext.setScopeGroupId(dettPratica.getGroupId()); @@ -203,9 +209,9 @@ public class SorteggioPraticaUtil { * @author Manifattura Web Group per Regione Siciliana * @param companyId * @param pratiche - * Lista di pratiche sorteggiate + * Lista di pratiche sorteggiate * @param dtSorteggio - * Data del sorteggio + * Data del sorteggio */ private static void saveSorteggio(long companyId, List pratiche, Date dtSorteggio) throws PortalException, SystemException { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties index 798e4662..dff53512 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_bo - build.number=2759 - build.date=1642600956690 + build.number=2772 + build.date=1646228476610 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/common/preview_file_entry.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/common/preview_file_entry.jsp index b010c000..a4ed628c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/common/preview_file_entry.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/common/preview_file_entry.jsp @@ -1,3 +1,4 @@ +<%@page import="com.liferay.portal.kernel.util.ContentTypes"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portlet.documentlibrary.util.RawMetadataProcessor"%> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_desc_edificio.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_desc_edificio.jsp index a9359cc4..fd29d7d9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_desc_edificio.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_desc_edificio.jsp @@ -1,3 +1,4 @@ +<%@page import="com.liferay.portal.kernel.util.HtmlUtil"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.liferay.portal.kernel.bean.BeanPropertiesUtil"%> <%@ include file="/html/fascicolo/init.jsp" %> @@ -266,7 +267,7 @@
<%= LanguageUtil.get(pageContext, "dcc-strutture-ele-misto-altro") %> - <%=BeanPropertiesUtil.getString(dettPratica, "dccStruttureEleAltroDescrizione") %> + <%= HtmlUtil.escape(BeanPropertiesUtil.getString(dettPratica, "dccStruttureEleAltroDescrizione")) %>
@@ -299,7 +300,7 @@
<%= LanguageUtil.get(pageContext, "dcc-orizzontamenti-altro") %> - <%=BeanPropertiesUtil.getString(dettPratica, "dccOrizzontamentiAltroDescrizione") %> + <%= HtmlUtil.escape(BeanPropertiesUtil.getString(dettPratica, "dccOrizzontamentiAltroDescrizione")) %>
@@ -349,7 +350,7 @@
<%= LanguageUtil.get(pageContext, "dcc-copertura-altro") %> - <%=BeanPropertiesUtil.getString(dettPratica, "dccCoperturaAltroDesrizione") %> + <%= HtmlUtil.escape(BeanPropertiesUtil.getString(dettPratica, "dccCoperturaAltroDesrizione")) %>
@@ -378,7 +379,7 @@
<%= LanguageUtil.get(pageContext, "dcc-elem-non-strut-altro") %> - <%=BeanPropertiesUtil.getString(dettPratica, "dccElemNonStrutAltroDescrizione") %> + <%= HtmlUtil.escape(BeanPropertiesUtil.getString(dettPratica, "dccElemNonStrutAltroDescrizione")) %>
@@ -423,7 +424,7 @@
<%= LanguageUtil.get(pageContext, "dcc-opere-di-rinforzo-altro") %> - <%=BeanPropertiesUtil.getString(dettPratica, "dccOpereDiRinforzoAltroDescrizione") %> + <%= HtmlUtil.escape(BeanPropertiesUtil.getString(dettPratica, "dccOpereDiRinforzoAltroDescrizione")) %>
@@ -511,7 +512,7 @@
<%= LanguageUtil.get(pageContext, "de-inf-altro") %> - <%=BeanPropertiesUtil.getString(dettPratica, "deInfAltroDesc") %> + <%= HtmlUtil.escape(BeanPropertiesUtil.getString(dettPratica, "deInfAltroDesc")) %>
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp index d385b891..c2e702ea 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp @@ -1,3 +1,4 @@ +<%@page import="com.liferay.portal.kernel.util.HtmlUtil"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="it.mwg.sismica.bo.shared.util.Generics"%> <%@page import="it.mwg.sismica.bo.util.MappeUtil"%> @@ -264,7 +265,7 @@ String urlIframeMappe = MappeUtil.getUrlBo(request, dettPratica, comune, true); <%= LanguageUtil.get(pageContext, "interv-fin-pub-desc") %>:
- <%= BeanPropertiesUtil.getString(dettPratica, "intervFinPubDesc") %> + <%= HtmlUtil.escape(BeanPropertiesUtil.getString(dettPratica, "intervFinPubDesc")) %>
@@ -517,16 +518,16 @@ String urlIframeMappe = MappeUtil.getUrlBo(request, dettPratica, comune, true);
- <%=LanguageUtil.get(pageContext, "tc-altro") %> + <%= LanguageUtil.get(pageContext, "tc-altro") %>
- <%=BeanPropertiesUtil.getString(dettPratica, "tcAltroDescrizione") %> + <%= HtmlUtil.escape(BeanPropertiesUtil.getString(dettPratica, "tcAltroDescrizione")) %>
- - <%=LanguageUtil.get(pageContext, "tc-con-dispositivi") %> + + <%= LanguageUtil.get(pageContext, "tc-con-dispositivi") %>
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_actions.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_actions.jsp index 942becaf..c22dad21 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_actions.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/gestionefirme/avvisi_actions.jsp @@ -48,6 +48,19 @@ + + + + + + + + + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo.jsp index 30ce4561..222f734b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo.jsp @@ -1,3 +1,4 @@ +<%@page import="it.tref.liferay.portos.bo.shared.util.StatoPraticaConstants"%> <%@page import="java.util.HashSet"%> <%@page import="java.util.Set"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> @@ -29,6 +30,7 @@ if (dettPratica == null) { if (dettPratica == null) { dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId); } + dettPraticaId = dettPratica.getDettPraticaId(); } %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/soggettipratica/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/soggettipratica/view.jsp index 2f23f275..43866e0c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/soggettipratica/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/soggettipratica/view.jsp @@ -404,7 +404,8 @@ dataMap.put("id", PortletKeys.SOGGETTI + "_dialogEditSoggetto"); url="<%= detailsURL.toString() %>" useDialog="true" /> <% if (soggetto.getFileVariazioneId() != 0) { - DocPratica pratica = DocPraticaLocalServiceUtil.getDocPratica(soggetto.getFileVariazioneId()); + DocPratica pratica = DocPraticaLocalServiceUtil.fetchDocPratica( + soggetto.getFileVariazioneId()); if (pratica != null) { //ADT BUG BO ID = 37 - AGGIUNTA FIRMATARI FILE BACK OFFICE FirmeBean firme = FirmeUtil.deserialize(pratica.getJsonFirmatari()); @@ -412,8 +413,9 @@ dataMap.put("id", PortletKeys.SOGGETTI + "_dialogEditSoggetto"); if (!firme.getFirmeDigitali().isEmpty()) { title.append("Firme sul file:
    "); for (FirmeDetail firma : firme.getFirmeDigitali()) { - List soggetti = SoggettoLocalServiceUtil.findByIntPratica_CodiceFiscale( - pratica.getIntPraticaId(), firma.getCfFirmatario()); + List soggetti = SoggettoLocalServiceUtil + .findByIntPratica_CodiceFiscale(pratica.getIntPraticaId(), + firma.getCfFirmatario()); if (soggetti.size() > 0) { title.append("
  • ").append(soggetti.get(0).getNome()) .append(StringPool.SPACE).append(soggetti.get(0).getCognome())