Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.javaswift.joss.model;
  
  
A Container is the entity that holds StoredObjects. This handle allows you to access those objects and set/get information on the container itself. To make sure a Container exists, you can call exists which places a call to the Object Store for its information. To ascertain the creation of a Container, call its create method. By calling delete, the Container is removed from the Object Store. Containers start out as private, which means that the StoredObjects in the Container can not be accessed through the public URL. Set the Container to public to be able to do this. It is also important to understand that getObject does not create an StoredObject, or otherwise place a call to the Object Store. It just returns a handle for a StoredObject.

Author(s):
Robert Bor
 
 public interface Container extends ObjectStoreEntityComparable<Container>, ListHolder<StoredObject>, ListSubject{

    
Takes a single Container and makes it public. ALL (!) the objects in the Container are now public, so be very careful exercising this option. The public URL can now be used to access objects.
 
     public void makePublic();

    
Takes a single Container and makes it private. All the objects in the Container are now private and can no longer be accessed through the public URL.
 
     public void makePrivate();

    
Creates a Container in the Account.
 
     public Container create();

    
Deletes a Container from the Account. Note that the Container must be empty in order to be deleted.
 
     public void delete();

    
Checks whether a container exists

Returns:
whether the container exists
 
     public boolean exists();

    
Returns a handle for an object. Note that this method DOES NOT create an object in the Object Store

Parameters:
name name of the object to create a handle for
Returns:
the object handle
 
     public StoredObject getObject(String name);

    
Returns an object that represents a segment of a single large object

Parameters:
name the name of the object to create a handle for
part the part of the large object that the segment represents
Returns:
the object handle
 
     public StoredObject getObjectSegment(String nameint part);

    
Returns whether the metadata of the container has been retrieved

Returns:
true if the metadata has been retrieved
 
     public boolean isInfoRetrieved();

    
Force the Account to reload its metadata
 
     public void reload();

    
The number of StoredObjects in the Container. If the Container was read by Account.list, this value will not be refetched from the server, unless caching is disabled.

Returns:
number of StoredObjects
 
     public int getCount();

    
The number of bytes stored by the StoredObjects in the Container. If the Container was read by Account.list, this value will not be refetched from the server, unless caching is disabled.

Returns:
number of bytes
 
     public long getBytesUsed();

    
Returns a signature that can be used to upload files directly from the browser, using a basic form element.

Parameters:
redirect redirection URL after the upload has succeeded
maxFileSize max number of bytes allowed to upload
maxFileCount max number of files allowed to upload
seconds number of seconds for the temporary URL to be valid
Returns:
FormPost signature for uploading an object directly from the browser
 
     public FormPost getFormPost(String redirectlong maxFileSizelong maxFileCountlong seconds);

    
Returns a number equal to pageSize of Container elements, starting with the first element after the Container named the same as marker. Note that elements are returned as DirectoryOrObject elements, because a delimiter is used.

Parameters:
prefix show only the results starting with prefix
delimiter limit the results on encountering the delimiter character (probably a slash)
marker the last element on the previous page
pageSize the number of elements to return
Returns:
collection of directories and objects
    public Collection<DirectoryOrObjectlistDirectory(String prefixCharacter delimiterString markerint pageSize);

    
Reads a directory within the passed directory

Parameters:
directory the directory to read
Returns:
collection of directories and objects within the directory
    public Collection<DirectoryOrObjectlistDirectory(Directory directory);

    
Reads all directories and object in the root of a container

Returns:
collection of directories and objects within the root
    public boolean isPublic();
    public void setCount(int count);
    public void setBytesUsed(long bytesUsed);
    public abstract Account getAccount();
    
    
    public void setContainerRights(String writePermissionsString readPermissions);
    public String getcontainerWritePermission();
    
    
Sets custom headers to be passed when creating a container. This allows you to set implementation-dependent create options to the service.

Parameters:
headers the set of headers to pass in the create request.
    public void setCustomHeaders(Collection<Headerheaders);
    
    
Gets the custom headers on this container.
New to GrepCode? Check out our FAQ X