+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "accountItemArray", propOrder = {
+ "item"
+})
+public class AccountItemArray {
+
+ @XmlElement(nillable = true)
+ protected List item;
+
+ /**
+ * Gets the value of the item property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the item property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "dirHistoryDTOArray", propOrder = {
+ "item"
+})
+public class DirHistoryDTOArray {
+
+ @XmlElement(nillable = true)
+ protected List item;
+
+ /**
+ * Gets the value of the item property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the item property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getItem().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link DirHistoryDTO }
+ *
+ *
+ */
+ public List getItem() {
+ if (item == null) {
+ item = new ArrayList();
+ }
+ return this.item;
+ }
+
+}
diff --git a/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/DirHistoryDTOArrayArray.java b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/DirHistoryDTOArrayArray.java
new file mode 100644
index 0000000..9c954fa
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/DirHistoryDTOArrayArray.java
@@ -0,0 +1,69 @@
+
+package com.pmstation.shared.soap.client;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
Java class for dirHistoryDTOArrayArray complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "dirHistoryDTOArrayArray", propOrder = {
+ "item"
+})
+public class DirHistoryDTOArrayArray {
+
+ @XmlElement(nillable = true)
+ protected List item;
+
+ /**
+ * Gets the value of the item property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the item property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getItem().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link DirHistoryDTOArray }
+ *
+ *
+ */
+ public List getItem() {
+ if (item == null) {
+ item = new ArrayList();
+ }
+ return this.item;
+ }
+
+}
diff --git a/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/ExifInfo.java b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/ExifInfo.java
new file mode 100644
index 0000000..2982e2e
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/ExifInfo.java
@@ -0,0 +1,206 @@
+
+package com.pmstation.shared.soap.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
Java class for exifInfo complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "exifInfoArray", propOrder = {
+ "item"
+})
+public class ExifInfoArray {
+
+ @XmlElement(nillable = true)
+ protected List item;
+
+ /**
+ * Gets the value of the item property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the item property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getItem().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link ExifInfo }
+ *
+ *
+ */
+ public List getItem() {
+ if (item == null) {
+ item = new ArrayList();
+ }
+ return this.item;
+ }
+
+}
diff --git a/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/FaultBean.java b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/FaultBean.java
new file mode 100644
index 0000000..74d4ba5
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/FaultBean.java
@@ -0,0 +1,87 @@
+
+package com.pmstation.shared.soap.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
Java class for faultBean complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "longArray", namespace = "http://jaxb.dev.java.net/array", propOrder = {
+ "item"
+})
+public class LongArray {
+
+ @XmlElement(nillable = true)
+ protected List item;
+
+ /**
+ * Gets the value of the item property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the item property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getItem().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link Long }
+ *
+ *
+ */
+ public List getItem() {
+ if (item == null) {
+ item = new ArrayList();
+ }
+ return this.item;
+ }
+
+}
diff --git a/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/Mp3Info.java b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/Mp3Info.java
new file mode 100644
index 0000000..d2977cc
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/Mp3Info.java
@@ -0,0 +1,293 @@
+
+package com.pmstation.shared.soap.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
Java class for mp3Info complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "mp3InfoArray", propOrder = {
+ "item"
+})
+public class Mp3InfoArray {
+
+ @XmlElement(nillable = true)
+ protected List item;
+
+ /**
+ * Gets the value of the item property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the item property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getItem().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link Mp3Info }
+ *
+ *
+ */
+ public List getItem() {
+ if (item == null) {
+ item = new ArrayList();
+ }
+ return this.item;
+ }
+
+}
diff --git a/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/ObjectFactory.java b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/ObjectFactory.java
new file mode 100644
index 0000000..a653f22
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/ObjectFactory.java
@@ -0,0 +1,205 @@
+
+package com.pmstation.shared.soap.client;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the com.pmstation.shared.soap.client package.
+ *
An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _ApiException_QNAME = new QName("http://api.soap.shared.pmstation.com/", "ApiException");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.pmstation.shared.soap.client
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link StringArray }
+ *
+ */
+ public StringArray createStringArray() {
+ return new StringArray();
+ }
+
+ /**
+ * Create an instance of {@link FileUploadInfo }
+ *
+ */
+ public FileUploadInfo createFileUploadInfo() {
+ return new FileUploadInfo();
+ }
+
+ /**
+ * Create an instance of {@link UserSettings }
+ *
+ */
+ public UserSettings createUserSettings() {
+ return new UserSettings();
+ }
+
+ /**
+ * Create an instance of {@link FaultBean }
+ *
+ */
+ public FaultBean createFaultBean() {
+ return new FaultBean();
+ }
+
+ /**
+ * Create an instance of {@link ExifInfo }
+ *
+ */
+ public ExifInfo createExifInfo() {
+ return new ExifInfo();
+ }
+
+ /**
+ * Create an instance of {@link UserSetting }
+ *
+ */
+ public UserSetting createUserSetting() {
+ return new UserSetting();
+ }
+
+ /**
+ * Create an instance of {@link DirHistoryDTOArrayArray }
+ *
+ */
+ public DirHistoryDTOArrayArray createDirHistoryDTOArrayArray() {
+ return new DirHistoryDTOArrayArray();
+ }
+
+ /**
+ * Create an instance of {@link ExifInfoArray }
+ *
+ */
+ public ExifInfoArray createExifInfoArray() {
+ return new ExifInfoArray();
+ }
+
+ /**
+ * Create an instance of {@link AccountItemArray }
+ *
+ */
+ public AccountItemArray createAccountItemArray() {
+ return new AccountItemArray();
+ }
+
+ /**
+ * Create an instance of {@link AccountItem }
+ *
+ */
+ public AccountItem createAccountItem() {
+ return new AccountItem();
+ }
+
+ /**
+ * Create an instance of {@link DirHistoryDTOArray }
+ *
+ */
+ public DirHistoryDTOArray createDirHistoryDTOArray() {
+ return new DirHistoryDTOArray();
+ }
+
+ /**
+ * Create an instance of {@link Mp3Info }
+ *
+ */
+ public Mp3Info createMp3Info() {
+ return new Mp3Info();
+ }
+
+ /**
+ * Create an instance of {@link SharedFolderPropertiesArray }
+ *
+ */
+ public SharedFolderPropertiesArray createSharedFolderPropertiesArray() {
+ return new SharedFolderPropertiesArray();
+ }
+
+ /**
+ * Create an instance of {@link DirHistoryDTO }
+ *
+ */
+ public DirHistoryDTO createDirHistoryDTO() {
+ return new DirHistoryDTO();
+ }
+
+ /**
+ * Create an instance of {@link SettingsGroup }
+ *
+ */
+ public SettingsGroup createSettingsGroup() {
+ return new SettingsGroup();
+ }
+
+ /**
+ * Create an instance of {@link Mp3InfoArray }
+ *
+ */
+ public Mp3InfoArray createMp3InfoArray() {
+ return new Mp3InfoArray();
+ }
+
+ /**
+ * Create an instance of {@link SharedFolderProperties }
+ *
+ */
+ public SharedFolderProperties createSharedFolderProperties() {
+ return new SharedFolderProperties();
+ }
+
+ /**
+ * Create an instance of {@link LongArray }
+ *
+ */
+ public LongArray createLongArray() {
+ return new LongArray();
+ }
+
+ /**
+ * Create an instance of {@link SettingsGroupArray }
+ *
+ */
+ public SettingsGroupArray createSettingsGroupArray() {
+ return new SettingsGroupArray();
+ }
+
+ /**
+ * Create an instance of {@link UserSettingsArray }
+ *
+ */
+ public UserSettingsArray createUserSettingsArray() {
+ return new UserSettingsArray();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link FaultBean }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://api.soap.shared.pmstation.com/", name = "ApiException")
+ public JAXBElement createApiException(FaultBean value) {
+ return new JAXBElement(_ApiException_QNAME, FaultBean.class, null, value);
+ }
+
+}
diff --git a/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/SettingsGroup.java b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/SettingsGroup.java
new file mode 100644
index 0000000..17ee118
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/SettingsGroup.java
@@ -0,0 +1,106 @@
+
+package com.pmstation.shared.soap.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
Java class for settingsGroup complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "settingsGroupArray", propOrder = {
+ "item"
+})
+public class SettingsGroupArray {
+
+ @XmlElement(nillable = true)
+ protected List item;
+
+ /**
+ * Gets the value of the item property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the item property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getItem().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link SettingsGroup }
+ *
+ *
+ */
+ public List getItem() {
+ if (item == null) {
+ item = new ArrayList();
+ }
+ return this.item;
+ }
+
+}
diff --git a/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/SharedFolderProperties.java b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/SharedFolderProperties.java
new file mode 100644
index 0000000..ca878e2
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/SharedFolderProperties.java
@@ -0,0 +1,429 @@
+
+package com.pmstation.shared.soap.client;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
Java class for sharedFolderProperties complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sharedFolderPropertiesArray", propOrder = {
+ "item"
+})
+public class SharedFolderPropertiesArray {
+
+ @XmlElement(nillable = true)
+ protected List item;
+
+ /**
+ * Gets the value of the item property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the item property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getItem().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link SharedFolderProperties }
+ *
+ *
+ */
+ public List getItem() {
+ if (item == null) {
+ item = new ArrayList();
+ }
+ return this.item;
+ }
+
+}
diff --git a/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/StringArray.java b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/StringArray.java
new file mode 100644
index 0000000..510d8cc
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/StringArray.java
@@ -0,0 +1,69 @@
+
+package com.pmstation.shared.soap.client;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
Java class for stringArray complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "stringArray", namespace = "http://jaxb.dev.java.net/array", propOrder = {
+ "item"
+})
+public class StringArray {
+
+ @XmlElement(nillable = true)
+ protected List item;
+
+ /**
+ * Gets the value of the item property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the item property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getItem().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ *
+ *
+ */
+ public List getItem() {
+ if (item == null) {
+ item = new ArrayList();
+ }
+ return this.item;
+ }
+
+}
diff --git a/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/UserSetting.java b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/UserSetting.java
new file mode 100644
index 0000000..3ea497b
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/UserSetting.java
@@ -0,0 +1,215 @@
+
+package com.pmstation.shared.soap.client;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
Java class for userSetting complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "userSetting", propOrder = {
+ "editable",
+ "id",
+ "name",
+ "possibleValues",
+ "title",
+ "type",
+ "value"
+})
+public class UserSetting {
+
+ protected boolean editable;
+ protected int id;
+ protected String name;
+ @XmlElement(nillable = true)
+ protected List possibleValues;
+ protected String title;
+ protected String type;
+ protected String value;
+
+ /**
+ * Gets the value of the editable property.
+ *
+ */
+ public boolean isEditable() {
+ return editable;
+ }
+
+ /**
+ * Sets the value of the editable property.
+ *
+ */
+ public void setEditable(boolean value) {
+ this.editable = value;
+ }
+
+ /**
+ * Gets the value of the id property.
+ *
+ */
+ public int getId() {
+ return id;
+ }
+
+ /**
+ * Sets the value of the id property.
+ *
+ */
+ public void setId(int value) {
+ this.id = value;
+ }
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setName(String value) {
+ this.name = value;
+ }
+
+ /**
+ * Gets the value of the possibleValues property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the possibleValues property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getPossibleValues().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ *
+ *
+ */
+ public List getPossibleValues() {
+ if (possibleValues == null) {
+ possibleValues = new ArrayList();
+ }
+ return this.possibleValues;
+ }
+
+ /**
+ * Gets the value of the title property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * Sets the value of the title property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTitle(String value) {
+ this.title = value;
+ }
+
+ /**
+ * Gets the value of the type property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Sets the value of the type property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setType(String value) {
+ this.type = value;
+ }
+
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+}
diff --git a/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/UserSettings.java b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/UserSettings.java
new file mode 100644
index 0000000..cdf4089
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/UserSettings.java
@@ -0,0 +1,96 @@
+
+package com.pmstation.shared.soap.client;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
Java class for userSettings complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "userSettings", propOrder = {
+ "settings",
+ "settingsGroup"
+})
+public class UserSettings {
+
+ @XmlElement(nillable = true)
+ protected List settings;
+ protected SettingsGroup settingsGroup;
+
+ /**
+ * Gets the value of the settings property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the settings property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getSettings().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link UserSetting }
+ *
+ *
+ */
+ public List getSettings() {
+ if (settings == null) {
+ settings = new ArrayList();
+ }
+ return this.settings;
+ }
+
+ /**
+ * Gets the value of the settingsGroup property.
+ *
+ * @return
+ * possible object is
+ * {@link SettingsGroup }
+ *
+ */
+ public SettingsGroup getSettingsGroup() {
+ return settingsGroup;
+ }
+
+ /**
+ * Sets the value of the settingsGroup property.
+ *
+ * @param value
+ * allowed object is
+ * {@link SettingsGroup }
+ *
+ */
+ public void setSettingsGroup(SettingsGroup value) {
+ this.settingsGroup = value;
+ }
+
+}
diff --git a/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/UserSettingsArray.java b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/UserSettingsArray.java
new file mode 100644
index 0000000..0b873d8
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/UserSettingsArray.java
@@ -0,0 +1,69 @@
+
+package com.pmstation.shared.soap.client;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
Java class for userSettingsArray complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "userSettingsArray", propOrder = {
+ "item"
+})
+public class UserSettingsArray {
+
+ @XmlElement(nillable = true)
+ protected List item;
+
+ /**
+ * Gets the value of the item property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the item property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getItem().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link UserSettings }
+ *
+ *
+ */
+ public List getItem() {
+ if (item == null) {
+ item = new ArrayList();
+ }
+ return this.item;
+ }
+
+}
diff --git a/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/package-info.java b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/package-info.java
new file mode 100644
index 0000000..0c8558a
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/main/java/com/pmstation/shared/soap/client/package-info.java
@@ -0,0 +1,2 @@
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://api.soap.shared.pmstation.com/")
+package com.pmstation.shared.soap.client;
diff --git a/httpchannel-service/httpchannel-service-4shared/src/main/java/org/httpchannel/service/fourshared/FourSharedService.java b/httpchannel-service/httpchannel-service-4shared/src/main/java/org/httpchannel/service/fourshared/FourSharedService.java
new file mode 100644
index 0000000..e411cef
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/main/java/org/httpchannel/service/fourshared/FourSharedService.java
@@ -0,0 +1,261 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.httpchannel.service.fourshared;
+
+import java.io.IOException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import com.pmstation.shared.soap.client.ApiException;
+import com.pmstation.shared.soap.client.DesktopAppJax2;
+import com.pmstation.shared.soap.client.DesktopAppJax2Service;
+import com.rogiel.httpchannel.service.AbstractAuthenticator;
+import com.rogiel.httpchannel.service.AbstractHttpService;
+import com.rogiel.httpchannel.service.AbstractUploader;
+import com.rogiel.httpchannel.service.AuthenticationService;
+import com.rogiel.httpchannel.service.Authenticator;
+import com.rogiel.httpchannel.service.AuthenticatorCapability;
+import com.rogiel.httpchannel.service.CapabilityMatrix;
+import com.rogiel.httpchannel.service.Credential;
+import com.rogiel.httpchannel.service.Service;
+import com.rogiel.httpchannel.service.ServiceID;
+import com.rogiel.httpchannel.service.ServiceMode;
+import com.rogiel.httpchannel.service.UploadChannel;
+import com.rogiel.httpchannel.service.UploadService;
+import com.rogiel.httpchannel.service.Uploader;
+import com.rogiel.httpchannel.service.UploaderCapability;
+import com.rogiel.httpchannel.service.channel.LinkedUploadChannel;
+import com.rogiel.httpchannel.service.channel.LinkedUploadChannel.LinkedUploadChannelCloseCallback;
+import com.rogiel.httpchannel.service.config.NullAuthenticatorConfiguration;
+import com.rogiel.httpchannel.service.config.NullUploaderConfiguration;
+import com.rogiel.httpchannel.service.exception.AuthenticationInvalidCredentialException;
+import com.rogiel.httpchannel.service.exception.AuthenticationServiceException;
+import com.rogiel.httpchannel.service.exception.ChannelServiceException;
+import com.rogiel.httpchannel.service.exception.DownloadLinkNotFoundException;
+import com.rogiel.httpchannel.util.htmlparser.HTMLPage;
+
+/**
+ * This service handles uploads to 4shared.com.
+ *
+ * @author Rogiel
+ * @since 1.0
+ */
+public class FourSharedService extends AbstractHttpService implements Service,
+ UploadService,
+ AuthenticationService {
+ /**
+ * This service ID
+ */
+ public static final ServiceID SERVICE_ID = ServiceID.create("4shared");
+
+ private final DesktopAppJax2 api = new DesktopAppJax2Service()
+ .getDesktopAppJax2Port();
+
+ private String username;
+ private String password;
+
+ @Override
+ public ServiceID getServiceID() {
+ return SERVICE_ID;
+ }
+
+ @Override
+ public int getMajorVersion() {
+ return 1;
+ }
+
+ @Override
+ public int getMinorVersion() {
+ return 0;
+ }
+
+ @Override
+ public CapabilityMatrix getPossibleServiceModes() {
+ return new CapabilityMatrix(ServiceMode.UNAUTHENTICATED);
+ }
+
+ @Override
+ public Uploader getUploader(String filename,
+ long filesize, NullUploaderConfiguration configuration) {
+ return new UploaderImpl(filename, filesize, configuration);
+ }
+
+ @Override
+ public Uploader getUploader(String filename,
+ long filesize) {
+ return getUploader(filename, filesize, newUploaderConfiguration());
+ }
+
+ @Override
+ public NullUploaderConfiguration newUploaderConfiguration() {
+ // no configuration
+ return NullUploaderConfiguration.SHARED_INSTANCE;
+ }
+
+ @Override
+ public long getMaximumFilesize() {
+ try {
+ final long free = api.getFreeSpace(username, password);
+ final long max = api.getMaxFileSize(username, password);
+ if (max < free)
+ return max;
+ else
+ return free;
+ } catch (ApiException e) {
+ return 0;
+ }
+ }
+
+ @Override
+ public String[] getSupportedExtensions() {
+ // no extension restriction
+ return null;
+ }
+
+ @Override
+ public CapabilityMatrix getUploadCapabilities() {
+ return new CapabilityMatrix(
+ UploaderCapability.NON_PREMIUM_ACCOUNT_UPLOAD,
+ UploaderCapability.PREMIUM_ACCOUNT_UPLOAD);
+ }
+
+ @Override
+ public Authenticator getAuthenticator(
+ Credential credential, NullAuthenticatorConfiguration configuration) {
+ return new AuthenticatorImpl(credential, configuration);
+ }
+
+ @Override
+ public Authenticator getAuthenticator(
+ Credential credential) {
+ return getAuthenticator(credential, newAuthenticatorConfiguration());
+ }
+
+ @Override
+ public NullAuthenticatorConfiguration newAuthenticatorConfiguration() {
+ return NullAuthenticatorConfiguration.SHARED_INSTANCE;
+ }
+
+ @Override
+ public CapabilityMatrix getAuthenticationCapability() {
+ return new CapabilityMatrix();
+ }
+
+ protected class UploaderImpl extends
+ AbstractUploader implements
+ Uploader,
+ LinkedUploadChannelCloseCallback {
+ private Future uploadFuture;
+
+ public UploaderImpl(String filename, long filesize,
+ NullUploaderConfiguration configuration) {
+ super(FourSharedService.this, filename, filesize, configuration);
+ }
+
+ @Override
+ public UploadChannel openChannel() throws IOException {
+ try {
+ logger.debug("Starting upload to 4shared.com");
+ final String sessionID = api.createUploadSessionKey(username,
+ password, -1);
+ logger.debug("SessionID: {}", sessionID);
+ if (sessionID == null || sessionID.length() == 0)
+ throw new ChannelServiceException("SessionID is invalid");
+
+ final long datacenterID = api.getNewFileDataCenter(username,
+ password);
+ logger.debug("DatacenterID: {}", datacenterID);
+ if (datacenterID <= 0)
+ throw new ChannelServiceException("DatacenterID is invalid");
+
+ final String uri = api.getUploadFormUrl((int) datacenterID,
+ sessionID);
+ logger.debug("Upload URI: {}", uri);
+
+ // create a new channel
+ final LinkedUploadChannel channel = createLinkedChannel(this);
+ uploadFuture = multipartPost(uri)
+ .parameter("FilePart", channel).asPageAsync();
+
+ // wait for channel link
+ return waitChannelLink(channel, uploadFuture);
+ } catch (ApiException e) {
+ throw new ChannelServiceException(e);
+ }
+ }
+
+ @Override
+ public String finish() throws IOException {
+ try {
+ final long linkID = Long.parseLong(uploadFuture.get()
+ .getInputValueById("uploadedFileId"));
+ return api.getFileDownloadLink(username, password, linkID);
+ } catch (InterruptedException e) {
+ return null;
+ } catch (ExecutionException e) {
+ throw (IOException) e.getCause();
+ } catch (ApiException e) {
+ throw new DownloadLinkNotFoundException(e);
+ }
+ }
+ }
+
+ protected class AuthenticatorImpl extends
+ AbstractAuthenticator implements
+ Authenticator {
+ public AuthenticatorImpl(Credential credential,
+ NullAuthenticatorConfiguration configuration) {
+ super(credential, configuration);
+ }
+
+ @Override
+ public void login() throws IOException {
+ logger.debug("Logging to 4shared.com");
+
+ final String response = api.login(credential.getUsername(),
+ credential.getPassword());
+ username = credential.getUsername();
+ password = credential.getPassword();
+
+ try {
+ if (api.isAccountPremium(username, password))
+ serviceMode = ServiceMode.PREMIUM;
+ else
+ serviceMode = ServiceMode.NON_PREMIUM;
+ } catch (ApiException e) {
+ throw new AuthenticationServiceException(e);
+ }
+
+ if (!response.isEmpty())
+ throw new AuthenticationInvalidCredentialException();
+ }
+
+ @Override
+ public void logout() throws IOException {
+ username = null;
+ password = null;
+ }
+ }
+
+ @Override
+ public String toString() {
+ return this.getClass().getSimpleName() + " " + getMajorVersion() + "."
+ + getMinorVersion();
+ }
+}
diff --git a/httpchannel-service/httpchannel-service-4shared/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service b/httpchannel-service/httpchannel-service-4shared/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
new file mode 100644
index 0000000..5ba0742
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
@@ -0,0 +1 @@
+org.httpchannel.service.fourshared.FourSharedService
\ No newline at end of file
diff --git a/httpchannel-service/httpchannel-service-4shared/src/test/java/org/httpchannel/service/fourshared/FourSharedServiceTest.java b/httpchannel-service/httpchannel-service-4shared/src/test/java/org/httpchannel/service/fourshared/FourSharedServiceTest.java
new file mode 100644
index 0000000..59e5ac8
--- /dev/null
+++ b/httpchannel-service/httpchannel-service-4shared/src/test/java/org/httpchannel/service/fourshared/FourSharedServiceTest.java
@@ -0,0 +1,36 @@
+/**
+ *
+ */
+package org.httpchannel.service.fourshared;
+
+import java.io.IOException;
+import java.net.URI;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+import junit.framework.Assert;
+
+import org.junit.Test;
+
+import com.rogiel.httpchannel.service.helper.AuthenticationServices;
+import com.rogiel.httpchannel.util.ChannelUtils;
+
+/**
+ * @author Rogiel
+ *
+ */
+public class FourSharedServiceTest {
+ private final FourSharedService service = new FourSharedService();
+
+ @Test
+ public void test() throws IOException {
+ AuthenticationServices.authenticator(service, "", "").login();
+
+ final Path path = Paths
+ .get("../src/test/resources/upload-test-file.txt");
+ final URI uri = ChannelUtils.upload(service, path);
+
+ Assert.assertNotNull(uri);
+ System.out.println(uri);
+ }
+}
diff --git a/httpchannel-service/httpchannel-service-depositfiles/src/main/java/com/rogiel/httpchannel/service/impl/DepositFilesService.java b/httpchannel-service/httpchannel-service-depositfiles/src/main/java/com/rogiel/httpchannel/service/depositfiles/DepositFilesService.java
similarity index 96%
rename from httpchannel-service/httpchannel-service-depositfiles/src/main/java/com/rogiel/httpchannel/service/impl/DepositFilesService.java
rename to httpchannel-service/httpchannel-service-depositfiles/src/main/java/com/rogiel/httpchannel/service/depositfiles/DepositFilesService.java
index 5f7f8dc..4c679fa 100644
--- a/httpchannel-service/httpchannel-service-depositfiles/src/main/java/com/rogiel/httpchannel/service/impl/DepositFilesService.java
+++ b/httpchannel-service/httpchannel-service-depositfiles/src/main/java/com/rogiel/httpchannel/service/depositfiles/DepositFilesService.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.service.impl;
+package com.rogiel.httpchannel.service.depositfiles;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
diff --git a/httpchannel-service/httpchannel-service-depositfiles/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service b/httpchannel-service/httpchannel-service-depositfiles/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
index 000989d..ec032cf 100644
--- a/httpchannel-service/httpchannel-service-depositfiles/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
+++ b/httpchannel-service/httpchannel-service-depositfiles/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
@@ -1 +1 @@
-com.rogiel.httpchannel.service.impl.DepositFilesService
\ No newline at end of file
+com.rogiel.httpchannel.service.depositfiles.DepositFilesService
\ No newline at end of file
diff --git a/httpchannel-service/httpchannel-service-depositfiles/src/test/java/com/rogiel/httpchannel/service/impl/DepositFilesServiceTest.java b/httpchannel-service/httpchannel-service-depositfiles/src/test/java/com/rogiel/httpchannel/service/impl/DepositFilesServiceTest.java
index 0a5f737..b3b89fc 100644
--- a/httpchannel-service/httpchannel-service-depositfiles/src/test/java/com/rogiel/httpchannel/service/impl/DepositFilesServiceTest.java
+++ b/httpchannel-service/httpchannel-service-depositfiles/src/test/java/com/rogiel/httpchannel/service/impl/DepositFilesServiceTest.java
@@ -31,6 +31,7 @@ import org.junit.Before;
import org.junit.Test;
import com.rogiel.httpchannel.service.UploaderCapability;
+import com.rogiel.httpchannel.service.depositfiles.DepositFilesService;
import com.rogiel.httpchannel.util.ChannelUtils;
public class DepositFilesServiceTest {
diff --git a/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/FileSonicAPI.java b/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/FileSonicAPI.java
similarity index 86%
rename from httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/FileSonicAPI.java
rename to httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/FileSonicAPI.java
index f64f445..f2c8995 100644
--- a/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/FileSonicAPI.java
+++ b/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/FileSonicAPI.java
@@ -16,16 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.filesonic;
+package com.rogiel.httpchannel.service.filesonic;
import java.io.IOException;
import java.net.URI;
import javax.xml.bind.JAXB;
-import com.rogiel.httpchannel.filesonic.xml.FSAPI;
-import com.rogiel.httpchannel.filesonic.xml.FSGetUploadURL;
-import com.rogiel.httpchannel.filesonic.xml.FSUpload;
+import com.rogiel.httpchannel.service.filesonic.xml.FSAPI;
+import com.rogiel.httpchannel.service.filesonic.xml.FSGetUploadURL;
+import com.rogiel.httpchannel.service.filesonic.xml.FSUpload;
/**
* @author Rogiel
diff --git a/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/impl/FileSonicService.java b/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/FileSonicService.java
similarity index 98%
rename from httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/impl/FileSonicService.java
rename to httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/FileSonicService.java
index bf59c60..5547da7 100644
--- a/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/impl/FileSonicService.java
+++ b/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/FileSonicService.java
@@ -16,14 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.service.impl;
+package com.rogiel.httpchannel.service.filesonic;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.regex.Pattern;
-import com.rogiel.httpchannel.filesonic.FileSonicAPI;
import com.rogiel.httpchannel.service.AbstractAuthenticator;
import com.rogiel.httpchannel.service.AbstractHttpService;
import com.rogiel.httpchannel.service.AbstractUploader;
diff --git a/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/xml/FSAPI.java b/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/xml/FSAPI.java
similarity index 91%
rename from httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/xml/FSAPI.java
rename to httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/xml/FSAPI.java
index d1d2605..b0d08e3 100644
--- a/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/xml/FSAPI.java
+++ b/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/xml/FSAPI.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.filesonic.xml;
+package com.rogiel.httpchannel.service.filesonic.xml;
/**
* @author Rogiel
diff --git a/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/xml/FSGetUploadURL.java b/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/xml/FSGetUploadURL.java
similarity index 93%
rename from httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/xml/FSGetUploadURL.java
rename to httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/xml/FSGetUploadURL.java
index 1c2296d..f199701 100644
--- a/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/xml/FSGetUploadURL.java
+++ b/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/xml/FSGetUploadURL.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.filesonic.xml;
+package com.rogiel.httpchannel.service.filesonic.xml;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
diff --git a/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/xml/FSResponse.java b/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/xml/FSResponse.java
similarity index 92%
rename from httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/xml/FSResponse.java
rename to httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/xml/FSResponse.java
index 8e5c088..ba09d55 100644
--- a/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/xml/FSResponse.java
+++ b/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/xml/FSResponse.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.filesonic.xml;
+package com.rogiel.httpchannel.service.filesonic.xml;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
diff --git a/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/xml/FSUpload.java b/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/xml/FSUpload.java
similarity index 93%
rename from httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/xml/FSUpload.java
rename to httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/xml/FSUpload.java
index d90432a..af637f4 100644
--- a/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/filesonic/xml/FSUpload.java
+++ b/httpchannel-service/httpchannel-service-filesonic/src/main/java/com/rogiel/httpchannel/service/filesonic/xml/FSUpload.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.filesonic.xml;
+package com.rogiel.httpchannel.service.filesonic.xml;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
diff --git a/httpchannel-service/httpchannel-service-filesonic/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service b/httpchannel-service/httpchannel-service-filesonic/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
index 15dd2f2..68246e1 100644
--- a/httpchannel-service/httpchannel-service-filesonic/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
+++ b/httpchannel-service/httpchannel-service-filesonic/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
@@ -1 +1 @@
-com.rogiel.httpchannel.service.impl.FileSonicService
\ No newline at end of file
+com.rogiel.httpchannel.service.filesonic.FileSonicService
\ No newline at end of file
diff --git a/httpchannel-service/httpchannel-service-hotfile/src/main/java/com/rogiel/httpchannel/service/impl/HotFileService.java b/httpchannel-service/httpchannel-service-hotfile/src/main/java/com/rogiel/httpchannel/service/hotfile/HotFileService.java
similarity index 99%
rename from httpchannel-service/httpchannel-service-hotfile/src/main/java/com/rogiel/httpchannel/service/impl/HotFileService.java
rename to httpchannel-service/httpchannel-service-hotfile/src/main/java/com/rogiel/httpchannel/service/hotfile/HotFileService.java
index 9fcf2b1..f1e44a6 100644
--- a/httpchannel-service/httpchannel-service-hotfile/src/main/java/com/rogiel/httpchannel/service/impl/HotFileService.java
+++ b/httpchannel-service/httpchannel-service-hotfile/src/main/java/com/rogiel/httpchannel/service/hotfile/HotFileService.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.service.impl;
+package com.rogiel.httpchannel.service.hotfile;
import java.io.IOException;
import java.net.URI;
diff --git a/httpchannel-service/httpchannel-service-hotfile/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service b/httpchannel-service/httpchannel-service-hotfile/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
index a46dd2c..8dae694 100644
--- a/httpchannel-service/httpchannel-service-hotfile/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
+++ b/httpchannel-service/httpchannel-service-hotfile/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
@@ -1 +1 @@
-com.rogiel.httpchannel.service.impl.HotFileService
\ No newline at end of file
+com.rogiel.httpchannel.service.hotfile.HotFileService
\ No newline at end of file
diff --git a/httpchannel-service/httpchannel-service-hotfile/src/test/java/com/rogiel/httpchannel/service/impl/DiscoveryTest.java b/httpchannel-service/httpchannel-service-hotfile/src/test/java/com/rogiel/httpchannel/service/impl/DiscoveryTest.java
index 3408708..6dbcdc0 100644
--- a/httpchannel-service/httpchannel-service-hotfile/src/test/java/com/rogiel/httpchannel/service/impl/DiscoveryTest.java
+++ b/httpchannel-service/httpchannel-service-hotfile/src/test/java/com/rogiel/httpchannel/service/impl/DiscoveryTest.java
@@ -23,6 +23,7 @@ import junit.framework.Assert;
import org.junit.Test;
import com.rogiel.httpchannel.service.helper.Services;
+import com.rogiel.httpchannel.service.hotfile.HotFileService;
/**
* @author Rogiel
diff --git a/httpchannel-service/httpchannel-service-hotfile/src/test/java/com/rogiel/httpchannel/service/impl/HotFileServiceTest.java b/httpchannel-service/httpchannel-service-hotfile/src/test/java/com/rogiel/httpchannel/service/impl/HotFileServiceTest.java
index 2dc8561..d6494cd 100644
--- a/httpchannel-service/httpchannel-service-hotfile/src/test/java/com/rogiel/httpchannel/service/impl/HotFileServiceTest.java
+++ b/httpchannel-service/httpchannel-service-hotfile/src/test/java/com/rogiel/httpchannel/service/impl/HotFileServiceTest.java
@@ -47,6 +47,7 @@ import com.rogiel.httpchannel.service.UploaderCapability;
import com.rogiel.httpchannel.service.exception.AuthenticationInvalidCredentialException;
import com.rogiel.httpchannel.service.helper.Services;
import com.rogiel.httpchannel.service.helper.UploadServices;
+import com.rogiel.httpchannel.service.hotfile.HotFileService;
import com.rogiel.httpchannel.util.ChannelUtils;
public class HotFileServiceTest {
diff --git a/httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/impl/MegaUploadDownloaderConfiguration.java b/httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/megaupload/MegaUploadDownloaderConfiguration.java
similarity index 93%
rename from httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/impl/MegaUploadDownloaderConfiguration.java
rename to httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/megaupload/MegaUploadDownloaderConfiguration.java
index 7aedf96..8399d53 100644
--- a/httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/impl/MegaUploadDownloaderConfiguration.java
+++ b/httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/megaupload/MegaUploadDownloaderConfiguration.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.service.impl;
+package com.rogiel.httpchannel.service.megaupload;
import com.rogiel.httpchannel.service.AbstractDownloaderConfiguration;
import com.rogiel.httpchannel.service.Downloader.DownloaderConfiguration;
diff --git a/httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/impl/MegaUploadService.java b/httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/megaupload/MegaUploadService.java
similarity index 99%
rename from httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/impl/MegaUploadService.java
rename to httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/megaupload/MegaUploadService.java
index 0a66446..7b7163c 100644
--- a/httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/impl/MegaUploadService.java
+++ b/httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/megaupload/MegaUploadService.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.service.impl;
+package com.rogiel.httpchannel.service.megaupload;
import java.io.IOException;
import java.net.URI;
diff --git a/httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/impl/MegaUploadUploaderConfiguration.java b/httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/megaupload/MegaUploadUploaderConfiguration.java
similarity index 90%
rename from httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/impl/MegaUploadUploaderConfiguration.java
rename to httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/megaupload/MegaUploadUploaderConfiguration.java
index 3437f8b..b3d6456 100644
--- a/httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/impl/MegaUploadUploaderConfiguration.java
+++ b/httpchannel-service/httpchannel-service-megaupload/src/main/java/com/rogiel/httpchannel/service/megaupload/MegaUploadUploaderConfiguration.java
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.service.impl;
+package com.rogiel.httpchannel.service.megaupload;
import com.rogiel.httpchannel.service.AbstractUploaderConfiguration;
import com.rogiel.httpchannel.service.Uploader.DescriptionableUploaderConfiguration;
import com.rogiel.httpchannel.service.Uploader.UploaderConfiguration;
-import com.rogiel.httpchannel.service.impl.MegaUploadService.UploaderImpl;
+import com.rogiel.httpchannel.service.megaupload.MegaUploadService.UploaderImpl;
/**
* Describes an configuration for an {@link UploaderImpl}
diff --git a/httpchannel-service/httpchannel-service-megaupload/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service b/httpchannel-service/httpchannel-service-megaupload/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
index b8dea6b..3274a06 100644
--- a/httpchannel-service/httpchannel-service-megaupload/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
+++ b/httpchannel-service/httpchannel-service-megaupload/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
@@ -1 +1 @@
-com.rogiel.httpchannel.service.impl.MegaUploadService
\ No newline at end of file
+com.rogiel.httpchannel.service.megaupload.MegaUploadService
\ No newline at end of file
diff --git a/httpchannel-service/httpchannel-service-megaupload/src/test/java/com/rogiel/httpchannel/service/impl/DiscoveryTest.java b/httpchannel-service/httpchannel-service-megaupload/src/test/java/com/rogiel/httpchannel/service/impl/DiscoveryTest.java
index c32806e..420d0be 100644
--- a/httpchannel-service/httpchannel-service-megaupload/src/test/java/com/rogiel/httpchannel/service/impl/DiscoveryTest.java
+++ b/httpchannel-service/httpchannel-service-megaupload/src/test/java/com/rogiel/httpchannel/service/impl/DiscoveryTest.java
@@ -23,6 +23,7 @@ import junit.framework.Assert;
import org.junit.Test;
import com.rogiel.httpchannel.service.helper.Services;
+import com.rogiel.httpchannel.service.megaupload.MegaUploadService;
/**
* @author Rogiel
diff --git a/httpchannel-service/httpchannel-service-megaupload/src/test/java/com/rogiel/httpchannel/service/impl/MegaUploadServiceTest.java b/httpchannel-service/httpchannel-service-megaupload/src/test/java/com/rogiel/httpchannel/service/impl/MegaUploadServiceTest.java
index f41fc7d..d561371 100644
--- a/httpchannel-service/httpchannel-service-megaupload/src/test/java/com/rogiel/httpchannel/service/impl/MegaUploadServiceTest.java
+++ b/httpchannel-service/httpchannel-service-megaupload/src/test/java/com/rogiel/httpchannel/service/impl/MegaUploadServiceTest.java
@@ -46,6 +46,8 @@ import com.rogiel.httpchannel.service.UploadChannel;
import com.rogiel.httpchannel.service.UploaderCapability;
import com.rogiel.httpchannel.service.exception.AuthenticationInvalidCredentialException;
import com.rogiel.httpchannel.service.helper.UploadServices;
+import com.rogiel.httpchannel.service.megaupload.MegaUploadDownloaderConfiguration;
+import com.rogiel.httpchannel.service.megaupload.MegaUploadService;
import com.rogiel.httpchannel.util.ChannelUtils;
public class MegaUploadServiceTest {
diff --git a/httpchannel-service/httpchannel-service-multiupload/src/main/java/com/rogiel/httpchannel/service/impl/MultiUploadService.java b/httpchannel-service/httpchannel-service-multiupload/src/main/java/com/rogiel/httpchannel/service/multiupload/MultiUploadService.java
similarity index 93%
rename from httpchannel-service/httpchannel-service-multiupload/src/main/java/com/rogiel/httpchannel/service/impl/MultiUploadService.java
rename to httpchannel-service/httpchannel-service-multiupload/src/main/java/com/rogiel/httpchannel/service/multiupload/MultiUploadService.java
index 6fcbc88..bc29bbe 100644
--- a/httpchannel-service/httpchannel-service-multiupload/src/main/java/com/rogiel/httpchannel/service/impl/MultiUploadService.java
+++ b/httpchannel-service/httpchannel-service-multiupload/src/main/java/com/rogiel/httpchannel/service/multiupload/MultiUploadService.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.service.impl;
+package com.rogiel.httpchannel.service.multiupload;
import java.io.IOException;
import java.net.URI;
@@ -55,7 +55,7 @@ import com.rogiel.httpchannel.service.exception.DownloadLimitExceededException;
import com.rogiel.httpchannel.service.exception.DownloadLinkNotFoundException;
import com.rogiel.httpchannel.service.exception.DownloadNotAuthorizedException;
import com.rogiel.httpchannel.service.exception.DownloadNotResumableException;
-import com.rogiel.httpchannel.service.impl.MultiUploadUploaderConfiguration.MultiUploadMirrorService;
+import com.rogiel.httpchannel.service.multiupload.MultiUploadUploaderConfiguration.MultiUploadMirrorService;
import com.rogiel.httpchannel.util.PatternUtils;
import com.rogiel.httpchannel.util.htmlparser.HTMLPage;
@@ -221,6 +221,12 @@ public class MultiUploadService extends AbstractHttpService implements Service,
.uploadServices()) {
logger.debug("Adding {} as mirror", mirror.name());
request.parameter("service_" + mirror.id, 1);
+ final String[] login = configuration
+ .getAuthenticationForService(mirror);
+ if (login != null && login.length == 2) {
+ request.parameter("username_" + mirror.id, login[0]);
+ request.parameter("password_" + mirror.id, login[1]);
+ }
}
uploadFuture = request.asStringAsync();
diff --git a/httpchannel-service/httpchannel-service-multiupload/src/main/java/com/rogiel/httpchannel/service/impl/MultiUploadUploaderConfiguration.java b/httpchannel-service/httpchannel-service-multiupload/src/main/java/com/rogiel/httpchannel/service/multiupload/MultiUploadUploaderConfiguration.java
similarity index 74%
rename from httpchannel-service/httpchannel-service-multiupload/src/main/java/com/rogiel/httpchannel/service/impl/MultiUploadUploaderConfiguration.java
rename to httpchannel-service/httpchannel-service-multiupload/src/main/java/com/rogiel/httpchannel/service/multiupload/MultiUploadUploaderConfiguration.java
index 42052b2..da1f3d6 100644
--- a/httpchannel-service/httpchannel-service-multiupload/src/main/java/com/rogiel/httpchannel/service/impl/MultiUploadUploaderConfiguration.java
+++ b/httpchannel-service/httpchannel-service-multiupload/src/main/java/com/rogiel/httpchannel/service/multiupload/MultiUploadUploaderConfiguration.java
@@ -16,14 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.service.impl;
+package com.rogiel.httpchannel.service.multiupload;
import java.util.EnumSet;
import com.rogiel.httpchannel.service.AbstractUploaderConfiguration;
import com.rogiel.httpchannel.service.Uploader.DescriptionableUploaderConfiguration;
import com.rogiel.httpchannel.service.Uploader.UploaderConfiguration;
-import com.rogiel.httpchannel.service.impl.MultiUploadService.UploaderImpl;
+import com.rogiel.httpchannel.service.multiupload.MultiUploadService.UploaderImpl;
/**
* Describes an configuration for an {@link UploaderImpl}
@@ -42,6 +42,11 @@ public class MultiUploadUploaderConfiguration extends
*/
private EnumSet uploadServices = EnumSet
.allOf(MultiUploadMirrorService.class);
+ /**
+ * The service authentication
+ */
+ private final String[][] serviceAuthentication = new String[MultiUploadMirrorService
+ .values().length][];
/**
* An enumeration containing all supported services for Multiupload
@@ -82,11 +87,31 @@ public class MultiUploadUploaderConfiguration extends
public MultiUploadUploaderConfiguration uploadService(
MultiUploadMirrorService... services) {
for (final MultiUploadMirrorService service : services) {
+ serviceAuthentication[service.ordinal()] = null;
uploadServices.add(service);
}
return this;
}
+ /**
+ * Adds this service as an desired mirror
+ *
+ * @param service
+ * the service
+ * @param username
+ * the service username
+ * @param password
+ * the service password
+ */
+ public MultiUploadUploaderConfiguration uploadService(
+ MultiUploadMirrorService service, String username, String password) {
+ if (username != null && password != null) {
+ serviceAuthentication[service.ordinal()] = new String[] { username,
+ password };
+ }
+ return uploadService(service);
+ }
+
/**
* Checks if the service is on the desired mirror list
*
@@ -127,4 +152,12 @@ public class MultiUploadUploaderConfiguration extends
public EnumSet uploadServices() {
return uploadServices;
}
+
+ /**
+ * @return the configured authentication for the given service
+ */
+ protected String[] getAuthenticationForService(
+ MultiUploadMirrorService service) {
+ return serviceAuthentication[service.ordinal()];
+ }
}
diff --git a/httpchannel-service/httpchannel-service-multiupload/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service b/httpchannel-service/httpchannel-service-multiupload/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
index 4013beb..5d4a4ee 100644
--- a/httpchannel-service/httpchannel-service-multiupload/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
+++ b/httpchannel-service/httpchannel-service-multiupload/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
@@ -1 +1 @@
-com.rogiel.httpchannel.service.impl.MultiUploadService
\ No newline at end of file
+com.rogiel.httpchannel.service.multiupload.MultiUploadService
\ No newline at end of file
diff --git a/httpchannel-service/httpchannel-service-multiupload/src/test/java/com/rogiel/httpchannel/service/impl/MultiUploadServiceTest.java b/httpchannel-service/httpchannel-service-multiupload/src/test/java/com/rogiel/httpchannel/service/impl/MultiUploadServiceTest.java
index 15722dc..dcf0974 100644
--- a/httpchannel-service/httpchannel-service-multiupload/src/test/java/com/rogiel/httpchannel/service/impl/MultiUploadServiceTest.java
+++ b/httpchannel-service/httpchannel-service-multiupload/src/test/java/com/rogiel/httpchannel/service/impl/MultiUploadServiceTest.java
@@ -30,6 +30,7 @@ import org.junit.Before;
import org.junit.Test;
import com.rogiel.httpchannel.service.DownloadService;
+import com.rogiel.httpchannel.service.multiupload.MultiUploadService;
import com.rogiel.httpchannel.util.ChannelUtils;
public class MultiUploadServiceTest {
diff --git a/httpchannel-service/httpchannel-service-uploadhere/src/main/java/com/rogiel/httpchannel/service/impl/UploadHereService.java b/httpchannel-service/httpchannel-service-uploadhere/src/main/java/com/rogiel/httpchannel/service/uploadhere/UploadHereService.java
similarity index 96%
rename from httpchannel-service/httpchannel-service-uploadhere/src/main/java/com/rogiel/httpchannel/service/impl/UploadHereService.java
rename to httpchannel-service/httpchannel-service-uploadhere/src/main/java/com/rogiel/httpchannel/service/uploadhere/UploadHereService.java
index 8df5c69..b8eb49e 100644
--- a/httpchannel-service/httpchannel-service-uploadhere/src/main/java/com/rogiel/httpchannel/service/impl/UploadHereService.java
+++ b/httpchannel-service/httpchannel-service-uploadhere/src/main/java/com/rogiel/httpchannel/service/uploadhere/UploadHereService.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.service.impl;
+package com.rogiel.httpchannel.service.uploadhere;
import java.io.IOException;
import java.net.URI;
diff --git a/httpchannel-service/httpchannel-service-uploadhere/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service b/httpchannel-service/httpchannel-service-uploadhere/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
index af09d29..966e11f 100644
--- a/httpchannel-service/httpchannel-service-uploadhere/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
+++ b/httpchannel-service/httpchannel-service-uploadhere/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
@@ -1 +1 @@
-com.rogiel.httpchannel.service.impl.UploadKingService
\ No newline at end of file
+com.rogiel.httpchannel.service.uploadhere.UploadHereService
\ No newline at end of file
diff --git a/httpchannel-service/httpchannel-service-uploadhere/src/test/java/com/rogiel/httpchannel/service/impl/UploadHereServiceTest.java b/httpchannel-service/httpchannel-service-uploadhere/src/test/java/com/rogiel/httpchannel/service/impl/UploadHereServiceTest.java
index 32cc017..5f2adf1 100644
--- a/httpchannel-service/httpchannel-service-uploadhere/src/test/java/com/rogiel/httpchannel/service/impl/UploadHereServiceTest.java
+++ b/httpchannel-service/httpchannel-service-uploadhere/src/test/java/com/rogiel/httpchannel/service/impl/UploadHereServiceTest.java
@@ -31,6 +31,7 @@ import org.junit.Before;
import org.junit.Test;
import com.rogiel.httpchannel.service.UploaderCapability;
+import com.rogiel.httpchannel.service.uploadhere.UploadHereService;
import com.rogiel.httpchannel.util.ChannelUtils;
public class UploadHereServiceTest {
diff --git a/httpchannel-service/httpchannel-service-uploadking/src/main/java/com/rogiel/httpchannel/service/impl/UploadKingService.java b/httpchannel-service/httpchannel-service-uploadking/src/main/java/com/rogiel/httpchannel/service/uploadking/UploadKingService.java
similarity index 96%
rename from httpchannel-service/httpchannel-service-uploadking/src/main/java/com/rogiel/httpchannel/service/impl/UploadKingService.java
rename to httpchannel-service/httpchannel-service-uploadking/src/main/java/com/rogiel/httpchannel/service/uploadking/UploadKingService.java
index d9fc852..58ad28a 100644
--- a/httpchannel-service/httpchannel-service-uploadking/src/main/java/com/rogiel/httpchannel/service/impl/UploadKingService.java
+++ b/httpchannel-service/httpchannel-service-uploadking/src/main/java/com/rogiel/httpchannel/service/uploadking/UploadKingService.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.service.impl;
+package com.rogiel.httpchannel.service.uploadking;
import java.io.IOException;
import java.net.URI;
diff --git a/httpchannel-service/httpchannel-service-uploadking/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service b/httpchannel-service/httpchannel-service-uploadking/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
index af09d29..8431515 100644
--- a/httpchannel-service/httpchannel-service-uploadking/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
+++ b/httpchannel-service/httpchannel-service-uploadking/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
@@ -1 +1 @@
-com.rogiel.httpchannel.service.impl.UploadKingService
\ No newline at end of file
+com.rogiel.httpchannel.service.uploadking.UploadKingService
\ No newline at end of file
diff --git a/httpchannel-service/httpchannel-service-uploadking/src/test/java/com/rogiel/httpchannel/service/impl/UploadKingServiceTest.java b/httpchannel-service/httpchannel-service-uploadking/src/test/java/com/rogiel/httpchannel/service/impl/UploadKingServiceTest.java
index 33bdc9b..8222f5e 100644
--- a/httpchannel-service/httpchannel-service-uploadking/src/test/java/com/rogiel/httpchannel/service/impl/UploadKingServiceTest.java
+++ b/httpchannel-service/httpchannel-service-uploadking/src/test/java/com/rogiel/httpchannel/service/impl/UploadKingServiceTest.java
@@ -37,6 +37,7 @@ import com.rogiel.httpchannel.captcha.CaptchaService;
import com.rogiel.httpchannel.captcha.impl.CaptchaTraderService;
import com.rogiel.httpchannel.service.DownloadChannel;
import com.rogiel.httpchannel.service.UploaderCapability;
+import com.rogiel.httpchannel.service.uploadking.UploadKingService;
import com.rogiel.httpchannel.util.ChannelUtils;
public class UploadKingServiceTest {
diff --git a/httpchannel-service/httpchannel-service-zshare/src/main/java/com/rogiel/httpchannel/service/impl/ZShareService.java b/httpchannel-service/httpchannel-service-zshare/src/main/java/com/rogiel/httpchannel/service/zshare/ZShareService.java
similarity index 96%
rename from httpchannel-service/httpchannel-service-zshare/src/main/java/com/rogiel/httpchannel/service/impl/ZShareService.java
rename to httpchannel-service/httpchannel-service-zshare/src/main/java/com/rogiel/httpchannel/service/zshare/ZShareService.java
index 4c41a84..bfe0c71 100644
--- a/httpchannel-service/httpchannel-service-zshare/src/main/java/com/rogiel/httpchannel/service/impl/ZShareService.java
+++ b/httpchannel-service/httpchannel-service-zshare/src/main/java/com/rogiel/httpchannel/service/zshare/ZShareService.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.service.impl;
+package com.rogiel.httpchannel.service.zshare;
import com.rogiel.httpchannel.service.AbstractHttpService;
import com.rogiel.httpchannel.service.CapabilityMatrix;
diff --git a/httpchannel-service/httpchannel-service-zshare/src/main/java/com/rogiel/httpchannel/service/impl/ZShareUploaderConfiguration.java b/httpchannel-service/httpchannel-service-zshare/src/main/java/com/rogiel/httpchannel/service/zshare/ZShareUploaderConfiguration.java
similarity index 94%
rename from httpchannel-service/httpchannel-service-zshare/src/main/java/com/rogiel/httpchannel/service/impl/ZShareUploaderConfiguration.java
rename to httpchannel-service/httpchannel-service-zshare/src/main/java/com/rogiel/httpchannel/service/zshare/ZShareUploaderConfiguration.java
index 96b1f6f..6fd2478 100644
--- a/httpchannel-service/httpchannel-service-zshare/src/main/java/com/rogiel/httpchannel/service/impl/ZShareUploaderConfiguration.java
+++ b/httpchannel-service/httpchannel-service-zshare/src/main/java/com/rogiel/httpchannel/service/zshare/ZShareUploaderConfiguration.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package com.rogiel.httpchannel.service.impl;
+package com.rogiel.httpchannel.service.zshare;
import com.rogiel.httpchannel.service.AbstractUploaderConfiguration;
import com.rogiel.httpchannel.service.Uploader.DescriptionableUploaderConfiguration;
diff --git a/httpchannel-service/httpchannel-service-zshare/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service b/httpchannel-service/httpchannel-service-zshare/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
index 9b6dcd1..aeb8fe7 100644
--- a/httpchannel-service/httpchannel-service-zshare/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
+++ b/httpchannel-service/httpchannel-service-zshare/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
@@ -1 +1 @@
-com.rogiel.httpchannel.service.impl.ZShareService
\ No newline at end of file
+com.rogiel.httpchannel.service.zshare.ZShareService
\ No newline at end of file
diff --git a/httpchannel-service/pom.xml b/httpchannel-service/pom.xml
index 93d9992..0f670b7 100644
--- a/httpchannel-service/pom.xml
+++ b/httpchannel-service/pom.xml
@@ -22,6 +22,7 @@
httpchannel-service-hotfilehttpchannel-service-filesonichttpchannel-service-zshare
+ httpchannel-service-4shared
diff --git a/httpchannel-service/src/main/archetype-resources/pom.xml b/httpchannel-service/src/main/archetype-resources/pom.xml
deleted file mode 100644
index f933d96..0000000
--- a/httpchannel-service/src/main/archetype-resources/pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
- 4.0.0
-
- httpchannel-service
- com.rogiel.httpchannel
- 1.0.1-SNAPSHOT
- ..
-
- ${groupId}
- ${artifactId}
- ${version}
- jar
- HttpChannel/Service/MyService
- Provides upload access to myservice.com
-
\ No newline at end of file
diff --git a/httpchannel-service/src/main/archetype-resources/src/main/java/com/rogiel/httpchannel/service/impl/MyService.java b/httpchannel-service/src/main/archetype-resources/src/main/java/com/rogiel/httpchannel/service/impl/MyService.java
deleted file mode 100644
index 0e7ff53..0000000
--- a/httpchannel-service/src/main/archetype-resources/src/main/java/com/rogiel/httpchannel/service/impl/MyService.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.rogiel.httpchannel.service.impl;
-
-import java.io.IOException;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.regex.Pattern;
-
-import com.rogiel.httpchannel.captcha.ImageCaptcha;
-import com.rogiel.httpchannel.captcha.ReCaptchaExtractor;
-import com.rogiel.httpchannel.captcha.exception.UnsolvableCaptchaServiceException;
-import com.rogiel.httpchannel.service.AbstractAuthenticator;
-import com.rogiel.httpchannel.service.AbstractHttpService;
-import com.rogiel.httpchannel.service.AbstractUploader;
-import com.rogiel.httpchannel.service.AuthenticationService;
-import com.rogiel.httpchannel.service.Authenticator;
-import com.rogiel.httpchannel.service.AuthenticatorCapability;
-import com.rogiel.httpchannel.service.CapabilityMatrix;
-import com.rogiel.httpchannel.service.Credential;
-import com.rogiel.httpchannel.service.Service;
-import com.rogiel.httpchannel.service.ServiceID;
-import com.rogiel.httpchannel.service.ServiceMode;
-import com.rogiel.httpchannel.service.UploadChannel;
-import com.rogiel.httpchannel.service.UploadService;
-import com.rogiel.httpchannel.service.Uploader;
-import com.rogiel.httpchannel.service.UploaderCapability;
-import com.rogiel.httpchannel.service.channel.LinkedUploadChannel;
-import com.rogiel.httpchannel.service.channel.LinkedUploadChannel.LinkedUploadChannelCloseCallback;
-import com.rogiel.httpchannel.service.config.NullAuthenticatorConfiguration;
-import com.rogiel.httpchannel.service.config.NullUploaderConfiguration;
-import com.rogiel.httpchannel.service.exception.AuthenticationInvalidCredentialException;
-import com.rogiel.httpchannel.util.htmlparser.HTMLPage;
-
-/**
- * This service handles uploads to MyService.com.
- *
- * @author Rogiel
- * @since 1.0
- */
-public class DepositFilesService extends AbstractHttpService implements
- Service, UploadService {
- /**
- * This service ID
- */
- public static final ServiceID SERVICE_ID = ServiceID.create("myservice");
-
- @Override
- public ServiceID getServiceID() {
- return SERVICE_ID;
- }
-
- @Override
- public int getMajorVersion() {
- return 1;
- }
-
- @Override
- public int getMinorVersion() {
- return 0;
- }
-
- @Override
- public CapabilityMatrix getPossibleServiceModes() {
- return new CapabilityMatrix(ServiceMode.UNAUTHENTICATED);
- }
-
- @Override
- public Uploader getUploader(String filename,
- long filesize, NullUploaderConfiguration configuration) {
- return new UploaderImpl(filename, filesize, configuration);
- }
-
- @Override
- public Uploader getUploader(String filename,
- long filesize) {
- return getUploader(filename, filesize, newUploaderConfiguration());
- }
-
- @Override
- public NullUploaderConfiguration newUploaderConfiguration() {
- // no configuration
- return NullUploaderConfiguration.SHARED_INSTANCE;
- }
-
- @Override
- public long getMaximumFilesize() {
- // no limit
- return -1;
- }
-
- @Override
- public String[] getSupportedExtensions() {
- // all extensions
- return null;
- }
-
- @Override
- public CapabilityMatrix getUploadCapabilities() {
- return new CapabilityMatrix(
- UploaderCapability.UNAUTHENTICATED_UPLOAD,
- UploaderCapability.NON_PREMIUM_ACCOUNT_UPLOAD,
- UploaderCapability.PREMIUM_ACCOUNT_UPLOAD);
- }
-
- protected class UploaderImpl extends
- AbstractUploader implements
- Uploader,
- LinkedUploadChannelCloseCallback {
- private Future uploadFuture;
-
- public UploaderImpl(String filename, long filesize,
- NullUploaderConfiguration configuration) {
- super(DepositFilesService.this, filename, filesize, configuration);
- }
-
- @Override
- public UploadChannel openChannel() throws IOException {
- // TODO start upload
- final LinkedUploadChannel channel = createLinkedChannel(this);
- // TODO execute upload post
- return waitChannelLink(channel, uploadFuture);
- }
-
- @Override
- public String finish() throws IOException {
- try {
- final HTMLPage page = uploadFuture.get();
- // return download link here
- } catch (InterruptedException e) {
- return null;
- } catch (ExecutionException e) {
- throw (IOException) e.getCause();
- }
- }
- }
-}
diff --git a/httpchannel-service/src/main/archetype-resources/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service b/httpchannel-service/src/main/archetype-resources/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
deleted file mode 100644
index caaa717..0000000
--- a/httpchannel-service/src/main/archetype-resources/src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
+++ /dev/null
@@ -1 +0,0 @@
-com.rogiel.httpchannel.service.impl.MyService
\ No newline at end of file
diff --git a/httpchannel-service/src/main/resources/META-INF/maven/archetype-metadata.xml b/httpchannel-service/src/main/resources/META-INF/maven/archetype-metadata.xml
deleted file mode 100644
index 1074aae..0000000
--- a/httpchannel-service/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
- httpchannel-service
-
- src/main/java/com/rogiel/httpchannel/service/impl/MyService.java
-
-
-
- src/main/resources/META-INF/services/com.rogiel.httpchannel.service.Service
-
-
\ No newline at end of file
diff --git a/httpchannel-service/src/site/xdoc/service-table.xml b/httpchannel-service/src/site/xdoc/service-table.xml
index e1bff25..da4a360 100644
--- a/httpchannel-service/src/site/xdoc/service-table.xml
+++ b/httpchannel-service/src/site/xdoc/service-table.xml
@@ -20,6 +20,16 @@
+
DepositFiles
diff --git a/httpchannel-service/src/test/resources/upload-test-file.txt b/httpchannel-service/src/test/resources/upload-test-file.txt
new file mode 100644
index 0000000..3cfccc8
--- /dev/null
+++ b/httpchannel-service/src/test/resources/upload-test-file.txt
@@ -0,0 +1,3 @@
+This is a simple upload test file.
+
+This is for testing purposes only.
\ No newline at end of file
diff --git a/httpchannel-util/src/main/java/com/rogiel/httpchannel/util/htmlparser/HTMLPage.java b/httpchannel-util/src/main/java/com/rogiel/httpchannel/util/htmlparser/HTMLPage.java
index 613427b..41898a6 100644
--- a/httpchannel-util/src/main/java/com/rogiel/httpchannel/util/htmlparser/HTMLPage.java
+++ b/httpchannel-util/src/main/java/com/rogiel/httpchannel/util/htmlparser/HTMLPage.java
@@ -184,6 +184,11 @@ public class HTMLPage {
public String getInputValueById(final String id) {
return inputValue(filter(InputTag.class, new InputIDFilter(id)));
}
+
+ public int getInputValueByIdInt(final String id) {
+ return Integer.parseInt(inputValue(filter(InputTag.class, new InputIDFilter(id))));
+ }
+
public String getInputValue(final Pattern pattern) {
return inputValue(filter(InputTag.class, new InputValuePatternFilter(