
nl.tweeenveertig.openstack.command.object.AbstractObjectCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of joss Show documentation
Show all versions of joss Show documentation
Java Client library for OpenStack Storage (Swift)
package nl.tweeenveertig.openstack.command.object;
import nl.tweeenveertig.openstack.command.identity.access.AccessImpl;
import nl.tweeenveertig.openstack.model.Account;
import nl.tweeenveertig.openstack.command.core.AbstractSecureCommand;
import nl.tweeenveertig.openstack.model.Container;
import nl.tweeenveertig.openstack.model.StoredObject;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpRequestBase;
public abstract class AbstractObjectCommand extends AbstractSecureCommand {
public AbstractObjectCommand(Account account, HttpClient httpClient, AccessImpl access, StoredObject object) {
super(account, httpClient, access.getInternalURL() + getObjectPath(object), access.getToken());
}
protected static String getObjectPath(StoredObject object) {
return "/" + object.getPath();
}
}