exo-jcr SVN: r4340 - kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2011-04-29 15:33:18 -0400 (Fri, 29 Apr 2011)
New Revision: 4340
Modified:
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/ExoLogger.java
Log:
EXOJCR-1221: The tag NOSONAR only works on instructions in one line
Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/ExoLogger.java
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/ExoLogger.java 2011-04-29 19:18:13 UTC (rev 4339)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/ExoLogger.java 2011-04-29 19:33:18 UTC (rev 4340)
@@ -129,8 +129,7 @@
{
// We need to use the standard out print since we are actually
// configuring the logger
- System.err.println("Could not load logger class factory " + e.getMessage()
- + " will use fail over logger instead"); //NOSONAR
+ System.err.println("Could not load logger class factory " + e.getMessage() + " will use fail over logger instead"); //NOSONAR
return failOverFactory.getExoLogger(name);
}
}
@@ -156,8 +155,7 @@
{
// We need to use the standard out print since we are actually
// configuring the logger
- System.err.println("Could not load logger class factory " + e.getMessage()
- + " will use fail over logger instead"); //NOSONAR
+ System.err.println("Could not load logger class factory " + e.getMessage() + " will use fail over logger instead"); //NOSONAR
return failOverFactory.getExoLogger(name);
}
}
13 years, 1 month
exo-jcr SVN: r4339 - in kernel/trunk: exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl and 4 other directories.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2011-04-29 15:18:13 -0400 (Fri, 29 Apr 2011)
New Revision: 4339
Modified:
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/ExoLogger.java
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/Jdk14Configurator.java
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/Log4JConfigurator.java
kernel/trunk/exo.kernel.component.command/src/main/java/org/exoplatform/services/command/impl/SimpleCommandLineParser.java
kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/Listener.java
kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ConcurrentPicoContainer.java
kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java
Log:
EXOJCR-1221: Fix for last existing violation in kernel
Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/ExoLogger.java
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/ExoLogger.java 2011-04-29 18:52:14 UTC (rev 4338)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/ExoLogger.java 2011-04-29 19:18:13 UTC (rev 4339)
@@ -127,8 +127,10 @@
}
catch (NoClassDefFoundError e)
{
+ // We need to use the standard out print since we are actually
+ // configuring the logger
System.err.println("Could not load logger class factory " + e.getMessage()
- + " will use fail over logger instead");
+ + " will use fail over logger instead"); //NOSONAR
return failOverFactory.getExoLogger(name);
}
}
@@ -152,8 +154,10 @@
}
catch (NoClassDefFoundError e)
{
+ // We need to use the standard out print since we are actually
+ // configuring the logger
System.err.println("Could not load logger class factory " + e.getMessage()
- + " will use fail over logger instead");
+ + " will use fail over logger instead"); //NOSONAR
return failOverFactory.getExoLogger(name);
}
}
Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/Jdk14Configurator.java
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/Jdk14Configurator.java 2011-04-29 18:52:14 UTC (rev 4338)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/Jdk14Configurator.java 2011-04-29 19:18:13 UTC (rev 4339)
@@ -48,7 +48,9 @@
}
catch (IOException e)
{
- e.printStackTrace();
+ // We need to use the standard out print since we are actually
+ // configuring the logger
+ e.printStackTrace(); //NOSONAR
}
this.properties = properties;
}
Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/Log4JConfigurator.java
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/Log4JConfigurator.java 2011-04-29 18:52:14 UTC (rev 4338)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/Log4JConfigurator.java 2011-04-29 19:18:13 UTC (rev 4339)
@@ -49,7 +49,9 @@
}
catch (Exception e)
{
- e.printStackTrace();
+ // We need to use the standard out print since we are actually
+ // configuring the logger
+ e.printStackTrace(); //NOSONAR
}
return null;
}
Modified: kernel/trunk/exo.kernel.component.command/src/main/java/org/exoplatform/services/command/impl/SimpleCommandLineParser.java
===================================================================
--- kernel/trunk/exo.kernel.component.command/src/main/java/org/exoplatform/services/command/impl/SimpleCommandLineParser.java 2011-04-29 18:52:14 UTC (rev 4338)
+++ kernel/trunk/exo.kernel.component.command/src/main/java/org/exoplatform/services/command/impl/SimpleCommandLineParser.java 2011-04-29 19:18:13 UTC (rev 4339)
@@ -52,7 +52,6 @@
context.remove(parametersPropertyName);
- // TODO make regexp parser
// the rules:
// first word is command name (should be returned)
// else are parameters of command (should be put into Context under name ==
Modified: kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/Listener.java
===================================================================
--- kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/Listener.java 2011-04-29 18:52:14 UTC (rev 4338)
+++ kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/Listener.java 2011-04-29 19:18:13 UTC (rev 4339)
@@ -29,8 +29,6 @@
*/
public abstract class Listener<S, D> extends BaseComponentPlugin
{
- // TODO: Should have the event name here to avoid the conflict with the plugin
- // name
/**
* This method should be invoked when an event with the same name is
Modified: kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java
===================================================================
--- kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java 2011-04-29 18:52:14 UTC (rev 4338)
+++ kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java 2011-04-29 19:18:13 UTC (rev 4339)
@@ -142,7 +142,7 @@
* @param name The name of the event
* @param source The source object instance
* @param data The data object instance
- * @throws Exception TODO: Should not delegate to the method broadcast(Event)
+ * @throws Exception if an exception occurs
*/
final public <S, D> void broadcast(String name, S source, D data) throws Exception
{
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ConcurrentPicoContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ConcurrentPicoContainer.java 2011-04-29 18:52:14 UTC (rev 4338)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/ConcurrentPicoContainer.java 2011-04-29 19:18:13 UTC (rev 4339)
@@ -474,8 +474,6 @@
return parent.getComponentInstance(componentAdapter.getComponentKey());
}
- // TODO: decide .. exception or null?
- // exceptrion: mx: +1, joehni +1
return null;
}
Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java 2011-04-29 18:52:14 UTC (rev 4338)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/StandaloneContainer.java 2011-04-29 19:18:13 UTC (rev 4339)
@@ -71,7 +71,6 @@
private static StandaloneContainer container;
- // TODO use ONLY attribute from context instead
private static URL configurationURL = null;
private static boolean useDefault = true;
@@ -420,9 +419,7 @@
}
catch (Exception ex)
{
- // TODO https://jira.jboss.org/jira/browse/EXOJCR-198
- //System.err.println("Error of default config init: ");
- //ex.printStackTrace();
+ // ignore me
}
}
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java 2011-04-29 18:52:14 UTC (rev 4338)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/src/main/java/org/exoplatform/kernel/demos/mc/InjectingBean.java 2011-04-29 19:18:13 UTC (rev 4339)
@@ -35,9 +35,10 @@
import org.jboss.kernel.plugins.bootstrap.basic.KernelConstants;
import org.jboss.kernel.spi.config.KernelConfigurator;
-import javax.transaction.TransactionManager;
import java.util.Map;
+import javax.transaction.TransactionManager;
+
/**
* This POJO demonstrates how to use annotations to perform injections of JBoss Microcontainer components
* into a service object configured and managed through exo-kernel.
@@ -169,32 +170,38 @@
* @param bindings
*/
@MapValue(
- value = {
- @EntryValue(
- key = @Value(type = Class.class, string = @StringValue(value = "org.jboss.dependency.spi.Controller", type = Class.class)),
- value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_CONTROLLER_NAME))
- ),
- @EntryValue(
- key = @Value(type = Class.class, string = @StringValue(value = "org.jboss.kernel.Kernel", type = Class.class)),
- value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_NAME))
- ),
- @EntryValue(
- key = @Value(type = Class.class, string = @StringValue(value = "org.jboss.kernel.spi.dependency.KernelController", type = Class.class)),
- value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_CONTROLLER_NAME))
- ),
- @EntryValue(
- key = @Value(type = Class.class, string = @StringValue(value = "org.jboss.kernel.spi.registry.KernelBus", type = Class.class)),
- value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_BUS_NAME))
- ),
- @EntryValue(
- key = @Value(type = Class.class, string = @StringValue(value = "org.jboss.kernel.spi.registry.KernelRegistry", type = Class.class)),
- value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_REGISTRY_NAME))
- ),
- @EntryValue(
- key = @Value(type = Class.class, string = @StringValue(value = "org.jboss.kernel.spi.config.KernelConfigurator", type = Class.class)),
- value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_CONFIGURATOR_NAME))
- )
- }
+ value = {
+ @EntryValue(
+ key = @Value(type = Class.class,
+ string = @StringValue(value = "org.jboss.dependency.spi.Controller", type = Class.class)),
+ value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_CONTROLLER_NAME))
+ ),
+ @EntryValue(
+ key = @Value(type = Class.class,
+ string = @StringValue(value = "org.jboss.kernel.Kernel", type = Class.class)),
+ value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_NAME))
+ ),
+ @EntryValue(
+ key = @Value(type = Class.class,
+ string = @StringValue(value = "org.jboss.kernel.spi.dependency.KernelController", type = Class.class)),
+ value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_CONTROLLER_NAME))
+ ),
+ @EntryValue(
+ key = @Value(type = Class.class,
+ string = @StringValue(value = "org.jboss.kernel.spi.registry.KernelBus", type = Class.class)),
+ value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_BUS_NAME))
+ ),
+ @EntryValue(
+ key = @Value(type = Class.class,
+ string = @StringValue(value = "org.jboss.kernel.spi.registry.KernelRegistry", type = Class.class)),
+ value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_REGISTRY_NAME))
+ ),
+ @EntryValue(
+ key = @Value(type = Class.class,
+ string = @StringValue(value = "org.jboss.kernel.spi.config.KernelConfigurator", type = Class.class)),
+ value = @Value(inject = @Inject(bean = KernelConstants.KERNEL_CONFIGURATOR_NAME))
+ )
+ }
)
public void setBindings(Map<Class<?>, Object> bindings)
{
13 years, 1 month
exo-jcr SVN: r4338 - kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2011-04-29 14:52:14 -0400 (Fri, 29 Apr 2011)
New Revision: 4338
Modified:
kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryImpl.java
Log:
EXOJCR-1221: fixed the violation called "The equals and hashCode methods of URL are blocking"
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryImpl.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryImpl.java 2011-04-29 17:55:21 UTC (rev 4337)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ExoCacheFactoryImpl.java 2011-04-29 18:52:14 UTC (rev 4338)
@@ -37,7 +37,6 @@
import org.jboss.cache.config.EvictionRegionConfig;
import java.io.Serializable;
-import java.net.URL;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
@@ -349,14 +348,14 @@
*/
private static class ConfigurationKey
{
- private final URL jgroupsConfigFile;
+ private final String jgroupsConfigFile;
private final Configuration conf;
public ConfigurationKey(Configuration initialConf) throws CloneNotSupportedException
{
// Clone it first since it will be modified
this.conf = initialConf.clone();
- this.jgroupsConfigFile = conf.getJGroupsConfigFile();
+ this.jgroupsConfigFile = (conf.getJGroupsConfigFile() == null ? null : conf.getJGroupsConfigFile().toString());
// remove the jgroupsConfigFile from the conf
conf.setJgroupsConfigFile(null);
// remove the EvictionConfig to ignore it
13 years, 1 month
exo-jcr SVN: r4337 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2011-04-29 13:55:21 -0400 (Fri, 29 Apr 2011)
New Revision: 4337
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
Log:
EXOJCR-1221: fixed the violation called "The equals and hashCode methods of URL are blocking"
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java 2011-04-29 15:09:58 UTC (rev 4336)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java 2011-04-29 17:55:21 UTC (rev 4337)
@@ -39,7 +39,6 @@
import java.io.IOException;
import java.io.InputStream;
-import java.net.URL;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.HashMap;
@@ -331,7 +330,7 @@
*/
private static class ConfigurationKey
{
- private final URL jgroupsConfigFile;
+ private final String jgroupsConfigFile;
private final Configuration conf;
@@ -339,7 +338,7 @@
{
// Clone it first since it will be modified
this.conf = initialConf.clone();
- this.jgroupsConfigFile = conf.getJGroupsConfigFile();
+ this.jgroupsConfigFile = (conf.getJGroupsConfigFile() == null ? null : conf.getJGroupsConfigFile().toString());
// remove the jgroupsConfigFile from the conf
conf.setJgroupsConfigFile(null);
// remove the EvictionConfig to ignore it
13 years, 1 month
exo-jcr SVN: r4336 - in jcr/trunk: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl and 42 other directories.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2011-04-29 11:09:58 -0400 (Fri, 29 Apr 2011)
New Revision: 4336
Modified:
jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositorySuspendController.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/LocationFactory.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SysViewWorkspaceInitializer.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/XASessionImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockRemoverHolder.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/InmemoryNodeTypeRepository.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemDefinitionImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeDataManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/XmlNodeTypeDataPersister.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/IndexerChangesFilter.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/PropertyFunctionQueryNode.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexUpdateMonitor.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexUpdateMonitor.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexCacheLoader.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexChangesFilter.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChangesHolder.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChildAxisQuery.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DefaultHTMLExcerpt.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DefaultIndexUpdateMonitor.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DefaultXMLExcerpt.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneQueryBuilder.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MoreLikeThis.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SharedFieldCache.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/WeightedHTMLExcerpt.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/WeightedXMLExcerpt.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/sql/JCRSQLQueryBuilder.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/xpath/XPathQueryBuilder.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/SessionChangesLog.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/proccess/WorkerService.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/DocumentViewImporter.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/statistics/JCRStatisticsManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/util/Text.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/jbosscache/GenericTransactionService.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/ExtendedBackupManager.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryBackupChainLog.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/IndexCleanHelper.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/common/SessionProvider.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/distribution/DataDistributionType.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewGroupListener.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewUserListener.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RESTRegistryService.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/creation/RepositoryCreationService.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/AbstractXMLViewNodeRepresentation.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/DocumentViewNodeRepresentationFactory.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/SystemViewNodeRepresentationFactory.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtFileNodeRepresentation.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtResourceNodeRepresentation.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/JcrGroovyClassLoaderProvider.java
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServerImpl.java
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdMkd.java
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdStor.java
jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpDataTransiverImpl.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/AclCommand.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java
Log:
EXOJCR-1221 : The same violations was fixed in JCR.
Modified: jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -771,9 +771,9 @@
+ shortInfo.getRepositoryName()
+ "\n"
+ "\t\tbackup type : "
- + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
- : "full only") + "\n" + "\t\tfull backups state : " + getRepositoryBackupToFullState(shortInfo
- .getState()))
+ + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
+ : "full only") + "\n" + "\t\tfull backups state : "
+ + getRepositoryBackupToFullState(shortInfo.getState()))
+ "\n"
+ (shortInfo.getBackupType() == BackupManager.FULL_BACKUP_ONLY ? ""
: "\t\tincremental backups state : " + "working" + "\n")
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryServiceImpl.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -46,8 +46,8 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.StringTokenizer;
import java.util.Map.Entry;
-import java.util.StringTokenizer;
import javax.jcr.RepositoryException;
@@ -95,7 +95,8 @@
* be started before the {@link RepositoryServiceImpl} so we have to enforce the dependency
* with this component by adding it to the constructor
*/
- public RepositoryServiceImpl(RepositoryServiceConfiguration configuration, ExoContainerContext context, RepositoryCreationSynchronizer synchronizer)
+ public RepositoryServiceImpl(RepositoryServiceConfiguration configuration, ExoContainerContext context,
+ RepositoryCreationSynchronizer synchronizer)
{
this.config = configuration;
addNodeTypePlugins = new ArrayList<ComponentPlugin>();
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositorySuspendController.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositorySuspendController.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositorySuspendController.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -59,12 +59,14 @@
}
/**
- * Suspend repository which means that allow only read operations. All writing threads will wait until resume operations invoked.
+ * Suspend repository which means that allow only read operations.
+ * All writing threads will wait until resume operations invoked.
*
* @return repository state
*/
@Managed
- @ManagedDescription("Suspend repository which means that allow only read operations. All writing threads will wait until resume operations invoked.")
+ @ManagedDescription("Suspend repository which means that allow only read operations. " +
+ "All writing threads will wait until resume operations invoked.")
public String suspend()
{
// Need privileges to manage repository.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -175,10 +175,10 @@
else
{
cleanScripts
- .add("delete from JCR_SVALUE where exists(select * from JCR_SITEM where JCR_SITEM.ID=JCR_SVALUE.PROPERTY_ID and JCR_SITEM.CONTAINER_NAME='"
+ .add("delete from JCR_SVALUE where exists(select * from JCR_SITEM where JCR_SITEM.ID=JCR_SVALUE.PROPERTY_ID and JCR_SITEM.CONTAINER_NAME='"
+ containerName + "')");
cleanScripts
- .add("delete from JCR_SREF where exists(select * from JCR_SITEM where JCR_SITEM.ID=JCR_SREF.PROPERTY_ID and JCR_SITEM.CONTAINER_NAME='"
+ .add("delete from JCR_SREF where exists(select * from JCR_SITEM where JCR_SITEM.ID=JCR_SREF.PROPERTY_ID and JCR_SITEM.CONTAINER_NAME='"
+ containerName + "')");
if (cleanWithHelper)
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/config/JDBCConfigurationPersister.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -444,9 +444,8 @@
if (ps.executeUpdate() <= 0)
{
- LOG
- .warn("Repository service configuration doesn't stored ok. No rows was affected in JDBC operation. Datasource "
- + sourceName + ". SQL: " + sql);
+ LOG.warn("Repository service configuration doesn't stored ok. "
+ + "No rows was affected in JDBC operation. Datasource " + sourceName + ". SQL: " + sql);
}
}
else
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -19,7 +19,6 @@
package org.exoplatform.services.jcr.impl.core;
import org.exoplatform.services.jcr.core.NamespaceAccessor;
-import org.exoplatform.services.jcr.datamodel.InternalQName;
import org.exoplatform.services.jcr.datamodel.QPath;
import org.exoplatform.services.jcr.datamodel.QPathEntry;
import org.exoplatform.services.jcr.impl.Constants;
@@ -38,9 +37,11 @@
private static PathElement[] EMPTY_PATH = new PathElement[0];
- private static final PathElement THIS_ELEMENT = new PathElement(Constants.NS_DEFAULT_URI, THIS_RELPATH, Constants.NS_EMPTY_PREFIX, -1);
+ private static final PathElement THIS_ELEMENT =
+ new PathElement(Constants.NS_DEFAULT_URI, THIS_RELPATH, Constants.NS_EMPTY_PREFIX, -1);
- private static final PathElement MOVE_UP_ELEMENT = new PathElement(Constants.NS_DEFAULT_URI, PARENT_RELPATH, Constants.NS_EMPTY_PREFIX, -1);
+ private static final PathElement MOVE_UP_ELEMENT =
+ new PathElement(Constants.NS_DEFAULT_URI, PARENT_RELPATH, Constants.NS_EMPTY_PREFIX, -1);
protected final PathElement[] names;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/LocationFactory.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/LocationFactory.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/LocationFactory.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -314,8 +314,8 @@
char ch0 = str.charAt(0);
char ch1 = str.charAt(1);
return (((ch0 == '.') && (isNonspace(str, ch1) && (ch1 != '.')))
- || ((isNonspace(str, ch0) && (ch0 != '.')) && (ch1 == '.')) || ((isNonspace(str, ch0) && (ch0 != '.')) && (isNonspace(
- str, ch1) && (ch1 != '.'))));
+ || ((isNonspace(str, ch0) && (ch0 != '.')) && (ch1 == '.')) || ((isNonspace(str, ch0) && (ch0 != '.'))
+ && (isNonspace(str, ch1) && (ch1 != '.'))));
default :
return isNonspace(str, str.charAt(0)) && isSimpleString(str.substring(1, strLen - 1))
&& isNonspace(str, str.charAt(strLen - 1));
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -904,10 +904,9 @@
// warn in debug mode only
else if (PropertyManager.isDevelopping())
{
- log
- .warn(
- "This kind of operation is forbidden after a session.logout(), please note that an exception will be raised in the next jcr version.",
- new Exception(closedByCallStack));
+ log.warn("This kind of operation is forbidden after a session.logout(), "
+ + "please note that an exception will be raised in the next jcr version.", new Exception(
+ closedByCallStack));
}
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SysViewWorkspaceInitializer.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SysViewWorkspaceInitializer.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SysViewWorkspaceInitializer.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -799,7 +799,8 @@
}
else
{
- vdata = new TransientValueData(currentProperty.getValues().size(), propertyValue.getText()); // other like String
+ // other like String
+ vdata = new TransientValueData(currentProperty.getValues().size(), propertyValue.getText());
}
currentProperty.getValues().add(vdata);
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/XASessionImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/XASessionImpl.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/XASessionImpl.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -75,7 +75,8 @@
private Object payload;
/**
- * TransactionException of a last commit in context of a transaction. Can be set on commit and will be restet on enlist/delist resource or rollback.
+ * TransactionException of a last commit in context of a transaction.
+ * Can be set on commit and will be restet on enlist/delist resource or rollback.
*/
private TransactionException commitException = null;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockManagerImpl.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -290,7 +290,8 @@
// at
// org.exoplatform.services.jcr.impl.core.XASessionImpl.logout(XASessionImpl.java:254)
// at
- // org.exoplatform.services.jcr.impl.core.SessionRegistry$SessionCleaner.callPeriodically(SessionRegistry.java:165)
+ // org.exoplatform.services.jcr.impl.core.SessionRegistry
+ // $SessionCleaner.callPeriodically(SessionRegistry.java:165)
// at
// org.exoplatform.services.jcr.impl.proccess.WorkerThread.run(WorkerThread.java:46)
((NodeImpl)sessionImpl.getTransientNodesManager().getItemByIdentifier(
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockRemoverHolder.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockRemoverHolder.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/LockRemoverHolder.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -63,7 +63,9 @@
{
threadCount = entry.getLockRemoverThreadsCount();
}
- workerService = new WorkerService(threadCount, "Lock Remover " + (ctx != null ? ctx.getName() : (entry == null ? "" : entry.getName())));
+ workerService =
+ new WorkerService(threadCount, "Lock Remover "
+ + (ctx != null ? ctx.getName() : (entry == null ? "" : entry.getName())));
}
/**
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/cacheable/AbstractCacheableLockManager.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -757,7 +757,8 @@
}
/**
- * Execute the given action outside a transaction. This is needed since the {@link Cache} used by implementation of {@link CacheableLockManager}
+ * Execute the given action outside a transaction. This is needed since the {@link Cache} used by implementation
+ * of {@link CacheableLockManager}
* to manage the persistence of its locks thanks to a {@link CacheLoader} and a {@link CacheLoader} lock the cache {@link Node}
* even for read operations which cause deadlock issue when a XA {@link Transaction} is already opened
* @throws LockException when a exception occurs
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -207,7 +207,8 @@
{
String dataSourceName = parameterEntry.getParameterValue(INFINISPAN_JDBC_CL_DATASOURCE, null);
// if data source is defined, then inject correct data-types.
- // Also it cans be not defined and nothing should be injected (i.e. no cache loader is used (possibly pattern is changed, to used another cache loader))
+ // Also it cans be not defined and nothing should be injected
+ //(i.e. no cache loader is used (possibly pattern is changed, to used another cache loader))
if (dataSourceName != null)
{
String dialect;
@@ -317,8 +318,10 @@
// else GENERIC, DB2 etc
// set parameters if not defined
- // if parameter is missing in configuration, then getParameterValue(INFINISPAN_JDBC_CL_DATA_COLUMN, INFINISPAN_JDBC_CL_AUTO)
- // will return INFINISPAN_JDBC_CL_AUTO. If parameter is present in configuration and equals to "auto", then it should be replaced
+ // if parameter is missing in configuration, then
+ // getParameterValue(INFINISPAN_JDBC_CL_DATA_COLUMN, INFINISPAN_JDBC_CL_AUTO)
+ // will return INFINISPAN_JDBC_CL_AUTO. If parameter is present in configuration and
+ //equals to "auto", then it should be replaced
// with correct value for given database
if (parameterEntry.getParameterValue(INFINISPAN_JDBC_CL_DATA_COLUMN, INFINISPAN_JDBC_CL_AUTO)
.equalsIgnoreCase(INFINISPAN_JDBC_CL_AUTO))
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -31,8 +31,8 @@
import org.exoplatform.services.jcr.impl.storage.jdbc.DBConstants;
import org.exoplatform.services.jcr.impl.storage.jdbc.DialectDetecter;
import org.exoplatform.services.jcr.jbosscache.ExoJBossCacheFactory;
+import org.exoplatform.services.jcr.jbosscache.PrivilegedJBossCacheHelper;
import org.exoplatform.services.jcr.jbosscache.ExoJBossCacheFactory.CacheType;
-import org.exoplatform.services.jcr.jbosscache.PrivilegedJBossCacheHelper;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.services.naming.InitialContextInitializer;
@@ -291,7 +291,8 @@
{
String dataSourceName = parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_DATASOURCE, null);
// if data source is defined, then inject correct data-types.
- // Also it cans be not defined and nothing should be injected (i.e. no cache loader is used (possibly pattern is changed, to used another cache loader))
+ // Also it cans be not defined and nothing should be injected
+ // (i.e. no cache loader is used (possibly pattern is changed, to used another cache loader))
if (dataSourceName != null)
{
String dialect;
@@ -399,8 +400,10 @@
// else GENERIC, DB2 etc
// set parameters if not defined
- // if parameter is missing in configuration, then getParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, JBOSSCACHE_JDBC_CL_AUTO)
- // will return JBOSSCACHE_JDBC_CL_AUTO. If parameter is present in configuration and equals to "auto", then it should be replaced
+ // if parameter is missing in configuration, then
+ // getParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, JBOSSCACHE_JDBC_CL_AUTO)
+ // will return JBOSSCACHE_JDBC_CL_AUTO. If parameter is present in configuration and
+ // equals to "auto", then it should be replaced
// with correct value for given database
if (parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, JBOSSCACHE_JDBC_CL_AUTO)
.equalsIgnoreCase(JBOSSCACHE_JDBC_CL_AUTO))
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/InmemoryNodeTypeRepository.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/InmemoryNodeTypeRepository.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/InmemoryNodeTypeRepository.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -220,7 +220,7 @@
}
/**
- * @see org.exoplatform.services.jcr.impl.core.nodetype.NodeTypeRepository#removeNodeType(org.exoplatform.services.jcr.datamodel.InternalQName, org.exoplatform.services.jcr.core.nodetype.NodeTypeData)
+ * {@inheritDoc}
*/
public void removeNodeType(NodeTypeData nodeType)
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemDefinitionImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemDefinitionImpl.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/ItemDefinitionImpl.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -66,7 +66,8 @@
* @param protectedItem
*/
public ItemDefinitionImpl(ItemDefinitionData itemDefinitionData, NodeTypeDataManager nodeTypeDataManager,
- ExtendedNodeTypeManager nodeTypeManager, LocationFactory locationFactory, ValueFactory valueFactory, ItemDataConsumer dataManager)
+ ExtendedNodeTypeManager nodeTypeManager, LocationFactory locationFactory, ValueFactory valueFactory,
+ ItemDataConsumer dataManager)
{
this.itemDefinitionData = itemDefinitionData;
this.nodeTypeDataManager = nodeTypeDataManager;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeDataManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeDataManagerImpl.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeDataManagerImpl.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -87,7 +87,7 @@
private static final String NODETYPES_FILE = "nodetypes.xml";
- private final Log log = ExoLogger.getLogger("exo.jcr.component.core.NodeTypeDataManagerImpl");
+ private static final Log log = ExoLogger.getLogger("exo.jcr.component.core.NodeTypeDataManagerImpl");
protected final String accessControlPolicy;
@@ -465,10 +465,9 @@
{
final InternalQName[] nts = new InternalQName[mixinTypes.length + 1];
nts[0] = primaryNodeType;
- for (int i = 0; i < mixinTypes.length; i++)
- {
- nts[i + 1] = mixinTypes[i];
- }
+
+ System.arraycopy(mixinTypes, 0, nts, 1, mixinTypes.length);
+
return getPropertyDefinitions(propertyName, nts);
}
@@ -889,9 +888,7 @@
}
/**
- * @throws RepositoryException
- * @throws ConstraintViolationException
- * @see org.exoplatform.services.jcr.core.nodetype.NodeTypeDataManager#updateNodeType(org.exoplatform.services.jcr.core.nodetype.NodeTypeData, org.exoplatform.services.jcr.core.nodetype.NodeTypeData, java.util.Map)
+ * {@inheritDoc}
*/
public PlainChangesLog updateNodeType(NodeTypeData ancestorDefinition, NodeTypeData recipientDefinition,
Map<InternalQName, NodeTypeData> volatileNodeTypes) throws ConstraintViolationException, RepositoryException
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeImpl.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/NodeTypeImpl.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -453,9 +453,10 @@
return checkValueConstraints(requiredType, constraints, value);
}
else if (requiredType == PropertyType.BINARY
- && (value.getType() == PropertyType.STRING || value.getType() == PropertyType.DATE
- || value.getType() == PropertyType.LONG || value.getType() == PropertyType.DOUBLE
- || value.getType() == PropertyType.NAME || value.getType() == PropertyType.PATH || value.getType() == PropertyType.BOOLEAN))
+ && (value.getType() == PropertyType.STRING || value.getType() == PropertyType.DATE
+ || value.getType() == PropertyType.LONG || value.getType() == PropertyType.DOUBLE
+ || value.getType() == PropertyType.NAME || value.getType() == PropertyType.PATH || value
+ .getType() == PropertyType.BOOLEAN))
{
return checkValueConstraints(requiredType, constraints, value);
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/JCRNodeTypeDataPersister.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -325,7 +325,7 @@
}
/**
- * @see org.exoplatform.services.jcr.impl.core.nodetype.registration.NodeTypeDataPersister#unmarshall(org.exoplatform.services.jcr.datamodel.InternalQName, java.util.Set)
+ * {@inheritDoc}
*/
public NodeTypeData getNodeType(InternalQName nodeTypeName) throws RepositoryException, NoSuchNodeTypeException
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/XmlNodeTypeDataPersister.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/XmlNodeTypeDataPersister.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/nodetype/registration/XmlNodeTypeDataPersister.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -184,7 +184,7 @@
}
/**
- * @see org.exoplatform.services.jcr.impl.core.nodetype.registration.NodeTypeDataPersister#getNodeType(org.exoplatform.services.jcr.datamodel.InternalQName)
+ * {@inheritDoc}
*/
public NodeTypeData getNodeType(InternalQName nodeTypeName) throws RepositoryException
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/IndexerChangesFilter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/IndexerChangesFilter.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/IndexerChangesFilter.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -105,7 +105,7 @@
}
/**
- * @see org.exoplatform.services.jcr.dataflow.persistent.ItemsPersistenceListener#onSaveItems(org.exoplatform.services.jcr.dataflow.ItemStateChangesLog)
+ * {@inheritDoc}
*/
public void onSaveItems(ItemStateChangesLog itemStates)
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/PropertyFunctionQueryNode.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/PropertyFunctionQueryNode.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/PropertyFunctionQueryNode.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -26,8 +26,10 @@
* <code>PropertyFunctionQueryNode</code> allows to place function calls on properties
* in a query. Supported function names are:
* <ul>
- * <li><code>upper-case</code> as specified in <a href="http://www.w3.org/TR/xquery-operators/#func-upper-case">fn:upper-case()</a></li>
- * <li><code>lower-case</code> as specified in <a href="http://www.w3.org/TR/xquery-operators/#func-lower-case">fn:lower-case()</a></li>
+ * <li><code>upper-case</code> as specified in
+ * <a href="http://www.w3.org/TR/xquery-operators/#func-upper-case">fn:upper-case()</a></li>
+ * <li><code>lower-case</code> as specified in
+ * <a href="http://www.w3.org/TR/xquery-operators/#func-lower-case">fn:lower-case()</a></li>
* </ul>
*/
public class PropertyFunctionQueryNode extends QueryNode {
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -509,7 +509,7 @@
}
/**
- * @see org.exoplatform.services.jcr.dataflow.persistent.ItemsPersistenceListener#onSaveItems(org.exoplatform.services.jcr.dataflow.ItemStateChangesLog)
+ * {@inheritDoc}
*/
public void onSaveItems(ItemStateChangesLog itemStates)
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexUpdateMonitor.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexUpdateMonitor.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexUpdateMonitor.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -175,7 +175,7 @@
}
/**
- * @see org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitor#removeIndexUpdateMonitorListener(org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitorListener)
+ * {@inheritDoc}
*/
public void removeIndexUpdateMonitorListener(IndexUpdateMonitorListener listener)
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/IndexerCacheLoader.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -126,7 +126,7 @@
}
/**
- * @see org.exoplatform.services.jcr.impl.storage.jbosscache.AbstractWriteOnlyCacheLoader#put(org.jboss.cache.Fqn, java.util.Map)
+ * {@inheritDoc}
*/
public void put(Fqn arg0, Map<Object, Object> arg1) throws Exception
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -41,8 +41,6 @@
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig.SingletonStoreConfig;
-import org.jboss.cache.config.Configuration.CacheMode;
-import org.jboss.cache.loader.SingletonStoreCacheLoader.PushStateException;
import java.io.IOException;
import java.io.Serializable;
@@ -170,9 +168,8 @@
}
/**
- * @see org.exoplatform.services.jcr.impl.core.query.IndexerChangesFilter#doUpdateIndex(java.util.Set, java.util.Set, java.util.Set, java.util.Set)
+ * {@inheritDoc}
*/
- @Override
protected void doUpdateIndex(Set<String> removedNodes, Set<String> addedNodes, Set<String> parentRemovedNodes,
Set<String> parentAddedNodes)
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexInfos.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -124,7 +124,7 @@
}
/**
- * @see org.exoplatform.services.jcr.impl.core.query.IndexerIoModeListener#onChangeMode(org.exoplatform.services.jcr.impl.core.query.IndexerIoMode)
+ * {@inheritDoc}
*/
public void onChangeMode(IndexerIoMode mode)
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexUpdateMonitor.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexUpdateMonitor.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexUpdateMonitor.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -115,7 +115,7 @@
}
/**
- * @see org.exoplatform.services.jcr.impl.core.query.IndexerIoModeListener#onChangeMode(org.exoplatform.services.jcr.impl.core.query.IndexerIoMode)
+ * {@inheritDoc}
*/
public void onChangeMode(IndexerIoMode mode)
{
@@ -172,7 +172,7 @@
}
/**
- * @see org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitor#addIndexUpdateMonitorListener(org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitorListener)
+ * {@inheritDoc}
*/
public void addIndexUpdateMonitorListener(IndexUpdateMonitorListener listener)
{
@@ -180,7 +180,7 @@
}
/**
- * @see org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitor#removeIndexUpdateMonitorListener(org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitorListener)
+ * {@inheritDoc}
*/
public void removeIndexUpdateMonitorListener(IndexUpdateMonitorListener listener)
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexCacheLoader.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexCacheLoader.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexCacheLoader.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -51,7 +51,8 @@
if (ioMode == IndexerIoMode.READ_ONLY)
{
throw new UnsupportedOperationException(
- "Can't set ReadOnly on this type of CacheLoader. It is designed to provide local index for each cluster instance. Make sure you are using Index properly.");
+ "Can't set ReadOnly on this type of CacheLoader. It is designed to provide local index "
+ + "for each cluster instance. Make sure you are using Index properly.");
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexChangesFilter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexChangesFilter.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/LocalIndexChangesFilter.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -148,9 +148,8 @@
}
/**
- * @see org.exoplatform.services.jcr.impl.core.query.IndexerChangesFilter#doUpdateIndex(java.util.Set, java.util.Set, java.util.Set, java.util.Set)
+ * {@inheritDoc}
*/
- @Override
protected void doUpdateIndex(Set<String> removedNodes, Set<String> addedNodes, Set<String> parentRemovedNodes,
Set<String> parentAddedNodes)
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChangesHolder.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChangesHolder.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChangesHolder.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -175,7 +175,9 @@
else
{
// The value is a String
- field = new Field(name, (String)value, getStoreParameter(flags), getIndexParameter(flags), getTermVectorParameter(flags));
+ field =
+ new Field(name, (String) value, getStoreParameter(flags), getIndexParameter(flags),
+ getTermVectorParameter(flags));
}
field.setBoost(boost);
field.setOmitNorms((flags & OMIT_NORMS_FLAG) > 0);
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChildAxisQuery.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChildAxisQuery.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChildAxisQuery.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -21,7 +21,6 @@
import org.apache.lucene.index.Term;
import org.apache.lucene.index.TermDocs;
import org.apache.lucene.search.Explanation;
-import org.apache.lucene.search.HitCollector;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.Scorer;
import org.apache.lucene.search.Searcher;
@@ -724,7 +723,8 @@
Iterator<NodeData> entries;
if (nameTest != null)
{
- //NodeData childNodeData = (NodeData)itemMgr.getItemData(state, new QPathEntry(nameTest, 1));//state.getChildNodeEntries(nameTest).iterator();
+ //NodeData childNodeData = (NodeData)itemMgr.getItemData(state, new QPathEntry(nameTest, 1));
+ // //state.getChildNodeEntries(nameTest).iterator();
List<NodeData> childs = itemMgr.getChildNodesData(state);
List<NodeData> datas = new ArrayList<NodeData>();
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DefaultHTMLExcerpt.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DefaultHTMLExcerpt.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DefaultHTMLExcerpt.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -16,17 +16,19 @@
*/
package org.exoplatform.services.jcr.impl.core.query.lucene;
+import org.apache.lucene.index.TermPositionVector;
+
import java.io.IOException;
-import org.apache.lucene.index.TermPositionVector;
-
/**
* <code>DefaultHTMLExcerpt</code> creates a HTML excerpt with the following
* format:
* <pre>
* <div>
- * <span><strong>Jackrabbit</strong> implements both the mandatory XPath and optional SQL <strong>query</strong> syntax.</span>
- * <span>Before parsing the XPath <strong>query</strong> in <strong>Jackrabbit</strong>, the statement is surrounded</span>
+ * <span><strong>Jackrabbit</strong> implements both the mandatory XPath and optional SQL
+ * <strong>query</strong> syntax.</span>
+ * <span>Before parsing the XPath <strong>query</strong> in <strong>Jackrabbit</strong>,
+ * the statement is surrounded</span>
* </div>
* </pre>
*/
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DefaultIndexUpdateMonitor.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DefaultIndexUpdateMonitor.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DefaultIndexUpdateMonitor.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -69,7 +69,7 @@
}
/**
- * @see org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitor#addIndexUpdateMonitorListener(org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitorListener)
+ * {@inheritDoc}
*/
public void addIndexUpdateMonitorListener(IndexUpdateMonitorListener listener)
{
@@ -77,7 +77,7 @@
}
/**
- * @see org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitor#removeIndexUpdateMonitorListener(org.exoplatform.services.jcr.impl.core.query.lucene.IndexUpdateMonitorListener)
+ * {@inheritDoc}
*/
public void removeIndexUpdateMonitorListener(IndexUpdateMonitorListener listener)
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DefaultXMLExcerpt.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DefaultXMLExcerpt.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/DefaultXMLExcerpt.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -27,8 +27,10 @@
* result for a node:
* <pre>
* <excerpt>
- * <fragment><highlight>Jackrabbit</highlight> implements both the mandatory XPath and optional SQL <highlight>query</highlight> syntax.</fragment>
- * <fragment>Before parsing the XPath <highlight>query</highlight> in <highlight>Jackrabbit</highlight>, the statement is surrounded</fragment>
+ * <fragment><highlight>Jackrabbit</highlight> implements both the mandatory XPath and optional SQL
+ * <highlight>query</highlight> syntax.</fragment>
+ * <fragment>Before parsing the XPath <highlight>query</highlight> in <highlight>Jackrabbit</highlight>,
+ * the statement is surrounded</fragment>
* </excerpt>
* </pre>
*/
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneQueryBuilder.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneQueryBuilder.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/LuceneQueryBuilder.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -20,9 +20,9 @@
import org.apache.lucene.index.Term;
import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.queryParser.QueryParser;
-import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.Query;
+import org.apache.lucene.search.BooleanClause.Occur;
import org.exoplatform.commons.utils.ISO8601;
import org.exoplatform.services.jcr.core.nodetype.NodeTypeDataManager;
import org.exoplatform.services.jcr.dataflow.ItemDataConsumer;
@@ -57,8 +57,8 @@
import org.exoplatform.services.jcr.impl.core.query.TextsearchQueryNode;
import org.exoplatform.services.jcr.impl.util.ISO9075;
import org.exoplatform.services.jcr.impl.xml.XMLChar;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
import java.util.ArrayList;
import java.util.Calendar;
@@ -102,7 +102,7 @@
/**
* Logger for this class
*/
- private static final Logger log = LoggerFactory.getLogger("exo.jcr.component.core.LuceneQueryBuilder");
+ private static final Log log = ExoLogger.getLogger("exo.jcr.component.core.LuceneQueryBuilder");
/**
* Root node of the abstract query tree
@@ -464,7 +464,8 @@
// if path references property that's elements.length - 2
// if path references node that's elements.length - 1
if (name != null
- && ((node.getReferencesProperty() && i == elements.length - 2) || (!node.getReferencesProperty() && i == elements.length - 1)))
+ && ((node.getReferencesProperty() && i == elements.length - 2) || (!node
+ .getReferencesProperty() && i == elements.length - 1)))
{
Query q = new NameQuery(name, indexFormatVersion, nsMappings);
BooleanQuery and = new BooleanQuery();
@@ -494,8 +495,7 @@
}
catch (RepositoryException e)
{
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getLocalizedMessage(), e);
}
return null;
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MoreLikeThis.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MoreLikeThis.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MoreLikeThis.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -811,7 +811,8 @@
ArrayList al = new ArrayList(maxQueryTerms);
PriorityQueue pq = retrieveTerms(docNum);
Object cur;
- int lim = maxQueryTerms; // have to be careful, retrieveTerms returns all words but that's probably not useful to our caller...
+ // have to be careful, retrieveTerms returns all words but that's probably not useful to our caller...
+ int lim = maxQueryTerms;
// we just want to return the top words
while (((cur = pq.pop()) != null) && lim-- > 0) {
Object[] ar = (Object[]) cur;
@@ -834,7 +835,8 @@
ArrayList al = new ArrayList(maxQueryTerms);
PriorityQueue pq = retrieveTerms(r);
Object cur;
- int lim = maxQueryTerms; // have to be careful, retrieveTerms returns all words but that's probably not useful to our caller...
+ // have to be careful, retrieveTerms returns all words but that's probably not useful to our caller...
+ int lim = maxQueryTerms;
// we just want to return the top words
while (((cur = pq.pop()) != null) && lim-- > 0) {
Object[] ar = (Object[]) cur;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -473,8 +473,8 @@
}
else
{
- log
- .info("Index can'b be retrieved from coordinator now, because it is offline. Possibly coordinator node performs reindexing now. Switching to local re-indexing.");
+ log.info("Index can'b be retrieved from coordinator now, because it is offline. " +
+ "Possibly coordinator node performs reindexing now. Switching to local re-indexing.");
}
}
@@ -484,13 +484,13 @@
{
if (handler.getContext().getRPCService() == null)
{
- log
- .error("RPC Service is not configured but required for copying the index from coordinator node. Index will be created by re-indexing.");
+ log.error("RPC Service is not configured but required for copying the index " +
+ "from coordinator node. Index will be created by re-indexing.");
}
else if (handler.getContext().getRPCService().isCoordinator() == true)
{
- log
- .info("Copying the index from coordinator configured, but this node is the only one in a cluster. Index will be created by re-indexing.");
+ log.info("Copying the index from coordinator configured, but this node is the " +
+ "only one in a cluster. Index will be created by re-indexing.");
}
}
@@ -661,7 +661,8 @@
}
catch (Throwable e)
{
- // this is safe index reader retrieval. The last index already closed, possibly merged or any other exception that occurs here
+ // this is safe index reader retrieval. The last index already closed, possibly merged or
+ // any other exception that occurs here
}
for (Iterator<Document> it = add.iterator(); it.hasNext();)
@@ -696,7 +697,8 @@
}
catch (Throwable e)
{
- // this is safe index reader retrieval. The last index already closed, possibly merged or any other exception that occurs here
+ // this is safe index reader retrieval. The last index already closed,
+ // possibly merged or any other exception that occurs here
lastIndexReader = null;
lastIndexReaderId = -1;
}
@@ -3211,7 +3213,7 @@
}
/**
- * @see org.exoplatform.services.jcr.impl.core.query.IndexerIoModeListener#onChangeMode(org.exoplatform.services.jcr.impl.core.query.IndexerIoMode)
+ * {@inheritDoc}
*/
public void onChangeMode(IndexerIoMode mode)
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -575,7 +575,7 @@
}
catch (RepositoryException e)
{
- e.printStackTrace();
+ log.error("Index of property value error. " + prop.getQPath().getAsString() + ".", e);
throw new RepositoryException("Index of property value error. " + prop.getQPath().getAsString() + ". " + e,
e);
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SharedFieldCache.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SharedFieldCache.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SharedFieldCache.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -104,7 +104,8 @@
}
private boolean isSparse(Comparable[] values, int setValues) {
- // some really simple test to test whether the array is sparse. Currently, when less then 1% is set, the array is already sparse
+ // some really simple test to test whether the array is sparse.
+ // Currently, when less then 1% is set, the array is already sparse
// for this typical cache to avoid memory issues
if (setValues * SPARSE_FACTOR < values.length) {
return true;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/WeightedHTMLExcerpt.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/WeightedHTMLExcerpt.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/WeightedHTMLExcerpt.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -16,17 +16,19 @@
*/
package org.exoplatform.services.jcr.impl.core.query.lucene;
+import org.apache.lucene.index.TermPositionVector;
+
import java.io.IOException;
-import org.apache.lucene.index.TermPositionVector;
-
/**
* <code>WeightedHTMLExcerpt</code> creates a HTML excerpt with the following
* format:
* <pre>
* <div>
- * <span><strong>Jackrabbit</strong> implements both the mandatory XPath and optional SQL <strong>query</strong> syntax.</span>
- * <span>Before parsing the XPath <strong>query</strong> in <strong>Jackrabbit</strong>, the statement is surrounded</span>
+ * <span><strong>Jackrabbit</strong> implements both the mandatory XPath and optional SQL <
+ * strong>query</strong> syntax.</span>
+ * <span>Before parsing the XPath <strong>query</strong> in <strong>Jackrabbit</strong>,
+ * the statement is surrounded</span>
* </div>
* </pre>
* In contrast to {@link DefaultHTMLExcerpt} this implementation weights
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/WeightedXMLExcerpt.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/WeightedXMLExcerpt.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/WeightedXMLExcerpt.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -16,10 +16,10 @@
*/
package org.exoplatform.services.jcr.impl.core.query.lucene;
+import org.apache.lucene.index.TermPositionVector;
+
import java.io.IOException;
-import org.apache.lucene.index.TermPositionVector;
-
/**
* <code>WeightedXMLExcerpt</code> creates an XML excerpt of a matching node. In
* contrast to {@link DefaultXMLExcerpt} this implementation weights fragments
@@ -31,8 +31,10 @@
* result for a node:
* <pre>
* <excerpt>
- * <fragment><highlight>Jackrabbit</highlight> implements both the mandatory XPath and optional SQL <highlight>query</highlight> syntax.</fragment>
- * <fragment>Before parsing the XPath <highlight>query</highlight> in <highlight>Jackrabbit</highlight>, the statement is surrounded</fragment>
+ * <fragment><highlight>Jackrabbit</highlight> implements both the mandatory XPath and optional SQL
+ * <highlight>query</highlight> syntax.</fragment>
+ * <fragment>Before parsing the XPath <highlight>query</highlight> in <highlight>Jackrabbit</highlight>,
+ * the statement is surrounded</fragment>
* </excerpt>
* </pre>
*
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/sql/JCRSQLQueryBuilder.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/sql/JCRSQLQueryBuilder.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/sql/JCRSQLQueryBuilder.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -177,7 +177,7 @@
}
catch (Throwable t)
{
- t.printStackTrace();
+ log.error(t.getLocalizedMessage(), t);
// javacc parser may also throw an error in some cases
throw new InvalidQueryException(t.getMessage(), t);
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/xpath/XPathQueryBuilder.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/xpath/XPathQueryBuilder.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/xpath/XPathQueryBuilder.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -376,7 +376,8 @@
case JJTSTEPEXPR:
if (isAttributeAxis(node)) {
if (queryNode.getType() == QueryNode.TYPE_RELATION
- || (queryNode.getType() == QueryNode.TYPE_DEREF && ((DerefQueryNode) queryNode).getRefProperty() == null)
+ || (queryNode.getType() == QueryNode.TYPE_DEREF
+ && ((DerefQueryNode) queryNode).getRefProperty() == null)
|| queryNode.getType() == QueryNode.TYPE_ORDER
|| queryNode.getType() == QueryNode.TYPE_PATH
|| queryNode.getType() == QueryNode.TYPE_TEXTSEARCH) {
@@ -823,7 +824,8 @@
value = value.substring(1, value.length() - 1);
Calendar c = ISO8601.parse(value);
if (c == null) {
- exceptions.add(new InvalidQueryException("Unable to parse string literal for xs:dateTime: " + value));
+ exceptions.add(new InvalidQueryException("Unable to parse string literal for xs:dateTime: "
+ + value));
} else {
rel.setDateValue(c.getTime());
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -1035,7 +1035,8 @@
}
/**
- * Fix Property BLOB Values if someone has null file (swap actually) by reading the content from the storage (VS or JDBC no matter).
+ * Fix Property BLOB Values if someone has null file (swap actually)
+ * by reading the content from the storage (VS or JDBC no matter).
*
* @param prop PropertyData
* @throws RepositoryException
@@ -1282,8 +1283,8 @@
public String getId()
{
- return "org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager-requestForResponsibilityForResuming-"
- + dataContainer.getUniqueName();
+ return "org.exoplatform.services.jcr.impl.dataflow.persistent.CacheableWorkspaceDataManager"
+ + "-requestForResponsibilityForResuming-" + dataContainer.getUniqueName();
}
public Serializable execute(Serializable[] args) throws Throwable
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -49,7 +49,7 @@
* mix:versionable
*
* @author <a href="mailto:gennady.azarenkov@exoplatform.com">Gennady Azarenkov</a>
- * @version $Id$ * @version $Id: VersionableWorkspaceDataManager.java 1518 2010-01-20 23:33:30Z
+ * @version $Id$
*/
public class VersionableWorkspaceDataManager extends ACLInheritanceSupportedWorkspaceDataManager
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -664,11 +664,12 @@
{
if (modifyListsOfChild == ModifyChildOption.NOT_MODIFY)
{
- cache.putIfAbsent(new CacheQPath(node.getParentIdentifier(), node.getQPath(), ItemType.NODE), node.getIdentifier());
+ cache.putIfAbsent(new CacheQPath(node.getParentIdentifier(), node.getQPath(), ItemType.NODE), node
+ .getIdentifier());
}
else
{
- cache.put(new CacheQPath(node.getParentIdentifier(), node.getQPath(), ItemType.NODE), node.getIdentifier());
+ cache.put(new CacheQPath(node.getParentIdentifier(), node.getQPath(), ItemType.NODE), node.getIdentifier());
}
// if MODIFY and List present OR FORCE_MODIFY, then write
@@ -1020,8 +1021,10 @@
}
/**
- * <li>NOT_MODIFY - node(property) is not added to the parent's list (no persistent changes performed, cache used as cache)</li>
- * <li>MODIFY - node(property) is added to the parent's list if parent in the cache (new item is added to persistent, add to list if it is present)</li>
+ * <li>NOT_MODIFY - node(property) is not added to the parent's list
+ * (no persistent changes performed, cache used as cache)</li>
+ * <li>MODIFY - node(property) is added to the parent's list if parent in the cache
+ * (new item is added to persistent, add to list if it is present)</li>
* <li>FORCE_MODIFY - node(property) is added to the parent's list anyway (when list is read from DB, forcing write)</li>
*/
private enum ModifyChildOption {
@@ -1084,7 +1087,7 @@
}
/**
- * @see org.exoplatform.services.jcr.dataflow.persistent.WorkspaceStorageCache#addReferencedProperties(java.lang.String, java.util.List)
+ * {@inheritDoc}
*/
public void addReferencedProperties(String identifier, List<PropertyData> refProperties)
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/BufferedJBossCache.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -539,10 +539,11 @@
return parentCache.get(fqn, key);
}
-
+
/**
- * in case putIfAbsent is set to <code>true</code> this method will call cache.putIfAbsent(Fqn fqn, Serializable key, Object value)
- * otherwise it will call cache.put(Fqn fqn, Serializable key, Object value)
+ * in case putIfAbsent is set to <code>true</code> this method will
+ * call cache.putIfAbsent(Fqn fqn, Serializable key, Object value)
+ * otherwise it will call cache.put(Fqn fqn, Serializable key, Object value)
*/
protected Object put(Fqn fqn, Serializable key, Object value, boolean putIfAbsent)
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -52,8 +52,8 @@
import org.jboss.cache.CacheStatus;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
+import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.config.Configuration.CacheMode;
-import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.eviction.ExpirationAlgorithmConfig;
import org.picocontainer.Startable;
@@ -1080,7 +1080,8 @@
}
// add in ITEMS
- return (ItemData)cache.put(makeItemFqn(node.getIdentifier()), ITEM_DATA, node, modifyListsOfChild == ModifyChildOption.NOT_MODIFY);
+ return (ItemData) cache.put(makeItemFqn(node.getIdentifier()), ITEM_DATA, node,
+ modifyListsOfChild == ModifyChildOption.NOT_MODIFY);
}
/**
@@ -1198,8 +1199,10 @@
// add in ITEMS
// NullItemData must never be returned inside internal cache operations.
- ItemData returnedData = (ItemData)cache.put(makeItemFqn(prop.getIdentifier()), ITEM_DATA, prop, modifyListsOfChild == ModifyChildOption.NOT_MODIFY);
- return (returnedData instanceof NullItemData) ? null : (PropertyData)returnedData;
+ ItemData returnedData =
+ (ItemData) cache.put(makeItemFqn(prop.getIdentifier()), ITEM_DATA, prop,
+ modifyListsOfChild == ModifyChildOption.NOT_MODIFY);
+ return (returnedData instanceof NullItemData) ? null : (PropertyData) returnedData;
}
protected void removeItem(ItemData item)
@@ -1516,9 +1519,12 @@
}
/**
- * <li>NOT_MODIFY - node(property) is not added to the parent's list (no persistent changes performed, cache used as cache)</li>
- * <li>MODIFY - node(property) is added to the parent's list if parent in the cache (new item is added to persistent, add to list if it is present)</li>
- * <li>FORCE_MODIFY - node(property) is added to the parent's list anyway (when list is read from DB, forcing write)</li>
+ * <li>NOT_MODIFY - node(property) is not added to the parent's list
+ * (no persistent changes performed, cache used as cache)</li>
+ * <li>MODIFY - node(property) is added to the parent's list if parent in the cache
+ * (new item is added to persistent, add to list if it is present)</li>
+ * <li>FORCE_MODIFY - node(property) is added to the parent's list anyway
+ * (when list is read from DB, forcing write)</li>
*/
private enum ModifyChildOption {
NOT_MODIFY, MODIFY, FORCE_MODIFY
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/SessionChangesLog.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/SessionChangesLog.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/SessionChangesLog.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -230,7 +230,8 @@
children = lastChildNodeStates.get(identifier);
if (children != null)
{
- // Recursively call the method traverseChangesByIdentifier(String identifier, List<ItemState> changesList) for each sub node
+ // Recursively call the method traverseChangesByIdentifier(String identifier, List<ItemState> changesList)
+ // for each sub node
for (ItemState child : children.values())
{
traverseChangesByIdentifier(child.getData().getIdentifier(), changesList);
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/proccess/WorkerService.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/proccess/WorkerService.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/proccess/WorkerService.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -59,7 +59,9 @@
this.isDaemon = isDaemon;
SecurityManager s = System.getSecurityManager();
group = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup();
- this.namePrefix = (namePrefix == null || namePrefix.isEmpty()) ? "pool-" + poolNumber.getAndIncrement() + "-thread-" : namePrefix + " ";
+ this.namePrefix =
+ (namePrefix == null || namePrefix.isEmpty()) ? "pool-" + poolNumber.getAndIncrement() + "-thread-"
+ : namePrefix + " ";
}
public Thread newThread(Runnable r)
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/AbstractWriteOnlyCacheLoader.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -76,7 +76,8 @@
*/
public void prepare(Object tx, List<Modification> modifications, boolean onePhase) throws Exception
{
- throw new WriteOnlyCacheLoaderException("The method 'prepare(Object tx, List<Modification> modifications, boolean onePhase)' should not be called.");
+ throw new WriteOnlyCacheLoaderException(
+ "The method 'prepare(Object tx, List<Modification> modifications, boolean onePhase)' should not be called.");
}
/**
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -36,7 +36,8 @@
/**
* Detect databse dialect using JDBC metadata. Based on code of
- * http://svn.jboss.org/repos/hibernate/core/trunk/core/src/main/java/org/hi...
+ * http://svn.jboss.org/repos/hibernate/core/trunk/core/src/main/java/org/hi...
+ * dialect/resolver/StandardDialectResolver.java
*
* @param jdbcConn Connection
* @return String
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -1396,7 +1396,9 @@
{
return new JdbcNodeDataIndexingIterator(connFactory, pageSize);
}
- throw new UnsupportedOperationException("The method getNodeDataIndexingIterator is not supported for this type of connection use the complex queries instead");
+ throw new UnsupportedOperationException(
+ "The method getNodeDataIndexingIterator is not supported for this type of connection "
+ + "use the complex queries instead");
}
/**
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -185,11 +185,9 @@
// not succeeded - copy bytes, temp file will be deleted by transient ValueData
if (LOG.isDebugEnabled())
{
- LOG
- .debug("Value spool file move (rename) to Values Storage is not succeeded. Trying bytes copy. Spool file: "
- + PrivilegedFileHelper.getAbsolutePath(tempFile)
- + ". Destination: "
- + PrivilegedFileHelper.getAbsolutePath(file));
+ LOG.debug("Value spool file move (rename) to Values Storage is not succeeded. "
+ + "Trying bytes copy. Spool file: " + PrivilegedFileHelper.getAbsolutePath(tempFile)
+ + ". Destination: " + PrivilegedFileHelper.getAbsolutePath(file));
}
copyClose(PrivilegedFileHelper.fileInputStream(tempFile), PrivilegedFileHelper.fileOutputStream(file));
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/DocumentViewImporter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/DocumentViewImporter.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/DocumentViewImporter.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -310,7 +310,8 @@
if (ptVhdefs != null)
{
- pType = (ptVhdefs.getAnyDefinition().getRequiredType() > 0 ? ptVhdefs.getAnyDefinition().getRequiredType() : PropertyType.STRING);
+ pType = (ptVhdefs.getAnyDefinition().getRequiredType() > 0 ? ptVhdefs.getAnyDefinition()
+ .getRequiredType() : PropertyType.STRING);
}
}
}
@@ -384,7 +385,8 @@
if (nodeData.getPrimaryTypeName().equals(Constants.NT_FROZENNODE))
{
// get primaryType
- InternalQName fptName = locationFactory.parseJCRName(atts.get("jcr:frozenPrimaryType")).getInternalName();
+ InternalQName fptName =
+ locationFactory.parseJCRName(atts.get("jcr:frozenPrimaryType")).getInternalName();
// get mixin types
List<JCRName> mtNames = getJCRNames(atts.get("jcr:frozenMixinTypes"));
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/SystemViewImporter.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -390,7 +390,9 @@
{
if (propertyData.getQName().equals(Constants.JCR_FROZENPRIMARYTYPE))
{
- fptName = InternalQName.parse(new String(propertyData.getValues().get(0).getAsByteArray(), Constants.DEFAULT_ENCODING));
+ fptName =
+ InternalQName.parse(new String(propertyData.getValues().get(0).getAsByteArray(),
+ Constants.DEFAULT_ENCODING));
}
else if (propertyData.getQName().equals(Constants.JCR_FROZENMIXINTYPES))
{
@@ -419,7 +421,9 @@
for (ImportPropertyData propertyData : currentNodePropertiesInfo.getProperties())
{
- PropertyDefinitionDatas defs = nodeTypeDataManager.getPropertyDefinitions(propertyData.getQName(), nodePrimaryTypeName, nodeMixinTypeName);
+ PropertyDefinitionDatas defs =
+ nodeTypeDataManager.getPropertyDefinitions(propertyData.getQName(), nodePrimaryTypeName,
+ nodeMixinTypeName);
if (defs == null || (defs != null && defs.getAnyDefinition().isResidualSet()))
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/statistics/JCRStatisticsManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/statistics/JCRStatisticsManager.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/statistics/JCRStatisticsManager.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -382,8 +382,10 @@
@Managed
@ManagedDescription("The minimum value of the time spent for one call.")
public static long getMin(
- @ManagedDescription("The name of the category of the statistics") @ManagedName("categoryName") String category,
- @ManagedDescription("The name of the expected method or global for the global value") @ManagedName("statisticsName") String name)
+ @ManagedDescription("The name of the category of the statistics")
+ @ManagedName("categoryName") String category,
+ @ManagedDescription("The name of the expected method or global for the global value")
+ @ManagedName("statisticsName") String name)
{
Statistics statistics = getStatistics(category, name);
return statistics == null ? 0l : statistics.getMin();
@@ -396,8 +398,10 @@
@Managed
@ManagedDescription("The maximum value of the time spent for one call.")
public static long getMax(
- @ManagedDescription("The name of the category of the statistics") @ManagedName("categoryName") String category,
- @ManagedDescription("The name of the expected method or global for the global value") @ManagedName("statisticsName") String name)
+ @ManagedDescription("The name of the category of the statistics")
+ @ManagedName("categoryName") String category,
+ @ManagedDescription("The name of the expected method or global for the global value")
+ @ManagedName("statisticsName") String name)
{
Statistics statistics = getStatistics(category, name);
return statistics == null ? 0l : statistics.getMax();
@@ -410,8 +414,10 @@
@Managed
@ManagedDescription("The total time spent for all the calls.")
public static long getTotal(
- @ManagedDescription("The name of the category of the statistics") @ManagedName("categoryName") String category,
- @ManagedDescription("The name of the expected method or global for the global value") @ManagedName("statisticsName") String name)
+ @ManagedDescription("The name of the category of the statistics")
+ @ManagedName("categoryName") String category,
+ @ManagedDescription("The name of the expected method or global for the global value")
+ @ManagedName("statisticsName") String name)
{
Statistics statistics = getStatistics(category, name);
return statistics == null ? 0l : statistics.getTotal();
@@ -424,8 +430,10 @@
@Managed
@ManagedDescription("The total amount of calls.")
public static long getTimes(
- @ManagedDescription("The name of the category of the statistics") @ManagedName("categoryName") String category,
- @ManagedDescription("The name of the expected method or global for the global value") @ManagedName("statisticsName") String name)
+ @ManagedDescription("The name of the category of the statistics")
+ @ManagedName("categoryName") String category,
+ @ManagedDescription("The name of the expected method or global for the global value")
+ @ManagedName("statisticsName") String name)
{
Statistics statistics = getStatistics(category, name);
return statistics == null ? 0l : statistics.getTimes();
@@ -438,8 +446,10 @@
@Managed
@ManagedDescription("The average value of the time spent for one call.")
public static float getAvg(
- @ManagedDescription("The name of the category of the statistics") @ManagedName("categoryName") String category,
- @ManagedDescription("The name of the expected method or global for the global value") @ManagedName("statisticsName") String name)
+ @ManagedDescription("The name of the category of the statistics")
+ @ManagedName("categoryName") String category,
+ @ManagedDescription("The name of the expected method or global for the global value")
+ @ManagedName("statisticsName") String name)
{
Statistics statistics = getStatistics(category, name);
return statistics == null ? 0l : statistics.getAvg();
@@ -453,8 +463,10 @@
@Managed
@ManagedDescription("Reset the statistics.")
public static void reset(
- @ManagedDescription("The name of the category of the statistics") @ManagedName("categoryName") String category,
- @ManagedDescription("The name of the expected method or global for the global value") @ManagedName("statisticsName") String name)
+ @ManagedDescription("The name of the category of the statistics")
+ @ManagedName("categoryName") String category,
+ @ManagedDescription("The name of the expected method or global for the global value")
+ @ManagedName("statisticsName") String name)
{
Statistics statistics = getStatistics(category, name);
if (statistics != null)
@@ -470,7 +482,8 @@
@Managed
@ManagedDescription("Reset all the statistics.")
public static void resetAll(
- @ManagedDescription("The name of the category of the statistics") @ManagedName("categoryName") String category)
+ @ManagedDescription("The name of the category of the statistics")
+ @ManagedName("categoryName") String category)
{
StatisticsContext context = getContext(category);
if (context != null)
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/util/Text.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/util/Text.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/util/Text.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -337,7 +337,8 @@
*
* <pre>
* unreserved = alphanum | mark
- * mark = "-" | "_" | "." | "!" | "˜" | "*" | "'" | "(" | ")"
+ * mark = "-" | "_" | "." | "!" | "˜" | "*" |
+ * "'" | "(" | ")"
* </pre>
*/
public static BitSet URISave;
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/jbosscache/GenericTransactionService.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/jbosscache/GenericTransactionService.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/transaction/jbosscache/GenericTransactionService.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -301,7 +301,8 @@
}
/**
- * This class is used to enforce the {@link Transaction} timeout when a new transaction is created through the nested {@link TransactionManager}
+ * This class is used to enforce the {@link Transaction} timeout when a new transaction
+ * is created through the nested {@link TransactionManager}
*
* Created by The eXo Platform SAS
* Author : Nicolas Filotto
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/ExtendedBackupManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/ExtendedBackupManager.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/ExtendedBackupManager.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -66,7 +66,8 @@
* @throws BackupConfigurationException
* if configuration exception occurred
*/
- void restoreExistingWorkspace(BackupChainLog log, String repositoryName, WorkspaceEntry workspaceEntry, boolean asynchronous) throws BackupOperationException, BackupConfigurationException;
+ void restoreExistingWorkspace(BackupChainLog log, String repositoryName, WorkspaceEntry workspaceEntry,
+ boolean asynchronous) throws BackupOperationException, BackupConfigurationException;
/**
* Restore existing repository. Previous data will be deleted.
@@ -84,7 +85,8 @@
* @throws BackupConfigurationException
* if configuration exception occurred
*/
- void restoreExistingRepository(String repositoryBackupIdentifier, RepositoryEntry repositoryEntry, boolean asynchronous) throws BackupOperationException, BackupConfigurationException;
+ void restoreExistingRepository(String repositoryBackupIdentifier, RepositoryEntry repositoryEntry,
+ boolean asynchronous) throws BackupOperationException, BackupConfigurationException;
/**
* Restore existing repository. Previous data will be deleted.
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryBackupChainLog.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryBackupChainLog.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryBackupChainLog.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -288,7 +288,9 @@
public LogReader(File logFile) throws FileNotFoundException, XMLStreamException, FactoryConfigurationError
{
this.logFile = logFile;
- reader = XMLInputFactory.newInstance().createXMLStreamReader(PrivilegedFileHelper.fileInputStream(logFile), Constants.DEFAULT_ENCODING);
+ reader =
+ XMLInputFactory.newInstance().createXMLStreamReader(PrivilegedFileHelper.fileInputStream(logFile),
+ Constants.DEFAULT_ENCODING);
}
public void readLogFile() throws UnsupportedEncodingException, Exception
@@ -367,7 +369,8 @@
+ PrivilegedFileHelper.getCanonicalPath(configFile));
}
- if (!conf.getRepositoryConfiguration(getBackupConfig().getRepository()).getName().equals(getBackupConfig().getRepository()))
+ if (!conf.getRepositoryConfiguration(getBackupConfig().getRepository()).getName().equals(
+ getBackupConfig().getRepository()))
{
throw new RepositoryRestoreExeption(
"The oririginal configuration should be contains only one repository entry with name \""
@@ -585,8 +588,9 @@
* @throws BackupOperationException
*/
public RepositoryBackupChainLog(File logDirectory, RepositoryBackupConfig config, String fullBackupType,
- String incrementalBackupType, String systemWorkspace, List<String> wsLogFilePathList, String backupId,
- Calendar startTime, RepositoryEntry rEntry, RepositoryServiceConfiguration repositoryServiceConfiguration) throws BackupOperationException
+ String incrementalBackupType, String systemWorkspace, List<String> wsLogFilePathList, String backupId,
+ Calendar startTime, RepositoryEntry rEntry, RepositoryServiceConfiguration repositoryServiceConfiguration)
+ throws BackupOperationException
{
try
{
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -460,7 +460,8 @@
* @param registryService
* RegistryService, the registry service
*/
- public BackupManagerImpl(ExoContainerContext ctx, InitParams initParams, RepositoryService repoService, RegistryService registryService)
+ public BackupManagerImpl(ExoContainerContext ctx, InitParams initParams, RepositoryService repoService,
+ RegistryService registryService)
{
this.messagesListener = new MessagesListener();
this.repoService = repoService;
@@ -1297,7 +1298,8 @@
if (log.getOriginalWorkspaceEntry() == null)
{
- throw new RepositoryRestoreExeption("The backup log is not contains original repository log : " + log.getLogFilePath());
+ throw new RepositoryRestoreExeption("The backup log is not contains original repository log : "
+ + log.getLogFilePath());
}
@@ -1685,7 +1687,8 @@
// workspace should be existed
if (!workspaceAlreadyExist(repositoryName, workspaceEntry.getName()))
{
- throw new WorkspaceRestoreException("Workspace \"" + workspaceEntry.getName() + "\" should be existed in repository \"" + repositoryName + "\".");
+ throw new WorkspaceRestoreException("Workspace \"" + workspaceEntry.getName()
+ + "\" should be existed in repository \"" + repositoryName + "\".");
}
}
catch (RepositoryException e)
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/IndexCleanHelper.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/IndexCleanHelper.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/IndexCleanHelper.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -45,7 +45,8 @@
* @throws RepositoryConfigurationException - exception on parsing workspace configuration
* @throws IOException - exception on remove index folder
*/
- public void removeWorkspaceIndex(WorkspaceEntry wsConfig, boolean isSystem) throws RepositoryConfigurationException, IOException
+ public void removeWorkspaceIndex(WorkspaceEntry wsConfig, boolean isSystem) throws RepositoryConfigurationException,
+ IOException
{
String indexDirName = wsConfig.getQueryHandler().getParameterValue(QueryHandlerParams.PARAM_INDEX_DIR);
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/common/SessionProvider.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/common/SessionProvider.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/common/SessionProvider.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -171,7 +171,9 @@
ConversationState conversationState = ConversationState.getCurrent();
if (conversationState != null && conversationState.getIdentity().getUserId().equals(DynamicIdentity.DYNAMIC))
{
- session = (ExtendedSession) repository.getDynamicSession(workspaceName, conversationState.getIdentity().getMemberships());
+ session =
+ (ExtendedSession) repository.getDynamicSession(workspaceName, conversationState.getIdentity()
+ .getMemberships());
}
else if (!isSystem)
{
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/distribution/DataDistributionType.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/distribution/DataDistributionType.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/distribution/DataDistributionType.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -90,7 +90,8 @@
* @return the Node corresponding to the data to find
* @throws RepositoryException if an error occurred while trying to get or create the expected data
*/
- Node getOrCreateDataNode(Node rootNode, String dataId, String nodeType, List<String> mixinTypes, Map<String, String[]> permissions) throws RepositoryException;
+ Node getOrCreateDataNode(Node rootNode, String dataId, String nodeType, List<String> mixinTypes,
+ Map<String, String[]> permissions) throws RepositoryException;
/**
* Remove the node from the JCR if it exists
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewGroupListener.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewGroupListener.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewGroupListener.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -163,8 +163,8 @@
}
}
- private void createNode(Node groupNode, String path, String nodeType, List<String> mixinTypes, Map<String, String[]> permissions)
- throws Exception
+ private void createNode(Node groupNode, String path, String nodeType, List<String> mixinTypes,
+ Map<String, String[]> permissions) throws Exception
{
dataDistributionType_.getOrCreateDataNode(groupNode, path, nodeType, mixinTypes, permissions);
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewUserListener.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewUserListener.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/hierarchy/impl/NewUserListener.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -115,7 +115,8 @@
}
}
- private void createNode(Node userNode, String path, String nodeType, List<String> mixinTypes, Map<String, String[]> permissions)
+ private void createNode(Node userNode, String path, String nodeType, List<String> mixinTypes,
+ Map<String, String[]> permissions)
throws Exception
{
dataDistributionType_.getOrCreateDataNode(userNode, path, nodeType, mixinTypes, permissions);
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RESTRegistryService.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RESTRegistryService.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/registry/RESTRegistryService.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -151,7 +151,8 @@
@Consumes(MediaType.APPLICATION_XML)
@Deprecated
public Response recreateEntry(InputStream entryStream, @PathParam("repository") String repository,
- @PathParam("groupName") String groupName, @Context UriInfo uriInfo, @QueryParam("createIfNotExist") boolean createIfNotExist)
+ @PathParam("groupName") String groupName, @Context UriInfo uriInfo,
+ @QueryParam("createIfNotExist") boolean createIfNotExist)
{
try
{
@@ -277,7 +278,8 @@
@PUT
@Path("/{groupName:.+}")
@Consumes(MediaType.APPLICATION_XML)
- public Response recreateEntry(InputStream entryStream, @PathParam("groupName") String groupName, @Context UriInfo uriInfo, @QueryParam("createIfNotExist") boolean createIfNotExist)
+ public Response recreateEntry(InputStream entryStream, @PathParam("groupName") String groupName,
+ @Context UriInfo uriInfo, @QueryParam("createIfNotExist") boolean createIfNotExist)
{
SessionProvider sessionProvider = sessionProviderService.getSessionProvider(null);
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/creation/RepositoryCreationService.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/creation/RepositoryCreationService.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/creation/RepositoryCreationService.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -53,8 +53,8 @@
String reserveRepositoryName(String repositoryName) throws RepositoryCreationException;
/**
- * Creates repository, using token of already reserved repository name. Good for cases, when repository creation should be delayed or
- * made asynchronously in dedicated thread.
+ * Creates repository, using token of already reserved repository name. Good for cases,
+ * when repository creation should be delayed or made asynchronously in dedicated thread.
*
* @param rEntry - repository entry - note, that datasource must not exist
* @param backupId - backup id
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/AbstractXMLViewNodeRepresentation.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/AbstractXMLViewNodeRepresentation.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/AbstractXMLViewNodeRepresentation.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -209,8 +209,8 @@
}
- /* (non-Javadoc)
- * @see org.exoplatform.services.jcr.ext.resource.NodeRepresentation#addProperty(java.lang.String, org.exoplatform.common.util.HierarchicalProperty)
+ /**
+ * {@inheritDoc}
*/
public void addProperty(HierarchicalProperty property) throws UnsupportedRepositoryOperationException
{
@@ -218,8 +218,8 @@
}
- /* (non-Javadoc)
- * @see org.exoplatform.services.jcr.ext.resource.NodeRepresentation#removeProperty(java.lang.String)
+ /**
+ * {@inheritDoc}
*/
public void removeProperty(String name) throws UnsupportedRepositoryOperationException
{
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/DocumentViewNodeRepresentationFactory.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/DocumentViewNodeRepresentationFactory.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/DocumentViewNodeRepresentationFactory.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -30,16 +30,16 @@
public class DocumentViewNodeRepresentationFactory implements NodeRepresentationFactory
{
- /* (non-Javadoc)
- * @see org.exoplatform.services.jcr.ext.resource.NodeRepresentationFactory#createNodeRepresentation(javax.jcr.Node, java.lang.String)
+ /**
+ * {@inheritDoc}
*/
public NodeRepresentation createNodeRepresentation(Node node, String mediaTypeHint)
{
return new DocumentViewNodeRepresentation(node);
}
- /* (non-Javadoc)
- * @see org.exoplatform.services.jcr.ext.resource.NodeRepresentationFactory#getNodeType()
+ /**
+ * {@inheritDoc}
*/
public String getNodeType()
{
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/SystemViewNodeRepresentationFactory.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/SystemViewNodeRepresentationFactory.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/SystemViewNodeRepresentationFactory.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -31,16 +31,16 @@
public class SystemViewNodeRepresentationFactory implements NodeRepresentationFactory, ResourceContainer
{
- /* (non-Javadoc)
- * @see org.exoplatform.services.jcr.ext.resource.NodeRepresentationFactory#createNodeRepresentation(javax.jcr.Node, java.lang.String)
+ /**
+ * {@inheritDoc}
*/
public NodeRepresentation createNodeRepresentation(Node node, String mediaTypeHint)
{
return new SystemViewNodeRepresentation(node);
}
- /* (non-Javadoc)
- * @see org.exoplatform.services.jcr.ext.resource.NodeRepresentationFactory#getNodeType()
+ /**
+ * {@inheritDoc}
*/
public String getNodeType()
{
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtFileNodeRepresentation.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtFileNodeRepresentation.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtFileNodeRepresentation.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -235,8 +235,8 @@
}
- /* (non-Javadoc)
- * @see org.exoplatform.services.jcr.ext.resource.NodeRepresentation#addProperty(java.lang.String, org.exoplatform.common.util.HierarchicalProperty)
+ /**
+ * {@inheritDoc}
*/
public void addProperty(HierarchicalProperty property) throws UnsupportedRepositoryOperationException
{
@@ -244,8 +244,8 @@
}
- /* (non-Javadoc)
- * @see org.exoplatform.services.jcr.ext.resource.NodeRepresentation#removeProperty(java.lang.String)
+ /**
+ * {@inheritDoc}
*/
public void removeProperty(String name) throws UnsupportedRepositoryOperationException
{
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtResourceNodeRepresentation.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtResourceNodeRepresentation.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/resource/representation/NtResourceNodeRepresentation.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -213,8 +213,8 @@
this.properties.addAll(properties);
}
- /* (non-Javadoc)
- * @see org.exoplatform.services.jcr.ext.resource.NodeRepresentation#addProperty(java.lang.String, org.exoplatform.common.util.HierarchicalProperty)
+ /**
+ * {@inheritDoc}
*/
public void addProperty(HierarchicalProperty property) throws UnsupportedRepositoryOperationException
{
@@ -222,8 +222,8 @@
this.properties.add(property);
}
- /* (non-Javadoc)
- * @see org.exoplatform.services.jcr.ext.resource.NodeRepresentation#removeProperty(java.lang.String)
+ /**
+ * {@inheritDoc}
*/
public void removeProperty(String name) throws UnsupportedRepositoryOperationException
{
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/JcrGroovyClassLoaderProvider.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/JcrGroovyClassLoaderProvider.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/JcrGroovyClassLoaderProvider.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -67,8 +67,7 @@
}
/**
- * @see org.exoplatform.services.rest.ext.groovy.ExtendedGroovyClassLoader#createCompilationUnit(org.codehaus.groovy.control.CompilerConfiguration,
- * java.security.CodeSource)
+ * {@inheritDoc}
*/
protected CompilationUnit createCompilationUnit(CompilerConfiguration config, CodeSource cs)
{
@@ -241,9 +240,8 @@
}
/**
- * @see org.exoplatform.services.rest.ext.groovy.GroovyClassLoaderProvider#getGroovyClassLoader(org.exoplatform.services.rest.ext.groovy.SourceFolder[])
+ * {@inheritDoc}
*/
- @Override
public ExtendedGroovyClassLoader getGroovyClassLoader(SourceFolder[] sources) throws MalformedURLException
{
if (sources == null || sources.length == 0)
Modified: jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServerImpl.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/FtpServerImpl.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -219,7 +219,9 @@
{
this.ftpServer = ftpServer;
this.serverSocket = serverSocket;
- setName("Ftp Server" + (configuration.getPortalContainer() == null ? "" : " " + configuration.getPortalContainer().getName()));
+ setName("Ftp Server"
+ + (configuration.getPortalContainer() == null ? "" : " "
+ + configuration.getPortalContainer().getName()));
setDaemon(true);
}
Modified: jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdMkd.java
===================================================================
--- jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdMkd.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdMkd.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -80,7 +80,9 @@
if (replaceForbiddenChars)
{
- curPathName = FtpTextUtils.replaceForbiddenChars(curPathName, ftpConfig.getForbiddenChars(), ftpConfig.getReplaceChar());
+ curPathName =
+ FtpTextUtils.replaceForbiddenChars(curPathName, ftpConfig.getForbiddenChars(), ftpConfig
+ .getReplaceChar());
}
if (parentNode.hasNode(curPathName))
Modified: jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdStor.java
===================================================================
--- jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdStor.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/command/CmdStor.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -94,7 +94,9 @@
if (ftpConfig.isReplaceForbiddenChars())
{
String fName = newPath.get(newPath.size()-1);
- String newfName = FtpTextUtils.replaceForbiddenChars(fName, ftpConfig.getForbiddenChars(), ftpConfig.getReplaceChar());
+ String newfName =
+ FtpTextUtils.replaceForbiddenChars(fName, ftpConfig.getForbiddenChars(), ftpConfig
+ .getReplaceChar());
fileName = fileName.substring(0, fileName.indexOf(fName)) + newfName;
}
Modified: jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpDataTransiverImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpDataTransiverImpl.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.ftp/src/main/java/org/exoplatform/services/ftp/data/FtpDataTransiverImpl.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -211,7 +211,9 @@
public AcceptDataConnect()
{
- super("AcceptDataConnect" + (configuration.getPortalContainer() == null ? "" : " " + configuration.getPortalContainer().getName()));
+ super("AcceptDataConnect"
+ + (configuration.getPortalContainer() == null ? "" : " "
+ + configuration.getPortalContainer().getName()));
}
protected Log acceptLog = ExoLogger.getLogger("jcr.AcceptDataConnect");
@@ -244,7 +246,9 @@
public ConnectDataPort()
{
- super("ConnectDataPort" + (configuration.getPortalContainer() == null ? "" : " " + configuration.getPortalContainer().getName()));
+ super("ConnectDataPort"
+ + (configuration.getPortalContainer() == null ? "" : " "
+ + configuration.getPortalContainer().getName()));
}
protected Log connectLog = ExoLogger.getLogger("jcr.ConnectDataPort");
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/AclCommand.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/AclCommand.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/AclCommand.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -34,8 +34,8 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
+import java.util.Set;
import java.util.Map.Entry;
-import java.util.Set;
import javax.jcr.PathNotFoundException;
import javax.jcr.RepositoryException;
@@ -218,7 +218,8 @@
if (denyPermission.equals(grantPermission))
{
throw new IllegalArgumentException(
- "Malformed ace element (seems that a client is trying to grant and denay the same privilege in a single ace)");
+ "Malformed ace element (seems that a client is trying to grant and denay the same privilege in "
+ + "a single ace)");
}
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java 2011-04-29 12:44:02 UTC (rev 4335)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/propfind/PropFindResponseEntity.java 2011-04-29 15:09:58 UTC (rev 4336)
@@ -105,7 +105,8 @@
* @param propertyNames the list of properties requested
* @param propertyNamesOnly if only property names a requested
*/
- public PropFindResponseEntity(int depth, Resource rootResource, Set<QName> propertyNames, boolean propertyNamesOnly, Session session)
+ public PropFindResponseEntity(int depth, Resource rootResource, Set<QName> propertyNames, boolean propertyNamesOnly,
+ Session session)
{
this.rootResource = rootResource;
this.namespaceContext = rootResource.getNamespaceContext();
13 years, 1 month
exo-jcr SVN: r4335 - in kernel/trunk: exo.kernel.component.ext.cache.impl.infinispan.v4/src/main/java/org/exoplatform/services/cache/impl/infinispan/generic and 5 other directories.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2011-04-29 08:44:02 -0400 (Fri, 29 Apr 2011)
New Revision: 4335
Modified:
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java
kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v4/src/main/java/org/exoplatform/services/cache/impl/infinispan/generic/GenericExoCacheCreator.java
kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ea/EAExoCacheCreator.java
kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheCreator.java
kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheCreator.java
kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheCreator.java
kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheCreator.java
Log:
EXOJCR-1221 : The same violations was fixed in KERNEL.
Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java 2011-04-29 12:18:25 UTC (rev 4334)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java 2011-04-29 12:44:02 UTC (rev 4335)
@@ -49,7 +49,6 @@
String stringName = ("[" + namespace + "]" + name);
int hashCode = (31 + namespace.hashCode()) * 31 + name.hashCode();
- //
this.namespace = namespace;
this.name = name;
this.stringName = stringName;
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v4/src/main/java/org/exoplatform/services/cache/impl/infinispan/generic/GenericExoCacheCreator.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v4/src/main/java/org/exoplatform/services/cache/impl/infinispan/generic/GenericExoCacheCreator.java 2011-04-29 12:18:25 UTC (rev 4334)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.infinispan.v4/src/main/java/org/exoplatform/services/cache/impl/infinispan/generic/GenericExoCacheCreator.java 2011-04-29 12:44:02 UTC (rev 4335)
@@ -167,7 +167,7 @@
@ManagedName("Lifespan")
@ManagedDescription("Maximum lifespan of a cache entry, after which the entry is expired cluster-wide." +
- " -1 means the entries never expire.")
+ " -1 means the entries never expire.")
public long getLiveTime()
{
return cacheConfig.getExpirationLifespan();
@@ -176,7 +176,7 @@
@Managed
@ManagedName("MaxIdle")
@ManagedDescription("Maximum idle time a cache entry will be maintained in the cache. " +
- "If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire.")
+ "If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire.")
public long getMaxIdle()
{
return cacheConfig.getExpirationMaxIdle();
@@ -185,7 +185,7 @@
@Managed
@ManagedName("WakeUpInterval")
@ManagedDescription("Interval between subsequent eviction runs. If you wish to disable the periodic eviction " +
- "process altogether, set wakeupInterval to -1.")
+ "process altogether, set wakeupInterval to -1.")
public long getWakeUpInterval()
{
return cacheConfig.getEvictionWakeUpInterval();
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ea/EAExoCacheCreator.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ea/EAExoCacheCreator.java 2011-04-29 12:18:25 UTC (rev 4334)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/ea/EAExoCacheCreator.java 2011-04-29 12:44:02 UTC (rev 4335)
@@ -144,7 +144,7 @@
@ManagedName("MaxNodes")
@ManagedDescription("This is the maximum number of nodes allowed in this region. 0 denotes immediate expiry, " +
- "-1 denotes no limit.")
+ "-1 denotes no limit.")
public int getMaxSize()
{
return ea.getMaxNodes();
@@ -152,8 +152,8 @@
@ManagedName("MinTimeToLive")
@ManagedDescription("the minimum amount of time a node must be allowed to live after being accessed before " +
- "it is allowed to be considered for eviction. 0 denotes that this feature is disabled, " +
- "which is the default value.")
+ "it is allowed to be considered for eviction. 0 denotes that this feature is disabled, " +
+ "which is the default value.")
public long getLiveTime()
{
return ea.getMinTimeToLive();
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheCreator.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheCreator.java 2011-04-29 12:18:25 UTC (rev 4334)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/fifo/FIFOExoCacheCreator.java 2011-04-29 12:44:02 UTC (rev 4335)
@@ -105,7 +105,7 @@
@ManagedName("MaxNodes")
@ManagedDescription("This is the maximum number of nodes allowed in this region. " +
- "0 denotes immediate expiry, -1 denotes no limit.")
+ "0 denotes immediate expiry, -1 denotes no limit.")
public int getMaxSize()
{
return fifo.getMaxNodes();
@@ -113,8 +113,8 @@
@ManagedName("MinTimeToLive")
@ManagedDescription("the minimum amount of time a node must be allowed to live after " +
- "being accessed before it is allowed to be considered for eviction. 0 denotes that " +
- "this feature is disabled, which is the default value.")
+ "being accessed before it is allowed to be considered for eviction. 0 denotes that " +
+ "this feature is disabled, which is the default value.")
public long getLiveTime()
{
return fifo.getMinTimeToLive();
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheCreator.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheCreator.java 2011-04-29 12:18:25 UTC (rev 4334)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lfu/LFUExoCacheCreator.java 2011-04-29 12:44:02 UTC (rev 4335)
@@ -115,8 +115,8 @@
@ManagedName("MinTimeToLive")
@ManagedDescription("the minimum amount of time a node must be allowed to live after being accessed " +
- "before it is allowed to be considered for eviction. 0 denotes that this feature is disabled, " +
- "which is the default value.")
+ "before it is allowed to be considered for eviction. 0 denotes that this feature is disabled, " +
+ "which is the default value.")
public long getLiveTime()
{
return lfu.getMinTimeToLive();
@@ -124,7 +124,7 @@
@ManagedName("MaxNodes")
@ManagedDescription("This is the maximum number of nodes allowed in this region. " +
- "0 denotes immediate expiry, -1 denotes no limit.")
+ "0 denotes immediate expiry, -1 denotes no limit.")
public int getMaxSize()
{
return lfu.getMaxNodes();
@@ -133,9 +133,9 @@
@Managed
@ManagedName("MinNodes")
@ManagedDescription("This is the minimum number of nodes allowed in this region. This value determines " +
- "what the eviction queue should prune down to per pass. e.g. If minNodes is 10 and the cache grows " +
- "to 100 nodes, the cache is pruned down to the 10 most frequently used nodes when the eviction timer " +
- "makes a pass through the eviction algorithm.")
+ "what the eviction queue should prune down to per pass. e.g. If minNodes is 10 and the cache grows " +
+ "to 100 nodes, the cache is pruned down to the 10 most frequently used nodes when the eviction timer " +
+ "makes a pass through the eviction algorithm.")
public long getMinNodes()
{
return lfu.getMinNodes();
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheCreator.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheCreator.java 2011-04-29 12:18:25 UTC (rev 4334)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/lru/LRUExoCacheCreator.java 2011-04-29 12:44:02 UTC (rev 4335)
@@ -122,8 +122,8 @@
@ManagedName("MinTimeToLive")
@ManagedDescription("the minimum amount of time a node must be allowed to live after" +
- " being accessed before it is allowed to be considered for eviction. 0 denotes " +
- "that this feature is disabled, which is the default value.")
+ " being accessed before it is allowed to be considered for eviction. 0 denotes " +
+ "that this feature is disabled, which is the default value.")
public long getLiveTime()
{
return lru.getMinTimeToLive();
@@ -131,7 +131,7 @@
@ManagedName("MaxNodes")
@ManagedDescription("This is the maximum number of nodes allowed in this region. " +
- "0 denotes immediate expiry, -1 denotes no limit.")
+ "0 denotes immediate expiry, -1 denotes no limit.")
public int getMaxSize()
{
return lru.getMaxNodes();
@@ -140,7 +140,7 @@
@Managed
@ManagedName("TimeToLive")
@ManagedDescription("The amount of time a node is not written to or read (in milliseconds) " +
- "before the node is swept away. 0 denotes immediate expiry, -1 denotes no limit.")
+ "before the node is swept away. 0 denotes immediate expiry, -1 denotes no limit.")
public long getTimeToLive()
{
return lru.getTimeToLive();
@@ -149,7 +149,7 @@
@Managed
@ManagedName("MaxAges")
@ManagedDescription("Lifespan of a node (in milliseconds) regardless of idle time before " +
- "the node is swept away. 0 denotes immediate expiry, -1 denotes no limit.")
+ "the node is swept away. 0 denotes immediate expiry, -1 denotes no limit.")
public long getMaxAge()
{
return lru.getMaxAge();
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheCreator.java
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheCreator.java 2011-04-29 12:18:25 UTC (rev 4334)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/src/main/java/org/exoplatform/services/cache/impl/jboss/mru/MRUExoCacheCreator.java 2011-04-29 12:44:02 UTC (rev 4335)
@@ -89,7 +89,7 @@
@ManagedName("MaxNodes")
@ManagedDescription("This is the maximum number of nodes allowed in this region. " +
- "0 denotes immediate expiry, -1 denotes no limit.")
+ "0 denotes immediate expiry, -1 denotes no limit.")
public int getMaxSize()
{
return mru.getMaxNodes();
@@ -97,8 +97,8 @@
@ManagedName("MinTimeToLive")
@ManagedDescription("the minimum amount of time a node must be allowed to live after " +
- "being accessed before it is allowed to be considered for eviction. " +
- "0 denotes that this feature is disabled, which is the default value.")
+ "being accessed before it is allowed to be considered for eviction. " +
+ "0 denotes that this feature is disabled, which is the default value.")
public long getLiveTime()
{
return mru.getMinTimeToLive();
13 years, 1 month
exo-jcr SVN: r4334 - in ws/trunk: exo.ws.frameworks.json/src/main/java/org/exoplatform/ws/frameworks/json/impl and 4 other directories.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2011-04-29 08:18:25 -0400 (Fri, 29 Apr 2011)
New Revision: 4334
Modified:
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthSchemeNotImplException.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationHandler.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationInfo.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationModule.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationPrompter.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/BufferedInputStream.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/CIHashtable.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ChunkedInputStream.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Codecs.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentEncodingModule.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentMD5Module.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie2.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/CookieModule.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/CookiePolicyHandler.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/DefaultAuthHandler.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/DefaultModule.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/FilenameMangler.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/GlobalConstants.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPClientModule.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPClientModuleConstants.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPConnection.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPResponse.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HashVerifier.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpHeaderElement.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpOutputStream.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpURLConnection.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/IdempotentSequence.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/LinkedList.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Log.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/MD5.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/MD5InputStream.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ModuleException.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/NVPair.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ParseException.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ProtocolNotSuppException.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RedirectionModule.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Request.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RespInputStream.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Response.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ResponseHandler.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryException.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryModule.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RoRequest.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RoResponse.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/SocksClient.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/SocksException.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/StreamDemultiplexor.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/TransferEncodingModule.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/URI.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/UncompressInputStream.java
ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Util.java
ws/trunk/exo.ws.frameworks.json/src/main/java/org/exoplatform/ws/frameworks/json/impl/JsonWriterImpl.java
ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/BaseObjectModel.java
ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/ResourceBinder.java
ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/method/DefaultMethodInvoker.java
ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/method/PropertyResolver.java
ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/provider/DOMSourceEntityProvider.java
ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBElementEntityProvider.java
ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBObjectEntityProvider.java
Log:
EXOJCR-1221 : The same violations was fixed in WS.
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthSchemeNotImplException.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthSchemeNotImplException.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthSchemeNotImplException.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)AuthSchemeNotImplException.java 0.3-3 06/05/2001
+ * @(#)AuthSchemeNotImplException.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationHandler.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationHandler.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationHandler.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)AuthorizationHandler.java 0.3-3 06/05/2001
+ * @(#)AuthorizationHandler.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationInfo.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationInfo.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationInfo.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)AuthorizationInfo.java 0.3-3 06/05/2001
+ * @(#)AuthorizationInfo.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationModule.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationModule.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationModule.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)AuthorizationModule.java 0.3-3 06/05/2001
+ * @(#)AuthorizationModule.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationPrompter.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationPrompter.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/AuthorizationPrompter.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)AuthorizationPrompter.java 0.3-3 06/05/2001
+ * @(#)AuthorizationPrompter.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/BufferedInputStream.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/BufferedInputStream.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/BufferedInputStream.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)BufferedInputStream.java 0.3-3 06/05/2001
+ * @(#)BufferedInputStream.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/CIHashtable.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/CIHashtable.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/CIHashtable.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)CIHashtable.java 0.3-3 06/05/2001
+ * @(#)CIHashtable.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ChunkedInputStream.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ChunkedInputStream.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ChunkedInputStream.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)ChunkedInputStream.java 0.3-3 06/05/2001
+ * @(#)ChunkedInputStream.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Codecs.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Codecs.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Codecs.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)Codecs.java 0.3-3 06/05/2001
+ * @(#)Codecs.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentEncodingModule.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentEncodingModule.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentEncodingModule.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)ContentEncodingModule.java 0.3-3 06/05/2001
+ * @(#)ContentEncodingModule.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentMD5Module.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentMD5Module.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ContentMD5Module.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)ContentMD5Module.java 0.3-3 06/05/2001
+ * @(#)ContentMD5Module.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)Cookie.java 0.3-3 06/05/2001
+ * @(#)Cookie.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie2.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie2.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Cookie2.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)Cookie2.java 0.3-3 06/05/2001
+ * @(#)Cookie2.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/CookieModule.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/CookieModule.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/CookieModule.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)CookieModule.java 0.3-3 06/05/2001
+ * @(#)CookieModule.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/CookiePolicyHandler.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/CookiePolicyHandler.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/CookiePolicyHandler.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)CookiePolicyHandler.java 0.3-3 06/05/2001
+ * @(#)CookiePolicyHandler.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/DefaultAuthHandler.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/DefaultAuthHandler.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/DefaultAuthHandler.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)DefaultAuthHandler.java 0.3-3 06/05/2001
+ * @(#)DefaultAuthHandler.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
@@ -79,6 +79,11 @@
*/
public class DefaultAuthHandler implements AuthorizationHandler, GlobalConstants
{
+ /**
+ * The logger
+ */
+ private static final Log LOG = ExoLogger.getLogger("org.exoplatform.common.http.client.DefaultAuthHandler");
+
private static final byte[] NUL = new byte[0];
private static final int DI_A1 = 0;
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/DefaultModule.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/DefaultModule.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/DefaultModule.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)DefaultModule.java 0.3-3 06/05/2001
+ * @(#)DefaultModule.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/FilenameMangler.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/FilenameMangler.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/FilenameMangler.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)FilenameMangler.java 0.3-3 06/05/2001
+ * @(#)FilenameMangler.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/GlobalConstants.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/GlobalConstants.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/GlobalConstants.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)GlobalConstants.java 0.3-3 06/05/2001
+ * @(#)GlobalConstants.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPClientModule.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPClientModule.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPClientModule.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)HTTPClientModule.java 0.3-3 06/05/2001
+ * @(#)HTTPClientModule.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPClientModuleConstants.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPClientModuleConstants.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPClientModuleConstants.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)HTTPClientModuleConstants.java 0.3-3 06/05/2001
+ * @(#)HTTPClientModuleConstants.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPConnection.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPConnection.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPConnection.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)HTTPConnection.java 0.3-3 06/05/2001
+ * @(#)HTTPConnection.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
@@ -1460,7 +1460,7 @@
}
catch (XMLStreamException e)
{
- e.printStackTrace();
+ log.error(e.getLocalizedMessage(), e);
throw new IOException("Can't write XML data to output stream.");
}
return response;
@@ -1582,7 +1582,7 @@
}
catch (XMLStreamException e)
{
- e.printStackTrace();
+ log.error(e.getLocalizedMessage(), e);
throw new IOException("Can't write XML data to output stream.");
}
return response;
@@ -1639,7 +1639,7 @@
}
catch (XMLStreamException e)
{
- e.printStackTrace();
+ log.error(e.getLocalizedMessage(), e);
throw new IOException("Can't write XML request.");
}
finally
@@ -3786,8 +3786,10 @@
try
{
if (ServerProtocolVersion >= HTTP_1_1
- || ((((Proxy_Host == null || Protocol == HTTPS) && (con = resp.getHeader("Connection")) != null) || ((Proxy_Host != null && Protocol != HTTPS) && (con =
- resp.getHeader("Proxy-Connection")) != null)) && Util.hasToken(con, "keep-alive")))
+ || ((((Proxy_Host == null || Protocol == HTTPS)
+ && (con = resp.getHeader("Connection")) != null) || ((Proxy_Host != null && Protocol != HTTPS)
+ && (con = resp.getHeader("Proxy-Connection")) != null))
+ && Util.hasToken(con, "keep-alive")))
{
doesKeepAlive = true;
keepAliveUnknown = false;
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPResponse.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPResponse.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HTTPResponse.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)HTTPResponse.java 0.3-3 06/05/2001
+ * @(#)HTTPResponse.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HashVerifier.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HashVerifier.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HashVerifier.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)HashVerifier.java 0.3-3 06/05/2001
+ * @(#)HashVerifier.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpHeaderElement.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpHeaderElement.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpHeaderElement.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)HttpHeaderElement.java 0.3-3 06/05/2001
+ * @(#)HttpHeaderElement.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpOutputStream.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpOutputStream.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpOutputStream.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)HttpOutputStream.java 0.3-3 06/05/2001
+ * @(#)HttpOutputStream.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpURLConnection.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpURLConnection.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/HttpURLConnection.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)HttpURLConnection.java 0.3-3 06/05/2001
+ * @(#)HttpURLConnection.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/IdempotentSequence.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/IdempotentSequence.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/IdempotentSequence.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)IdempotentSequence.java 0.3-3 06/05/2001
+ * @(#)IdempotentSequence.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
@@ -32,6 +32,9 @@
package org.exoplatform.common.http.client;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+
import java.util.Enumeration;
import java.util.Hashtable;
@@ -67,6 +70,11 @@
// DAV methods
PROPFIND = 8, PROPPATCH = 9, MKCOL = 10, COPY = 11, MOVE = 12, LOCK = 13, UNLOCK = 14;
+ /**
+ * The logger
+ */
+ private static final Log LOG = ExoLogger.getLogger("org.exoplatform.common.http.client.IdempotentSequence");
+
/** these are the history of previous requests */
private int[] m_history;
@@ -356,24 +364,24 @@
seq.add(new Request(null, "PUT", "/b7", null, null, null, false));
if (!seq.isIdempotent(new Request(null, null, "/b1", null, null, null, false)))
- System.err.println("Sequence b1 failed");
+ LOG.error("Sequence b1 failed");
if (!seq.isIdempotent(new Request(null, null, "/b2", null, null, null, false)))
- System.err.println("Sequence b2 failed");
+ LOG.error("Sequence b2 failed");
if (!seq.isIdempotent(new Request(null, null, "/b3", null, null, null, false)))
- System.err.println("Sequence b3 failed");
+ LOG.error("Sequence b3 failed");
if (seq.isIdempotent(new Request(null, null, "/b4", null, null, null, false)))
- System.err.println("Sequence b4 failed");
+ LOG.error("Sequence b4 failed");
if (!seq.isIdempotent(new Request(null, null, "/b5", null, null, null, false)))
- System.err.println("Sequence b5 failed");
+ LOG.error("Sequence b5 failed");
if (seq.isIdempotent(new Request(null, null, "/b6", null, null, null, false)))
- System.err.println("Sequence b6 failed");
+ LOG.error("Sequence b6 failed");
if (seq.isIdempotent(new Request(null, null, "/b7", null, null, null, false)))
- System.err.println("Sequence b7 failed");
+ LOG.error("Sequence b7 failed");
if (seq.isIdempotent(new Request(null, null, "/b8", null, null, null, false)))
- System.err.println("Sequence b8 failed");
+ LOG.error("Sequence b8 failed");
if (seq.isIdempotent(new Request(null, null, "/b9", null, null, null, false)))
- System.err.println("Sequence b9 failed");
+ LOG.error("Sequence b9 failed");
- System.out.println("Tests finished");
+ LOG.error("Tests finished");
}
}
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/LinkedList.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/LinkedList.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/LinkedList.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)LinkedList.java 0.3-3 06/05/2001
+ * @(#)LinkedList.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Log.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Log.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Log.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)Log.java 0.3-3 06/05/2001
+ * @(#)Log.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
@@ -33,6 +33,7 @@
package org.exoplatform.common.http.client;
import org.exoplatform.commons.utils.PrivilegedSystemHelper;
+import org.exoplatform.services.log.ExoLogger;
import java.io.ByteArrayOutputStream;
import java.io.FileWriter;
@@ -72,6 +73,12 @@
*/
public class Log
{
+ /**
+ * The logger
+ */
+ private static final org.exoplatform.services.log.Log LOG =
+ ExoLogger.getLogger("org.exoplatform.common.http.client.Log");
+
/** The HTTPConnection facility (1) */
public static final int CONN = 1 << 0;
@@ -127,7 +134,7 @@
}
catch (IOException ioe)
{
- System.err.println("failed to open file log stream `" + file + "': " + ioe);
+ LOG.error("failed to open file log stream `" + file + "': " + ioe, ioe);
}
}
}
@@ -176,8 +183,8 @@
}
catch (IOException ioe)
{
- System.err.println("Failed to write to log: " + ioe);
- System.err.println("Failed log Entry was: " + msg);
+ LOG.error("Failed to write to log: " + ioe, ioe);
+ LOG.error("Failed log Entry was: " + msg);
}
}
@@ -210,9 +217,9 @@
}
catch (IOException ioe)
{
- System.err.println("Failed to write to log: " + ioe);
- System.err.print("Failed log Entry was: " + prefix);
- t.printStackTrace(System.err);
+ LOG.error("Failed to write to log: " + ioe, ioe);
+ LOG.error("Failed log Entry was: " + prefix);
+ LOG.error(t.getLocalizedMessage(), t);
}
}
@@ -241,9 +248,9 @@
}
catch (IOException ioe)
{
- System.err.println("Failed to write to log: " + ioe);
- System.err.println("Failed log Entry was: " + prefix);
- System.err.println(new String(buf.toByteArray()));
+ LOG.error("Failed to write to log: " + ioe, ioe);
+ LOG.error("Failed log Entry was: " + prefix);
+ LOG.error(new String(buf.toByteArray()));
}
}
@@ -325,7 +332,7 @@
}
catch (IOException ioe)
{
- System.err.println("Error closing log stream: " + ioe);
+ LOG.error("Error closing log stream: " + ioe, ioe);
}
}
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/MD5.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/MD5.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/MD5.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)MD5.java 0.3-3 06/05/2001
+ * @(#)MD5.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/MD5InputStream.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/MD5InputStream.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/MD5InputStream.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)MD5InputStream.java 0.3-3 06/05/2001
+ * @(#)MD5InputStream.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ModuleException.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ModuleException.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ModuleException.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)ModuleException.java 0.3-3 06/05/2001
+ * @(#)ModuleException.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/NVPair.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/NVPair.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/NVPair.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)NVPair.java 0.3-3 06/05/2001
+ * @(#)NVPair.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ParseException.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ParseException.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ParseException.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)ParseException.java 0.3-3 06/05/2001
+ * @(#)ParseException.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ProtocolNotSuppException.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ProtocolNotSuppException.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ProtocolNotSuppException.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)ProtocolNotSuppException.java 0.3-3 06/05/2001
+ * @(#)ProtocolNotSuppException.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RedirectionModule.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RedirectionModule.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RedirectionModule.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)RedirectionModule.java 0.3-3 06/05/2001
+ * @(#)RedirectionModule.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Request.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Request.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Request.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)Request.java 0.3-3 06/05/2001
+ * @(#)Request.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RespInputStream.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RespInputStream.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RespInputStream.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)RespInputStream.java 0.3-3 06/05/2001
+ * @(#)RespInputStream.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Response.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Response.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Response.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)Response.java 0.3-3 06/05/2001
+ * @(#)Response.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ResponseHandler.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ResponseHandler.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/ResponseHandler.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)ResponseHandler.java 0.3-3 06/05/2001
+ * @(#)ResponseHandler.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryException.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryException.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryException.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)RetryException.java 0.3-3 06/05/2001
+ * @(#)RetryException.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryModule.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryModule.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RetryModule.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)RetryModule.java 0.3-3 06/05/2001
+ * @(#)RetryModule.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RoRequest.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RoRequest.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RoRequest.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)RoRequest.java 0.3-3 06/05/2001
+ * @(#)RoRequest.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RoResponse.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RoResponse.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/RoResponse.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)RoResponse.java 0.3-3 06/05/2001
+ * @(#)RoResponse.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/SocksClient.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/SocksClient.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/SocksClient.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)SocksClient.java 0.3-3 06/05/2001
+ * @(#)SocksClient.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/SocksException.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/SocksException.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/SocksException.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)SocksException.java 0.3-3 06/05/2001
+ * @(#)SocksException.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/StreamDemultiplexor.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/StreamDemultiplexor.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/StreamDemultiplexor.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)StreamDemultiplexor.java 0.3-3 06/05/2001
+ * @(#)StreamDemultiplexor.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/TransferEncodingModule.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/TransferEncodingModule.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/TransferEncodingModule.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)TransferEncodingModule.java 0.3-3 06/05/2001
+ * @(#)TransferEncodingModule.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/URI.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/URI.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/URI.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)URI.java 0.3-3 06/05/2001
+ * @(#)URI.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
@@ -80,8 +80,8 @@
* <PRE>
* base = http://a/b/c/d;p?q
* rel = http:g
- * result = http:g (correct)
- * result = http://a/b/c/g (backwards compatible)
+ * result = http:g (correct)
+ * result = http://a/b/c/g (backwards compatible)
* </PRE>
*
* See rfc-2396, section 5.2, step 3, second paragraph.
@@ -557,8 +557,8 @@
public static String canonicalizePath(String path)
{
int idx, len = path.length();
- if (!((idx = path.indexOf("/.")) != -1 && (idx == len - 2 || path.charAt(idx + 2) == '/' || (path.charAt(idx + 2) == '.' && (idx == len - 3 || path
- .charAt(idx + 3) == '/')))))
+ if (!((idx = path.indexOf("/.")) != -1 && (idx == len - 2 || path.charAt(idx + 2) == '/'
+ || (path.charAt(idx + 2) == '.' && (idx == len - 3 || path.charAt(idx + 3) == '/')))))
return path;
char[] p = new char[path.length()]; // clean path
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/UncompressInputStream.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/UncompressInputStream.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/UncompressInputStream.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)UncompressInputStream.java 0.3-3 06/05/2001
+ * @(#)UncompressInputStream.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
@@ -32,6 +32,9 @@
package org.exoplatform.common.http.client;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+
import java.io.EOFException;
import java.io.FileInputStream;
import java.io.FilterInputStream;
@@ -49,6 +52,11 @@
class UncompressInputStream extends FilterInputStream
{
/**
+ * The logger
+ */
+ private static final Log LOG = ExoLogger.getLogger("exo.ws.commons.UncompressInputStream");
+
+ /**
* @param is the input stream to decompress
* @exception IOException if the header is malformed
*/
@@ -175,8 +183,8 @@
l_n_bits++;
l_maxcode = (l_n_bits == maxbits) ? l_maxmaxcode : (1 << l_n_bits) - 1;
- if (debug)
- System.err.println("Code-width expanded to " + l_n_bits);
+ if (LOG.isDebugEnabled())
+ LOG.debug("Code-width expanded to " + l_n_bits);
l_bitmask = (1 << l_n_bits) - 1;
l_bit_pos = resetbuf(l_bit_pos);
@@ -216,8 +224,8 @@
l_maxcode = (1 << l_n_bits) - 1;
l_bitmask = l_maxcode;
- if (debug)
- System.err.println("Code tables reset");
+ if (LOG.isDebugEnabled())
+ LOG.debug("Code tables reset");
l_bit_pos = resetbuf(l_bit_pos);
continue main_loop;
@@ -392,10 +400,10 @@
if ((header & HDR_FREE) > 0)
throw new IOException("Header bit 6 set");
- if (debug)
+ if (LOG.isDebugEnabled())
{
- System.err.println("block mode: " + block_mode);
- System.err.println("max bits: " + maxbits);
+ LOG.debug("block mode: " + block_mode);
+ LOG.debug("max bits: " + maxbits);
}
// initialize stuff
@@ -423,7 +431,7 @@
{
if (args.length != 1)
{
- System.err.println("Usage: UncompressInputStream <file>");
+ LOG.error("Usage: UncompressInputStream <file>");
System.exit(1);
}
@@ -443,7 +451,7 @@
}
long end = System.currentTimeMillis();
- System.err.println("Decompressed " + tot + " bytes");
- System.err.println("Time: " + (end - beg) / 1000. + " seconds");
+ LOG.error("Decompressed " + tot + " bytes");
+ LOG.error("Time: " + (end - beg) / 1000. + " seconds");
}
}
Modified: ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Util.java
===================================================================
--- ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Util.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.commons/src/main/java/org/exoplatform/common/http/client/Util.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -1,5 +1,5 @@
/*
- * @(#)Util.java 0.3-3 06/05/2001
+ * @(#)Util.java 0.3-3 06/05/2001
*
* This file is part of the HTTPClient package
* Copyright (C) 1996-2001 Ronald Tschal�r
Modified: ws/trunk/exo.ws.frameworks.json/src/main/java/org/exoplatform/ws/frameworks/json/impl/JsonWriterImpl.java
===================================================================
--- ws/trunk/exo.ws.frameworks.json/src/main/java/org/exoplatform/ws/frameworks/json/impl/JsonWriterImpl.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.frameworks.json/src/main/java/org/exoplatform/ws/frameworks/json/impl/JsonWriterImpl.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -356,9 +356,8 @@
JsonToken token = stack.pop();
if (token != JsonToken.object)
{
- System.out.println(token);
// wrong JSON structure.
- throw new JsonException("Sysntax error. Unexpected element '}'.");
+ throw new JsonException("Sysntax error. Unexpected element '}' : " + token);
}
writer.write('}');
commaFirst = true;
Modified: ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/BaseObjectModel.java
===================================================================
--- ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/BaseObjectModel.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/BaseObjectModel.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -100,8 +100,9 @@
{
if (Modifier.isPublic(modif)
|| Modifier.isProtected(modif)
- || (!Modifier.isPrivate(modif) && ((resourcePackageName == null && scPackageName == null) || resourcePackageName
- .equals(scPackageName))))
+ || (!Modifier.isPrivate(modif)
+ && ((resourcePackageName == null && scPackageName == null)
+ || resourcePackageName.equals(scPackageName))))
{
FieldInjector inj = new FieldInjectorImpl(clazz, jfield);
// Skip not annotated field. They will be not injected from container.
Modified: ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/ResourceBinder.java
===================================================================
--- ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/ResourceBinder.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/ResourceBinder.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -188,6 +188,11 @@
* @deprecated Do not need container here any more.
*/
protected final ExoContainer container;
+
+ /**
+ * The name of the container
+ */
+ protected final String containerName;
public ResourceBinder(ExoContainerContext containerContext) throws Exception
{
@@ -217,6 +222,7 @@
rd = RuntimeDelegate.getInstance();
container = containerContext.getContainer();
+ this.containerName = containerContext.getName();
}
/**
@@ -641,7 +647,7 @@
*/
protected void startResourceCleaner()
{
- Thread thread = new Thread(new ResourceCleaner(60));
+ Thread thread = new Thread(new ResourceCleaner(60), "Resource Cleaner " + containerName);
thread.setDaemon(true);
thread.start();
}
Modified: ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/method/DefaultMethodInvoker.java
===================================================================
--- ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/method/DefaultMethodInvoker.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/method/DefaultMethodInvoker.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -161,7 +161,7 @@
{
if (LOG.isDebugEnabled())
{
- e.printStackTrace();
+ LOG.debug(e.getLocalizedMessage(), e);
}
if (e instanceof WebApplicationException)
{
@@ -206,7 +206,7 @@
{
if (LOG.isDebugEnabled())
{
- cause.printStackTrace();
+ LOG.debug(cause.getLocalizedMessage(), cause);
}
// get cause of exception that method produces
Throwable throwable = cause.getCause();
Modified: ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/method/PropertyResolver.java
===================================================================
--- ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/method/PropertyResolver.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/method/PropertyResolver.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -20,7 +20,6 @@
import org.exoplatform.services.rest.ApplicationContext;
import org.exoplatform.services.rest.Property;
-import org.exoplatform.services.rest.impl.ApplicationContextImpl;
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
@@ -43,8 +42,9 @@
this.property = property;
}
+
/**
- * @see org.exoplatform.services.rest.impl.method.ParameterResolver#resolve(org.exoplatform.services.rest.Parameter, org.exoplatform.services.rest.ApplicationContext)
+ * {@inheritDoc}
*/
@Override
public Object resolve(org.exoplatform.services.rest.Parameter parameter, ApplicationContext context)
Modified: ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/provider/DOMSourceEntityProvider.java
===================================================================
--- ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/provider/DOMSourceEntityProvider.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/provider/DOMSourceEntityProvider.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -100,7 +100,7 @@
// if can't read from stream (e.g. steam is empty)
if (LOG.isDebugEnabled())
{
- cause.printStackTrace();
+ LOG.debug(cause.getLocalizedMessage(), cause);
}
return null;
}
Modified: ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBElementEntityProvider.java
===================================================================
--- ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBElementEntityProvider.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBElementEntityProvider.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -105,7 +105,7 @@
// if can't read from stream (e.g. steam is empty)
if (LOG.isDebugEnabled())
{
- cause.printStackTrace();
+ LOG.debug(cause.getLocalizedMessage(), cause);
}
return null;
}
Modified: ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBObjectEntityProvider.java
===================================================================
--- ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBObjectEntityProvider.java 2011-04-29 12:05:32 UTC (rev 4333)
+++ ws/trunk/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBObjectEntityProvider.java 2011-04-29 12:18:25 UTC (rev 4334)
@@ -101,7 +101,7 @@
// if can't read from stream (e.g. steam is empty)
if (LOG.isDebugEnabled())
{
- cause.printStackTrace();
+ LOG.debug(cause.getLocalizedMessage(), cause);
}
return null;
}
13 years, 1 month
exo-jcr SVN: r4333 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-04-29 08:05:32 -0400 (Fri, 29 Apr 2011)
New Revision: 4333
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/ItemDataMoveVisitor.java
Log:
EXOJCR-1327: trigger evetns by default for Workspace.move()
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/ItemDataMoveVisitor.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/ItemDataMoveVisitor.java 2011-04-29 09:05:52 UTC (rev 4332)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/ItemDataMoveVisitor.java 2011-04-29 12:05:32 UTC (rev 4333)
@@ -130,7 +130,7 @@
public ItemDataMoveVisitor(NodeData parent, InternalQName dstNodeName, NodeTypeDataManager nodeTypeManager,
SessionDataManager srcDataManager, boolean keepIdentifiers)
{
- this(parent, dstNodeName, nodeTypeManager, srcDataManager, keepIdentifiers, false);
+ this(parent, dstNodeName, nodeTypeManager, srcDataManager, keepIdentifiers, true);
}
@Override
13 years, 1 month
exo-jcr SVN: r4332 - in jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl: dataflow/session and 1 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-04-29 05:05:52 -0400 (Fri, 29 Apr 2011)
New Revision: 4332
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/SessionChangesLog.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableDataManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java
Log:
EXOJCR-1234: make code more readable
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2011-04-29 08:25:13 UTC (rev 4331)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2011-04-29 09:05:52 UTC (rev 4332)
@@ -968,14 +968,7 @@
int lastOrderNumber = changesLog.getLastChildOrderNumber(parent.getIdentifier());
int lastPersistedNodeOrderNumber = transactionableManager.getLastOrderNumber(parent);
- if (lastPersistedNodeOrderNumber < lastOrderNumber)
- {
- return lastOrderNumber;
- }
- else
- {
- return lastPersistedNodeOrderNumber;
- }
+ return Math.max(lastPersistedNodeOrderNumber, lastOrderNumber);
}
/**
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/SessionChangesLog.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/SessionChangesLog.java 2011-04-29 08:25:13 UTC (rev 4331)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/SessionChangesLog.java 2011-04-29 09:05:52 UTC (rev 4332)
@@ -62,10 +62,23 @@
new HashMap<String, Map<String, ItemState>>();
/**
- * Stores persisted child nodes count.
+ * Stores info for persisted child nodes by parent identifier.
+ * <br>Index in array points to:
+ * <br>0 - child nodes count.
+ * <br>1 - last child order number
*/
- protected Map<String, int[]> childNodesCount = new HashMap<String, int[]>();
+ protected Map<String, int[]> childNodesInfo = new HashMap<String, int[]>();
+ /**
+ * Index in <code>childNodesInfo<code> value array to store child nodes count.
+ */
+ protected final int CHILD_NODES_COUNT_INDEX = 0;
+
+ /**
+ * Index in <code>childNodesInfo<code> value array to store last child order number.
+ */
+ protected final int CHILD_NODES_LAST_ORDER_NUMBER_INDEX = 1;
+
/**
* Create empty ChangesLog.
*
@@ -129,7 +142,7 @@
index.clear();
lastChildNodeStates.clear();
lastChildPropertyStates.clear();
- childNodesCount.clear();
+ childNodesInfo.clear();
}
/**
@@ -153,21 +166,21 @@
index.remove(item.getData().getQPath());
index.remove(new ParentIDQPathBasedKey(item));
index.remove(new IDStateBasedKey(item.getData().getIdentifier(), item.getState()));
- childNodesCount.remove(item.getData().getIdentifier());
+ childNodesInfo.remove(item.getData().getIdentifier());
lastChildNodeStates.remove(item.getData().getIdentifier());
lastChildPropertyStates.remove(item.getData().getIdentifier());
if (item.isNode() && item.isPersisted())
{
- int childCount[] = childNodesCount.get(item.getData().getParentIdentifier());
- if (childCount != null)
+ int childInfo[] = childNodesInfo.get(item.getData().getParentIdentifier());
+ if (childInfo != null)
{
if (item.isDeleted())
- ++childCount[0];
+ ++childInfo[CHILD_NODES_COUNT_INDEX];
else if (item.isAdded())
- --childCount[0];
+ --childInfo[CHILD_NODES_COUNT_INDEX];
- childNodesCount.put(item.getData().getParentIdentifier(), childCount);
+ childNodesInfo.put(item.getData().getParentIdentifier(), childInfo);
}
}
@@ -412,15 +425,15 @@
public int getChildNodesCount(String rootIdentifier)
{
- int[] childCount = childNodesCount.get(rootIdentifier);
- return childCount == null ? 0 : childCount[0];
+ int[] childInfo = childNodesInfo.get(rootIdentifier);
+ return childInfo == null ? 0 : childInfo[CHILD_NODES_COUNT_INDEX];
}
public int getLastChildOrderNumber(String rootIdentifier)
{
- int[] childInfo = childNodesCount.get(rootIdentifier);
- return childInfo == null ? -1 : childInfo[1];
+ int[] childInfo = childNodesInfo.get(rootIdentifier);
+ return childInfo == null ? -1 : childInfo[CHILD_NODES_LAST_ORDER_NUMBER_INDEX];
}
/**
@@ -671,20 +684,20 @@
if (item.isNode() && item.isPersisted())
{
- int[] childCount = childNodesCount.get(item.getData().getParentIdentifier());
- if (childCount == null)
- childCount = new int[2];
+ int[] childInfo = childNodesInfo.get(item.getData().getParentIdentifier());
+ if (childInfo == null)
+ childInfo = new int[2];
if (item.isDeleted())
{
- --childCount[0];
+ --childInfo[CHILD_NODES_COUNT_INDEX];
}
else if (item.isAdded())
{
- ++childCount[0];
- childCount[1] = ((NodeData)item.getData()).getOrderNumber();
+ ++childInfo[CHILD_NODES_COUNT_INDEX];
+ childInfo[CHILD_NODES_LAST_ORDER_NUMBER_INDEX] = ((NodeData)item.getData()).getOrderNumber();
}
- childNodesCount.put(item.getData().getParentIdentifier(), childCount);
+ childNodesInfo.put(item.getData().getParentIdentifier(), childInfo);
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableDataManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableDataManager.java 2011-04-29 08:25:13 UTC (rev 4331)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableDataManager.java 2011-04-29 09:05:52 UTC (rev 4332)
@@ -133,14 +133,8 @@
}
int lastOrderNumber = storageDataManager.getLastOrderNumber(parent);
- if (lastOrderNumber > txLastOrderNumber)
- {
- return lastOrderNumber;
- }
- else
- {
- return txLastOrderNumber;
- }
+
+ return Math.max(lastOrderNumber, txLastOrderNumber);
}
else
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java 2011-04-29 08:25:13 UTC (rev 4331)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java 2011-04-29 09:05:52 UTC (rev 4332)
@@ -235,7 +235,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#add(org.exoplatform.services.jcr.datamodel.NodeData)
+ * {@inheritDoc}
*/
public void add(NodeData data) throws RepositoryException, UnsupportedOperationException, InvalidItemStateException,
IllegalStateException
@@ -253,7 +253,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#add(org.exoplatform.services.jcr.datamodel.PropertyData)
+ * {@inheritDoc}
*/
public void add(PropertyData data) throws RepositoryException, UnsupportedOperationException,
InvalidItemStateException, IllegalStateException
@@ -271,7 +271,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#close()
+ * {@inheritDoc}
*/
public void close() throws IllegalStateException, RepositoryException
{
@@ -288,7 +288,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#commit()
+ * {@inheritDoc}
*/
public void commit() throws IllegalStateException, RepositoryException
{
@@ -305,7 +305,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#delete(org.exoplatform.services.jcr.datamodel.NodeData)
+ * {@inheritDoc}
*/
public void delete(NodeData data) throws RepositoryException, UnsupportedOperationException,
InvalidItemStateException, IllegalStateException
@@ -323,7 +323,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#delete(org.exoplatform.services.jcr.datamodel.PropertyData)
+ * {@inheritDoc}
*/
public void delete(PropertyData data) throws RepositoryException, UnsupportedOperationException,
InvalidItemStateException, IllegalStateException
@@ -341,7 +341,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getChildNodesCount(org.exoplatform.services.jcr.datamodel.NodeData)
+ * {@inheritDoc}
*/
public int getLastOrderNumber(NodeData parent) throws RepositoryException
{
@@ -356,9 +356,9 @@
s.end();
}
}
-
+
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getChildNodesCount(org.exoplatform.services.jcr.datamodel.NodeData)
+ * {@inheritDoc}
*/
public int getChildNodesCount(NodeData parent) throws RepositoryException
{
@@ -375,7 +375,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getChildNodesData(org.exoplatform.services.jcr.datamodel.NodeData)
+ * {@inheritDoc}
*/
public List<NodeData> getChildNodesData(NodeData parent) throws RepositoryException, IllegalStateException
{
@@ -392,7 +392,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getChildPropertiesData(org.exoplatform.services.jcr.datamodel.NodeData)
+ * {@inheritDoc}
*/
public List<PropertyData> getChildPropertiesData(NodeData parent) throws RepositoryException, IllegalStateException
{
@@ -435,7 +435,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getItemData(java.lang.String)
+ * {@inheritDoc}
*/
public ItemData getItemData(String identifier) throws RepositoryException, IllegalStateException
{
@@ -452,7 +452,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getReferencesData(java.lang.String)
+ * {@inheritDoc}
*/
public List<PropertyData> getReferencesData(String nodeIdentifier) throws RepositoryException,
IllegalStateException, UnsupportedOperationException
@@ -470,7 +470,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#isOpened()
+ * {@inheritDoc}
*/
public boolean isOpened()
{
@@ -487,7 +487,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#listChildPropertiesData(org.exoplatform.services.jcr.datamodel.NodeData)
+ * {@inheritDoc}
*/
public List<PropertyData> listChildPropertiesData(NodeData parent) throws RepositoryException, IllegalStateException
{
@@ -504,7 +504,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#rename(org.exoplatform.services.jcr.datamodel.NodeData)
+ * {@inheritDoc}
*/
public void rename(NodeData data) throws RepositoryException, UnsupportedOperationException,
InvalidItemStateException, IllegalStateException
@@ -522,7 +522,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#rollback()
+ * {@inheritDoc}
*/
public void rollback() throws IllegalStateException, RepositoryException
{
@@ -539,7 +539,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#update(org.exoplatform.services.jcr.datamodel.NodeData)
+ * {@inheritDoc}
*/
public void update(NodeData data) throws RepositoryException, UnsupportedOperationException,
InvalidItemStateException, IllegalStateException
@@ -557,7 +557,7 @@
}
/**
- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#update(org.exoplatform.services.jcr.datamodel.PropertyData)
+ * {@inheritDoc}
*/
public void update(PropertyData data) throws RepositoryException, UnsupportedOperationException,
InvalidItemStateException, IllegalStateException
13 years, 1 month
exo-jcr SVN: r4331 - in jcr/branches/1.12.x/patch/1.12.9-GA: JCR-1611 and 1 other directory.
by do-not-reply@jboss.org
Author: tolusha
Date: 2011-04-29 04:25:13 -0400 (Fri, 29 Apr 2011)
New Revision: 4331
Added:
jcr/branches/1.12.x/patch/1.12.9-GA/JCR-1611/
jcr/branches/1.12.x/patch/1.12.9-GA/JCR-1611/JCR-1611.patch
Log:
JCR-1611: patch proposed
Added: jcr/branches/1.12.x/patch/1.12.9-GA/JCR-1611/JCR-1611.patch
===================================================================
--- jcr/branches/1.12.x/patch/1.12.9-GA/JCR-1611/JCR-1611.patch (rev 0)
+++ jcr/branches/1.12.x/patch/1.12.9-GA/JCR-1611/JCR-1611.patch 2011-04-29 08:25:13 UTC (rev 4331)
@@ -0,0 +1,1086 @@
+Index: exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestJBossCacheWorkspaceStorageCacheInClusterMode.java
+===================================================================
+--- exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestJBossCacheWorkspaceStorageCacheInClusterMode.java (revision 4327)
++++ exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/TestJBossCacheWorkspaceStorageCacheInClusterMode.java (working copy)
+@@ -96,6 +96,7 @@
+ // Test getChildNodesData
+ Action readAction = new Action(cwdmNode2)
+ {
++ @Override
+ public void execute(NodeData parentNode) throws Exception
+ {
+ cwdm.getChildNodesData(parentNode);
+@@ -103,6 +104,7 @@
+ };
+ Action writeAction = new Action(cwdmNode1)
+ {
++ @Override
+ public void execute(NodeData parentNode) throws Exception
+ {
+ PlainChangesLog chlog = new PlainChangesLogImpl();
+@@ -127,6 +129,7 @@
+ // Test getChildPropertiesData
+ readAction = new Action(cwdmNode2)
+ {
++ @Override
+ public void execute(NodeData parentNode) throws Exception
+ {
+ cwdm.getChildPropertiesData(parentNode);
+@@ -134,6 +137,7 @@
+ };
+ writeAction = new Action(cwdmNode1)
+ {
++ @Override
+ public void execute(NodeData parentNode) throws Exception
+ {
+ PlainChangesLog chlog = new PlainChangesLogImpl();
+@@ -161,6 +165,7 @@
+ // Test getReferencesData
+ readAction = new Action(cwdmNode2)
+ {
++ @Override
+ public void execute(NodeData parentNode) throws Exception
+ {
+ cwdm.getReferencesData(parentNode.getIdentifier(), false);
+@@ -168,6 +173,7 @@
+ };
+ writeAction = new Action(cwdmNode1)
+ {
++ @Override
+ public void execute(NodeData parentNode) throws Exception
+ {
+ PlainChangesLog chlog = new PlainChangesLogImpl();
+@@ -196,6 +202,7 @@
+ // Test getItemData by Id
+ readAction = new Action(cwdmNode2)
+ {
++ @Override
+ public void execute(NodeData parentNode) throws Exception
+ {
+ cwdm.getItemData(parentNode.getIdentifier());
+@@ -203,6 +210,7 @@
+ };
+ writeAction = new Action(cwdmNode1)
+ {
++ @Override
+ public void execute(NodeData parentNode) throws Exception
+ {
+ PlainChangesLog chlog = new PlainChangesLogImpl();
+@@ -231,6 +239,7 @@
+ final QPathEntry qpe = new QPathEntry(null, "my-property", 1);
+ readAction = new Action(cwdmNode2)
+ {
++ @Override
+ public void execute(NodeData parentNode) throws Exception
+ {
+ cwdm.getItemData(parentNode, qpe, ItemType.PROPERTY);
+@@ -238,6 +247,7 @@
+ };
+ writeAction = new Action(cwdmNode1)
+ {
++ @Override
+ public void execute(NodeData parentNode) throws Exception
+ {
+ PlainChangesLog chlog = new PlainChangesLogImpl();
+@@ -308,6 +318,7 @@
+ final CountDownLatch doneSignal = new CountDownLatch(2);
+ Thread writer = new Thread()
+ {
++ @Override
+ public void run()
+ {
+ try
+@@ -331,6 +342,7 @@
+ writer.start();
+ Thread reader = new Thread()
+ {
++ @Override
+ public void run()
+ {
+ try
+@@ -593,6 +605,11 @@
+ InvalidItemStateException, IllegalStateException
+ {
+ }
++
++ public int getLastOrderNumber(NodeData parent) throws RepositoryException
++ {
++ return -1;
++ }
+ };
+
+ private static class MyWorkspaceDataContainer extends WorkspaceDataContainerBase
+Index: exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCacheableWorkspaceDataManager.java
+===================================================================
+--- exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCacheableWorkspaceDataManager.java (revision 4327)
++++ exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCacheableWorkspaceDataManager.java (working copy)
+@@ -526,6 +526,12 @@
+ {
+ }
+
++ @Override
++ public int getLastOrderNumber(NodeData parent) throws RepositoryException
++ {
++ return -1;
++ }
++
+ };
+
+ private static class MyWorkspaceDataContainer extends WorkspaceDataContainerBase
+Index: exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestNodeOrder.java
+===================================================================
+--- exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestNodeOrder.java (revision 4327)
++++ exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestNodeOrder.java (working copy)
+@@ -36,14 +36,14 @@
+ */
+ package org.exoplatform.services.jcr.impl.core;
+
++import org.exoplatform.services.jcr.JcrImplBaseTest;
++import org.exoplatform.services.jcr.datamodel.NodeData;
++
+ import javax.jcr.ItemExistsException;
+ import javax.jcr.Node;
+ import javax.jcr.NodeIterator;
+ import javax.jcr.Session;
+
+-import org.exoplatform.services.jcr.JcrImplBaseTest;
+-import org.exoplatform.services.jcr.datamodel.NodeData;
+-
+ /**
+ * Created by The eXo Platform SAS.
+ *
+@@ -227,7 +227,7 @@
+ assertEquals(order++, orderNumb);
+ }
+ }
+-
++
+ public void testOrderWithRefreshKeep() throws Exception
+ {
+ Node testNode = root.addNode("testNode");
+@@ -268,4 +268,41 @@
+ }
+ }
+
++ public void testRemoveOrder() throws Exception
++ {
++ Node list = session.getRootNode().addNode("list");
++ assertTrue(list.getPrimaryNodeType().hasOrderableChildNodes());
++ list.addNode("foo", "nt:unstructured");
++ list.addNode("bar", "nt:unstructured");
++ list.addNode("juu", "nt:unstructured");
++ session.save();
++
++ list = session.getRootNode().getNode("list");
++ list.getNode("bar").remove();
++ session.save();
++
++ list = session.getRootNode().getNode("list");
++ list.addNode("daa", "nt:unstructured");
++ session.save();
++
++ //check order numbers
++ NodeImpl foo = (NodeImpl)list.getNode("foo");
++ assertEquals(0, ((NodeData)foo.getData()).getOrderNumber());
++ NodeImpl juu = (NodeImpl)list.getNode("juu");
++ assertEquals(2, ((NodeData)juu.getData()).getOrderNumber());
++ NodeImpl daa = (NodeImpl)list.getNode("daa");
++ assertEquals(3, ((NodeData)daa.getData()).getOrderNumber());
++
++ // list.orderBefore("daa", null);
++ NodeIterator it = list.getNodes();
++ foo = (NodeImpl)it.nextNode();
++ assertEquals("foo", foo.getName());
++ juu = (NodeImpl)it.nextNode();
++ assertEquals("juu", juu.getName());
++ daa = (NodeImpl)it.nextNode();
++ assertEquals("daa", daa.getName());
++ assertFalse(it.hasNext());
++ session.save();
++ }
++
+ }
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemDataConsumer.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemDataConsumer.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemDataConsumer.java (working copy)
+@@ -91,6 +91,15 @@
+ * @return int, child nodes count
+ */
+ int getChildNodesCount(NodeData parent) throws RepositoryException;
++
++ /**
++ * Get order number of parent's last child node.
++ *
++ * @param parent node
++ * @return int Returns last child nodes order number or -1 if there is no subnodes.
++ * @throws RepositoryException
++ */
++ int getLastOrderNumber(NodeData parent) throws RepositoryException;
+
+ /**
+ * Get child Properties of the parent node.
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java (working copy)
+@@ -2824,7 +2824,7 @@
+
+ private int getNextChildOrderNum() throws RepositoryException
+ {
+- return dataManager.getChildNodesCount(nodeData());
++ return dataManager.getLastOrderNumber(nodeData()) + 1;
+ }
+
+ private int getNextChildIndex(InternalQName nameToAdd, NodeData parentNode) throws RepositoryException,
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java (working copy)
+@@ -843,6 +843,17 @@
+ /**
+ * {@inheritDoc}
+ */
++ public int getLastOrderNumber(NodeData parent) throws RepositoryException
++ {
++ int lastOrderNumber = changesLog.getLastChildOrderNumber(parent.getIdentifier());
++ int lastPersistedNodeOrderNumber = transactionableManager.getLastOrderNumber(parent);
++
++ return Math.max(lastPersistedNodeOrderNumber, lastOrderNumber);
++ }
++
++ /**
++ * {@inheritDoc}
++ */
+ public int getChildNodesCount(NodeData parent) throws RepositoryException
+ {
+ int childsCount =
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/LocalWorkspaceStorageDataManagerProxy.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/LocalWorkspaceStorageDataManagerProxy.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/LocalWorkspaceStorageDataManagerProxy.java (working copy)
+@@ -135,6 +135,14 @@
+ /**
+ * {@inheritDoc}
+ */
++ public int getLastOrderNumber(final NodeData parent) throws RepositoryException
++ {
++ return storageDataManager.getLastOrderNumber(parent);
++ }
++
++ /**
++ * {@inheritDoc}
++ */
+ public int getChildNodesCount(final NodeData parent) throws RepositoryException
+ {
+ return storageDataManager.getChildNodesCount(parent);
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/SessionChangesLog.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/SessionChangesLog.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/SessionChangesLog.java (working copy)
+@@ -62,11 +62,24 @@
+ new HashMap<String, Map<String, ItemState>>();
+
+ /**
+- * Stores persisted child nodes count.
++ * Stores info for persisted child nodes by parent identifier.
++ * <br>Index in array points to:
++ * <br>0 - child nodes count
++ * <br>1 - last child order number
+ */
+- protected Map<String, int[]> childNodesCount = new HashMap<String, int[]>();
++ protected Map<String, int[]> childNodesInfo = new HashMap<String, int[]>();
+
+ /**
++ * Index in <code>childNodesInfo<code> value array to store child nodes count.
++ */
++ protected final int CHILD_NODES_COUNT_INDEX = 0;
++
++ /**
++ * Index in <code>childNodesInfo<code> value array to store last child order number.
++ */
++ protected final int CHILD_NODES_LAST_ORDER_NUMBER_INDEX = 1;
++
++ /**
+ * Create empty ChangesLog.
+ *
+ * @param sessionId
+@@ -129,7 +142,7 @@
+ index.clear();
+ lastChildNodeStates.clear();
+ lastChildPropertyStates.clear();
+- childNodesCount.clear();
++ childNodesInfo.clear();
+ }
+
+ /**
+@@ -153,21 +166,25 @@
+ index.remove(item.getData().getQPath());
+ index.remove(new ParentIDQPathBasedKey(item));
+ index.remove(new IDStateBasedKey(item.getData().getIdentifier(), item.getState()));
+- childNodesCount.remove(item.getData().getIdentifier());
++ childNodesInfo.remove(item.getData().getIdentifier());
+ lastChildNodeStates.remove(item.getData().getIdentifier());
+ lastChildPropertyStates.remove(item.getData().getIdentifier());
+
+ if (item.isNode() && item.isPersisted())
+ {
+- int childCount[] = childNodesCount.get(item.getData().getParentIdentifier());
+- if (childCount != null)
++ int childInfo[] = childNodesInfo.get(item.getData().getParentIdentifier());
++ if (childInfo != null)
+ {
+ if (item.isDeleted())
+- ++childCount[0];
++ {
++ ++childInfo[CHILD_NODES_COUNT_INDEX];
++ }
+ else if (item.isAdded())
+- --childCount[0];
++ {
++ --childInfo[CHILD_NODES_COUNT_INDEX];
++ }
+
+- childNodesCount.put(item.getData().getParentIdentifier(), childCount);
++ childNodesInfo.put(item.getData().getParentIdentifier(), childInfo);
+ }
+ }
+
+@@ -412,10 +429,17 @@
+
+ public int getChildNodesCount(String rootIdentifier)
+ {
+- int[] childCount = childNodesCount.get(rootIdentifier);
+- return childCount == null ? 0 : childCount[0];
++ int[] childInfo = childNodesInfo.get(rootIdentifier);
++ return childInfo == null ? 0 : childInfo[CHILD_NODES_COUNT_INDEX];
+ }
+
++ public int getLastChildOrderNumber(String rootIdentifier)
++ {
++
++ int[] childInfo = childNodesInfo.get(rootIdentifier);
++ return childInfo == null ? -1 : childInfo[CHILD_NODES_LAST_ORDER_NUMBER_INDEX];
++ }
++
+ /**
+ * Collect last in ChangesLog order item child changes.
+ *
+@@ -663,16 +687,22 @@
+
+ if (item.isNode() && item.isPersisted())
+ {
+- int[] childCount = childNodesCount.get(item.getData().getParentIdentifier());
+- if (childCount == null)
+- childCount = new int[1];
++ int[] childInfo = childNodesInfo.get(item.getData().getParentIdentifier());
++ if (childInfo == null)
++ {
++ childInfo = new int[2];
++ }
+
+ if (item.isDeleted())
+- --childCount[0];
++ {
++ --childInfo[CHILD_NODES_COUNT_INDEX];
++ }
+ else if (item.isAdded())
+- ++childCount[0];
+-
+- childNodesCount.put(item.getData().getParentIdentifier(), childCount);
++ {
++ ++childInfo[CHILD_NODES_COUNT_INDEX];
++ childInfo[CHILD_NODES_LAST_ORDER_NUMBER_INDEX] = ((NodeData)item.getData()).getOrderNumber();
++ }
++ childNodesInfo.put(item.getData().getParentIdentifier(), childInfo);
+ }
+ }
+
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableDataManager.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableDataManager.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableDataManager.java (working copy)
+@@ -114,6 +114,37 @@
+ /**
+ * {@inheritDoc}
+ */
++ public int getLastOrderNumber(final NodeData parent) throws RepositoryException
++ {
++ if (txStarted())
++ {
++ int txLastOrderNumber = -1;
++ for (ItemState change : transactionLog.getAllStates())
++ {
++ if (change.isNode() && change.isPersisted() && change.isAdded()
++ && change.getData().getParentIdentifier().equals(parent.getIdentifier()))
++ {
++ int orderNumber = ((NodeData)change.getData()).getOrderNumber();
++ if (orderNumber > txLastOrderNumber)
++ {
++ txLastOrderNumber = orderNumber;
++ }
++ }
++ }
++
++ int lastOrderNumber = storageDataManager.getLastOrderNumber(parent);
++
++ return Math.max(lastOrderNumber, txLastOrderNumber);
++ }
++ else
++ {
++ return storageDataManager.getLastOrderNumber(parent);
++ }
++ }
++
++ /**
++ * {@inheritDoc}
++ */
+ public int getChildNodesCount(final NodeData parent) throws RepositoryException
+ {
+ if (txStarted())
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/DefaultItemDataCopyVisitor.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/DefaultItemDataCopyVisitor.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/DefaultItemDataCopyVisitor.java (working copy)
+@@ -264,7 +264,7 @@
+
+ protected int calculateNewNodeOrderNumber() throws RepositoryException
+ {
+- return dataManager.getChildNodesCount(curParent());
++ return dataManager.getLastOrderNumber(curParent()) + 1;
+ }
+
+ protected QPath calculateNewNodePath(NodeData node, int level) throws RepositoryException
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java (working copy)
+@@ -473,10 +473,27 @@
+ con.close();
+ }
+ }
+-
++
+ /**
+ * {@inheritDoc}
+ */
++ @Override
++ public int getLastOrderNumber(final NodeData nodeData) throws RepositoryException
++ {
++ final WorkspaceStorageConnection con = dataContainer.openConnection();
++ try
++ {
++ return con.getLastOrderNumber(nodeData);
++ }
++ finally
++ {
++ con.close();
++ }
++ }
++
++ /**
++ * {@inheritDoc}
++ */
+ public int getChildNodesCount(NodeData parent) throws RepositoryException
+ {
+ final WorkspaceStorageConnection con = dataContainer.openConnection();
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ACLInheritanceSupportedWorkspaceDataManager.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ACLInheritanceSupportedWorkspaceDataManager.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ACLInheritanceSupportedWorkspaceDataManager.java (working copy)
+@@ -158,6 +158,14 @@
+ /**
+ * {@inheritDoc}
+ */
++ public int getLastOrderNumber(final NodeData parent) throws RepositoryException
++ {
++ return persistentManager.getLastOrderNumber(parent);
++ }
++
++ /**
++ * {@inheritDoc}
++ */
+ public int getChildNodesCount(final NodeData parent) throws RepositoryException
+ {
+ return persistentManager.getChildNodesCount(parent);
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/inmemory/InmemoryStorageConnection.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/inmemory/InmemoryStorageConnection.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/inmemory/InmemoryStorageConnection.java (working copy)
+@@ -126,6 +126,11 @@
+ return null;
+ }
+
++ public int getLastOrderNumber(NodeData nodeData) throws RepositoryException
++ {
++ return -1;
++ }
++
+ public int getChildNodesCount(NodeData nodeData) throws RepositoryException
+ {
+ return 0;
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/HSQLDBMultiDbJDBCConnection.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/HSQLDBMultiDbJDBCConnection.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/HSQLDBMultiDbJDBCConnection.java (working copy)
+@@ -78,6 +78,10 @@
+ "select V.DATA" + " from JCR_MITEM I, JCR_MVALUE V"
+ + " where I.PARENT_ID=? and I.I_CLASS=2 and I.NAME=? and I.ID=V.PROPERTY_ID order by V.ORDER_NUM";
+ FIND_NODES_BY_PARENTID = "select * from JCR_MITEM" + " where PARENT_ID=? and I_CLASS=1" + " order by N_ORDER_NUM";
++
++ FIND_LAST_ORDER_NUMBER_BY_PARENTID =
++ "select count(*), max(N_ORDER_NUM) from JCR_MITEM where PARENT_ID=? and I_CLASS=1";
++
+ FIND_NODES_COUNT_BY_PARENTID = "select count(ID) from JCR_MITEM" + " where PARENT_ID=? and I_CLASS=1";
+ FIND_PROPERTIES_BY_PARENTID = "select * from JCR_MITEM" + " where PARENT_ID=? and I_CLASS=2" + " order by ID";
+ FIND_NODES_BY_PARENTID_CQ =
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/MultiDbJDBCConnection.java (working copy)
+@@ -151,6 +151,9 @@
+ + " from JCR_MITEM I, (SELECT ID, PARENT_ID from JCR_MITEM where ID=?) J"
+ + " where I.ID = J.ID or I.ID = J.PARENT_ID";
+
++ FIND_LAST_ORDER_NUMBER_BY_PARENTID =
++ "select count(*), max(N_ORDER_NUM) from JCR_MITEM where I_CLASS=1 and PARENT_ID=?";
++
+ FIND_NODES_COUNT_BY_PARENTID = "select count(ID) from JCR_MITEM" + " where I_CLASS=1 and PARENT_ID=?";
+
+ FIND_PROPERTIES_BY_PARENTID = "select * from JCR_MITEM" + " where I_CLASS=2 and PARENT_ID=?" + " order by NAME";
+@@ -413,6 +416,21 @@
+ * {@inheritDoc}
+ */
+ @Override
++ protected ResultSet findLastOrderNumberByParentIdentifier(String parentIdentifier) throws SQLException
++ {
++ if (findLastOrderNumberByParentId == null)
++ findLastOrderNumberByParentId = dbConnection.prepareStatement(FIND_LAST_ORDER_NUMBER_BY_PARENTID);
++ else
++ findLastOrderNumberByParentId.clearParameters();
++
++ findLastOrderNumberByParentId.setString(1, parentIdentifier);
++ return findLastOrderNumberByParentId.executeQuery();
++ }
++
++ /**
++ * {@inheritDoc}
++ */
++ @Override
+ protected ResultSet findChildNodesCountByParentIdentifier(String parentIdentifier) throws SQLException
+ {
+ if (findNodesCountByParentId == null)
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/HSQLDBSingleDbJDBCConnection.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/HSQLDBSingleDbJDBCConnection.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/HSQLDBSingleDbJDBCConnection.java (working copy)
+@@ -85,6 +85,10 @@
+ + " where I.PARENT_ID=? and I.I_CLASS=2 and I.CONTAINER_NAME=? and I.NAME=? and I.ID=V.PROPERTY_ID order by V.ORDER_NUM";
+ FIND_NODES_BY_PARENTID =
+ "select * from JCR_SITEM" + " where PARENT_ID=? and I_CLASS=1 and CONTAINER_NAME=?" + " order by N_ORDER_NUM";
++
++ FIND_LAST_ORDER_NUMBER_BY_PARENTID =
++ "select count(*), max(N_ORDER_NUM) from JCR_SITEM where PARENT_ID=? and I_CLASS=1 and CONTAINER_NAME=?";
++
+ FIND_NODES_COUNT_BY_PARENTID =
+ "select count(ID) from JCR_SITEM" + " where PARENT_ID=? and I_CLASS=1 and CONTAINER_NAME=?";
+ FIND_PROPERTIES_BY_PARENTID =
+@@ -165,6 +169,23 @@
+ * {@inheritDoc}
+ */
+ @Override
++ protected ResultSet findLastOrderNumberByParentIdentifier(String parentIdentifier) throws SQLException
++ {
++ if (findLastOrderNumberByParentId == null)
++ findLastOrderNumberByParentId = dbConnection.prepareStatement(FIND_LAST_ORDER_NUMBER_BY_PARENTID);
++ else
++ findLastOrderNumberByParentId.clearParameters();
++
++ findLastOrderNumberByParentId.setString(1, parentIdentifier);
++ findLastOrderNumberByParentId.setString(2, containerName);
++
++ return findLastOrderNumberByParentId.executeQuery();
++ }
++
++ /**
++ * {@inheritDoc}
++ */
++ @Override
+ protected ResultSet findChildNodesCountByParentIdentifier(String parentCid) throws SQLException
+ {
+ if (findNodesCountByParentId == null)
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/db/SingleDbJDBCConnection.java (working copy)
+@@ -157,6 +157,9 @@
+ + " from JCR_SITEM I, (SELECT ID, PARENT_ID from JCR_SITEM where ID=?) J"
+ + " where I.ID = J.ID or I.ID = J.PARENT_ID";
+
++ FIND_LAST_ORDER_NUMBER_BY_PARENTID =
++ "select count(*), max(N_ORDER_NUM) from JCR_SITEM where I_CLASS=1 and CONTAINER_NAME=? and PARENT_ID=?";
++
+ FIND_NODES_COUNT_BY_PARENTID =
+ "select count(ID) from JCR_SITEM" + " where I_CLASS=1 and CONTAINER_NAME=? and PARENT_ID=?";
+
+@@ -308,6 +311,22 @@
+ * {@inheritDoc}
+ */
+ @Override
++ protected ResultSet findLastOrderNumberByParentIdentifier(String parentIdentifier) throws SQLException
++ {
++ if (findLastOrderNumberByParentId == null)
++ findLastOrderNumberByParentId = dbConnection.prepareStatement(FIND_LAST_ORDER_NUMBER_BY_PARENTID);
++ else
++ findLastOrderNumberByParentId.clearParameters();
++
++ findLastOrderNumberByParentId.setString(1, containerName);
++ findLastOrderNumberByParentId.setString(2, parentIdentifier);
++ return findLastOrderNumberByParentId.executeQuery();
++ }
++
++ /**
++ * {@inheritDoc}
++ */
++ @Override
+ protected ResultSet findChildNodesCountByParentIdentifier(String parentCid) throws SQLException
+ {
+ if (findNodesCountByParentId == null)
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java (working copy)
+@@ -128,8 +128,13 @@
+ * FIND_NODES_BY_PARENTID.
+ */
+ protected String FIND_NODES_BY_PARENTID;
+-
++
+ /**
++ * FIND_LAST_ORDER_NUMBER_BY_PARENTID.
++ */
++ protected String FIND_LAST_ORDER_NUMBER_BY_PARENTID;
++
++ /**
+ * FIND_NODES_COUNT_BY_PARENTID.
+ */
+ protected String FIND_NODES_COUNT_BY_PARENTID;
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/HSQLDBMultiDbJDBCConnection.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/HSQLDBMultiDbJDBCConnection.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/HSQLDBMultiDbJDBCConnection.java (working copy)
+@@ -74,6 +74,8 @@
+ "select V.DATA" + " from JCR_MITEM I, JCR_MVALUE V"
+ + " where I.PARENT_ID=? and I.I_CLASS=2 and I.NAME=? and I.ID=V.PROPERTY_ID order by V.ORDER_NUM";
+ FIND_NODES_BY_PARENTID = "select * from JCR_MITEM" + " where PARENT_ID=? and I_CLASS=1" + " order by N_ORDER_NUM";
++ FIND_LAST_ORDER_NUMBER_BY_PARENTID =
++ "select count(*), max(N_ORDER_NUM) from JCR_MITEM where PARENT_ID=? and I_CLASS=1";
+ FIND_NODES_COUNT_BY_PARENTID = "select count(ID) from JCR_MITEM" + " where PARENT_ID=? and I_CLASS=1";
+ FIND_PROPERTIES_BY_PARENTID = "select * from JCR_MITEM" + " where PARENT_ID=? and I_CLASS=2" + " order by ID";
+ }
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java (working copy)
+@@ -127,6 +127,9 @@
+
+ FIND_NODES_BY_PARENTID = "select * from JCR_MITEM" + " where I_CLASS=1 and PARENT_ID=?" + " order by N_ORDER_NUM";
+
++ FIND_LAST_ORDER_NUMBER_BY_PARENTID =
++ "select count(*), max(N_ORDER_NUM) from JCR_MITEM where I_CLASS=1 and PARENT_ID=?";
++
+ FIND_NODES_COUNT_BY_PARENTID = "select count(ID) from JCR_MITEM" + " where I_CLASS=1 and PARENT_ID=?";
+
+ FIND_PROPERTIES_BY_PARENTID = "select * from JCR_MITEM" + " where I_CLASS=2 and PARENT_ID=?" + " order by ID";
+@@ -371,6 +374,21 @@
+ * {@inheritDoc}
+ */
+ @Override
++ protected ResultSet findLastOrderNumberByParentIdentifier(String parentIdentifier) throws SQLException
++ {
++ if (findLastOrderNumberByParentId == null)
++ findLastOrderNumberByParentId = dbConnection.prepareStatement(FIND_LAST_ORDER_NUMBER_BY_PARENTID);
++ else
++ findLastOrderNumberByParentId.clearParameters();
++
++ findLastOrderNumberByParentId.setString(1, parentIdentifier);
++ return findLastOrderNumberByParentId.executeQuery();
++ }
++
++ /**
++ * {@inheritDoc}
++ */
++ @Override
+ protected ResultSet findChildNodesCountByParentIdentifier(String parentIdentifier) throws SQLException
+ {
+ if (findNodesCountByParentId == null)
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/HSQLDBSingleDbJDBCConnection.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/HSQLDBSingleDbJDBCConnection.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/HSQLDBSingleDbJDBCConnection.java (working copy)
+@@ -81,6 +81,8 @@
+ + " where I.PARENT_ID=? and I.I_CLASS=2 and I.CONTAINER_NAME=? and I.NAME=? and I.ID=V.PROPERTY_ID order by V.ORDER_NUM";
+ FIND_NODES_BY_PARENTID =
+ "select * from JCR_SITEM" + " where PARENT_ID=? and I_CLASS=1 and CONTAINER_NAME=?" + " order by N_ORDER_NUM";
++ FIND_LAST_ORDER_NUMBER_BY_PARENTID =
++ "select count(*), max(N_ORDER_NUM) from JCR_SITEM where PARENT_ID=? and I_CLASS=1 and CONTAINER_NAME=?";
+ FIND_NODES_COUNT_BY_PARENTID =
+ "select count(ID) from JCR_SITEM" + " where PARENT_ID=? and I_CLASS=1 and CONTAINER_NAME=?";
+ FIND_PROPERTIES_BY_PARENTID =
+@@ -142,6 +144,23 @@
+ * {@inheritDoc}
+ */
+ @Override
++ protected ResultSet findLastOrderNumberByParentIdentifier(String parentIdentifier) throws SQLException
++ {
++ if (findLastOrderNumberByParentId == null)
++ findLastOrderNumberByParentId = dbConnection.prepareStatement(FIND_LAST_ORDER_NUMBER_BY_PARENTID);
++ else
++ findLastOrderNumberByParentId.clearParameters();
++
++ findLastOrderNumberByParentId.setString(1, parentIdentifier);
++ findLastOrderNumberByParentId.setString(2, containerName);
++
++ return findLastOrderNumberByParentId.executeQuery();
++ }
++
++ /**
++ * {@inheritDoc}
++ */
++ @Override
+ protected ResultSet findChildNodesCountByParentIdentifier(String parentCid) throws SQLException
+ {
+ if (findNodesCountByParentId == null)
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java (working copy)
+@@ -133,6 +133,9 @@
+ FIND_NODES_BY_PARENTID =
+ "select * from JCR_SITEM" + " where I_CLASS=1 and CONTAINER_NAME=? and PARENT_ID=?" + " order by N_ORDER_NUM";
+
++ FIND_LAST_ORDER_NUMBER_BY_PARENTID =
++ "select count(*), max(N_ORDER_NUM) from JCR_SITEM where I_CLASS=1 and CONTAINER_NAME=? and PARENT_ID=?";
++
+ FIND_NODES_COUNT_BY_PARENTID =
+ "select count(ID) from JCR_SITEM" + " where I_CLASS=1 and CONTAINER_NAME=? and PARENT_ID=?";
+
+@@ -282,6 +285,22 @@
+ * {@inheritDoc}
+ */
+ @Override
++ protected ResultSet findLastOrderNumberByParentIdentifier(String parentIdentifier) throws SQLException
++ {
++ if (findLastOrderNumberByParentId == null)
++ findLastOrderNumberByParentId = dbConnection.prepareStatement(FIND_LAST_ORDER_NUMBER_BY_PARENTID);
++ else
++ findLastOrderNumberByParentId.clearParameters();
++
++ findLastOrderNumberByParentId.setString(1, containerName);
++ findLastOrderNumberByParentId.setString(2, parentIdentifier);
++ return findLastOrderNumberByParentId.executeQuery();
++ }
++
++ /**
++ * {@inheritDoc}
++ */
++ @Override
+ protected ResultSet findChildNodesCountByParentIdentifier(String parentCid) throws SQLException
+ {
+ if (findNodesCountByParentId == null)
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java (working copy)
+@@ -151,6 +151,8 @@
+
+ protected PreparedStatement findNodesByParentId;
+
++ protected PreparedStatement findLastOrderNumberByParentId;
++
+ protected PreparedStatement findNodesCountByParentId;
+
+ protected PreparedStatement findPropertiesByParentId;
+@@ -459,6 +461,11 @@
+ findNodesByParentId.close();
+ }
+
++ if (findLastOrderNumberByParentId != null)
++ {
++ findLastOrderNumberByParentId.close();
++ }
++
+ if (findNodesCountByParentId != null)
+ {
+ findNodesCountByParentId.close();
+@@ -921,6 +928,44 @@
+ /**
+ * {@inheritDoc}
+ */
++ public int getLastOrderNumber(NodeData parent) throws RepositoryException
++ {
++ checkIfOpened();
++ try
++ {
++ ResultSet count = findLastOrderNumberByParentIdentifier(getInternalId(parent.getIdentifier()));
++ try
++ {
++ if (count.next() && count.getInt(1) > 0)
++ {
++ return count.getInt(2);
++ }
++ else
++ {
++ return -1;
++ }
++ }
++ finally
++ {
++ try
++ {
++ count.close();
++ }
++ catch (SQLException e)
++ {
++ LOG.error("Can't close the ResultSet: " + e);
++ }
++ }
++ }
++ catch (SQLException e)
++ {
++ throw new RepositoryException(e);
++ }
++ }
++
++ /**
++ * {@inheritDoc}
++ */
+ public int getChildNodesCount(NodeData parent) throws RepositoryException
+ {
+ checkIfOpened();
+@@ -2454,6 +2499,8 @@
+
+ protected abstract ResultSet findChildNodesByParentIdentifier(String parentIdentifier) throws SQLException;
+
++ protected abstract ResultSet findLastOrderNumberByParentIdentifier(String parentIdentifier) throws SQLException;
++
+ protected abstract ResultSet findChildNodesCountByParentIdentifier(String parentIdentifier) throws SQLException;
+
+ protected abstract ResultSet findChildPropertiesByParentIdentifier(String parentIdentifier) throws SQLException;
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java (working copy)
+@@ -117,6 +117,12 @@
+ * <code>getChildNodesCount(NodeData parent)</code>
+ */
+ private static final String GET_CHILD_NODES_COUNT_DESCR = "getChildNodesCount";
++
++ /**
++ * The description of the statistics corresponding to the method
++ * <code>getLastOrderNumber(NodeData parent)</code>
++ */
++ private static final String GET_LAST_ORDER_NUMBER_DESCR = "getLastOrderNumber";
+
+ /**
+ * The description of the statistics corresponding to the method
+@@ -171,6 +177,8 @@
+ GET_ITEM_DATA_BY_NODE_DATA_NQ_PATH_ENTRY_DESCR));
+ ALL_STATISTICS.put(GET_CHILD_NODES_DATA_DESCR, new Statistics(GLOBAL_STATISTICS, GET_CHILD_NODES_DATA_DESCR));
+ ALL_STATISTICS.put(GET_CHILD_NODES_COUNT_DESCR, new Statistics(GLOBAL_STATISTICS, GET_CHILD_NODES_COUNT_DESCR));
++ ALL_STATISTICS.put(GET_LAST_ORDER_NUMBER_DESCR, new Statistics(GLOBAL_STATISTICS, GET_LAST_ORDER_NUMBER_DESCR));
++
+ ALL_STATISTICS.put(GET_CHILD_PROPERTIES_DATA_DESCR, new Statistics(GLOBAL_STATISTICS,
+ GET_CHILD_PROPERTIES_DATA_DESCR));
+ ALL_STATISTICS.put(LIST_CHILD_PROPERTIES_DATA_DESCR, new Statistics(GLOBAL_STATISTICS,
+@@ -227,7 +235,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#add(org.exoplatform.services.jcr.datamodel.NodeData)
++ * {@inheritDoc}
+ */
+ public void add(NodeData data) throws RepositoryException, UnsupportedOperationException, InvalidItemStateException,
+ IllegalStateException
+@@ -245,7 +253,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#add(org.exoplatform.services.jcr.datamodel.PropertyData)
++ * {@inheritDoc}
+ */
+ public void add(PropertyData data) throws RepositoryException, UnsupportedOperationException,
+ InvalidItemStateException, IllegalStateException
+@@ -263,7 +271,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#close()
++ * {@inheritDoc}
+ */
+ public void close() throws IllegalStateException, RepositoryException
+ {
+@@ -280,7 +288,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#commit()
++ * {@inheritDoc}
+ */
+ public void commit() throws IllegalStateException, RepositoryException
+ {
+@@ -297,7 +305,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#delete(org.exoplatform.services.jcr.datamodel.NodeData)
++ * {@inheritDoc}
+ */
+ public void delete(NodeData data) throws RepositoryException, UnsupportedOperationException,
+ InvalidItemStateException, IllegalStateException
+@@ -315,7 +323,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#delete(org.exoplatform.services.jcr.datamodel.PropertyData)
++ * {@inheritDoc}
+ */
+ public void delete(PropertyData data) throws RepositoryException, UnsupportedOperationException,
+ InvalidItemStateException, IllegalStateException
+@@ -333,8 +341,25 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getChildNodesCount(org.exoplatform.services.jcr.datamodel.NodeData)
++ * {@inheritDoc}
+ */
++ public int getLastOrderNumber(NodeData parent) throws RepositoryException
++ {
++ Statistics s = ALL_STATISTICS.get(GET_LAST_ORDER_NUMBER_DESCR);
++ try
++ {
++ s.begin();
++ return wcs.getLastOrderNumber(parent);
++ }
++ finally
++ {
++ s.end();
++ }
++ }
++
++ /**
++ * {@inheritDoc}
++ */
+ public int getChildNodesCount(NodeData parent) throws RepositoryException
+ {
+ Statistics s = ALL_STATISTICS.get(GET_CHILD_NODES_COUNT_DESCR);
+@@ -350,7 +375,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getChildNodesData(org.exoplatform.services.jcr.datamodel.NodeData)
++ * {@inheritDoc}
+ */
+ public List<NodeData> getChildNodesData(NodeData parent) throws RepositoryException, IllegalStateException
+ {
+@@ -367,7 +392,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getChildPropertiesData(org.exoplatform.services.jcr.datamodel.NodeData)
++ * {@inheritDoc}
+ */
+ public List<PropertyData> getChildPropertiesData(NodeData parent) throws RepositoryException, IllegalStateException
+ {
+@@ -410,7 +435,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getItemData(java.lang.String)
++ * {@inheritDoc}
+ */
+ public ItemData getItemData(String identifier) throws RepositoryException, IllegalStateException
+ {
+@@ -427,7 +452,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#getReferencesData(java.lang.String)
++ * {@inheritDoc}
+ */
+ public List<PropertyData> getReferencesData(String nodeIdentifier) throws RepositoryException,
+ IllegalStateException, UnsupportedOperationException
+@@ -445,7 +470,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#isOpened()
++ * {@inheritDoc}
+ */
+ public boolean isOpened()
+ {
+@@ -462,7 +487,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#listChildPropertiesData(org.exoplatform.services.jcr.datamodel.NodeData)
++ * {@inheritDoc}
+ */
+ public List<PropertyData> listChildPropertiesData(NodeData parent) throws RepositoryException, IllegalStateException
+ {
+@@ -479,7 +504,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#rename(org.exoplatform.services.jcr.datamodel.NodeData)
++ * {@inheritDoc}
+ */
+ public void rename(NodeData data) throws RepositoryException, UnsupportedOperationException,
+ InvalidItemStateException, IllegalStateException
+@@ -497,7 +522,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#rollback()
++ * {@inheritDoc}
+ */
+ public void rollback() throws IllegalStateException, RepositoryException
+ {
+@@ -514,7 +539,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#update(org.exoplatform.services.jcr.datamodel.NodeData)
++ * {@inheritDoc}
+ */
+ public void update(NodeData data) throws RepositoryException, UnsupportedOperationException,
+ InvalidItemStateException, IllegalStateException
+@@ -532,7 +557,7 @@
+ }
+
+ /**
+- * @see org.exoplatform.services.jcr.storage.WorkspaceStorageConnection#update(org.exoplatform.services.jcr.datamodel.PropertyData)
++ * {@inheritDoc}
+ */
+ public void update(PropertyData data) throws RepositoryException, UnsupportedOperationException,
+ InvalidItemStateException, IllegalStateException
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/storage/WorkspaceStorageConnection.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/storage/WorkspaceStorageConnection.java (revision 4327)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/storage/WorkspaceStorageConnection.java (working copy)
+@@ -126,6 +126,15 @@
+ int getChildNodesCount(NodeData parent) throws RepositoryException;
+
+ /**
++ * Reads order number of last <code>parent<code/> child nodes.
++ *
++ * @param parent NodeData
++ * @return long, order number of last parent's child node.
++ * @throws RepositoryException if error occurs
++ */
++ int getLastOrderNumber(NodeData parent) throws RepositoryException;
++
++ /**
+ * Reads <code>List</code> of <code>PropertyData</code> from the storage using item's parent
+ * location.
+ *
13 years, 1 month