Skip to content

Commit 75133c2

Browse files
committed
support for 5.2
1 parent 3127e49 commit 75133c2

File tree

4 files changed

+77
-119
lines changed

4 files changed

+77
-119
lines changed

pom.xml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
<messages.path>acosix/simple-content-stores</messages.path>
5252
<messages.packageId>acosix.simple-content-stores</messages.packageId>
5353
<moduleId>acosix-simple-content-stores</moduleId>
54+
<alfresco.distribution.version>5.2.g</alfresco.distribution.version>
55+
<surf.version>6.11</surf.version>
5456
</properties>
5557

5658
<repositories>
@@ -195,5 +197,80 @@
195197

196198
</plugins>
197199

200+
<pluginManagement>
201+
<plugins>
202+
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
203+
<plugin>
204+
<groupId>org.eclipse.m2e</groupId>
205+
<artifactId>lifecycle-mapping</artifactId>
206+
<version>1.0.0</version>
207+
<configuration>
208+
<lifecycleMappingMetadata>
209+
<pluginExecutions>
210+
<pluginExecution>
211+
<pluginExecutionFilter>
212+
<groupId>
213+
org.alfresco.maven.plugin
214+
</groupId>
215+
<artifactId>
216+
alfresco-maven-plugin
217+
</artifactId>
218+
<versionRange>
219+
[1.1.1,)
220+
</versionRange>
221+
<goals>
222+
<goal>set-version</goal>
223+
</goals>
224+
</pluginExecutionFilter>
225+
<action>
226+
<ignore></ignore>
227+
</action>
228+
</pluginExecution>
229+
<pluginExecution>
230+
<pluginExecutionFilter>
231+
<groupId>
232+
de.acosix.maven
233+
</groupId>
234+
<artifactId>
235+
jshint-maven-plugin
236+
</artifactId>
237+
<versionRange>
238+
[1.0.0,)
239+
</versionRange>
240+
<goals>
241+
<goal>jshint</goal>
242+
</goals>
243+
</pluginExecutionFilter>
244+
<action>
245+
<ignore></ignore>
246+
</action>
247+
</pluginExecution>
248+
<pluginExecution>
249+
<pluginExecutionFilter>
250+
<groupId>
251+
de.acosix.alfresco.maven
252+
</groupId>
253+
<artifactId>
254+
de.acosix.alfresco.maven.plugins
255+
</artifactId>
256+
<versionRange>
257+
[1.0.0.2,)
258+
</versionRange>
259+
<goals>
260+
<goal>
261+
duplicateI18nResources
262+
</goal>
263+
</goals>
264+
</pluginExecutionFilter>
265+
<action>
266+
<ignore></ignore>
267+
</action>
268+
</pluginExecution>
269+
</pluginExecutions>
270+
</lifecycleMappingMetadata>
271+
</configuration>
272+
</plugin>
273+
</plugins>
274+
</pluginManagement>
198275
</build>
199276
</project>

src/main/java/de/acosix/alfresco/simplecontentstores/repo/store/facade/CommonFacadingContentStore.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
package de.acosix.alfresco.simplecontentstores.repo.store.facade;
1717

18-
import java.util.Date;
1918
import java.util.HashSet;
2019
import java.util.List;
2120
import java.util.Set;
@@ -28,7 +27,6 @@
2827
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
2928
import org.alfresco.service.cmr.dictionary.DictionaryService;
3029
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
31-
import org.alfresco.service.cmr.repository.ContentIOException;
3230
import org.alfresco.service.cmr.repository.ContentReader;
3331
import org.alfresco.service.cmr.repository.ContentWriter;
3432
import org.alfresco.service.namespace.NamespaceService;
@@ -208,25 +206,6 @@ else if (this.exists(contentUrl))
208206
return this.backingStore.getWriter(context);
209207
}
210208

211-
/**
212-
*
213-
* {@inheritDoc}
214-
*/
215-
@Override @SuppressWarnings("deprecation")
216-
public void getUrls(final Date createdAfter, final Date createdBefore, final ContentUrlHandler handler) throws ContentIOException
217-
{
218-
this.backingStore.getUrls(createdAfter, createdBefore, handler);
219-
}
220-
221-
/**
222-
* {@inheritDoc}
223-
*/
224-
@Override @SuppressWarnings("deprecation")
225-
public void getUrls(final ContentUrlHandler handler) throws ContentIOException
226-
{
227-
this.backingStore.getUrls(handler);
228-
}
229-
230209
/**
231210
*
232211
* {@inheritDoc}

src/main/java/de/acosix/alfresco/simplecontentstores/repo/store/file/FileContentStore.java

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import java.io.Serializable;
2121
import java.util.Calendar;
2222
import java.util.Collections;
23-
import java.util.Date;
2423
import java.util.GregorianCalendar;
2524
import java.util.Locale;
2625
import java.util.Map;
@@ -407,19 +406,6 @@ public boolean delete(final String contentUrl)
407406
return deleted;
408407
}
409408

410-
/**
411-
* {@inheritDoc}
412-
*/
413-
@Deprecated
414-
@Override
415-
public void getUrls(final Date createdAfter, final Date createdBefore, final ContentUrlHandler handler)
416-
{
417-
// recursively get all files within the root
418-
this.getUrls(this.rootDirectory, handler, createdAfter, createdBefore);
419-
// done
420-
LOGGER.debug("Listed all content URLS: \n store: {}", this);
421-
}
422-
423409
/**
424410
*
425411
* {@inheritDoc}
@@ -673,54 +659,4 @@ protected String createNewFileStoreUrl()
673659
// done
674660
return newContentUrl;
675661
}
676-
677-
/**
678-
* Returns a list of all files within the given directory and all subdirectories.
679-
*
680-
* @param directory
681-
* the current directory to get the files from
682-
* @param handler
683-
* the callback to use for each URL
684-
* @param createdAfter
685-
* only get URLs for content create after this date
686-
* @param createdBefore
687-
* only get URLs for content created before this date
688-
*/
689-
@Deprecated
690-
protected void getUrls(final File directory, final ContentUrlHandler handler, final Date createdAfter, final Date createdBefore)
691-
{
692-
final File[] files = directory.listFiles();
693-
if (files == null)
694-
{
695-
// the directory has disappeared
696-
throw new ContentIOException("Failed list files in folder: " + directory);
697-
}
698-
for (final File file : files)
699-
{
700-
if (file.isDirectory())
701-
{
702-
// we have a subdirectory - recurse
703-
this.getUrls(file, handler, createdAfter, createdBefore);
704-
}
705-
else
706-
{
707-
// check the created date of the file
708-
final long lastModified = file.lastModified();
709-
if (createdAfter != null && lastModified < createdAfter.getTime())
710-
{
711-
// file is too old
712-
continue;
713-
}
714-
else if (createdBefore != null && lastModified > createdBefore.getTime())
715-
{
716-
// file is too young
717-
continue;
718-
}
719-
// found a file - create the URL
720-
final String contentUrl = this.makeContentUrl(file);
721-
// Callback
722-
handler.handle(contentUrl);
723-
}
724-
}
725-
}
726662
}

src/main/java/de/acosix/alfresco/simplecontentstores/repo/store/routing/MoveCapableCommonRoutingContentStore.java

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import java.util.ArrayList;
2020
import java.util.Collection;
2121
import java.util.Collections;
22-
import java.util.Date;
2322
import java.util.HashMap;
2423
import java.util.HashSet;
2524
import java.util.List;
@@ -363,39 +362,6 @@ else if (!store.isWriteSupported())
363362
return writer;
364363
}
365364

366-
/**
367-
*
368-
* {@inheritDoc}
369-
*/
370-
@Override
371-
@SuppressWarnings("deprecation")
372-
public void getUrls(final ContentUrlHandler handler) throws ContentIOException
373-
{
374-
this.getUrls(null, null, handler);
375-
}
376-
377-
/**
378-
*
379-
* {@inheritDoc}
380-
*/
381-
@Override
382-
@SuppressWarnings("deprecation")
383-
public void getUrls(final Date createdAfter, final Date createdBefore, final ContentUrlHandler handler) throws ContentIOException
384-
{
385-
final List<ContentStore> stores = this.getAllStores();
386-
for (final ContentStore store : stores)
387-
{
388-
try
389-
{
390-
store.getUrls(createdAfter, createdBefore, handler);
391-
}
392-
catch (final UnsupportedOperationException e)
393-
{
394-
// Support of this is not mandatory
395-
}
396-
}
397-
}
398-
399365
/**
400366
*
401367
* {@inheritDoc}

0 commit comments

Comments
 (0)