public abstract class AbstractContainer extends AbstractObjectStoreEntity<ContainerInformation> implements Container
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
protected java.lang.String |
name |
ALLOW_CACHING, info, staleHeaders| Constructor and Description |
|---|
AbstractContainer(Account account,
java.lang.String name,
boolean allowCaching) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Container o) |
Container |
create()
Creates a Container in the Account.
|
protected Metadata |
createMetadataEntry(java.lang.String name,
java.lang.String value) |
void |
delete()
Deletes a Container from the Account.
|
boolean |
equals(java.lang.Object o) |
Account |
getAccount() |
long |
getBytesUsed()
The number of bytes stored by the StoredObjects in the Container.
|
java.lang.String |
getContainerReadPermission() |
java.lang.String |
getcontainerWritePermission() |
int |
getCount()
The number of StoredObjects in the Container.
|
java.util.Collection<Header> |
getCustomHeaders()
Gets the custom headers on this container.
|
ContainerCommandFactory |
getFactory() |
FormPost |
getFormPost(java.lang.String redirect,
long maxFileSize,
long maxFileCount,
long seconds)
Returns a signature that can be used to upload files directly from the browser, using a basic form
element.
|
protected void |
getInfo(boolean allowErrorLog) |
int |
getMaxPageSize()
The ObjectStore server will force a maximum page size.
|
java.lang.String |
getName() |
StoredObject |
getObjectSegment(java.lang.String name,
int part)
Returns an object that represents a segment of a single large object
|
PaginationMap |
getPaginationMap(int pageSize)
Returns a PaginationMap of a listing of Containers.
|
PaginationMap |
getPaginationMap(java.lang.String prefix,
int pageSize)
Returns a PaginationMap of a listing of Containers.
|
java.lang.String |
getPathForEntity() |
int |
hashCode() |
boolean |
isPublic() |
java.util.Collection<StoredObject> |
list()
Returns all the containers in an Account.
|
java.util.Collection<StoredObject> |
list(PaginationMap paginationMap,
int page)
Returns a number equal to pageSize of Container elements, starting with the first element
after the Container named the same as marker.
|
java.util.Collection<StoredObject> |
list(java.lang.String prefix,
java.lang.String marker,
int pageSize)
Returns a number equal to pageSize of Container elements, starting with the first element
after the Container named the same as marker.
|
java.util.Collection<DirectoryOrObject> |
listDirectory()
Reads all directories and object in the root of a container
|
java.util.Collection<DirectoryOrObject> |
listDirectory(Directory directory)
Reads a directory within the passed directory
|
java.util.Collection<DirectoryOrObject> |
listDirectory(java.lang.String prefix,
java.lang.Character delimiter,
java.lang.String marker,
int pageSize)
Returns a number equal to pageSize of Container elements, starting with the first element
after the Container named the same as marker.
|
void |
makePrivate()
Takes a single Container and makes it private.
|
void |
makePublic()
Takes a single Container and makes it public.
|
void |
metadataSetFromHeaders()
Declares to the ListSubject that a number of fields have been read from the list operation
and therefore do not have to be fetched individually, unless caching is turned off.
|
protected void |
saveSpecificMetadata() |
void |
setBytesUsed(long bytesUsed) |
void |
setContainerRights(boolean publicContainer) |
void |
setContainerRights(java.lang.String writePermissions,
java.lang.String readPermissions) |
void |
setCount(int count) |
void |
setCustomHeaders(java.util.Collection<Header> headers)
Sets custom headers to be passed when creating a container.
|
void |
uploadSegmentedObjects(java.lang.String name,
UploadInstructions uploadInstructions) |
checkForInfo, checkForInfo, checkForInfoAndAllowHeaderSet, checkForInfoDisallowErrorLog, exists, getMetadata, getMetadata, getPath, invalidate, isAllowCaching, isInfoRetrieved, isStale, reload, removeAndDoNotSaveMetadata, removeAndSaveMetadata, saveMetadata, setAndDoNotSaveMetadata, setAndSaveMetadata, setInfoRetrieved, setMetadataclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitexists, getObject, isInfoRetrieved, reloadgetMetadata, getMetadata, getPath, removeAndDoNotSaveMetadata, removeAndSaveMetadata, saveMetadata, setAndDoNotSaveMetadata, setAndSaveMetadata, setMetadatapublic static final org.slf4j.Logger LOG
protected final java.lang.String name
public AbstractContainer(Account account, java.lang.String name, boolean allowCaching)
public java.util.Collection<StoredObject> list()
ListHolderlist in interface ListHolder<StoredObject>public java.util.Collection<StoredObject> list(PaginationMap paginationMap, int page)
ListHolderlist in interface ListHolder<StoredObject>paginationMap - the map that is fetched with getPaginationMap and maps from page to markerpage - the page to return the Containers forpublic java.util.Collection<StoredObject> list(java.lang.String prefix, java.lang.String marker, int pageSize)
ListHolderlist in interface ListHolder<StoredObject>prefix - show only the results starting with prefixmarker - the last element on the previous pagepageSize - the number of elements to returnpublic java.util.Collection<DirectoryOrObject> listDirectory(java.lang.String prefix, java.lang.Character delimiter, java.lang.String marker, int pageSize)
ContainerlistDirectory in interface Containerprefix - show only the results starting with prefixdelimiter - limit the results on encountering the delimiter character (probably a slash)marker - the last element on the previous pagepageSize - the number of elements to returnpublic java.util.Collection<DirectoryOrObject> listDirectory(Directory directory)
ContainerlistDirectory in interface Containerdirectory - the directory to readpublic java.util.Collection<DirectoryOrObject> listDirectory()
ContainerlistDirectory in interface Containerpublic void metadataSetFromHeaders()
ListSubjectmetadataSetFromHeaders in interface ListSubjectpublic PaginationMap getPaginationMap(java.lang.String prefix, int pageSize)
ListHoldergetPaginationMap in interface ListHolder<StoredObject>prefix - the names must start with the prefix or else will be filtered outpageSize - number of elements on a single pagepublic PaginationMap getPaginationMap(int pageSize)
ListHoldergetPaginationMap in interface ListHolder<StoredObject>pageSize - number of elements on a single pagepublic StoredObject getObjectSegment(java.lang.String name, int part)
ContainergetObjectSegment in interface Containername - the name of the object to create a handle forpart - the part of the large object that the segment representspublic int getCount()
ContainergetCount in interface ContainergetCount in interface ListHolder<StoredObject>public long getBytesUsed()
ContainergetBytesUsed in interface Containerpublic FormPost getFormPost(java.lang.String redirect, long maxFileSize, long maxFileCount, long seconds)
ContainergetFormPost in interface Containerredirect - redirection URL after the upload has succeededmaxFileSize - max number of bytes allowed to uploadmaxFileCount - max number of files allowed to uploadseconds - number of seconds for the temporary URL to be validpublic void setBytesUsed(long bytesUsed)
setBytesUsed in interface Containerpublic java.lang.String getContainerReadPermission()
getContainerReadPermission in interface Containerpublic java.lang.String getcontainerWritePermission()
getcontainerWritePermission in interface Containerpublic java.lang.String getName()
getName in interface ListSubjectpublic Account getAccount()
getAccount in interface Containerpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int compareTo(Container o)
compareTo in interface java.lang.Comparable<Container>protected Metadata createMetadataEntry(java.lang.String name, java.lang.String value)
createMetadataEntry in class AbstractObjectStoreEntity<ContainerInformation>public void uploadSegmentedObjects(java.lang.String name,
UploadInstructions uploadInstructions)
public int getMaxPageSize()
ListHoldergetMaxPageSize in interface ListHolder<StoredObject>public ContainerCommandFactory getFactory()
public void makePublic()
ContainermakePublic in interface Containerpublic void makePrivate()
ContainermakePrivate in interface Containerpublic void setContainerRights(boolean publicContainer)
public void setContainerRights(java.lang.String writePermissions,
java.lang.String readPermissions)
setContainerRights in interface Containerpublic Container create()
Containerpublic void delete()
Containerprotected void saveSpecificMetadata()
saveSpecificMetadata in class AbstractObjectStoreEntity<ContainerInformation>protected void getInfo(boolean allowErrorLog)
getInfo in class AbstractObjectStoreEntity<ContainerInformation>public java.lang.String getPathForEntity()
throws java.io.UnsupportedEncodingException
getPathForEntity in class AbstractObjectStoreEntity<ContainerInformation>java.io.UnsupportedEncodingExceptionpublic void setCustomHeaders(java.util.Collection<Header> headers)
ContainersetCustomHeaders in interface Containerheaders - the set of headers to pass in the create request.public java.util.Collection<Header> getCustomHeaders()
ContainergetCustomHeaders in interface ContainerCopyright © 2012-2020 42 BV. All Rights Reserved.