org.javaswift.joss.swift
Class Swift

java.lang.Object
  extended by org.javaswift.joss.swift.Swift

public class Swift
extends Object

Mock implementation of the Swift Object Store


Constructor Summary
Swift()
           
 
Method Summary
 void addIgnore()
           
 void addIgnore(Class<? extends CommandMock> ignoreClass)
           
 void addStatus(Class<? extends CommandMock> clazz, int status)
           
 void addStatus(int status)
           
 SwiftResult<Access> authenticate(String tenantName, String tenantId, String username, String password)
           
protected  void closeStreams(InputStream is, OutputStream os)
           
 SwiftResult<Object> copyObject(Container sourceContainer, StoredObject sourceObject, Container targetContainer, StoredObject targetObject)
           
 SwiftResult<Object> createContainer(String name)
           
 SwiftResult<String[]> deleteContainer(String name)
           
 SwiftResult<Object> deleteObject(Container container, StoredObject object)
           
 SwiftResult<byte[]> downloadObject(Container container, StoredObject object, DownloadInstructions downloadInstructions)
           
 SwiftResult<Object> downloadObject(Container container, StoredObject object, File targetFile, DownloadInstructions downloadInstructions)
           
 SwiftResult<InputStream> downloadObjectAsInputStream(Container container, StoredObject object, DownloadInstructions downloadInstructions)
           
 SwiftResult<AccountInformation> getAccountInformation()
           
 SwiftContainer getContainer(String name)
           
 SwiftResult<ContainerInformation> getContainerInformation(String name)
           
 ObjectDeleter getCurrentObjectDeleter()
           
 String getHashPassword()
           
 long getMillisDelay()
           
 SwiftResult<ObjectInformation> getObjectInformation(Container container, StoredObject object)
           
 String getPrivateHost()
           
 String getPublicHost()
           
 int getStatus(Class<? extends CommandMock> clazz)
           
 SwiftResult<Tenants> getTenant()
           
 MockUserStore getUserStore()
           
 boolean isObjectDeleterActive()
           
 boolean isTenantSupplied()
           
 SwiftResult<Collection<Container>> listContainers(Account account, ListInstructions listInstructions)
           
 SwiftResult<Collection<StoredObject>> listObjects(Container container, ListInstructions listInstructions)
           
protected  byte[] mergeSegmentedObjects(ObjectManifest objectManifest)
           
 SwiftResult<Object> saveContainerMetadata(String name, Collection<? extends Header> headers)
           
 SwiftResult<Object> saveHashPassword(String hashPassword)
           
 SwiftResult<Object> saveMetadata(Collection<? extends Header> headers)
           
 SwiftResult<Object> saveObjectMetadata(Container container, StoredObject object, Collection<? extends Header> headers)
           
 Swift setAllowObjectDeleter(boolean allowObjectDeleter)
           
 SwiftResult<String[]> setContainerPrivacy(String name, boolean publicContainer)
           
 Swift setMillisDelay(long millisDelay)
           
 Swift setObjectDeleterIntervalSeconds(int objectDeleterIntervalSeconds)
           
 Swift setObjectDeleterStartAfterSeconds(int objectDeleterStartAfterSeconds)
           
 Swift setOnFileObjectStore(String onFileObjectStore)
           
 Swift setPrivateHost(String privateHost)
           
 Swift setPublicHost(String publicHost)
           
 Swift setTenantSupplied(String tenantId, String tenantName)
           
 Swift setUserStore(MockUserStore users)
           
 SwiftResult<Object> uploadObject(Container container, StoredObject object, UploadInstructions uploadInstructions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Swift

public Swift()
Method Detail

setOnFileObjectStore

public Swift setOnFileObjectStore(String onFileObjectStore)

isObjectDeleterActive

public boolean isObjectDeleterActive()

getCurrentObjectDeleter

public ObjectDeleter getCurrentObjectDeleter()

setAllowObjectDeleter

public Swift setAllowObjectDeleter(boolean allowObjectDeleter)

setUserStore

public Swift setUserStore(MockUserStore users)

getUserStore

public MockUserStore getUserStore()

setPublicHost

public Swift setPublicHost(String publicHost)

setPrivateHost

public Swift setPrivateHost(String privateHost)

setMillisDelay

public Swift setMillisDelay(long millisDelay)

setObjectDeleterStartAfterSeconds

public Swift setObjectDeleterStartAfterSeconds(int objectDeleterStartAfterSeconds)

setObjectDeleterIntervalSeconds

public Swift setObjectDeleterIntervalSeconds(int objectDeleterIntervalSeconds)

setTenantSupplied

public Swift setTenantSupplied(String tenantId,
                               String tenantName)

getTenant

public SwiftResult<Tenants> getTenant()

addIgnore

public void addIgnore()

addIgnore

public void addIgnore(Class<? extends CommandMock> ignoreClass)

addStatus

public void addStatus(int status)

addStatus

public void addStatus(Class<? extends CommandMock> clazz,
                      int status)

getStatus

public int getStatus(Class<? extends CommandMock> clazz)

getHashPassword

public String getHashPassword()

authenticate

public SwiftResult<Access> authenticate(String tenantName,
                                        String tenantId,
                                        String username,
                                        String password)

listContainers

public SwiftResult<Collection<Container>> listContainers(Account account,
                                                         ListInstructions listInstructions)

getPublicHost

public String getPublicHost()

getPrivateHost

public String getPrivateHost()

getAccountInformation

public SwiftResult<AccountInformation> getAccountInformation()

saveMetadata

public SwiftResult<Object> saveMetadata(Collection<? extends Header> headers)

saveHashPassword

public SwiftResult<Object> saveHashPassword(String hashPassword)

getContainer

public SwiftContainer getContainer(String name)

createContainer

public SwiftResult<Object> createContainer(String name)

deleteContainer

public SwiftResult<String[]> deleteContainer(String name)

getContainerInformation

public SwiftResult<ContainerInformation> getContainerInformation(String name)

saveContainerMetadata

public SwiftResult<Object> saveContainerMetadata(String name,
                                                 Collection<? extends Header> headers)

setContainerPrivacy

public SwiftResult<String[]> setContainerPrivacy(String name,
                                                 boolean publicContainer)

listObjects

public SwiftResult<Collection<StoredObject>> listObjects(Container container,
                                                         ListInstructions listInstructions)

uploadObject

public SwiftResult<Object> uploadObject(Container container,
                                        StoredObject object,
                                        UploadInstructions uploadInstructions)

copyObject

public SwiftResult<Object> copyObject(Container sourceContainer,
                                      StoredObject sourceObject,
                                      Container targetContainer,
                                      StoredObject targetObject)

deleteObject

public SwiftResult<Object> deleteObject(Container container,
                                        StoredObject object)

saveObjectMetadata

public SwiftResult<Object> saveObjectMetadata(Container container,
                                              StoredObject object,
                                              Collection<? extends Header> headers)

getObjectInformation

public SwiftResult<ObjectInformation> getObjectInformation(Container container,
                                                           StoredObject object)

downloadObject

public SwiftResult<byte[]> downloadObject(Container container,
                                          StoredObject object,
                                          DownloadInstructions downloadInstructions)

downloadObject

public SwiftResult<Object> downloadObject(Container container,
                                          StoredObject object,
                                          File targetFile,
                                          DownloadInstructions downloadInstructions)

closeStreams

protected void closeStreams(InputStream is,
                            OutputStream os)

downloadObjectAsInputStream

public SwiftResult<InputStream> downloadObjectAsInputStream(Container container,
                                                            StoredObject object,
                                                            DownloadInstructions downloadInstructions)

mergeSegmentedObjects

protected byte[] mergeSegmentedObjects(ObjectManifest objectManifest)

getMillisDelay

public long getMillisDelay()

isTenantSupplied

public boolean isTenantSupplied()


Copyright © 2012-2014 42 BV. All Rights Reserved.