org.javaswift.joss.model
Interface Access

All Known Implementing Classes:
AbstractAccess, AccessBasic, AccessNoTenant, AccessTenant

public interface Access

Interface that determines the kind of access that was granted to the ObjectStore. It holds the token, which must be passed to all secure calls. Also, you can get the internal and public URLs for accessing content. If you have preference for a region, this is the place to make your preference known. If a suitable region was found, the URLs will show.


Method Summary
 String getInternalURL()
          The internal URL to access resources with.
 String getPublicURL()
          The public URL of a resource.
 String getTempUrlPrefix(TempUrlHashPrefixSource tempUrlHashPrefixSource)
          Returns the first part of the object path in a TempURL.
 String getToken()
          The security token to pass to all secure ObjectStore calls.
 boolean isTenantSupplied()
          Ascertains whether tenant ID and/or name were supplied.
 void setPreferredRegion(String preferredRegion)
          The ObjectStore holds multiple regions.
 

Method Detail

setPreferredRegion

void setPreferredRegion(String preferredRegion)
The ObjectStore holds multiple regions. If you state a preference, it will choose that region (if available). You will see the result in getting the internal or public URL.

Parameters:
preferredRegion - the region where you want to access the resources

getToken

String getToken()
The security token to pass to all secure ObjectStore calls. Note that this token has a validity for a period of 24 hours. After that, you require a new token.

Returns:
the token

getInternalURL

String getInternalURL()
The internal URL to access resources with. This works on both public and private containers.

Returns:
internal URL

getPublicURL

String getPublicURL()
The public URL of a resource. This is the URL you might want to display to the outside world, expect that you may replace the domain with your own.

Returns:
public URL

isTenantSupplied

boolean isTenantSupplied()
Ascertains whether tenant ID and/or name were supplied.

Returns:
true if tenant ID and/or name were supplied before the authentication call

getTempUrlPrefix

String getTempUrlPrefix(TempUrlHashPrefixSource tempUrlHashPrefixSource)
Returns the first part of the object path in a TempURL. This is determined by the URL that serves as the source; public, internal or admin

Parameters:
tempUrlHashPrefixSource - the source URL to server as the basis for the prefix
Returns:
temp URL object path prefix


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