[exo-jcr-commits] exo-jcr SVN: r5432 - in jcr/branches/1.15.x: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/persistent and 12 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Jan 10 07:39:18 EST 2012
Author: andrew.plotnikov
Date: 2012-01-10 07:39:15 -0500 (Tue, 10 Jan 2012)
New Revision: 5432
Modified:
jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemDataConsumer.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/persistent/WorkspaceStorageCache.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ACLInheritanceSupportedWorkspaceDataManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ShareableSupportedWorkspaceDataManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableDataManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java
jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/storage/WorkspaceStorageConnection.java
jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/BaseStandaloneTest.java
jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSessionDataManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCacheableWorkspaceDataManager.java
jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestWorkspaceStorageCacheInClusterMode.java
jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java
Log:
EXOJCR-978: Removed deprecated methods from ItemDataConsumer, WorkspaceStorageConnection and WorkspaceStorageCache interfaces
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemDataConsumer.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemDataConsumer.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/ItemDataConsumer.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -44,19 +44,6 @@
{
/**
- * Find Item by parent (id) and name (with path index).
- *
- * @param parent
- * NodeData
- * @param name
- * item name
- * @return ItemData, data by parent and name
- * @throws RepositoryException
- */
- @Deprecated
- ItemData getItemData(NodeData parent, QPathEntry name) throws RepositoryException;
-
- /**
* Find Item by parent (id) and name (with path index) of define type.
*
* @param parent
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/persistent/WorkspaceStorageCache.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/persistent/WorkspaceStorageCache.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/persistent/WorkspaceStorageCache.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -49,18 +49,6 @@
public static final String LIVE_TIME_PARAMETER_NAME = "live-time";
/**
- * Get item by parent identifier and name +index.
- *
- * @param parentIdentifier
- * parent identifier
- * @param name
- * item name
- * @return itemData by parent Identifier and item name with index or null in other case
- */
- @Deprecated
- ItemData get(String parentIdentifier, QPathEntry name);
-
- /**
* Get item by parent identifier and name +index of define type.
*
* @param parentIdentifier
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -169,22 +169,6 @@
* @param parent
* @param relPath
* - array of QPathEntry which represents the relation path to the searched item
- * @return existed item data or null if not found
- * @throws RepositoryException
- */
- @Deprecated
- public ItemData getItemData(NodeData parent, QPathEntry[] relPathEntries) throws RepositoryException
- {
- return getItemData(parent, relPathEntries, ItemType.UNKNOWN);
- }
-
- /**
- * Return item data by parent NodeDada and relPathEntries If relpath is JCRPath.THIS_RELPATH = '.'
- * it return itself
- *
- * @param parent
- * @param relPath
- * - array of QPathEntry which represents the relation path to the searched item
* @param itemType
* - item type
* @return existed item data or null if not found
@@ -225,14 +209,6 @@
/**
* {@inheritDoc}
*/
- public ItemData getItemData(NodeData parentData, QPathEntry name) throws RepositoryException
- {
- return getItemData(parentData, name, ItemType.UNKNOWN);
- }
-
- /**
- * {@inheritDoc}
- */
public ItemData getItemData(NodeData parent, QPathEntry name, ItemType itemType) throws RepositoryException
{
return getItemData(parent, name, false, itemType, true);
@@ -328,26 +304,6 @@
* @return existed item or null if not found
* @throws RepositoryException
*/
- @Deprecated
- public ItemImpl getItem(NodeData parent, QPathEntry name, boolean pool) throws RepositoryException
- {
- return getItem(parent, name, pool, ItemType.UNKNOWN);
- }
-
- /**
- * Return Item by parent NodeDada and the name of searched item.
- *
- * @param parent
- * - parent of the searched item
- * @param name
- * - item name
- * @param itemType
- * - item type
- * @param pool
- * - indicates does the item fall in pool
- * @return existed item or null if not found
- * @throws RepositoryException
- */
public ItemImpl getItem(NodeData parent, QPathEntry name, boolean pool, ItemType itemType)
throws RepositoryException
{
@@ -422,27 +378,6 @@
}
}
- /**
- * Return Item by parent NodeDada and the name of searched item.
- *
- * @param parent
- * - parent of the searched item
- * @param name
- * - item name
- * @param pool
- * - indicates does the item fall in pool
- * @param skipCheckInPersistence
- * - skip getting Item from persistence if need
- * @return existed item or null if not found
- * @throws RepositoryException
- */
- @Deprecated
- public ItemImpl getItem(NodeData parent, QPathEntry name, boolean pool, boolean skipCheckInPersistence)
- throws RepositoryException
- {
- return getItem(parent, name, pool, skipCheckInPersistence, ItemType.UNKNOWN, true);
- }
-
public ItemImpl getItem(NodeData parent, QPathEntry name, boolean pool, boolean skipCheckInPersistence,
ItemType itemType) throws RepositoryException
{
@@ -503,25 +438,6 @@
* - array of QPathEntry which represents the relation path to the searched item
* @param pool
* - indicates does the item fall in pool
- * @return existed item or null if not found
- * @throws RepositoryException
- */
- @Deprecated
- public ItemImpl getItem(NodeData parent, QPathEntry[] relPath, boolean pool) throws RepositoryException
- {
- return getItem(parent, relPath, pool, ItemType.UNKNOWN);
- }
-
- /**
- * Return Item by parent NodeDada and array of QPathEntry which represent a relative path to the
- * searched item
- *
- * @param parent
- * - parent of the searched item
- * @param relPath
- * - array of QPathEntry which represents the relation path to the searched item
- * @param pool
- * - indicates does the item fall in pool
* @param itemType
* - item type
* @return existed item or null if not found
@@ -882,111 +798,6 @@
}
/**
- * Return list with properties, for the parent node, for which user have access permeations.
- *
- * @param parent
- * NodeData
- * @param pool
- * boolean, if true list of childs will be refreshed in Items pool
- * @return List of NodeImpl
- * @throws RepositoryException
- * if error occurs
- * @throws AccessDeniedException
- * if it's no permissions for childs listing
- */
- @Deprecated
- public List<NodeImpl> getChildNodes(NodeData parent, boolean pool) throws RepositoryException, AccessDeniedException
- {
-
- long start = 0;
- if (log.isDebugEnabled())
- {
- start = System.currentTimeMillis();
- log.debug("getChildNodes(" + parent.getQPath().getAsString() + ") >>>>>");
- }
-
- try
- {
- // merge data from changesLog with data from txManager
- List<NodeData> nodeDatas = getChildNodesData(parent);
- List<NodeImpl> nodes = new ArrayList<NodeImpl>(nodeDatas.size());
-
- for (int i = 0, length = nodeDatas.size(); i < length; i++)
- {
- NodeData data = nodeDatas.get(i);
- if (accessManager.hasPermission(data.getACL(), new String[]{PermissionType.READ}, session.getUserState()
- .getIdentity()))
- {
- NodeImpl item = (NodeImpl)readItem(data, parent, pool, false);
- session.getActionHandler().postRead(item);
- nodes.add(item);
- }
- }
- return nodes;
- }
- finally
- {
- if (log.isDebugEnabled())
- {
- log.debug("getChildNodes(" + parent.getQPath().getAsString() + ") <<<<< "
- + ((System.currentTimeMillis() - start) / 1000d) + "sec");
- }
- }
- }
-
- /**
- * Return list with properties, for the parent node, for which user have access permeations.
- *
- * @param parent
- * NodeData
- * @param pool
- * boolean, if true list of childs will be refreshed in Items pool
- * @return List of PropertyImpl
- * @throws RepositoryException
- * if error occurs
- * @throws AccessDeniedException
- * if it's no permissions for childs listing
- */
- @Deprecated
- public List<PropertyImpl> getChildProperties(NodeData parent, boolean pool) throws RepositoryException,
- AccessDeniedException
- {
-
- long start = 0;
- if (log.isDebugEnabled())
- {
- start = System.currentTimeMillis();
- log.debug("getChildProperties(" + parent.getQPath().getAsString() + ") >>>>>");
- }
-
- try
- {
- List<PropertyData> propDatas = getChildPropertiesData(parent);
- List<PropertyImpl> props = new ArrayList<PropertyImpl>(propDatas.size());
- for (int i = 0, length = propDatas.size(); i < length; i++)
- {
- PropertyData data = propDatas.get(i);
- if (accessManager.hasPermission(parent.getACL(), new String[]{PermissionType.READ}, session.getUserState()
- .getIdentity()))
- {
- ItemImpl item = readItem(data, parent, pool, false);
- session.getActionHandler().postRead(item);
- props.add((PropertyImpl)item);
- }
- }
- return props;
- }
- finally
- {
- if (log.isDebugEnabled())
- {
- log.debug("getChildProperties(" + parent.getQPath().getAsString() + ") <<<<< "
- + ((System.currentTimeMillis() - start) / 1000d) + "sec");
- }
- }
- }
-
- /**
* {@inheritDoc}
*/
public boolean getChildNodesDataByPage(final NodeData parent, int fromOrderNum, int toOrderNum, List<NodeData> childs)
@@ -2615,70 +2426,6 @@
}
/**
- * Load nodes ti the pool USED FOR TEST PURPOSE ONLY
- *
- * @param nodes
- * @return child nodes
- * @throws RepositoryException
- */
- @Deprecated
- List<NodeImpl> getNodes(List<NodeImpl> nodes) throws RepositoryException
- {
- List<NodeImpl> children = new ArrayList<NodeImpl>();
- for (NodeImpl node : nodes)
- {
- String id = node.getInternalIdentifier();
-
- WeakReference<ItemImpl> weakItem = items.get(id);
- NodeImpl pooled = weakItem != null ? (NodeImpl)weakItem.get() : null;
-
- if (pooled == null)
- {
- items.put(id, new WeakReference<ItemImpl>(node));
- children.add(node);
- }
- else
- {
- pooled.loadData(node.getData());
- children.add(pooled);
- }
- }
- return children;
- }
-
- /**
- * Load properties to the pool USED FOR TEST PURPOSE ONLY
- *
- * @param props
- * @return child properties
- * @throws RepositoryException
- */
- @Deprecated
- List<PropertyImpl> getProperties(List<PropertyImpl> props) throws RepositoryException
- {
- List<PropertyImpl> children = new ArrayList<PropertyImpl>();
- for (PropertyImpl prop : props)
- {
- String id = prop.getInternalIdentifier();
-
- WeakReference<ItemImpl> weakItem = items.get(id);
- PropertyImpl pooled = weakItem != null ? (PropertyImpl)weakItem.get() : null;
-
- if (pooled == null)
- {
- items.put(id, new WeakReference<ItemImpl>(prop));
- children.add(prop);
- }
- else
- {
- pooled.loadData(prop.getData());
- children.add(pooled);
- }
- }
- return children;
- }
-
- /**
* Search for all descendants of given parent path.
*
* @parentPath parent path
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ACLInheritanceSupportedWorkspaceDataManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ACLInheritanceSupportedWorkspaceDataManager.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ACLInheritanceSupportedWorkspaceDataManager.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -98,14 +98,6 @@
/**
* {@inheritDoc}
*/
- public ItemData getItemData(NodeData parent, QPathEntry name) throws RepositoryException
- {
- return getItemData(parent, name, ItemType.UNKNOWN);
- }
-
- /**
- * {@inheritDoc}
- */
public ItemData getItemData(NodeData parent, QPathEntry name, ItemType itemType) throws RepositoryException
{
return getItemData(parent, name, itemType, true);
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -718,15 +718,6 @@
* {@inheritDoc}
*/
@Override
- public ItemData getItemData(NodeData parentData, QPathEntry name) throws RepositoryException
- {
- return getItemData(parentData, name, ItemType.UNKNOWN);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
public ItemData getItemData(final NodeData parentData, final QPathEntry name, final ItemType itemType)
throws RepositoryException
{
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -884,14 +884,6 @@
/**
* {@inheritDoc}
*/
- public ItemData get(String parentIdentifier, QPathEntry name)
- {
- return get(parentIdentifier, name, ItemType.UNKNOWN);
- }
-
- /**
- * {@inheritDoc}
- */
public ItemData get(final String parentId, final QPathEntry name, ItemType itemType)
{
if (enabled && parentId != null && name != null)
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ShareableSupportedWorkspaceDataManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ShareableSupportedWorkspaceDataManager.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/ShareableSupportedWorkspaceDataManager.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -98,14 +98,6 @@
/**
* {@inheritDoc}
*/
- public ItemData getItemData(NodeData parent, QPathEntry name) throws RepositoryException
- {
- return getItemData(parent, name, ItemType.UNKNOWN);
- }
-
- /**
- * {@inheritDoc}
- */
public ItemData getItemData(NodeData parent, QPathEntry name, ItemType itemType) throws RepositoryException
{
return getItemData(parent, name, itemType, true);
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/VersionableWorkspaceDataManager.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -172,15 +172,6 @@
* {@inheritDoc}
*/
@Override
- public ItemData getItemData(NodeData parentData, QPathEntry name) throws RepositoryException
- {
- return getItemData(parentData, name, ItemType.UNKNOWN);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
public ItemData getItemData(NodeData parentData, QPathEntry name, ItemType itemType) throws RepositoryException
{
return getItemData(parentData, name, itemType, true);
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/WorkspacePersistentDataManager.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -1035,14 +1035,6 @@
/**
* {@inheritDoc}
*/
- public ItemData getItemData(final NodeData parentData, final QPathEntry name) throws RepositoryException
- {
- return getItemData(parentData, name, ItemType.UNKNOWN);
- }
-
- /**
- * {@inheritDoc}
- */
public ItemData getItemData(final NodeData parentData, final QPathEntry name, ItemType itemType)
throws RepositoryException
{
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -1107,14 +1107,6 @@
/**
* {@inheritDoc}
*/
- public ItemData get(String parentId, QPathEntry name)
- {
- return get(parentId, name, ItemType.UNKNOWN);
- }
-
- /**
- * {@inheritDoc}
- */
public ItemData get(String parentId, QPathEntry name, ItemType itemType)
{
return getFromCacheByPath.run(parentId, name, itemType);
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableDataManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableDataManager.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableDataManager.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -338,14 +338,6 @@
/**
* {@inheritDoc}
*/
- public ItemData getItemData(NodeData parentData, QPathEntry name) throws RepositoryException
- {
- return getItemData(parentData, name, ItemType.UNKNOWN);
- }
-
- /**
- * {@inheritDoc}
- */
public ItemData getItemData(NodeData parentData, QPathEntry name, ItemType itemType) throws RepositoryException
{
return getItemData(parentData, name, itemType, true);
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -1250,14 +1250,6 @@
/**
* {@inheritDoc}
*/
- public ItemData getItemData(NodeData parentData, QPathEntry name) throws RepositoryException, IllegalStateException
- {
- return getItemData(parentData, name, ItemType.UNKNOWN);
- }
-
- /**
- * {@inheritDoc}
- */
public ItemData getItemData(NodeData parentData, QPathEntry name, ItemType itemType) throws RepositoryException,
IllegalStateException
{
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/statistics/StatisticsJDBCStorageConnection.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -480,14 +480,6 @@
/**
* {@inheritDoc}
*/
- public ItemData getItemData(NodeData parentData, QPathEntry name) throws RepositoryException, IllegalStateException
- {
- return getItemData(parentData, name, ItemType.UNKNOWN);
- }
-
- /**
- * {@inheritDoc}
- */
public ItemData getItemData(NodeData parentData, QPathEntry name, ItemType itemType) throws RepositoryException,
IllegalStateException
{
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/storage/WorkspaceStorageConnection.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/storage/WorkspaceStorageConnection.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/storage/WorkspaceStorageConnection.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -54,24 +54,6 @@
/**
* Reads <code>ItemData</code> from the storage using item's parent and name relative the parent
- * location.
- *
- * @param parentData
- * - the item's parent NodeData
- * @param name
- * - item's path entry (QName + index)
- * @return - stored ItemData which has exact the same path Entry (name+index) inside the parent; or
- * null if not such an item data found
- * @throws RepositoryException
- * if some exception occurred
- * @throws IllegalStateException
- * if connection is closed
- */
- @Deprecated
- ItemData getItemData(NodeData parentData, QPathEntry name) throws RepositoryException, IllegalStateException;
-
- /**
- * Reads <code>ItemData</code> from the storage using item's parent and name relative the parent
* location of define type.
*
* @param parentData
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/BaseStandaloneTest.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/BaseStandaloneTest.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/BaseStandaloneTest.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -602,13 +602,6 @@
{
@Override
- public ItemData getItemData(NodeData parentData, QPathEntry name) throws RepositoryException,
- IllegalStateException
- {
- throw new UnsupportedOperationException("TestWorkspaceStorageConnection: operation is unsupported.");
- }
-
- @Override
public ItemData getItemData(NodeData parentData, QPathEntry name, ItemType itemType) throws RepositoryException,
IllegalStateException
{
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSessionDataManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSessionDataManager.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSessionDataManager.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -121,7 +121,8 @@
List<NodeImpl> nodes = new ArrayList<NodeImpl>();
nodes.add(node1);
nodes.add(node2);
- List<NodeImpl> testNodes = pool.getNodes(nodes);
+
+ List<NodeImpl> testNodes = getNodes(pool, nodes);
assertEquals(2, testNodes.size());
assertEquals(node1, testNodes.get(0));
assertEquals(node2, testNodes.get(1));
@@ -133,7 +134,7 @@
PropertyImpl prop1 = (PropertyImpl)modificationManager.update(ItemState.createAddedState(prop), true);
List<PropertyImpl> props = new ArrayList<PropertyImpl>();
props.add(prop1);
- List<PropertyImpl> testProps = pool.getProperties(props);
+ List<PropertyImpl> testProps = getProperties(pool, props);
assertEquals(1, testProps.size());
assertEquals(prop1, testProps.get(0));
@@ -151,6 +152,70 @@
assertEquals(3, pool.size());
}
+ private List<NodeImpl> getNodes(SessionDataManager.ItemReferencePool pool, List<NodeImpl> nodes)
+ throws RepositoryException
+ {
+ List<ItemImpl> items = (List<ItemImpl>)pool.getAll();
+ List<NodeImpl> children = new ArrayList<NodeImpl>();
+ for (NodeImpl node : nodes)
+ {
+ String id = node.getInternalIdentifier();
+
+ NodeImpl pooled = null;
+ for (ItemImpl item : items)
+ {
+ if (items.get(0).getData().getIdentifier().equals(id))
+ {
+ pooled = (NodeImpl)item;
+ break;
+ }
+ }
+
+ if (pooled == null)
+ {
+ children.add(node);
+ }
+ else
+ {
+ pooled.loadData(node.getData());
+ children.add(pooled);
+ }
+ }
+ return children;
+ }
+
+ private List<PropertyImpl> getProperties(SessionDataManager.ItemReferencePool pool, List<PropertyImpl> props)
+ throws RepositoryException
+ {
+ List<ItemImpl> items = (List<ItemImpl>)pool.getAll();
+ List<PropertyImpl> children = new ArrayList<PropertyImpl>();
+ for (PropertyImpl prop : props)
+ {
+ String id = prop.getInternalIdentifier();
+
+ PropertyImpl pooled = null;
+ for (ItemImpl item : items)
+ {
+ if (items.get(0).getData().getIdentifier().equals(id))
+ {
+ pooled = (PropertyImpl)item;
+ break;
+ }
+ }
+
+ if (pooled == null)
+ {
+ children.add(prop);
+ }
+ else
+ {
+ pooled.loadData(prop.getData());
+ children.add(pooled);
+ }
+ }
+ return children;
+ }
+
public void testSessionChangesLog() throws Exception
{
SessionChangesLog changesLog = modificationManager.getChangesLog();
@@ -252,12 +317,12 @@
assertEquals(1, modificationManager.getChildNodesData(parent).size());
assertEquals(2, modificationManager.getChildPropertiesData(parent).size());
- assertEquals(1, modificationManager.getChildNodes(parent, true).size());
+ assertEquals(1, modificationManager.getChildNodesData(parent).size());
// List <PropertyImpl> props =
// modificationManager.getChildProperties(parent, true);
// for(PropertyImpl p: props)
// System.out.println(">>>>>>>>>>>>>>>> "+p.getPath());
- assertEquals(2, modificationManager.getChildProperties(parent, true).size());
+ assertEquals(2, modificationManager.getChildPropertiesData(parent).size());
// Collections.copy(dest, src);
@@ -283,9 +348,9 @@
assertEquals(0, modificationManager.getChangesLog().getSize());
assertNotNull(modificationManager.getItem(data1.getQPath(), true));
+
+ assertEquals(1, modificationManager.getChildPropertiesData(parent).size());
- assertEquals(1, modificationManager.getChildProperties(data1, true).size());
-
// ... add property
TransientPropertyData prop =
TransientPropertyData.createPropertyData(parent, new InternalQName(null, "testCommitAndRefreshP1"),
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCacheableWorkspaceDataManager.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCacheableWorkspaceDataManager.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestCacheableWorkspaceDataManager.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -316,14 +316,6 @@
private volatile ItemData itemData;
- /**
- * {@inheritDoc}
- */
- public ItemData get(String parentIdentifier, QPathEntry name)
- {
- return get(parentIdentifier, name, ItemType.UNKNOWN);
- }
-
public ItemData get(String parentIdentifier, QPathEntry name, ItemType itemType)
{
if (itemData != null && itemType.isSuitableFor(itemData))
@@ -531,15 +523,6 @@
public AtomicInteger getItemDataByNodeDataNQPathEntryCalls = new AtomicInteger();
- /**
- * {@inheritDoc}
- */
- public ItemData getItemData(NodeData parentData, QPathEntry name) throws RepositoryException,
- IllegalStateException
- {
- return getItemData(parentData, name, ItemType.UNKNOWN);
- }
-
public ItemData getItemData(NodeData parentData, QPathEntry name, ItemType itemType) throws RepositoryException,
IllegalStateException
{
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestWorkspaceStorageCacheInClusterMode.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestWorkspaceStorageCacheInClusterMode.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/TestWorkspaceStorageCacheInClusterMode.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -779,15 +779,6 @@
return children;
}
- /**
- * {@inheritDoc}
- */
- public ItemData getItemData(NodeData parentData, QPathEntry name) throws RepositoryException,
- IllegalStateException
- {
- return getItemData(parentData, name, ItemType.UNKNOWN);
- }
-
public ItemData getItemData(NodeData parentData, QPathEntry name, ItemType itemType) throws RepositoryException,
IllegalStateException
{
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -242,15 +242,6 @@
return null;
}
- /**
- * {@inheritDoc}
- */
- public ItemData getItemData(NodeData parentData, QPathEntry name) throws RepositoryException,
- IllegalStateException
- {
- return getItemData(parentData, name, ItemType.UNKNOWN);
- }
-
public ItemData getItemData(NodeData parentData, QPathEntry name, ItemType itemType) throws RepositoryException,
IllegalStateException
{
Modified: jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java 2012-01-06 19:23:09 UTC (rev 5431)
+++ jcr/branches/1.15.x/exo.jcr.component.core.impl.infinispan.v5/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java 2012-01-10 12:39:15 UTC (rev 5432)
@@ -826,14 +826,6 @@
/**
* {@inheritDoc}
*/
- public ItemData get(String parentId, QPathEntry name)
- {
- return get(parentId, name, ItemType.UNKNOWN);
- }
-
- /**
- * {@inheritDoc}
- */
public ItemData get(String parentIdentifier, QPathEntry name, ItemType itemType)
{
return getFromCacheByPath.run(parentIdentifier, name, itemType);
More information about the exo-jcr-commits
mailing list