Commit 9b196c97a8357dccc9112c1c557ec877d18d87c8
1 parent
83f45ffbdc
Exists in
master
REPO-1485 "Align code with Alfresco coding best practice" remove old license inf…
…ormation, code refactoring
Showing
2 changed files
with
1 additions
and
41 deletions
Show diff stats
src/main/config/alfresco/module/alfresco-trashcan-cleaner/context/service-context.xml
1 | 1 | <?xml version='1.0' encoding='UTF-8'?> |
2 | 2 | <!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'> |
3 | -<!-- | |
4 | - Licensed to the Apache Software Foundation (ASF) under one or more | |
5 | - contributor license agreements. See the NOTICE file distributed with | |
6 | - this work for additional information regarding copyright ownership. | |
7 | - The ASF licenses this file to You under the Apache License, Version 2.0 | |
8 | - (the "License"); you may not use this file except in compliance with | |
9 | - the License. You may obtain a copy of the License at | |
10 | - | |
11 | - http://www.apache.org/licenses/LICENSE-2.0 | |
12 | - | |
13 | - Unless required by applicable law or agreed to in writing, software | |
14 | - distributed under the License is distributed on an "AS IS" BASIS, | |
15 | - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
16 | - See the License for the specific language governing permissions and | |
17 | - limitations under the License. | |
18 | - | |
19 | ---> | |
20 | 3 | <beans> |
21 | 4 | |
22 | 5 | <bean id="trashcanCleaner" class="org.alfresco.trashcan.TrashcanCleaner"> | ... | ... |
src/main/java/org/alfresco/trashcan/TrashcanCleanerJob.java
... | ... | @@ -50,27 +50,6 @@ import org.quartz.JobExecutionException; |
50 | 50 | */ |
51 | 51 | public class TrashcanCleanerJob extends AbstractScheduledLockedJob |
52 | 52 | { |
53 | - private TrashcanCleaner trashcanCleaner; | |
54 | - | |
55 | - public void setTrashcanCleaner(TrashcanCleaner trashcanCleaner) | |
56 | - { | |
57 | - this.trashcanCleaner = trashcanCleaner; | |
58 | - } | |
59 | - | |
60 | - /** | |
61 | - * | |
62 | - * Extracts the necessary services and configuration for trashcan cleaning. | |
63 | - * Since its an extension of {@link org.alfresco.schedule.AbstractScheduledLockedJob AbstractScheduledLockedJob} it should also receive reference to the | |
64 | - * service {@link org.alfresco.repo.lock.JobLockService jobLockService}. | |
65 | - * | |
66 | - * @param jobContext | |
67 | - */ | |
68 | - private void setUp(JobExecutionContext jobContext) | |
69 | - { | |
70 | - trashcanCleaner = (TrashcanCleaner) jobContext.getJobDetail().getJobDataMap() | |
71 | - .get("trashcanCleaner"); | |
72 | - } | |
73 | - | |
74 | 53 | /** |
75 | 54 | * The implementation of the |
76 | 55 | * {@link org.alfresco.schedule.AbstractScheduledLockedJob |
... | ... | @@ -79,9 +58,7 @@ public class TrashcanCleanerJob extends AbstractScheduledLockedJob |
79 | 58 | @Override |
80 | 59 | public void executeJob(JobExecutionContext jobContext) throws JobExecutionException |
81 | 60 | { |
82 | - setUp(jobContext); | |
83 | - | |
61 | + TrashcanCleaner trashcanCleaner = (TrashcanCleaner) jobContext.getJobDetail().getJobDataMap().get("trashcanCleaner"); | |
84 | 62 | trashcanCleaner.clean(); |
85 | 63 | } |
86 | - | |
87 | 64 | } | ... | ... |