com.esri.core.portal
Class PortalInfo

java.lang.Object
  extended by com.esri.core.portal.PortalInfo

public class PortalInfo
extends Object

Class used to hold some information about the Portal such as default basemap, featured groups, etc. If the user is not logged in this call will return some defaults. If the user is logged in, the account information returned will be specific to the user's account.

Since:
1.0

Nested Class Summary
static class PortalInfo.GeocodeServiceInfo
           
static class PortalInfo.HelperServices
           
 
Method Summary
 byte[] fetchOrganizationThumbnail()
          Starts a process that fetches the organization thumbnail from the portal.
 void fetchOrganizationThumbnail(PortalListener<byte[]> portalListener)
          Deprecated. please use fetchOrganizationThumbnail() instead.
 byte[] fetchPortalThumbnail()
          Fetches the portal thumbnail from the portal.
 void fetchPortalThumbnail(PortalListener<byte[]> portalListener)
          Deprecated. please use fetchPortalThumbnail() instead.
static PortalInfo fromJson(org.codehaus.jackson.JsonParser parser, Portal portal)
          Creates a PortalInfo from the Json Parser.
 PortalAccess getAccess()
          Returns the access level of the Portal or Organization.
 String getBasemapGalleryGroupQuery()
          Returns the query used to determine which group should drive the gallery of basemaps displayed in the client application for the specified culture.
 String getCustomBaseURL()
          Gets the custom base url for the portal.
 BaseMap getDefaultBaseMap()
          Returns the default basemap to be used by the client application for the specified culture when creating new maps (if applicable).
 MapGeometry getDefaultExtent()
          Returns the default extent to be used by the client application for the specified culture when creating new maps (if applicable).
 List<String> getFeaturedGroupsQueries()
          Returns an array of featured groups to possibly display on the group page or to feature for an organization.
 String getFeaturedItemsGroupQuery()
          Returns the query used to determine which group should drive the gallery of featured items displayed in the client application for the specified culture.
 PortalInfo.HelperServices getHelperServices()
          Gets the helper services information.
 String getHomepageFeaturedContentGroupQuery()
          Returns the pre-defined query string for finding homepage featured items group on the portal.
 String getIpCountryCode()
          Gets the ip country code.
 String getOrganizationDescription()
          Returns the description of the organization.
 String getOrganizationId()
          Returns the id of the organization, if the user belongs to one.
 String getOrganizationName()
          Returns the name of the organization.
 String getOrganizationThumbnailFileName()
          Returns the filename for the organization's thumbnail.
 Portal getPortal()
          Returns the Portal from which this PortalInfo was generated.
 PortalMode getPortalMode()
          Indicates whether the portal is single or multi tenant mode of the Portal.
 String getPortalName()
          Returns the name of the Portal.
 String getPortalThumbnailFileName()
          Returns the filename for the portal's thumbnail.
 String getUrlKey()
          Gets the urlKey of the PortalInfo.
 boolean isCanSearchPublic()
          Includes or excludes public items, groups, and users in search queries.
 boolean isCanSharePublic()
          Allows or disallows an organization to share groups or items publicly. false denotes that content can not be shared with everyone. true is the default.
 boolean isShowHomePageDescription()
          Returns whether or not the organization's description should be shown.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

fetchOrganizationThumbnail

@Deprecated
public void fetchOrganizationThumbnail(PortalListener<byte[]> portalListener)
Deprecated. please use fetchOrganizationThumbnail() instead.

Fetches the organization thumbnail from the portal. Implement the callback listener to receieve the thumbnails and check for errors.

Parameters:
portalListener - - fetches the thumbnail associated with an organization as a byte array.
Since:
1.0

fetchOrganizationThumbnail

public byte[] fetchOrganizationThumbnail()
                                  throws Exception
Starts a process that fetches the organization thumbnail from the portal. Implement this method inside an AsycTask, create a bitmap from the byte array, add it to an imageview to see the image. Before calling this method, verify the thumbnail file name is not null.

Returns:
the byte[]
Throws:
Exception - if unable to complete the request.
Since:
1.0

fetchPortalThumbnail

@Deprecated
public void fetchPortalThumbnail(PortalListener<byte[]> portalListener)
Deprecated. please use fetchPortalThumbnail() instead.

Fetches the portal thumbnail from the portal. Implement the callback listener to receieve the thumbnails and check for errors.

Parameters:
portalListener - fetches the thumbnail associated with a portal as a byte array.
Since:
1.0

fetchPortalThumbnail

public byte[] fetchPortalThumbnail()
                            throws Exception
Fetches the portal thumbnail from the portal. Implement the callback listener to receieve the thumbnails and check for errors.

Returns:
the byte[]
Throws:
Exception - if unable to complete the request.
Since:
1.0

fromJson

public static PortalInfo fromJson(org.codehaus.jackson.JsonParser parser,
                                  Portal portal)
                           throws Exception
Creates a PortalInfo from the Json Parser.

Parameters:
parser - the json to parse the PortalInfo out.
portal - the Portal which contains the PortalInfo.
Returns:
returns a new PortalInfo or null if the json is invalid.
Throws:
Exception - if unable to complete the request.
Since:
1.0

getPortal

public Portal getPortal()
Returns the Portal from which this PortalInfo was generated.

Returns:
The Portal from which this PortalInfo was generated
Since:
1.0

getBasemapGalleryGroupQuery

public String getBasemapGalleryGroupQuery()
Returns the query used to determine which group should drive the gallery of basemaps displayed in the client application for the specified culture.

Returns:
The query used to determine which group should drive the gallery of basemaps displayed in the client application for the specified culture
Since:
1.0

getHomepageFeaturedContentGroupQuery

public String getHomepageFeaturedContentGroupQuery()
Returns the pre-defined query string for finding homepage featured items group on the portal.

Returns:
The pre-defined query string for finding homepage featured items group on the portal
Since:
1.0

getDefaultBaseMap

public BaseMap getDefaultBaseMap()
Returns the default basemap to be used by the client application for the specified culture when creating new maps (if applicable).

Returns:
The default basemap to be used by the client application for the specified culture when creating new maps (if applicable)
Since:
1.0

getDefaultExtent

public MapGeometry getDefaultExtent()
Returns the default extent to be used by the client application for the specified culture when creating new maps (if applicable).

Returns:
The default extent to be used by the client application for the specified culture when creating new maps (if applicable)
Since:
1.0

getOrganizationDescription

public String getOrganizationDescription()
Returns the description of the organization. In the case of non-organizational users of ArcGIS Online or a multi-tenant portal, this will be null.

Returns:
The description of the organization. In the case of non-organizational users of ArcGIS Online or a multi-tenant portal, this will be null
Since:
1.0

getFeaturedGroupsQueries

public List<String> getFeaturedGroupsQueries()
Returns an array of featured groups to possibly display on the group page or to feature for an organization. This is an array of title and owner which can be used to search for these groups or setup links to them.

Returns:
An array of featured groups to possibly display on the group page or to feature for an organization
Since:
1.0

getFeaturedItemsGroupQuery

public String getFeaturedItemsGroupQuery()
Returns the query used to determine which group should drive the gallery of featured items displayed in the client application for the specified culture.

Returns:
The query used to determine which group should drive the gallery of featured items displayed in the client application for the specified culture
Since:
1.0

getOrganizationId

public String getOrganizationId()
Returns the id of the organization, if the user belongs to one.

Returns:
The id of the organization, if the user belongs to one
Since:
1.0

getOrganizationName

public String getOrganizationName()
Returns the name of the organization. In the case of non-organizational users of ArcGIS Online or a multi-tenant portal this will be null.

Returns:
The name of the organization
Since:
1.0

getPortalName

public String getPortalName()
Returns the name of the Portal.

Returns:
The name of the portal
Since:
1.0

getHelperServices

public PortalInfo.HelperServices getHelperServices()
Gets the helper services information.

Returns:
the helper services information
Since:
10.1.1

getPortalThumbnailFileName

public String getPortalThumbnailFileName()
Returns the filename for the portal's thumbnail. Will be null if no thumbnail is set.

Returns:
The filename for the portal's thumbnail
Since:
1.0

isShowHomePageDescription

public boolean isShowHomePageDescription()
Returns whether or not the organization's description should be shown.

Returns:
Whether or not the organization's description should be shown
Since:
1.0

getOrganizationThumbnailFileName

public String getOrganizationThumbnailFileName()
Returns the filename for the organization's thumbnail. Will be null if no thumbnail is set.

Returns:
The filename for the organization's thumbnail
Since:
1.0

getAccess

public PortalAccess getAccess()
Returns the access level of the Portal or Organization.

Returns:
The access level of the Portal or Organization
Since:
1.0

getPortalMode

public PortalMode getPortalMode()
Indicates whether the portal is single or multi tenant mode of the Portal. A multi tenant portal supports organization subscriptions, but a single tenant does not.

Returns:
The tenancy mode of the Portal
Since:
1.0

getUrlKey

public String getUrlKey()
Gets the urlKey of the PortalInfo. The urlKey is the prefix selected by the organization's administrator to be used with the customBaseURL.

Returns:
Returns the urlKey.
Since:
1.0

getCustomBaseURL

public String getCustomBaseURL()
Gets the custom base url for the portal. The portion of the URL's host component that identifies a specific organization subscription within a portal. For example, http://./

Returns:
Returns the customBaseURL.
Since:
1.0

isCanSearchPublic

public boolean isCanSearchPublic()
Includes or excludes public items, groups, and users in search queries. When canSearchPublic is false, no public items outside of the organization are included in searches. However, public items which are part of the organization are returned. The default is true.

Returns:
Returns the true if it can be search.
Since:
10.1.1

isCanSharePublic

public boolean isCanSharePublic()
Allows or disallows an organization to share groups or items publicly. false denotes that content can not be shared with everyone. true is the default.

Returns:
returns true if the sharing is allowed.
Since:
1.0

getIpCountryCode

public String getIpCountryCode()
Gets the ip country code.

Returns:
the ip country code
Since:
10.1.1

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.