Class PortalInfo
- java.lang.Object
-
- com.esri.arcgisruntime.portal.PortalInfo
-
- All Implemented Interfaces:
JsonSerializable
public final class PortalInfo extends Object implements JsonSerializable
Provides information about aPortal
as seen by the current user, anonymous or logged in. If no user is logged in, it provides a default view of the portal. If a user is logged in, it provides a view that is specific to the organization to which the user belongs.- Since:
- 100.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PortalInfo.Access
Signifies the level of access to a portal or organization for anonymous users.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ListenableFuture<byte[]>
fetchOrganizationThumbnailAsync()
Executes an asynchronous operation to fetch the thumbnail for the organization.ListenableFuture<byte[]>
fetchPortalThumbnailAsync()
Executes an asynchronous operation to fetch the thumbnail for this portal.static PortalInfo
fromJson(String json, Portal portal)
Creates a PortalInfo instance from a JSON string.PortalInfo.Access
getAccess()
Gets the level of access to this portal or organization for anonymous users.String
getBasemapGalleryGroupQuery()
Gets a query string that can be used to find the group containing web maps for display in a gallery of basemaps.String
getBingKey()
Gets the Bing key to use for web maps that use Bing Maps.Calendar
getCreated()
Gets the date the organization was created.String
getCulture()
Gets locale information for the organization (language-country, for example "en-us").String
getCurrentVersion()
Returns the current version property specified with this PortalInfo's JSON.String
getCustomBaseUrl()
Gets the custom base URL for this portal.Basemap
getDefaultBasemap()
Gets default basemap of the portal/organization.Envelope
getDefaultExtent()
Gets the default extent to be used by the client application when creating new maps.Basemap
getDefaultVectorBasemap()
Gets the default vector basemap of the portal/organization.String
getDeveloperBasemapGalleryGroupQuery()
Gets a query that identifies the group containing developer basemaps.List<String>
getFeaturedGroupsQueries()
Gets a list of query strings that can be used to find the featured groups for the organization.String
getFeaturedItemsGroupQuery()
Gets a query string that can be used to find the group containing featured items.HelperServices
getHelperServices()
Gets information about helper services that are provided by the Portal.int
getHomePageFeaturedContentCount()
Gets the number of items to show per page for the featured content screens (max=100).String
getHomePageFeaturedContentGroupQuery()
Gets a query string that can be used to find the group containing featured content to be displayed on the home page.String
getIpCountryCode()
Gets the country code of the calling IP.LicenseInfo
getLicenseInfo()
Deprecated.As of 100.7.0, the LicenseInfo should be retrieved fromPortal.fetchLicenseInfoAsync()
to ensure that the LicenseInfo has the correct user entitlements and extensions.String
getLivingAtlasGroupQuery()
Gets the query that identifies the group containing the Living Atlas layers.Calendar
getModified()
Gets the date the organization was last modified.String
getOrganizationDescription()
Gets the description of the organization.String
getOrganizationId()
Gets the ID of the organization, if the user belongs to one.String
getOrganizationName()
Gets the name of the organization.String
getOrganizationThumbnailFileName()
Gets the filename of the thumbnail for the organization.Portal
getPortal()
Gets the portal this object belongs to.Portal.Mode
getPortalMode()
Gets the tenancy mode of this portal.String
getPortalName()
Gets the name of this portal.String
getPortalThumbnailFileName()
Gets the filename of the thumbnail for this portal.String
getReadOnlyMessage()
Gets the read-only message.String
getStylesGroupQuery()
Gets a query that identifies a group of styles.SubscriptionInfo
getSubscriptionInfo()
Gets information about the portal user's subscription.String
getSymbolSetsGroupQuery()
Gets a query that identifies the symbol sets group.Map<String,Object>
getUnknownJson()
If this object was created from JSON, this method gets unknown data from the source JSON.Map<String,Object>
getUnsupportedJson()
If this object was created from JSON, this method gets unsupported data from the source JSON.String
getUrl()
Gets the complete URL of this portal.String
getUrlKey()
Gets the urlKey of this portal.String
getVectorBasemapGalleryGroupQuery()
Gets a query string that can be used to find the group containing web maps for display in a gallery of vector basemaps.boolean
isAllSsl()
Indicates if the organization is using SSL.boolean
isCanSearchPublic()
Indicates if members of the organization can search outside of the organization.boolean
isCanShareBingPublic()
Indicates if the Bing key can be shared to the public.boolean
isCanSharePublic()
Indicates if members of the organization can share resources outside of the organization.boolean
isCommentsEnabled()
Indicates if users are allowed to view and add comments on portal items.boolean
isPKCESupported()
Returns a boolean that defines if PKCE (proof key code exchange) is supported with this portal.boolean
isPortal()
Indicates if this portal is on premise or online.boolean
isReadOnly()
Indicates if the portal is currently in read-only mode.boolean
isShowHomePageDescription()
Indicates if the organization description should be shown on the home page.boolean
isSupportsOAuth()
Indicates if this portal supports OAuth authentication.String
toJson()
Serializes this object to a JSON string.boolean
useVectorBasemaps()
Indicates if the organization uses the Esri vector basemaps in supported ArcGIS apps.
-
-
-
Method Detail
-
fromJson
public static PortalInfo fromJson(String json, Portal portal)
Creates a PortalInfo instance from a JSON string.- Parameters:
json
- a JSON string that represents a PortalInfoportal
- the Portal object for use by the PortalInfo- Returns:
- a PortalInfo instance
- Throws:
IllegalArgumentException
- if portal is null or json is null or empty- Since:
- 100.0.0
-
toJson
public String toJson()
Description copied from interface:JsonSerializable
Serializes this object to a JSON string. Note that unknown JSON is omitted from the serialized string.- Specified by:
toJson
in interfaceJsonSerializable
- Returns:
- a JSON string
-
getUnknownJson
public Map<String,Object> getUnknownJson()
Description copied from interface:JsonSerializable
If this object was created from JSON, this method gets unknown data from the source JSON. Unknown JSON is a Map of values that were in the source JSON but are not known by the Runtime and therefore not exposed in the API.- Specified by:
getUnknownJson
in interfaceJsonSerializable
- Returns:
- an unmodifiable Map containing unknown JSON data. The keys are Strings containing names. The types of
the values depend on the types of tokens within the JSON as follows:
- a
Map<String, Object>
represents an object in the JSON - a
List<Object>
represents an array in the JSON - a
String
represents a string in the JSON - a
Double
represents a number in the JSON - a
Boolean
represents true or false in the JSON null
represents null in the JSON
- a
-
getUnsupportedJson
public Map<String,Object> getUnsupportedJson()
Description copied from interface:JsonSerializable
If this object was created from JSON, this method gets unsupported data from the source JSON. Unsupported JSON is a Map of values that are supported by webmaps and known to the version of the webmap specification the API supports (see system requirements), but are not explicitly exposed through the Runtime API.- Specified by:
getUnsupportedJson
in interfaceJsonSerializable
- Returns:
- an unmodifiable Map containing unsupported JSON data. The keys are Strings containing names. The types of
the values depend on the types of tokens within the JSON as follows:
- a
Map<String, Object>
represents an object in the JSON - a
List<Object>
represents an array in the JSON - a
String
represents a string in the JSON - a
Double
represents a number in the JSON - a
Boolean
represents true or false in the JSON null
represents null in the JSON
- a
-
getAccess
public PortalInfo.Access getAccess()
Gets the level of access to this portal or organization for anonymous users.- Returns:
- the access level of this portal or organization
- Since:
- 100.0.0
- See Also:
PortalInfo.Access
-
getBasemapGalleryGroupQuery
public String getBasemapGalleryGroupQuery()
Gets a query string that can be used to find the group containing web maps for display in a gallery of basemaps.This query is intended for use when
useVectorBasemaps()
is false.- Returns:
- query string to find the basemap gallery group
- Since:
- 100.0.0
-
getBingKey
public String getBingKey()
Gets the Bing key to use for web maps that use Bing Maps.- Returns:
- the Bing key
- Since:
- 100.0.0
-
getCreated
public Calendar getCreated()
Gets the date the organization was created.- Returns:
- the date the organization was created; always a GregorianCalendar using UTC time zone and English locale, or null if no user is logged in
- Since:
- 100.0.0
-
getCulture
public String getCulture()
Gets locale information for the organization (language-country, for example "en-us").- Returns:
- locale information for the organization
- Since:
- 100.0.0
-
getCustomBaseUrl
public String getCustomBaseUrl()
Gets the custom base URL for this portal. This is the portion of the host component of the URL that identifies a specific organization subscription within the portal. ThegetUrl()
method combines this with the urlKey to provide a complete URL.- Returns:
- the custom base URL
- Since:
- 100.0.0
-
getDefaultBasemap
public Basemap getDefaultBasemap()
Gets default basemap of the portal/organization.- Returns:
- a Basemap object containing the default basemap, or null if none
- Since:
- 100.0.0
- See Also:
Basemap
-
getDefaultExtent
public Envelope getDefaultExtent()
Gets the default extent to be used by the client application when creating new maps.- Returns:
- an Envelope object containing the default extent for new maps, or null if none
- Since:
- 100.0.0
- See Also:
Envelope
-
getDeveloperBasemapGalleryGroupQuery
public String getDeveloperBasemapGalleryGroupQuery()
Gets a query that identifies the group containing developer basemaps.This expression can be used as the query string parameter to find the group that contains the developer basemaps of the
Portal
. Developer basemaps are basemaps that are accessible and metered via API keys.- Returns:
- a query that identifies the group containing developer basemaps
- Since:
- 100.12.0
- See Also:
Portal.fetchDeveloperBasemapsAsync()
-
getFeaturedGroupsQueries
public List<String> getFeaturedGroupsQueries()
Gets a list of query strings that can be used to find the featured groups for the organization. Each string specifies the title and owner of a group and sometimes also the ID of the group.- Returns:
- an unmodifiable list of query strings to find the featured groups. This will throw an UnsupportedOperationException if an attempt is made to modify it.
- Since:
- 100.0.0
- See Also:
PortalQueryParameters
-
getFeaturedItemsGroupQuery
public String getFeaturedItemsGroupQuery()
Gets a query string that can be used to find the group containing featured items.- Returns:
- query string to find the featured items group
- Since:
- 100.0.0
- See Also:
PortalQueryParameters
-
getHelperServices
public HelperServices getHelperServices()
Gets information about helper services that are provided by the Portal.- Returns:
- helper services information
- Since:
- 100.0.0
- See Also:
HelperServices
-
getHomePageFeaturedContentGroupQuery
public String getHomePageFeaturedContentGroupQuery()
Gets a query string that can be used to find the group containing featured content to be displayed on the home page.- Returns:
- query string to find the home page featured content group
- Since:
- 100.0.0
- See Also:
PortalQueryParameters
-
getHomePageFeaturedContentCount
public int getHomePageFeaturedContentCount()
Gets the number of items to show per page for the featured content screens (max=100).- Returns:
- the number of featured items to show per page
- Since:
- 100.0.0
-
getIpCountryCode
public String getIpCountryCode()
Gets the country code of the calling IP.- Returns:
- the IP country code
- Since:
- 100.0.0
-
getLicenseInfo
@Deprecated public LicenseInfo getLicenseInfo()
Deprecated.As of 100.7.0, the LicenseInfo should be retrieved fromPortal.fetchLicenseInfoAsync()
to ensure that the LicenseInfo has the correct user entitlements and extensions.Gets a LicenseInfo object that can be used to authenticate the ArcGIS Runtime.- Returns:
- a LicenseInfo object, or null if no user is logged in or there is no license information available
- Since:
- 100.0.0
- See Also:
LicenseInfo
-
getLivingAtlasGroupQuery
public String getLivingAtlasGroupQuery()
Gets the query that identifies the group containing the Living Atlas layers. This expression should be used as the query string parameter to find the group.- Returns:
- the query string that identifies the Living Atlas group
- Since:
- 100.7.0
- See Also:
Portal.findGroupsAsync(com.esri.arcgisruntime.portal.PortalQueryParameters)
,PortalQueryParameters
-
getModified
public Calendar getModified()
Gets the date the organization was last modified.- Returns:
- the date the organization was last modified; always a GregorianCalendar using UTC time zone and English locale, or null if no user is logged in
- Since:
- 100.0.0
-
getOrganizationDescription
public String getOrganizationDescription()
Gets 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, or null in the case of non-organizational users of ArcGIS Online or a multi-tenant portal
- Since:
- 100.0.0
-
getOrganizationId
public String getOrganizationId()
Gets the ID of the organization, if the user belongs to one.- Returns:
- the ID of the organization, or null if the user does not belong to one
- Since:
- 100.0.0
-
getOrganizationName
public String getOrganizationName()
Gets 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, or null in the case of non-organizational users of ArcGIS Online or a multi-tenant portal
- Since:
- 100.0.0
-
getOrganizationThumbnailFileName
public String getOrganizationThumbnailFileName()
Gets the filename of the thumbnail for the organization.- Returns:
- the filename of the organization thumbnail, or null if there is none
- Since:
- 100.0.0
-
getPortal
public Portal getPortal()
Gets the portal this object belongs to.- Returns:
- the portal this object belongs to
- Since:
- 100.0.0
-
getPortalMode
public Portal.Mode getPortalMode()
Gets the tenancy mode of this portal.- Returns:
- the tenancy mode of this portal
- Since:
- 100.0.0
- See Also:
Portal.Mode
-
getPortalName
public String getPortalName()
Gets the name of this portal.- Returns:
- the name of this portal
- Since:
- 100.0.0
-
getPortalThumbnailFileName
public String getPortalThumbnailFileName()
Gets the filename of the thumbnail for this portal.- Returns:
- the filename of the portal thumbnail, or null if there is none
- Since:
- 100.0.0
-
getReadOnlyMessage
public String getReadOnlyMessage()
Gets the read-only message. If the portal is currently in read-only mode, this is an explanatory message that can be displayed to the user. It will be null ifisReadOnly()
is false.- Returns:
- the read-only message, or null if none
- Since:
- 100.9.0
-
getStylesGroupQuery
public String getStylesGroupQuery()
Gets a query that identifies a group of styles. Each style contains references to symbols that can be used in the ArcGIS platform.This expression can be used as the query string parameter to find the styles group. Instead of providing your own query, you can use the helper method
Portal.fetchStylesAsync()
to fetch the items in the styles group.- Returns:
- a query that identifies a group of styles
- Since:
- 100.12.0
- See Also:
Portal.findGroupsAsync(PortalQueryParameters)
,PortalQueryParameters
-
getSubscriptionInfo
public SubscriptionInfo getSubscriptionInfo()
Gets information about the portal user's subscription.- Returns:
- the subscription information, or null if the portal is accessed anonymously
- Since:
- 100.9.0
-
getSymbolSetsGroupQuery
public String getSymbolSetsGroupQuery()
Gets a query that identifies the symbol sets group.This expression can be used as the query string parameter to find the symbol sets group. Instead of providing your own query, you can use the helper method
Portal.fetchSymbolSetsAsync()
to fetch the items in the symbol sets group.- Returns:
- a query that identifies the symbol sets group
- Since:
- 100.12.0
- See Also:
Portal.findGroupsAsync(PortalQueryParameters)
,PortalQueryParameters
-
getUrl
public String getUrl()
Gets the complete URL of this portal. This includes the urlKey and the customBaseUrl, giving a complete URL such ashttp://<urlKey>.<customBaseUrl>/
- Returns:
- the complete URL of this portal
- Since:
- 100.0.0
-
getUrlKey
public String getUrlKey()
Gets the urlKey of this portal. This is the prefix selected by the organization administrator to be used with the customBaseUrl. ThegetUrl()
method combines this with the customBaseUrl to provide a complete URL.- Returns:
- the urlKey of this portal
- Since:
- 100.0.0
-
getDefaultVectorBasemap
public Basemap getDefaultVectorBasemap()
Gets the default vector basemap of the portal/organization.- Returns:
- a Basemap object containing the default vector basemap, or null if none
- Since:
- 100.6.0
-
getVectorBasemapGalleryGroupQuery
public String getVectorBasemapGalleryGroupQuery()
Gets a query string that can be used to find the group containing web maps for display in a gallery of vector basemaps.This query is intended for use when
useVectorBasemaps()
is true.- Returns:
- query string to find the vector basemap gallery group
- Since:
- 100.6.0
-
useVectorBasemaps
public boolean useVectorBasemaps()
Indicates if the organization uses the Esri vector basemaps in supported ArcGIS apps.- Returns:
- true if the organization uses Esri vector basemaps
- Since:
- 100.6.0
-
isAllSsl
public boolean isAllSsl()
Indicates if the organization is using SSL. If true, all calls made against resources that belong to the organization will require SSL.- Returns:
- true if access should be made over SSL
- Since:
- 100.0.0
-
isCanSearchPublic
public boolean isCanSearchPublic()
Indicates if members of the organization can search outside of the organization. When true, public items, groups and users are included in search queries. When false, no items outside of the organization are included. However, public items which are part of the organization are included.- Returns:
- true if public items outside of the organization are included in search queries
- Since:
- 100.0.0
-
isCanShareBingPublic
public boolean isCanShareBingPublic()
Indicates if the Bing key can be shared to the public. If the portal is accessed anonymously, this property will always be false.- Returns:
- true if Bing key can be shared to the public
- Since:
- 100.0.0
-
isCanSharePublic
public boolean isCanSharePublic()
Indicates if members of the organization can share resources outside of the organization.- Returns:
- returns true if public sharing is allowed
- Since:
- 100.0.0
-
isCommentsEnabled
public boolean isCommentsEnabled()
Indicates if users are allowed to view and add comments on portal items.- Returns:
- true if users are allowed to view and add comments on portal items
- Since:
- 100.0.0
-
isPortal
public boolean isPortal()
Indicates if this portal is on premise or online.- Returns:
- true for an on premise portal
- Since:
- 100.0.0
-
isReadOnly
public boolean isReadOnly()
Indicates if the portal is currently in read-only mode.- Returns:
- true if the portal is currently in read-only mode
- Since:
- 100.9.0
- See Also:
getReadOnlyMessage()
-
isShowHomePageDescription
public boolean isShowHomePageDescription()
Indicates if the organization description should be shown on the home page.- Returns:
- true if organization description should be shown on the home page
- Since:
- 100.0.0
-
isSupportsOAuth
public boolean isSupportsOAuth()
Indicates if this portal supports OAuth authentication.- Returns:
- true if OAuth authentication is supported
- Since:
- 100.0.0
-
fetchOrganizationThumbnailAsync
public ListenableFuture<byte[]> fetchOrganizationThumbnailAsync()
Executes an asynchronous operation to fetch the thumbnail for the organization. The result is a byte[] containing the thumbnail data, or null if there is no thumbnail for the organization.- Returns:
- a ListenableFuture for tracking when the operation is done and getting the result; also allows
cancellation. Calling
get()
on the returned future may throw an ExecutionException with its cause set to an exception as follows:IOException
if the network request fails
- Since:
- 100.0.0
-
fetchPortalThumbnailAsync
public ListenableFuture<byte[]> fetchPortalThumbnailAsync()
Executes an asynchronous operation to fetch the thumbnail for this portal. The result is a byte[] containing the thumbnail data, or null if there is no thumbnail for this portal.- Returns:
- a ListenableFuture for tracking when the operation is done and getting the result; also allows
cancellation. Calling
get()
on the returned future may throw an ExecutionException with its cause set to an exception as follows:IOException
if the network request fails
- Since:
- 100.0.0
-
getCurrentVersion
public String getCurrentVersion()
Returns the current version property specified with this PortalInfo's JSON.- Returns:
- portal's current version
- Since:
- 100.12.0
-
isPKCESupported
public boolean isPKCESupported()
Returns a boolean that defines if PKCE (proof key code exchange) is supported with this portal. PKCE is supported for portal version 10.9 and higher if OAuth is supported.- Returns:
- a boolean that defines if PKCE is supported with this portal
- Since:
- 100.12.0
-
-