mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
[feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details
This commit is contained in:
@@ -23,12 +23,12 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.repo.node;
|
||||
package org.alfresco.repo.node.sizeDetails;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.alfresco.repo.cache.SimpleCache;
|
||||
import org.alfresco.repo.node.NodeSizeDetailsServiceImpl.NodeSizeDetails;
|
||||
import org.alfresco.repo.node.sizeDetails.NodeSizeDetailsServiceImpl.NodeSizeDetails;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
public interface NodeSizeDetailsService
|
||||
@@ -23,7 +23,7 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.repo.node;
|
||||
package org.alfresco.repo.node.sizeDetails;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
@@ -32,7 +32,7 @@ import java.util.Objects;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
import org.alfresco.repo.cache.SimpleCache;
|
||||
import org.alfresco.repo.node.NodeSizeDetailsServiceImpl.NodeSizeDetails.STATUS;
|
||||
import org.alfresco.repo.node.sizeDetails.NodeSizeDetailsServiceImpl.NodeSizeDetails.STATUS;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
@@ -49,8 +49,6 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
import net.sf.acegisecurity.Authentication;
|
||||
|
||||
/**
|
||||
* NodeSizeDetailsServiceImpl
|
||||
* Executing Alfresco FTS Query to find size details of Folder Node
|
||||
@@ -113,7 +111,6 @@ public class NodeSizeDetailsServiceImpl implements NodeSizeDetailsService, Initi
|
||||
|
||||
private void executeSizeCalculation(NodeRef nodeRef, String jobId)
|
||||
{
|
||||
final Authentication fullAuthentication = AuthenticationUtil.getFullAuthentication();
|
||||
RetryingTransactionCallback<NodeSizeDetails> executionCallback = () -> {
|
||||
|
||||
try
|
||||
@@ -133,7 +130,6 @@ public class NodeSizeDetailsServiceImpl implements NodeSizeDetailsService, Initi
|
||||
|
||||
try
|
||||
{
|
||||
AuthenticationUtil.setFullAuthentication(fullAuthentication);
|
||||
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getSystemUserName());
|
||||
nodeSizeDetails = AuthenticationUtil.runAs(() -> transactionService.getRetryingTransactionHelper()
|
||||
.doInTransaction(executionCallback, true), AuthenticationUtil.getSystemUserName());
|
||||
@@ -344,7 +344,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="NodeSizeDetailsServiceImpl" class="org.alfresco.repo.node.NodeSizeDetailsServiceImpl">
|
||||
<bean id="NodeSizeDetailsServiceImpl" class="org.alfresco.repo.node.sizeDetails.NodeSizeDetailsServiceImpl">
|
||||
<property name="searchService" ref="SearchService"/>
|
||||
<property name="simpleCache" ref="folderSizeSharedCache" />
|
||||
<property name="transactionService" ref="transactionService"/>
|
||||
@@ -360,7 +360,7 @@
|
||||
</property>
|
||||
<property name="proxyInterfaces">
|
||||
<list>
|
||||
<value>org.alfresco.repo.node.NodeSizeDetailsService</value>
|
||||
<value>org.alfresco.repo.node.sizeDetails.NodeSizeDetailsService</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
Reference in New Issue
Block a user