-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add network connection proxy capability * change user configuration persistence * change cache management * minor refactoring
- Loading branch information
1 parent
ea91d8c
commit 7dab5e0
Showing
56 changed files
with
1,046 additions
and
775 deletions.
There are no files selected for viewing
45 changes: 22 additions & 23 deletions
45
remotesync-api/.settings/PiwigoRemoteSync API Junit AllTests.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> | ||
<stringAttribute key="bad_container_name" value="/remotesync-api/.se"/> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
<listEntry value="/remotesync-api/src/test/java/org/piwigo/remotesync/api/test/RemotesyncAPIAllTests.java"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
<listEntry value="1"/> | ||
</listAttribute> | ||
<mapAttribute key="org.eclipse.debug.core.preferred_launchers"> | ||
<mapEntry key="[debug]" value="org.eclipse.jdt.junit.launchconfig"/> | ||
<mapEntry key="[run]" value="org.eclipse.jdt.junit.launchconfig"/> | ||
</mapAttribute> | ||
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> | ||
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> | ||
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> | ||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-1.7.0-openjdk-i386"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.piwigo.remotesync.api.test.RemotesyncAPIAllTests"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="remotesync-api"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/> | ||
</launchConfiguration> | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> | ||
<stringAttribute key="bad_container_name" value="/remotesync-api/.se"/> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
<listEntry value="/remotesync-api/src/test/java/org/piwigo/remotesync/api/test/RemotesyncAPIAllTests.java"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
<listEntry value="1"/> | ||
</listAttribute> | ||
<mapAttribute key="org.eclipse.debug.core.preferred_launchers"> | ||
<mapEntry key="[debug]" value="org.eclipse.jdt.junit.launchconfig"/> | ||
<mapEntry key="[run]" value="org.eclipse.jdt.junit.launchconfig"/> | ||
</mapAttribute> | ||
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> | ||
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> | ||
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> | ||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.piwigo.remotesync.api.test.RemotesyncAPIAllTests"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="remotesync-api"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/> | ||
</launchConfiguration> |
29 changes: 14 additions & 15 deletions
29
remotesync-api/.settings/PiwigoRemoteSync API Main.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
<listEntry value="/remotesync-api/src/main/java/org/piwigo/remotesync/api/Main.java"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
<listEntry value="1"/> | ||
</listAttribute> | ||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-1.7.0-openjdk-i386"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.piwigo.remotesync.api.Main"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-debug -help"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="remotesync-api"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/> | ||
</launchConfiguration> | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
<listEntry value="/remotesync-api/src/main/java/org/piwigo/remotesync/api/Main.java"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
<listEntry value="1"/> | ||
</listAttribute> | ||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.piwigo.remotesync.api.Main"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-debug -help"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="remotesync-api"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/> | ||
</launchConfiguration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
remotesync-api/src/main/java/org/piwigo/remotesync/api/IClientConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2014 Matthieu Helleboid. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the GNU Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | ||
* | ||
* Contributors: | ||
* Matthieu Helleboid - initial API and implementation | ||
******************************************************************************/ | ||
package org.piwigo.remotesync.api; | ||
|
||
public interface IClientConfiguration { | ||
public String getUrl(); | ||
|
||
public String getUsername(); | ||
public String getPassword(); | ||
|
||
public boolean getUsesProxy(); | ||
public String getProxyUrl(); | ||
public int getProxyPort(); | ||
public String getProxyUsername(); | ||
public String getProxyPassword(); | ||
|
||
public int getChunkSize(); | ||
} |
15 changes: 15 additions & 0 deletions
15
remotesync-api/src/main/java/org/piwigo/remotesync/api/ISyncConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2014 Matthieu Helleboid. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the GNU Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | ||
* | ||
* Contributors: | ||
* Matthieu Helleboid - initial API and implementation | ||
******************************************************************************/ | ||
package org.piwigo.remotesync.api; | ||
|
||
public interface ISyncConfiguration extends IClientConfiguration { | ||
public String getDirectory(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
remotesync-api/src/main/java/org/piwigo/remotesync/api/cache/AbstractCacheElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2014 Matthieu Helleboid. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the GNU Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | ||
* | ||
* Contributors: | ||
* Matthieu Helleboid - initial API and implementation | ||
******************************************************************************/ | ||
package org.piwigo.remotesync.api.cache; | ||
|
||
public abstract class AbstractCacheElement implements ILegacyCacheElement { | ||
protected String url; | ||
protected Integer id; | ||
|
||
public AbstractCacheElement() { | ||
} | ||
|
||
public AbstractCacheElement(String url, Integer id) { | ||
this.url = url; | ||
this.id = id; | ||
} | ||
|
||
public Integer getId() { | ||
return id; | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
remotesync-api/src/main/java/org/piwigo/remotesync/api/cache/AlbumCacheElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2014 Matthieu Helleboid. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the GNU Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | ||
* | ||
* Contributors: | ||
* Matthieu Helleboid - initial API and implementation | ||
******************************************************************************/ | ||
package org.piwigo.remotesync.api.cache; | ||
|
||
public class AlbumCacheElement extends AbstractCacheElement { | ||
|
||
public AlbumCacheElement() { | ||
super(); | ||
} | ||
|
||
public AlbumCacheElement(String url, Integer id) { | ||
super(url, id); | ||
} | ||
|
||
@Override | ||
public String writeToString() { | ||
StringBuilder stringBuilder = new StringBuilder(); | ||
stringBuilder.append(url); | ||
stringBuilder.append(" album_id = "); | ||
stringBuilder.append(id); | ||
return stringBuilder.toString(); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
remotesync-api/src/main/java/org/piwigo/remotesync/api/cache/ILegacyCacheElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2014 Matthieu Helleboid. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the GNU Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | ||
* | ||
* Contributors: | ||
* Matthieu Helleboid - initial API and implementation | ||
******************************************************************************/ | ||
package org.piwigo.remotesync.api.cache; | ||
|
||
public interface ILegacyCacheElement { | ||
|
||
public String writeToString(); | ||
|
||
} |
Oops, something went wrong.