Commit 7ddec10aa13dbd9f40196962c7606e64c915a5ea

Authored by Rui Fernandes
1 parent 11d9d0ee2d
Exists in master

alfresco java code commenting

alfresco-trashcan-cleaner-amp/src/main/java/org/alfresco/schedule/AbstractScheduledLockedJob.java
  1 +/*
  2 + * Copyright (C) 2005-2013 Alfresco Software Limited.
  3 + *
  4 + * This program is free software; you can redistribute it and/or
  5 + * modify it under the terms of the GNU General Public License
  6 + * as published by the Free Software Foundation; either version 2
  7 + * of the License, or (at your option) any later version.
  8 +
  9 + * This program is distributed in the hope that it will be useful,
  10 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12 + * GNU General Public License for more details.
  13 +
  14 + * You should have received a copy of the GNU General Public License
  15 + * along with this program; if not, write to the Free Software
  16 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17 +
  18 + * As a special exception to the terms and conditions of version 2.0 of
  19 + * the GPL, you may redistribute this Program in connection with Free/Libre
  20 + * and Open Source Software ("FLOSS") applications as described in Alfresco's
  21 + * FLOSS exception. You should have recieved a copy of the text describing
  22 + * the FLOSS exception, and it is also available here:
  23 + * http://www.alfresco.com/legal/licensing"
  24 + */
1 25 package org.alfresco.schedule;
2 26  
3 27 import org.alfresco.repo.lock.JobLockService;
... ... @@ -7,6 +31,24 @@ import org.springframework.scheduling.quartz.QuartzJobBean;
7 31  
8 32 /**
9 33 *
  34 + * This class should be extended any time a scheduled job needs to be
  35 + * implemented to be executed using
  36 + * {@link org.alfresco.repo.lock.JobLockService JobLockService}. It makes the
  37 + * cluster aware locking of the job transparent to the implementation. On the
  38 + * job's spring {@link org.quartz.JobExecutionContext JobExecutionContext} it
  39 + * will still always have to be passed as parameter the
  40 + * {@link org.alfresco.repo.lock.JobLockService jobLockService}. The name to be
  41 + * used for locking of the job is optional, if none is passed a name will be
  42 + * composed using the simple name of the implementation class. In general if it
  43 + * may make sense to have more than one job setup using the same class you
  44 + * should always use a different name on each
  45 + * {@link org.quartz.JobExecutionContext JobExecutionContext} to differentiate
  46 + * the jobs, unless you want the lock to be shared between the different
  47 + * instances.
  48 + *
  49 + * The only method to be implemented when extending this class is the executeJob
  50 + * method.
  51 + *
10 52 * @author Rui Fernandes
11 53 *
12 54 */
... ... @@ -36,6 +78,15 @@ public abstract class AbstractScheduledLockedJob extends QuartzJobBean
36 78 locker.execute(jobContext);
37 79 }
38 80  
  81 + /**
  82 + *
  83 + * This is the method that should be implemented by any extension of the
  84 + * abstract class. It won't need to worry about any lockings of the job and
  85 + * can focus only on its specific task.
  86 + *
  87 + * @param jobContext
  88 + * @throws JobExecutionException
  89 + */
39 90 public abstract void executeJob(JobExecutionContext jobContext)
40 91 throws JobExecutionException;
41 92 }
... ...
alfresco-trashcan-cleaner-amp/src/main/java/org/alfresco/schedule/ScheduledJobLockExecuter.java
  1 +/*
  2 + * Copyright (C) 2005-2013 Alfresco Software Limited.
  3 + *
  4 + * This program is free software; you can redistribute it and/or
  5 + * modify it under the terms of the GNU General Public License
  6 + * as published by the Free Software Foundation; either version 2
  7 + * of the License, or (at your option) any later version.
  8 +
  9 + * This program is distributed in the hope that it will be useful,
  10 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12 + * GNU General Public License for more details.
  13 +
  14 + * You should have received a copy of the GNU General Public License
  15 + * along with this program; if not, write to the Free Software
  16 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17 +
  18 + * As a special exception to the terms and conditions of version 2.0 of
  19 + * the GPL, you may redistribute this Program in connection with Free/Libre
  20 + * and Open Source Software ("FLOSS") applications as described in Alfresco's
  21 + * FLOSS exception. You should have recieved a copy of the text describing
  22 + * the FLOSS exception, and it is also available here:
  23 + * http://www.alfresco.com/legal/licensing"
  24 + */
1 25 package org.alfresco.schedule;
2 26  
3 27 import org.alfresco.repo.lock.JobLockService;
... ... @@ -13,6 +37,15 @@ import org.quartz.JobExecutionException;
13 37  
14 38 /**
15 39 *
  40 + * This class encapsulates the {@link org.alfresco.repo.lock.JobLockService
  41 + * JobLockService} usage in order to guarantee that a job is not executed
  42 + * simultaneously in more than one node in a cluster. After instantiated passing
  43 + * in constructor {@link org.alfresco.schedule.AbstractScheduledLockedJob job}
  44 + * to be executed, as well as the name of the to be locked job and the
  45 + * {@link org.alfresco.repo.lock.JobLockService JobLockService}, the execute
  46 + * method of this class will execute the job taking care of all cluster aware
  47 + * lockings.
  48 + *
16 49 * @author Rui Fernandes
17 50 *
18 51 */
... ... @@ -29,6 +62,14 @@ public class ScheduledJobLockExecuter
29 62 private QName lockQName;
30 63 private AbstractScheduledLockedJob job;
31 64  
  65 + /**
  66 + *
  67 + * @param jobLockService
  68 + * the {@link org.alfresco.repo.lock.JobLockService
  69 + * JobLockService}
  70 + * @param name the name of the job to be used for the lock registry
  71 + * @param job the {@link org.alfresco.schedule.AbstractScheduledLockedJob job} to be executed
  72 + */
32 73 public ScheduledJobLockExecuter(JobLockService jobLockService, String name,
33 74 AbstractScheduledLockedJob job)
34 75 {
... ... @@ -38,6 +79,16 @@ public class ScheduledJobLockExecuter
38 79 this.job = job;
39 80 }
40 81  
  82 + /**
  83 + *
  84 + * It will execute the
  85 + * {@link org.alfresco.schedule.AbstractScheduledLockedJob job} passed on
  86 + * instantiation taking care of all cluster aware lockings.
  87 + *
  88 + * @param jobContext
  89 + * the usual quartz job context
  90 + * @throws JobExecutionException
  91 + */
41 92 public void execute(JobExecutionContext jobContext)
42 93 throws JobExecutionException
43 94 {
... ...
alfresco-trashcan-cleaner-amp/src/main/java/org/alfresco/trashcan/TrashcanCleaner.java
  1 +/*
  2 + * Copyright (C) 2005-2013 Alfresco Software Limited.
  3 + *
  4 + * This program is free software; you can redistribute it and/or
  5 + * modify it under the terms of the GNU General Public License
  6 + * as published by the Free Software Foundation; either version 2
  7 + * of the License, or (at your option) any later version.
  8 +
  9 + * This program is distributed in the hope that it will be useful,
  10 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12 + * GNU General Public License for more details.
  13 +
  14 + * You should have received a copy of the GNU General Public License
  15 + * along with this program; if not, write to the Free Software
  16 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17 +
  18 + * As a special exception to the terms and conditions of version 2.0 of
  19 + * the GPL, you may redistribute this Program in connection with Free/Libre
  20 + * and Open Source Software ("FLOSS") applications as described in Alfresco's
  21 + * FLOSS exception. You should have recieved a copy of the text describing
  22 + * the FLOSS exception, and it is also available here:
  23 + * http://www.alfresco.com/legal/licensing"
  24 + */
1 25 package org.alfresco.trashcan;
2 26  
3 27 import java.util.ArrayList;
... ... @@ -14,6 +38,23 @@ import org.apache.commons.logging.LogFactory;
14 38  
15 39 /**
16 40 *
  41 + * This class is capable of cleaning the trashcan without depending on searches
  42 + * over the archive store. So the corresponding index core could be deactivated
  43 + * with no impact on its execution. It will clean (<b>clean</b> method the
  44 + * trashcan according to defined <b>deleteBatchCount</b> and <b>daysToKeep</b>.
  45 + *
  46 + * <b>deleteBatchCount</b>: It will set how many nodes in trashcan to delete at
  47 + * maximum during <b>clean</b> execution. By default the value is 1000.
  48 + * <b>daysToKeep</b>: The number of days to keep a document in trashcan since
  49 + * its deletion. Any node archived less than the value specified won't be
  50 + * deleted during <b>clean</b> execution. If the value is 0 or negative any
  51 + * archived will be eligible for deletion (default behavior if no positive value
  52 + * is explicitly set).
  53 + *
  54 + * By default the cleaning will be executed against the standard store for
  55 + * trashcan: archive://SpacesStore. If you want you can also specify a different
  56 + * <b>archiveStoreUrl</b> than the default.
  57 + *
17 58 * @author Rui Fernandes
18 59 *
19 60 */
... ... @@ -28,11 +69,27 @@ public class TrashcanCleaner
28 69 private int daysToKeep = -1;
29 70 private static final long DAYS_TO_MILLIS = 1000 * 60 * 60 * 24;
30 71  
  72 + /**
  73 + *
  74 + * It will use the default values for <b>deleteBatchCount</b> and
  75 + * <b>daysToKeep</b>, 1000 and -1.
  76 + *
  77 + * @param nodeService
  78 + */
31 79 public TrashcanCleaner(NodeService nodeService)
32 80 {
33 81 this.nodeService = nodeService;
34 82 }
35 83  
  84 + /**
  85 + *
  86 + * If you need to set explicit values different than default for
  87 + * <b>deleteBatchCount</b> and <b>daysToKeep</b>.
  88 + *
  89 + * @param nodeService
  90 + * @param deleteBatchCount
  91 + * @param daysToKeep
  92 + */
36 93 public TrashcanCleaner(NodeService nodeService, int deleteBatchCount,
37 94 int daysToKeep)
38 95 {
... ... @@ -41,6 +98,16 @@ public class TrashcanCleaner
41 98 this.daysToKeep = daysToKeep;
42 99 }
43 100  
  101 + /**
  102 + *
  103 + * In case you also need to set a different store for <b>archiveStoreUrl</b>
  104 + * than the default archive://SpacesStore.
  105 + *
  106 + * @param nodeService
  107 + * @param archiveStoreUrl
  108 + * @param deleteBatchCount
  109 + * @param daysToKeep
  110 + */
44 111 public TrashcanCleaner(NodeService nodeService, String archiveStoreUrl,
45 112 int deleteBatchCount, int daysToKeep)
46 113 {
... ... @@ -48,6 +115,13 @@ public class TrashcanCleaner
48 115 this.archiveStoreUrl = archiveStoreUrl;
49 116 }
50 117  
  118 + /**
  119 + *
  120 + * The method that will clean the specified <b>archiveStoreUrl</b> to the
  121 + * limits defined by the values set for <b>deleteBatchCount</b> and
  122 + * <b>daysToKeep</b>.
  123 + *
  124 + */
51 125 public void clean()
52 126 {
53 127 List<NodeRef> nodes = getBatchToDelete();
... ... @@ -66,6 +140,14 @@ public class TrashcanCleaner
66 140 }
67 141 }
68 142  
  143 + /**
  144 + *
  145 + * It deletes the {@link java.util.List List} of
  146 + * {@link org.alfresco.service.cmr.repository.NodeRef NodeRef} received as
  147 + * argument.
  148 + *
  149 + * @param nodes
  150 + */
69 151 private void deleteNodes(List<NodeRef> nodes)
70 152 {
71 153 for (int i = nodes.size(); i > 0; i--)
... ... @@ -74,6 +156,15 @@ public class TrashcanCleaner
74 156 }
75 157 }
76 158  
  159 + /**
  160 + *
  161 + * It returns the {@link java.util.List List} of
  162 + * {@link org.alfresco.service.cmr.repository.NodeRef NodeRef} of the
  163 + * archive store set to be deleted according to configuration for
  164 + * <b>deleteBatchCount</b> and <b>daysToKeep</b>.
  165 + *
  166 + * @return
  167 + */
77 168 private List<NodeRef> getBatchToDelete()
78 169 {
79 170 List<ChildAssociationRef> childAssocs = getTrashcanChildAssocs();
... ... @@ -86,6 +177,18 @@ public class TrashcanCleaner
86 177 return fillBatchToDelete(nodes, childAssocs);
87 178 }
88 179  
  180 + /**
  181 + *
  182 + * It will fill up a {@link java.util.List List} of
  183 + * {@link org.alfresco.service.cmr.repository.NodeRef NodeRef} from all the
  184 + * {@link org.alfresco.service.cmr.repository.ChildAssociationRef
  185 + * ChildAssociationRef} of the archive store set, according to the limit
  186 + * parameters: <b>deleteBatchCount</b> and <b>daysToKeep</b>.
  187 + *
  188 + * @param batch
  189 + * @param trashChildAssocs
  190 + * @return
  191 + */
89 192 private List<NodeRef> fillBatchToDelete(List<NodeRef> batch,
90 193 List<ChildAssociationRef> trashChildAssocs)
91 194 {
... ... @@ -102,6 +205,14 @@ public class TrashcanCleaner
102 205 return batch;
103 206 }
104 207  
  208 + /**
  209 + *
  210 + * It will return all
  211 + * {@link org.alfresco.service.cmr.repository.ChildAssociationRef
  212 + * ChildAssociationRef} of the archive store set.
  213 + *
  214 + * @return
  215 + */
105 216 private List<ChildAssociationRef> getTrashcanChildAssocs()
106 217 {
107 218 StoreRef archiveStore = new StoreRef(archiveStoreUrl);
... ... @@ -109,6 +220,15 @@ public class TrashcanCleaner
109 220 return nodeService.getChildAssocs(archiveRoot);
110 221 }
111 222  
  223 + /**
  224 + *
  225 + * It checks if the archived node has been archived since longer than
  226 + * <b>daysToKeep</b>. If <b>daysToKeep</b> is 0 or negative it will return
  227 + * always true.
  228 + *
  229 + * @param node
  230 + * @return
  231 + */
112 232 private boolean olderThanDaysToKeep(NodeRef node)
113 233 {
114 234 if (daysToKeep <= 0)
... ...
alfresco-trashcan-cleaner-amp/src/main/java/org/alfresco/trashcan/TrashcanCleanerJob.java
  1 +/*
  2 + * Copyright (C) 2005-2013 Alfresco Software Limited.
  3 + *
  4 + * This program is free software; you can redistribute it and/or
  5 + * modify it under the terms of the GNU General Public License
  6 + * as published by the Free Software Foundation; either version 2
  7 + * of the License, or (at your option) any later version.
  8 +
  9 + * This program is distributed in the hope that it will be useful,
  10 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12 + * GNU General Public License for more details.
  13 +
  14 + * You should have received a copy of the GNU General Public License
  15 + * along with this program; if not, write to the Free Software
  16 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17 +
  18 + * As a special exception to the terms and conditions of version 2.0 of
  19 + * the GPL, you may redistribute this Program in connection with Free/Libre
  20 + * and Open Source Software ("FLOSS") applications as described in Alfresco's
  21 + * FLOSS exception. You should have recieved a copy of the text describing
  22 + * the FLOSS exception, and it is also available here:
  23 + * http://www.alfresco.com/legal/licensing"
  24 + */
1 25 package org.alfresco.trashcan;
2 26  
3 27 import org.alfresco.repo.security.authentication.AuthenticationComponent;
... ... @@ -10,6 +34,21 @@ import org.quartz.JobExecutionException;
10 34  
11 35 /**
12 36 *
  37 + * This class is the job responsible for cleaning the trashcan periodically
  38 + * according to <b>trashcan.deleteBatchCount</b> and <b>trashcan.daysToKeep</b>
  39 + * set. It's a {@link org.springframework.scheduling.quartz.QuartzJobBean
  40 + * QuartzJobBean} implemented through extension of the
  41 + * {@link org.alfresco.schedule.AbstractScheduledLockedJob
  42 + * AbstractScheduledLockedJob}.
  43 + *
  44 + * <b>trashcan.deleteBatchCount</b>: It will set how many nodes in trashcan to
  45 + * delete at maximum during <b>clean</b> execution. By default the value is
  46 + * 1000. <b>trashcan.daysToKeep</b>: The number of days to keep a document in
  47 + * trashcan since its deletion. Any node archived less than the value specified
  48 + * won't be deleted during <b>clean</b> execution. If the value is 0 or negative
  49 + * any archived will be eligible for deletion (default behavior if no positive
  50 + * value is explicitly set).
  51 + *
13 52 * @author Rui Fernandes
14 53 *
15 54 */
... ... @@ -22,6 +61,11 @@ public class TrashcanCleanerJob extends AbstractScheduledLockedJob
22 61 private int deleteBatchCount = 1000;
23 62 private int daysToKeep = -1;
24 63  
  64 + /**
  65 + * The implementation of the
  66 + * {@link org.alfresco.schedule.AbstractScheduledLockedJob
  67 + * AbstractScheduledLockedJob} abstract executeJob method.
  68 + */
25 69 @Override
26 70 public void executeJob(JobExecutionContext jobContext)
27 71 throws JobExecutionException
... ... @@ -31,6 +75,12 @@ public class TrashcanCleanerJob extends AbstractScheduledLockedJob
31 75 cleanInTransaction();
32 76 }
33 77  
  78 + /**
  79 + *
  80 + * This method instantiates the
  81 + * {@link org.alfresco.trashcan.TrashcanCleaner TrashcanCleaner} and calls
  82 + * the execution of the <b>clean</b> method inside a transaction.
  83 + */
34 84 private void cleanInTransaction()
35 85 {
36 86 RetryingTransactionCallback<Object> txnWork = new RetryingTransactionCallback<Object>()
... ... @@ -47,6 +97,18 @@ public class TrashcanCleanerJob extends AbstractScheduledLockedJob
47 97 txnWork);
48 98 }
49 99  
  100 + /**
  101 + *
  102 + * Extracts the necessary services and configuration for trashcan cleaning:
  103 + * <b>trashcan.deleteBatchCount</b> and <b>trashcan.daysToKeep</b>. The
  104 + * services needed to be injected are the <b>nodeService</b>,
  105 + * <b>transactionService</b> and <b>authenticationComponent</b>. Since iots
  106 + * an extension of {@link org.alfresco.schedule.AbstractScheduledLockedJob
  107 + * AbstractScheduledLockedJob} it should also receive reference to the
  108 + * service {@link org.alfresco.repo.lock.JobLockService jobLockService}.
  109 + *
  110 + * @param jobContext
  111 + */
50 112 private void setUp(JobExecutionContext jobContext)
51 113 {
52 114 nodeService = (NodeService) jobContext.getJobDetail().getJobDataMap()
... ... @@ -62,6 +124,17 @@ public class TrashcanCleanerJob extends AbstractScheduledLockedJob
62 124  
63 125 }
64 126  
  127 + /**
  128 + *
  129 + * Extracts the specified parameter value from the
  130 + * {@link org.quartz.JobExecutionContext jobContext}. If it is not specified
  131 + * returns the corresponding default value.
  132 + *
  133 + * @param parameterName
  134 + * @param defaultValue
  135 + * @param jobContext
  136 + * @return
  137 + */
65 138 private static int getSetupValue(String parameterName, int defaultValue,
66 139 JobExecutionContext jobContext)
67 140 {
... ...
alfresco-trashcan-cleaner-amp/src/test/java/org/alfresco/trashcan/TrashcanCleanerTest.java
  1 +/*
  2 + * Copyright (C) 2005-2013 Alfresco Software Limited.
  3 + *
  4 + * This program is free software; you can redistribute it and/or
  5 + * modify it under the terms of the GNU General Public License
  6 + * as published by the Free Software Foundation; either version 2
  7 + * of the License, or (at your option) any later version.
  8 +
  9 + * This program is distributed in the hope that it will be useful,
  10 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12 + * GNU General Public License for more details.
  13 +
  14 + * You should have received a copy of the GNU General Public License
  15 + * along with this program; if not, write to the Free Software
  16 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17 +
  18 + * As a special exception to the terms and conditions of version 2.0 of
  19 + * the GPL, you may redistribute this Program in connection with Free/Libre
  20 + * and Open Source Software ("FLOSS") applications as described in Alfresco's
  21 + * FLOSS exception. You should have recieved a copy of the text describing
  22 + * the FLOSS exception, and it is also available here:
  23 + * http://www.alfresco.com/legal/licensing"
  24 + */
1 25 package org.alfresco.trashcan;
2 26  
3 27 import java.io.Serializable;
... ... @@ -24,6 +48,8 @@ import org.springframework.context.ApplicationContext;
24 48  
25 49 /**
26 50 *
  51 + * Test class for {@link org.alfresco.trashcan.TrashcanCleaner TrashcanCleaner}.
  52 + *
27 53 * @author Rui Fernandes
28 54 *
29 55 */
... ... @@ -41,6 +67,11 @@ public class TrashcanCleanerTest extends TestCase
41 67 protected Repository repository;
42 68 protected AuthenticationComponent authenticationComponent;
43 69  
  70 + /**
  71 + *
  72 + * Sets services and current user as system.
  73 + *
  74 + */
44 75 @Override
45 76 public void setUp()
46 77 {
... ... @@ -56,22 +87,52 @@ public class TrashcanCleanerTest extends TestCase
56 87 authenticationComponent.setSystemUserAsCurrentUser();
57 88 }
58 89  
  90 + /**
  91 + *
  92 + * Clears security context.
  93 + *
  94 + */
59 95 @Override
60 96 public void tearDown()
61 97 {
62 98 authenticationComponent.clearCurrentSecurityContext();
63 99 }
64 100  
  101 + /**
  102 + *
  103 + * Tests that existing just one node deleted the cleaning of the trashcan
  104 + * will delete it using the default configuration.
  105 + *
  106 + * @throws Throwable
  107 + */
65 108 public void testCleanSimple() throws Throwable
66 109 {
67 110 cleanBatchTest(1, 0);
68 111 }
69 112  
  113 + /**
  114 + *
  115 + * Tests that existing the maximum number of nodes to be deleted in a single
  116 + * trashcan clean execution plus one, after the deletion just a single node
  117 + * is present in archive.
  118 + *
  119 + * @throws Throwable
  120 + */
70 121 public void testCleanBatch() throws Throwable
71 122 {
72 123 cleanBatchTest(BATCH_SIZE + 1, 1);
73 124 }
74 125  
  126 + /**
  127 + *
  128 + * Generic method that asserts that for the <b>nodesCreate</b> existing on
  129 + * archive store the execution of trashcan clean will leave remaining
  130 + * undeleted <b>nodesRemain</b>.
  131 + *
  132 + * @param nodesCreate
  133 + * @param nodesRemain
  134 + * @throws Throwable
  135 + */
75 136 private void cleanBatchTest(int nodesCreate, int nodesRemain)
76 137 throws Throwable
77 138 {
... ... @@ -106,6 +167,12 @@ public class TrashcanCleanerTest extends TestCase
106 167 }
107 168 }
108 169  
  170 + /**
  171 + *
  172 + * Creates and deletes the specified number of nodes.
  173 + *
  174 + * @param n
  175 + */
109 176 private void createAndDeleteNodes(int n)
110 177 {
111 178 for (int i = n; i > 0; i--)
... ... @@ -115,6 +182,12 @@ public class TrashcanCleanerTest extends TestCase
115 182  
116 183 }
117 184  
  185 + /**
  186 + *
  187 + * Creates and delete a single node whose name is based on the current time
  188 + * in milliseconds.
  189 + *
  190 + */
118 191 private void createAndDeleteNode()
119 192 {
120 193 NodeRef companyHome = repository.getCompanyHome();
... ... @@ -129,6 +202,12 @@ public class TrashcanCleanerTest extends TestCase
129 202  
130 203 }
131 204  
  205 + /**
  206 + *
  207 + * It returns the number of nodes present on trashcan.
  208 + *
  209 + * @return
  210 + */
132 211 private long getNumberOfNodesInTrashcan()
133 212 {
134 213 StoreRef archiveStore = new StoreRef("archive://SpacesStore");
... ...
alfresco/src/main/resources/log4j.properties
... ... @@ -263,4 +263,3 @@ log4j.logger.org.apache.pdfbox.pdmodel.font.PDCIDFont=fatal
263 263 # no index support
264 264 log4j.logger.org.alfresco.repo.search.impl.noindex.NoIndexIndexer=fatal
265 265 log4j.logger.org.alfresco.repo.search.impl.noindex.NoIndexSearchService=fatal
266   -log4j.logger.org.alfresco.trashcan=debug
267 266 \ No newline at end of file
... ...