|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.rackspacecloud.client.cloudfiles.FilesContainer
public class FilesContainer
Field Summary | |
---|---|
protected FilesClient |
client
|
protected static org.apache.log4j.Logger |
logger
|
protected java.lang.String |
name
|
protected java.util.List<FilesObject> |
objects
|
Constructor Summary | |
---|---|
FilesContainer(java.lang.String name,
FilesClient client)
|
|
FilesContainer(java.lang.String name,
java.util.List<FilesObject> objs,
FilesClient client)
Note, this does not actually create a container on the server |
Method Summary | |
---|---|
boolean |
addObject(java.io.File f,
java.lang.String mimeType)
Adds a new object to the container |
void |
createContainer()
Creates the container represented by this instance on the server |
FilesClient |
getClient()
Returns the instance of the client we're using |
FilesContainerInfo |
getInfo()
Get useful information on this container |
java.lang.String |
getName()
Get the name of the container |
java.util.List<FilesObject> |
getObjects()
Returns the contents of this container |
java.util.List<FilesObject> |
getObjects(java.lang.String path)
Returns the contents of this container |
void |
setName(java.lang.String name)
Set the name of the container |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected java.util.List<FilesObject> objects
protected FilesClient client
protected static org.apache.log4j.Logger logger
Constructor Detail |
---|
public FilesContainer(java.lang.String name, java.util.List<FilesObject> objs, FilesClient client)
name
- The name of the containerobjs
- The objects in that containerclient
- The client we are currently usingpublic FilesContainer(java.lang.String name, FilesClient client)
name
- The name of the containerclient
- A logged in clientMethod Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The new namepublic java.util.List<FilesObject> getObjects() throws java.io.IOException, FilesAuthorizationException, FilesException
org.apache.http.HttpException
- There was a problem communicating with the server
java.io.IOException
- There was a problem communicating with the server
FilesAuthorizationException
FilesInvalidNameException
FilesException
public java.util.List<FilesObject> getObjects(java.lang.String path) throws org.apache.http.HttpException, java.io.IOException, FilesAuthorizationException, FilesException
path
- Limit the results to files under the following path
org.apache.http.HttpException
- There was a problem communicating with the server
java.io.IOException
- There was a problem communicating with the server
FilesAuthorizationException
FilesInvalidNameException
FilesException
public FilesContainerInfo getInfo() throws org.apache.http.HttpException, java.io.IOException, FilesException
org.apache.http.HttpException
- There was a problem communicating with the server
java.io.IOException
- There was a problem communicating with the server
FilesException
public FilesClient getClient()
public boolean addObject(java.io.File f, java.lang.String mimeType) throws java.security.NoSuchAlgorithmException, java.io.IOException, FilesAuthorizationException, FilesException
f
- The file for this objectmimeType
- It's MIME type
java.security.NoSuchAlgorithmException
- The MD5 implementation is not installed in the client
java.io.IOException
FilesAuthorizationException
FilesInvalidNameException
FilesException
public void createContainer() throws org.apache.http.HttpException, java.io.IOException, FilesAuthorizationException, FilesException
org.apache.http.HttpException
java.io.IOException
FilesAuthorizationException
FilesInvalidNameException
FilesException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |