|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.javaswift.joss.client.core.AbstractObjectStoreEntity<AccountInformation>
org.javaswift.joss.client.core.AbstractAccount
public abstract class AbstractAccount
Field Summary | |
---|---|
static org.slf4j.Logger |
LOG
|
Fields inherited from class org.javaswift.joss.client.core.AbstractObjectStoreEntity |
---|
ALLOW_CACHING, info, staleHeaders |
Constructor Summary | |
---|---|
AbstractAccount(AccountCommandFactory commandFactory,
ContainerFactory<Container> containerFactory,
ContainerFactory<Website> websiteFactory,
boolean allowCaching)
|
Method Summary | |
---|---|
Access |
authenticate()
Trigger the authentication against Object Store. |
protected Metadata |
createMetadataEntry(String name,
String value)
|
long |
getActualServerTimeInSeconds(long seconds)
Calculate the server time taking into account the number of seconds passed. |
long |
getBytesUsed()
The number of bytes stored by the StoredObjects in all Containers in the Account. |
Container |
getContainer(String containerName)
Returns a handle for a container. |
int |
getCount()
The number of child entities (ListSubjects) that are being held by the ListHolder |
AccountCommandFactory |
getFactory()
|
String |
getHashPassword()
Returns the hash password originally set on Account. |
protected void |
getInfo(boolean allowErrorLog)
|
int |
getMaxPageSize()
The ObjectStore server will force a maximum page size. |
int |
getNumberOfCalls()
Returns the number of HTTP calls that have been made to the ObjectStore server. |
int |
getObjectCount()
The number of StoredObjects in all Containers in the Account. |
String |
getOriginalHost()
Returns the original host, regardless of the configured public and private host settings |
PaginationMap |
getPaginationMap(int pageSize)
Returns a PaginationMap of a listing of Containers. |
PaginationMap |
getPaginationMap(String prefix,
int pageSize)
Returns a PaginationMap of a listing of Containers. |
String |
getPathForEntity()
|
String |
getPrivateURL()
Returns the private URL which is used for the underlying stored objects |
String |
getPublicURL()
Returns the public URL which is used for the underlying stored objects |
long |
getServerTime()
Returns the server time in milliseconds since 1970 |
Tenants |
getTenants()
Returns the tenants of the account. |
Website |
getWebsite(String containerName)
Returns a handle for a website. |
void |
increaseCallCounter()
Increase the call counter which tracks how many calls are made to the ObjectStore |
boolean |
isAllowReauthenticate()
Whether reauthentication on expiration of the authentication token is allowed, or this is done manually by the client |
boolean |
isTenantSupplied()
Checks whether a tenant ID and/or name were supplied. |
Collection<Container> |
list()
Returns all the containers in an Account. |
Collection<Container> |
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. |
Collection<Container> |
list(String prefix,
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 |
resetContainerCache()
Empties the Container Cache |
protected void |
saveSpecificMetadata()
|
AbstractAccount |
setAllowContainerCaching(boolean allowContainerCaching)
If ContainerCaching is enabled, Account will keep track of its Container instances and reuse them. |
AbstractAccount |
setAllowReauthenticate(boolean allowReauthenticate)
An ObjectStore authentication token will expire after 24 hours. |
AbstractAccount |
setHashPassword(String hashPassword)
Saves the password to the Account. |
AbstractAccount |
setPrivateHost(String privateHost)
Set your own private host to prefix the public URLs of objects |
AbstractAccount |
setPublicHost(String publicHost)
Set your own public host to prefix the public URLs of objects |
void |
synchronizeWithServerTime()
Compares the local time to the server time and maintains a number of milliseconds to account for the difference. |
Methods inherited from class org.javaswift.joss.client.core.AbstractObjectStoreEntity |
---|
checkForInfo, checkForInfo, checkForInfoAndAllowHeaderSet, checkForInfoDisallowErrorLog, exists, getMetadata, getMetadata, getPath, invalidate, isAllowCaching, isInfoRetrieved, isStale, reload, removeAndDoNotSaveMetadata, removeAndSaveMetadata, saveMetadata, setAndDoNotSaveMetadata, setAndSaveMetadata, setInfoRetrieved, setMetadata |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.javaswift.joss.model.Account |
---|
reload |
Methods inherited from interface org.javaswift.joss.model.ObjectStoreEntity |
---|
getMetadata, getMetadata, getPath, removeAndDoNotSaveMetadata, removeAndSaveMetadata, saveMetadata, setAndDoNotSaveMetadata, setAndSaveMetadata, setMetadata |
Field Detail |
---|
public static final org.slf4j.Logger LOG
Constructor Detail |
---|
public AbstractAccount(AccountCommandFactory commandFactory, ContainerFactory<Container> containerFactory, ContainerFactory<Website> websiteFactory, boolean allowCaching)
Method Detail |
---|
public Collection<Container> list()
ListHolder
list
in interface ListHolder<Container>
public Collection<Container> list(PaginationMap paginationMap, int page)
ListHolder
list
in interface ListHolder<Container>
paginationMap
- the map that is fetched with getPaginationMap and maps from page to markerpage
- the page to return the Containers for
public Collection<Container> list(String prefix, String marker, int pageSize)
ListHolder
list
in interface ListHolder<Container>
marker
- the last element on the previous pagepageSize
- the number of elements to return
public PaginationMap getPaginationMap(String prefix, int pageSize)
ListHolder
getPaginationMap
in interface ListHolder<Container>
prefix
- the names must start with the prefix or else will be filtered outpageSize
- number of elements on a single page
public PaginationMap getPaginationMap(int pageSize)
ListHolder
getPaginationMap
in interface ListHolder<Container>
pageSize
- number of elements on a single page
public String getHashPassword()
Account
getHashPassword
in interface Account
public AbstractAccount setHashPassword(String hashPassword)
Account
setHashPassword
in interface Account
hashPassword
- the password to use for generating the hashespublic AbstractAccount setPublicHost(String publicHost)
Account
setPublicHost
in interface Account
publicHost
- host of an object's public URL
public AbstractAccount setPrivateHost(String privateHost)
Account
setPrivateHost
in interface Account
privateHost
- host of an object's private URL
public AbstractAccount setAllowReauthenticate(boolean allowReauthenticate)
Account
setAllowReauthenticate
in interface Account
allowReauthenticate
- whether reauthentication is allowed
public AbstractAccount setAllowContainerCaching(boolean allowContainerCaching)
Account
setAllowContainerCaching
in interface Account
allowContainerCaching
- whether container caching is allowedpublic boolean isAllowReauthenticate()
Account
isAllowReauthenticate
in interface Account
public int getCount()
ListHolder
getCount
in interface ListHolder<Container>
public long getBytesUsed()
Account
getBytesUsed
in interface Account
public int getObjectCount()
Account
getObjectCount
in interface Account
public long getServerTime()
Account
getServerTime
in interface Account
public long getActualServerTimeInSeconds(long seconds)
Account
getActualServerTimeInSeconds
in interface Account
seconds
- number of seconds after the actual server time
public void synchronizeWithServerTime()
Account
synchronizeWithServerTime
in interface Account
protected Metadata createMetadataEntry(String name, String value)
createMetadataEntry
in class AbstractObjectStoreEntity<AccountInformation>
public int getMaxPageSize()
ListHolder
getMaxPageSize
in interface ListHolder<Container>
public void increaseCallCounter()
Account
increaseCallCounter
in interface Account
public int getNumberOfCalls()
Account
getNumberOfCalls
in interface Account
public AccountCommandFactory getFactory()
public Access authenticate()
Account
authenticate
in interface Account
public String getPublicURL()
Account
getPublicURL
in interface Account
public String getPrivateURL()
Account
getPrivateURL
in interface Account
protected void saveSpecificMetadata()
saveSpecificMetadata
in class AbstractObjectStoreEntity<AccountInformation>
protected void getInfo(boolean allowErrorLog)
getInfo
in class AbstractObjectStoreEntity<AccountInformation>
public Tenants getTenants()
Account
getTenants
in interface Account
public boolean isTenantSupplied()
Account
isTenantSupplied
in interface Account
public String getPathForEntity() throws UnsupportedEncodingException
getPathForEntity
in class AbstractObjectStoreEntity<AccountInformation>
UnsupportedEncodingException
public Container getContainer(String containerName)
Account
getContainer
in interface Account
containerName
- name of the container to create a handle for
public Website getWebsite(String containerName)
Account
getWebsite
in interface Account
containerName
- name of the website to create a handle for
public void resetContainerCache()
Account
resetContainerCache
in interface Account
public String getOriginalHost()
Account
getOriginalHost
in interface Account
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |